# 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-subscription_*.tar.gz` - (Mandatory) The Bonita Docker image archive - `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. ## 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 ``` ## 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.
bcd

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

livingapp

Manage Bonita Living Application

bcd livingapp [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

Options

-h, --help

Show this help message

build

Build Bonita Living Application

bcd livingapp build [OPTIONS]

Options

-p, --path <path>

Bonita Living Application workspace 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 livingapp deploy [OPTIONS]

Options

-p, --path <path>

Bonita Living Application file path

-X, --debug

Enable debug mode

-h, --help

Show this help message

stack

Manage Bonita stack (infrastructure)

bcd stack [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

Options

-h, --help

Show this help message

create

Create AWS instances

bcd stack 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 stack deploy [OPTIONS]

Options

-h, --help

Show this help message

destroy

Destroy AWS machines (EC2 instances)

bcd stack destroy [OPTIONS]

Options

-d, --dry-run

Show an execution plan only

-h, --help

Show this help message

status

Show the platform status

bcd stack status [OPTIONS]

Options

-h, --help

Show this help message

undeploy

Undeploy Bonita stack (removes Docker containers)

bcd stack undeploy [OPTIONS]

Options

-h, --help

Show this help message