DOC: Configuration Objects - ibmcb/cbtool GitHub Wiki

Configuration Objects (also known as Global Objects) are used to customize the CBTOOL behavior for each specific environment, plus to alter the execution behavior while running experiments. These objects are basically a list of key-value pairs (in fact, they are internally implemented as Python dictionaries) that are stored on the Object Store (implemented in Redis as hashes).

At the beginning of a CBTOOL execution (or whenever the tool is started with the --soft_reset or --hard_reset command line option), the configuration objects are built by parsing multiple configuration files, stored on the ~/cbtool/configs/templates/ directory plus a "private" configuration file (by the default, CBTOOL looks for a file called (your username)_cloud_definitions.txt in ~/cbtool/configs). After all configuration objects are built by the combination of multiple files (the "private" configuration file is used to override any attribute described on any other files), each object is then stored on the Object Store (i.e., a Redis) server.

Configuration Objects

To check the contents of the configuration objects on the Object Store (i.e., after all overrides from the "private" configuration file are properly processed), use the command cldshow on the CLI. Please note that on the CLI, the Configuration Objects are called Global Objects. Some examples:

metricstore cli

vm_defaults cli

vm_templates cli

To alter any paramater on any configuration object before they are processed and stored on the Object Store, add it to your "private" configuration file. It is important to remember that, whenever a new attribute is added to this file, the whole configuration has to be re-processed (exactly like described in the diagram above) by re-executing CBTOOL's CLI binary with the reset options (~/cbtoo/cb --soft_reset or ~/cbtool/cb --hard_reset).

It is possible to alter any parameter on configuration object after these were processed, directly on the Object Store. This is highly useful during an experiment execution, as it can change CBTOOL's execution characteristics without having to restart it from scratch. To do so, use the command cldalter (configuration object name) on the CLI. For example, the attribute login on vm_defaults could be changed by:

cldalter_run