Command line interface for IBM Business Automation Insights for a server
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
- Starts the Docker containers that are bound to the Business Automation Insights services.
- Creates the volumes for the Flink job manager and task manager, and for Elasticsearch and for Kafka by using the values of the FLINK_VOLUME_DIR, ELASTICSEARCH_VOLUME_DIR, and KAFKA_VOLUME_DIR variables, which are specified in the .env file.
- --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.
- You can choose a silent installation by providing the response-file.txt
response file.
For more information about the response file, see Installing on a server silently../bin/bai-start --init < ./response-file.txt
- --savepoint-paths
- If you specify the --savepoint-paths option, the bai-start
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, as documented
in the Creating savepoints for running processors: bai-flink-create-savepoints section later in this
page.
./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.
./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.