cli.md 1.81 KB
Newer Older
jeremy's avatar
jeremy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Bonita Continuous Delivery CLI

This is a command-line tool for Bonita Continuous Delivery.

## Install

The CLI is provided as a Python package. Install the package locally as follows:

```
$ cd cli
$ pip install --user .
```

This will make the `bcd` command available under `$HOME/.local/bin`.

Basically make sure to add `$HOME/.local/bin` to your `PATH` environment variable in order to make your environment aware of the `bcd` command.


## Usage

The `bcd` command takes a mandatory option called `scenario` through the `-s / --scenario` command line option.

Then the `bcd` command provides the following subcommands in order to drive Bonita Continuous Delivery module:
```
Usage: bcd [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

  Bonita Continuous Delivery CLI.

Options:
  -s, --scenario PATH    YAML scenario file (required)
  -y, --yes              Execute action without confirmation prompt
  -v, --verbose          Enable Ansible verbose mode
  -e, --extra-vars TEXT  Extra vars for Ansible (multiple) - Variables are
                         passed using the key=value syntax.
  -h, --help             Show this help message

Commands:
  status     Show the platform status
  create     Create AWS instances
  deploy     Deploy Bonita stack
  undeploy   Undeploy Bonita stack
  destroy    Destroy AWS machines (EC2 instances)
```

### Examples

```
$ bcd -s scenarios/uswest2_cluster.yml create

$ bcd -s scenarios/vagrant_single.yml -e lic_request=no -y deploy

$ bcd -s scenarios/uswest2_performance.yml destroy --dry-run
```

### 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.

For example:
```
61
$ bcd -s scenarios/uswest2_cluster.yml -y create deploy
jeremy's avatar
jeremy committed
62
```