Unverified Commit f98e52ea authored by Truc Nguyen's avatar Truc Nguyen Committed by GitHub

Merge pull request #105 from bonitasoft/feat/add_licenses_subcommand

Add documentation about license management
parents 15b88dfb 46af7e15
...@@ -121,6 +121,66 @@ You can also see this information by running `bcd --help` and `bcd [SUBCOMMAND] ...@@ -121,6 +121,66 @@ You can also see this information by running `bcd --help` and `bcd [SUBCOMMAND]
<dd><p>Show the version and exit.</p> <dd><p>Show the version and exit.</p>
</dd></dl> </dd></dl>
<div class="section" id="bcd-license">
<h4>license</h4>
<p>Manage Bonita licenses</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre>bcd license <span class="o">[</span>OPTIONS<span class="o">]</span> COMMAND1 <span class="o">[</span>ARGS<span class="o">]</span>... <span class="o">[</span>COMMAND2 <span class="o">[</span>ARGS<span class="o">]</span>...<span class="o">]</span>...
</pre></div>
</div>
<p class="rubric">Options</p>
<dl class="option">
<dt id="cmdoption-bcd-license-h">
<code class="descname">-h</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--help</code><code class="descclassname"></code></dt>
<dd><p>Show this help message</p>
</dd></dl>
<div class="section" id="bcd-license-generate">
<h5>generate</h5>
<p>Request a license and get the license file</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre>bcd license generate <span class="o">[</span>OPTIONS<span class="o">]</span>
</pre></div>
</div>
<p class="rubric">Options</p>
<dl class="option">
<dt id="cmdoption-bcd-license-generate-k">
<code class="descname">-k</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--request-key</code><code class="descclassname"> &lt;request_key&gt;</code></dt>
<dd><p>Request key to generate the license</p>
</dd></dl>
<dl class="option">
<dt id="cmdoption-bcd-license-generate-o">
<code class="descname">-o</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--output-dir</code><code class="descclassname"> &lt;output_dir&gt;</code></dt>
<dd><p>Output directory path where the license file will be saved - Default to <cite>/tmp</cite></p>
</dd></dl>
<dl class="option">
<dt id="cmdoption-bcd-license-generate-h">
<code class="descname">-h</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--help</code><code class="descclassname"></code></dt>
<dd><p>Show this help message</p>
</dd></dl>
</div>
<div class="section" id="bcd-license-revoke">
<h5>revoke</h5>
<p>Revoke a license file</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre>bcd license revoke <span class="o">[</span>OPTIONS<span class="o">]</span>
</pre></div>
</div>
<p class="rubric">Options</p>
<dl class="option">
<dt id="cmdoption-bcd-license-revoke-p">
<code class="descname">-p</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--path</code><code class="descclassname"> &lt;path&gt;</code></dt>
<dd><p>Path to the license file to revoke</p>
</dd></dl>
<dl class="option">
<dt id="cmdoption-bcd-license-revoke-h">
<code class="descname">-h</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--help</code><code class="descclassname"></code></dt>
<dd><p>Show this help message</p>
</dd></dl>
</div></div>
<div class="section" id="bcd-livingapp"> <div class="section" id="bcd-livingapp">
<h4>livingapp</h4> <h4>livingapp</h4>
<p>Manage Bonita Living Application</p> <p>Manage Bonita Living Application</p>
......
...@@ -189,6 +189,7 @@ Example scenario files are provided in the **scenarios** directory, including: ...@@ -189,6 +189,7 @@ Example scenario files are provided in the **scenarios** directory, including:
- **uswest_performance.yml.EXAMPLE** - a scenario for both stack and living application management with AWS provisioning - **uswest_performance.yml.EXAMPLE** - a scenario for both stack and living application management with AWS provisioning
- **azure_northEurope.yml.EXAMPLE** - a scenario for both stack and living application management with Azure provisioning - **azure_northEurope.yml.EXAMPLE** - a scenario for both stack and living application management with Azure provisioning
- **build_and_deploy.yml.EXAMPLE** - a scenario for living application management only - **build_and_deploy.yml.EXAMPLE** - a scenario for living application management only
- **manage_licenses.yml.EXAMPLE** - a scenario for license management only
Use these examples to customize your scenario and save it with a `.yml` file extension. Use these examples to customize your scenario and save it with a `.yml` file extension.
......
# How to manage Bonita licenses
This tutorial describes how to manage Bonita licenses from the command line using BCD.
This feature lets you generate licenses programmatically for your Bonita Studio or Bonita Server.
## Prerequisites
To use this feature, you need to prepare a [scenario file](scenarios) with the following required information:
* [All Licensing variables](https://documentation.bonitasoft.com/bcd/${varVersion}/scenarios#toc4)
* [The following Bonita variables](https://documentation.bonitasoft.com/bcd/${varVersion}/scenarios#toc3)
* bonita_edition
* bonita_version
::: info
An example scenario is provided with the **scenarios/manage_licenses.yml.EXAMPLE** file with required variables to manage
Bonita licenses with BCD.
:::
## Generating a new license
You can generate a new license providing a **Request Key**. Read more about Bonita licenses and how to generate a request key on this [documentation page](https://documentation.bonitasoft.com/bonita/${bonitaDocVersion}/licenses#toc2).
::: info
The request key has to be generated on the host where your Bonita Studio or Bonita Server will be running.
:::
Assuming your request key is `(CIVpYDRB8bhouXdWadLY1M9TVctwYUYu)`, here is an example usage of the `bcd license generate` command:
```bash
$ bcd -s scenarios/euwest1_performance.yml -y license generate -k '(CIVpYDRB8bhouXdWadLY1M9TVctwYUYu)' -o /path/to/output_directory
```
::: warning
The output directory (`/path/to/output_directory` in the above example) is related to your BCD Controller Docker container.
In order to persist the generated licenses after exiting the BCD Controller, you may use a bind-mounted output directory. Still, you may copy your generated licenses while the BCD controller is running.
:::
## Revoking a license
You can revoke a Bonita license providing the path to a license file.
::: info
Revoking a license will make your license inactive and it will delete the license file you have provided.
This operation releases a _slot_ to generate a new license as authorized by your Bonita subscription.
:::
Here is an example usage of the `bcd license revoke` command:
```bash
$ bcd -s scenarios/euwest1_performance.yml -y license revoke -p /path/to/bonita_license_file.lic
```
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* [Using initialization scripts](custom_init.md) * [Using initialization scripts](custom_init.md)
* [Configuring REST API authorization](how_to_configure_rest_api_authorization.md) * [Configuring REST API authorization](how_to_configure_rest_api_authorization.md)
* [Enabling remote monitoring with JMX](how_to_enable_remote_monitoring_jmx.md) * [Enabling remote monitoring with JMX](how_to_enable_remote_monitoring_jmx.md)
* [Manage Bonita licenses](manage_bonita_licenses.md)
* [Manage Bonita Living Applications](_manage_living_application.md) * [Manage Bonita Living Applications](_manage_living_application.md)
* [Build a Living App repository](livingapp_build.md) * [Build a Living App repository](livingapp_build.md)
* [Manage Living App configuration](livingapp_manage_configuration.md) * [Manage Living App configuration](livingapp_manage_configuration.md)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment