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 theBCD_HOME
environment variable is set. By defaultBCD_HOME
is set to/home/bonita/bonita-continuous-delivery
in the controller container. -
Next, the
bcd
command takes a mandatory option calledscenario
through the-s / --scenario
command line option. This option expects an existing relative or absolute path to a BCD YAML scenario file. The BCD scenario path can also be specified through theBCD_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 or any of its subdirectories. BCD dependencies include:-
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. Since BCD 3.0.0, dependencies can be retrieved asquay.io/bonitasoft/bcd-dependencies:<bonita_version>
Docker images and they must be mounted as volumes in the$BCD_HOME/dependencies
directory. You can read more about in Common installation steps
-
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 Test
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 Test 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 [COMMAND] --help
- where COMMAND is in [license, livingapp, stack, version]
- from the command line.
bcd
Bonita Continuous Delivery CLI.
$ bcd [OPTIONS] COMMAND [COMMAND_OPTIONS] SUBCOMMAND [SUBCOMMAND_OPTIONS]...
Options
-s, --scenario <scenario>
YAML scenario file path - MANDATORY OPTION unless BCD_SCENARIO environment variable is defined.
-y, --yes
Execute action without confirmation prompt
-v, --verbose
Enable Ansible verbose mode
--nocolor
Turn output colorization off
-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.
license
Manage Bonita licenses
$ bcd [BCD_OPTIONS] license [OPTIONS] COMMAND [COMMAND_OPTIONS]
Options
-h,--help
Show this help message
generate
Request a license and get the license file
$ bcd [BCD_OPTIONS] license [LICENSE_OPTIONS] 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
livingapp
Manage Bonita Living Application
$ bcd [BCD_OPTIONS] livingapp [OPTIONS] COMMAND1 [COMMAND1_OPTIONS] [COMMAND2
[COMMAND2_OPTIONS]]
Options
-h, --help
Show this help message
build
Build Bonita Living Application
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] 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
Deploy Bonita Living Application
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] deploy [OPTIONS]
Options
-p, --path <path>
Bonita Living Application archive or directory path
-c, --configuration-path <configuration_path>
Bonita configuration (.bconf) archive path
--http-timeout <http_timeout>
(Default: 120) Timeout in seconds for HTTP interactions with Bonita stack. The transaction timeout of the platform should be increased accordingly.
--disable-certificate-check
Disable all certificate validation when connecting to a Bonita stack over HTTPS. This option may be used when a self-signed certificate is installed on the target Bonita stack
--development-mode
Deploy for development environments (eg. processes and profiles are replaced if existing, organization data are merged).
-X, --debug
Enable debug mode
-h, --help
Show this help message
extract-conf
Extract parameters from a Bonita configuration archive (.bconf)
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] 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-conf
Merge parameters into a Bonita configuration archive (.bconf)
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] 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
stack
Manage Bonita stack (infrastructure)
$ bcd [BCD_OPTIONS] stack [OPTIONS] COMMAND1 [COMMAND1_OPTIONS] [COMMAND2[COMMAND2_OPTIONS]]
Options
-h, --help
Show this help message
create
Create infra machines
$ bcd [BCD_OPTIONS] stack [STACK_OPTIONS] create [OPTIONS]
Options
-d, --dry-run
Show an execution plan only
-h, --help
Show this help message
deploy
Deploy Bonita stack (creates Docker containers)
$ bcd [BCD_OPTIONS] stack [STACK_OPTIONS] deploy [OPTIONS]
Options
-h, --help
Show this help message
destroy
Destroy infra machines
$ bcd [BCD_OPTIONS] stack [STACK_OPTIONS] destroy [OPTIONS]
Options
-d, --dry-run
Show an execution plan only
-h, --help
Show this help message