Command line interface for IBM Business Automation Insights on a single node
New in 19.0.3 Use the command-line interface to interact with IBM Business Automation Insights services.
- Starting the services: bai-start
- Displaying the service logs: bai-logs
- Stopping the services: bai-stop
- Restarting the services: bai-stop + bai-start
- Exporting Kibana saved objects: bai-kibana-export-saved-objects
- Synchronizing Kibana configuration files: bai-kibana-synchronize-config
- Creating savepoints for running processors: bai-flink-create-savepoints
Exit code for commands
The commands return 0 on success or a non-zero value when an error occurred during execution.
Starting the services: bai-start
- --acceptLicense
- Each time you run the bai-start command, you must read the license agreement on the Software License Agreement and accept it by specifying the --acceptLicense option. If you omit to pass the --acceptLicense option, the bai-start command fails and a message prompts you to read the license.
- --init
- For a first installation, the --init option is mandatory to create all the
necessary certificate, keystore, and truststore that are used by the Business Automation Insights services. With this
option, the command also prompts you to enter the machine hostname, user name, and passwords to use
the administration services, Kafka, and the Kibana user interface.
For further restarts, the --init option is not necessary.
For a silent installation, you can provide the response-file.txt response file.
This response file starts with the hostname, after which each user and password are provided on a single line and followed by a new-line character, in this order../bin/bai-start --init < ./response-file.txthostname kafka-username kafka-password kibana-username kibana-password admin-username admin-password - --savepoint-paths
- If you specify the --savepoint-paths option, this command starts one or
multiple processors from an existing savepoint or from a checkpoint path by using a comma-separated
list of savepoint paths by processor name. The specified paths must be absolute and refer to
existing directories within the container of the job manager service. To retrieve those paths, run
the bai-flink-create-savepoints
command.
./bin/bai-start [--init] [--savepoint-paths="name1:path1,name2:path2,..."]
Displaying the service logs: bai-logs
./bin/bai-logs [service1 service2 service3 ...]Stopping the services: bai-stop
./bin/bai-stopRestarting the services: bai-stop + bai-start
To restart the Business Automation Insights services, run the bai-stop command and then the bai-start command. For further restarts, the --init option is not necessary.
Exporting Kibana saved objects: bai-kibana-export-saved-objects
- --path
- Use this option to specify an existing directory.
./bin/bai-kibana-export-saved-objects --path=<directory>Synchronizing Kibana configuration files: bai-kibana-synchronize-config
When you make changes in the Kibana user interface to define or edit roles, role mappings, or action groups, the changes are persisted in a specific Elasticsearch index but not in the YAML files of the ./config/kibana directory. The bai-kibana-synchronize-config command updates these YAML files with the latest changes that are persisted in that specific Elasticsearch index.
./bin/bai-kibana-synchronize-configCreating savepoints for running processors: bai-flink-create-savepoints
- --stop
- If you specify the --stop option, the processors are stopped after the savepoints are triggered.
- --savepoint-paths
- If you specify the --savepoint-paths option, this command starts one or
multiple processors from an existing savepoint or from a checkpoint path by using a comma-separated
list of savepoint paths by processor name. The specified paths must be absolute and refer to
existing directories within the container of the job manager service. To retrieve those paths, run
the bai-flink-create-savepoints
command.
./bin/bai-start [--init] [--savepoint-paths="name1:path1,name2:path2,..."]
./bin/bai-flink-create-savepoints [--stop]- Checkpoints
- Checkpoints are written to the
_volume_/flink/checkpoints/_flink_processor_id_
directory. In this path, the _volume_ placeholder takes the
value of the FLINK_VOLUME_DIR variable in the .env file and the
_flink_processor_id_ placeholder is the processor identifier
that created the savepoint or checkpoint. The
<bai-sn-installdir>/processors/running_processors_info
file contains the processor identifier by processor name for all the processors that were
successfully submitted.
Example: To start from a checkpoint for an ODM processor that was submitted with _flink_processor_id_
37e7559a707bbbf94e55d0a7960fb161and created in directory <bai-sn-installdir>/volumes/flink/checkpoints/37e7559a707bbbf94e55d0a7960fb161/chk-320, you specify bai-odm:/mnt/pv/checkpoints/37e7559a707bbbf94e55d0a7960fb161/chk-320 by using option --savepoint-paths. - Savepoints
- Savepoints are written to the
_volume_/flink/savepoints/dba/_processor_name_
directory. The _volume_ placeholder takes the value of the
FLINK_VOLUME_DIR variable in the .env file and
_processor_name_ is the name of the processor for which a
savepoint was triggered.
Example: To start from a savepoint that was created for the BPMN processor in directory <bai-sn-installdir>/volumes/flink/savepoints/dba/bai-bpmn/savepoint-2e1b81-4f1797568a0d, you specify bai-bpmn:/mnt/pv/savepoints/dba/bai-bpmn/savepoint-2e1b81-4f1797568a0d by using option --savepoint-paths. By default, if the --savepoint-paths option is not specified, the bai-start command restarts from the savepoints that were created by the bai-stop command for each running processor.