Skip to content

HOWTO: Running the tool for the first time

ibmcb edited this page Mar 4, 2014 · 36 revisions

The first time the tool is run, an experiment containing a simulated cloud, designated "MYSIMCLOUD" is automatically initiated. It is used just to confirm that the tool's main components (e.g., Object Store, Metric Store) are up and running before any interaction with a real cloud starts.

The tool reads all configuration parameters from a file name _cloud_definitions.txt (or cloud_definitions.txt, in case it does not find the former) located on the configs directory.

IMPORTANT: If, and only if, your CBTOOL Orchestrator Node has more than one network interface, please open your cloud configuration file and change the attribute "MANAGER_IP = $IP_AUTO" to the actual IP address of the interface that has access to the network that is used to contact the VMs that will be created.

To run the tool's CLI, type cb. The aforementioned file, will automatically "attach" the simulated cloud "MYSIMCLOUD", which means that the commands cldattach sim MYSIMCLOUD, to initialize the cloud and vmcattach all, to register 4 "cloud regions" (with 5 simulated hosts per region) is automatically executed.

Since the first execution includes the startup of both a Redis and MongoDB server, it is not unusual that it takes a couple of minutes (2 or 3).

Here is an example execution (the simulated cloud name on the screenshots is TESTCLOUD instead of MYSIMCLOUD, but the command outputs are equivalent):

First Run

At this point you can create some simple simulated VMs with the command vmattach db2 or vmattach was. Make sure all simulated VMs are created with the command vmlist.

First VM attach

Now try to attach some "Virtual Applications" (VApps). The VApps are internally designated "Application Instances". For instance, here two VApps are added, one ibm_daytrader and one hadoop.

First AI attach

All *attach commands block the CLI during its execution. Since some commands (e.g., aiattach) can take quite a bit of time to complete, the keyword async can be appended at the end of the command to allow its execution in background. For instance, while deploying a DayTrader Virtual Application with the command aiattach daytrader would block the CLI for several minutes (depending on the cloud), the command aiattach daytrader async would return immediately, leaving a daemon executing the deployment in the background.

First AI attach async

To exit, use the exit command. You can exit and restart the tool at any moment; the data/state is stored on an Object Store (Redis server) that is accessed by the CLI. When the experiment is finished, use the command clddetach to make sure that no VMs were left behind on the cloud.

First clddetach

After this, you will see an empty prompt, (), indicating that there is no cloud attached to this experiment.

NEXT STEP: Proceed to the section [Preparing your cloud to be driven by CBTOOL] (https://github.com/ibmcb/cbtool/wiki/HOWTO:-Preparing-your-cloud-to-be-driven-by-CBTOOL)

Clone this wiki locally