# BCD command-line interface On this page you will find detailed information about the BCD CLI with usage examples and reference. ## Requirements * First, the `bcd` command requires that the **`BCD_HOME`** environment variable is set. By default `BCD_HOME` is set to `/home/bonita/bonita-continuous-delivery` in the controller container. * Next, the `bcd` command takes a mandatory option called `scenario` through the `-s / --scenario` command line option. This option expects an existing relative or absolute path to a [BCD YAML scenario](scenarios.md) file. The BCD scenario path can also be specified through the **`BCD_SCENARIO`** environment variable, hence allowing to skip the `-s / --scenario` command line option. * Finally, the BCD CLI expects to find Bonita version-specific dependencies in the **`$BCD_HOME/dependencies`** directory. This directory must contain: - `bonita-la-builder-*-exec.jar` - (Mandatory) The Bonita Living Application Builder library - `bonita-sp-*-maven-repository.zip` - (Optional) The Bonita Maven repository zip if required by your Living Application workspace. BCD dependencies may be retrieved as `bonitasoft/bcd-dependencies` Docker images and they must be mounted as volumes in the `$BCD_HOME/dependencies` directory. ## Usage examples Running the `create` subcommand of the `stack` command with scenario command-line option: ``` $ bcd -s scenarios/uswest2_cluster.yml stack create ``` Running the `deploy` subcommand of the `stack` command with scenario command-line option and overridden `mail_notification` variable: ``` $ bcd -s scenarios/vagrant_single.yml -e mail_notification=no -y stack deploy ``` Running the `destroy` subcommand of the `stack` command with `BCD_SCENARIO` environment variable and subcommand `--dry-run` option: ``` $ export BCD_SCENARIO=scenarios/uswest2_performance.yml $ bcd stack destroy --dry-run ``` Running the `build` subcommand of the `livingapp` command with `BCD_SCENARIO` environment variable and subcommand `-p` and `-e` options: ``` $ export BCD_SCENARIO=scenarios/euwest1_performance.yml $ bcd livingapp build -p path/to/livingapp-repo -e Qualification ``` Running the `version` command which does not require a scenario file: ``` $ bcd version ``` ## Multi command chaining The BCD CLI allows to invoke more than one command in one go. This is useful to chain commands as a pipeline. If one command fails then `bcd` stops executing any subsequent command it may have. **Examples**: Running `create` then `deploy` subcommands of the `stack` command: ``` $ bcd -s scenarios/uswest2_cluster.yml -y stack create deploy ``` Running `build` then `deploy` subcommands of the `livingapp` command: ``` $ bcd -s scenarios/vagrant_single.yml --yes \ livingapp build -p path/to/livingapp-repo -e Qualification deploy ``` ## Command-line reference This section describes the comprehensive usage information for the `bcd` command. You can also see this information by running `bcd --help` and `bcd [SUBCOMMAND] --help` - where SUBCOMMAND is in `[livingapp, stack]` - from the command line.
Bonita Continuous Delivery CLI.
bcd [OPTIONS] COMMAND [ARGS]...
Options
-v
,
--verbose
Enable Ansible verbose mode
-y
,
--yes
Execute action without confirmation prompt
--nocolor
Turn output colorization off
-s
,
--scenario
<scenario>
YAML scenario file path - Optional if BCD_SCENARIO environment variable is defined.
-e
,
--extra-vars
<extra_vars>
Extra vars for Ansible (multiple) - Variables are passed using the key=value syntax.
-h
,
--help
Show this help message
--version
Show the version and exit.
Manage Bonita licenses
bcd license [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Options
-h
,
--help
Show this help message
Request a license and get the license file
bcd license generate [OPTIONS]
Options
-k
,
--request-key
<request_key>
Request key to generate the license
-o
,
--output-dir
<output_dir>
Output directory path where the license file will be saved - Default to /tmp
-h
,
--help
Show this help message
Revoke a license file
bcd license revoke [OPTIONS]
Options
-p
,
--path
<path>
Path to the license file to revoke
-h
,
--help
Show this help message
Manage Bonita Living Application
bcd livingapp [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Options
-h
,
--help
Show this help message
Build Bonita Living Application
bcd livingapp build [OPTIONS]
Options
-p
,
--path
<path>
Bonita Living Application repository path
-e
,
--environment
<environment>
Name of the process configuration environment as defined in Bonita Studio
-X
,
--debug
Enable debug mode
-h
,
--help
Show this help message
Deploy Bonita Living Application
bcd livingapp deploy [OPTIONS]
Options
-p
,
--path
<path>
Bonita Living Application archive or directory path
-c
,
--configuration-path
<configuration_path>
Bonita configuration (.bconf) archive path
-X
,
--debug
Enable debug mode
-h
,
--help
Show this help message
Extract parameters from a Bonita configuration archive (.bconf)
bcd livingapp extract-conf [OPTIONS]
Options
-p
,
--path
<path>
Bonita configuration (.bconf) archive path
--without-value
Only extract parameters which do not have a value
-o
,
--output
<output>
Output file
-h
,
--help
Show this help message
Merge parameters into a Bonita configuration archive
bcd livingapp merge-conf [OPTIONS]
Options
-p
,
--path
<path>
Bonita configuration (.bconf) archive path
-i
,
--input
<input>
Input parameter file
-o
,
--output
<output>
Output file
-h
,
--help
Show this help message
Manage Bonita stack (infrastructure)
bcd stack [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Options
-h
,
--help
Show this help message
Create infra machines
bcd stack create [OPTIONS]
Options
-d
,
--dry-run
Show an execution plan only
-h
,
--help
Show this help message
Deploy Bonita stack (creates Docker containers)
bcd stack deploy [OPTIONS]
Options
-h
,
--help
Show this help message
Destroy infra machines
bcd stack destroy [OPTIONS]
Options
-d
,
--dry-run
Show an execution plan only
-h
,
--help
Show this help message
Show the platform status
bcd stack status [OPTIONS]
Options
-h
,
--help
Show this help message
Undeploy Bonita stack (removes Docker containers)
bcd stack undeploy [OPTIONS]
Options
-h
,
--help
Show this help message
Show BCD version information
bcd version [OPTIONS]
Options
-h
,
--help
Show this help message