HOWTO: Use the NOOP cloud adapter - ibmcb/cbtool GitHub Wiki

  • While using the "NO Operation" (NOOP) cloud adapter, CBTOOL's basic mode of operation is to bypass actual VM creation altogether, just deploying and running applications on pre-created VMs instead.

  • Taking the detailed deployment timeline as a reference, a Virtual Application deployment by CBTOOL with NOOP cloud adapter will just start after step 5.

  • Since the VMs are not really instantiated by CBTOOL, the management metrics will contain mock numbers.

  • The NOOP adapter is useful in different situations: a) when testing the scripts for a new Virtual Application being developed, b) when deploying a Virtual Application on bare-metal hosts or c) when deploying a Virtual Application in a cloud that does not have an API that can be called by CBTOOL.

  • The main downside of the NOOP adapter is, evidently, the need to collect and supply CBTOOL with the appropriate IPs that will be used.

  • Here follows a simple example on how to use CBTOOL with the NOOP cloud adapter to deploy a netperf Virtual Application instance.

  1. Add the following lines to your private configuration file.
   CLOUDOPTION_TESTNOPCLOUD = cldattach nop, vmcattach all

   STARTUP_CLOUD = TESTNOPCLOUD

   [USER-DEFINED : CLOUDOPTION_TESTNOPCLOUD ]
   NOP_INITIAL_VMCS = ANY ARBITRARY NAME
   NOP_SSH_KEY_NAME = A KEY ALREADY PRESENT ON THE VMs/HOSTs WHERE THE APPLICATION WILL BE RUN
   NOP_LOGIN = A USER ALREADY CREATED ON THE VMs/HOSTs WHERE THE APPLICATION WILL BE RUN
  1. Manually create/prepare two VMs/Hosts. The CBTOOL automated installer can be helpful in this preparation (for instance, you can run ~/cbtool/install --wks netperf on both VMs/Hosts). Take note of the IPs for the VMs/Hosts (e.g., 10.10.0.8 for the VM with the "netserver" role and 10.10.0.7 for the VM with the "netclient" role).

  2. Start CBTOOL (e.g., ~/cbtool/cb --soft_reset)

  3. Supply the IPs for the VMs/Hosts during the new netperf Virtual Application instantiation by adding additional parameters to the command line: aiattach netperf netserver_cloud_ips=10.10.0.8,netclient_cloud_ips=10.10.0.7. In case of application with multiple VMs with the same role, such as hadoop, just add all IPs pertaining a given role separated by semi-colons (e.g., attach hadoop hadoopmaster_cloud_ips=10.20.80.31,hadoopslave_cloud_ips=10.20.80.33;10.20.80.34;10.20.80.36;10.20.80.32)

  • Please keep in mind that, after an aidetach in a NOOP cloud, there will be quite a bit of stateful application information left over on the VMs/Hosts. CBTOOL will kill and remove its own processes, but it will not remove files/directories/volumes.

  • WARNING: Do not attempt to deploy Virtual Application Submitter (VAppS) on a NOOP cloud. It will evidently fail, since each new individual Virtual Application (VApp) instantiation requires a set of IPs supplied by the user.