Passing IBM Cloud Orchestrator parameters into Cloud Automation Manager

IBM Cloud Orchestrator user interface uses many OpenStack constructs of IBM Cloud Manager, such as flavors, regions, networks. As Cloud Automation Manager does not interact with IBM Cloud Manager directly, parameters are not readily available in Cloud Automation Manager. You must pass some additional parameters in the Business Process.

About the task

This procedure is an one time activity whenever you use an IBM Cloud Orchestrator offering for the first time.

Procedure

  1. Create a IBM Cloud Orchestrator cloud connection. For the steps, see Configuring IBM Cloud Orchestrator connection. After the cloud connection is created successfully, you can see all the IBM Cloud Orchestrator Offerings in the Service Composer.
  2. Find out the specific toolkit name in Business Process Manager that is referenced by your IBM Cloud Orchestrator offering. For example, Deploy Single Virtual Machine refers to SCONOVA toolkit in Business Process Manager.
  3. Go to IBM Business Process Manager process designer of your IBM Cloud Orchestrator.
  4. Open the Diagram tab of the specific Business Process.
  5. Drag and drop a new activity of type script on to the canvas next to the activity that gets the input parameter. For example, in Deploy Single Virtual Machine Business Process, drag and drop an activity between GetInputParameter and Initialization activities.
  6. Go to the Implementation tab of the new script activity and enter the following print statements:

    log.info("Printing logs for ICO-CAM - inputParameterObject: " + tw.local.inputParameterObject );
    
  7. Connect the output of GetInputParameter activity as an input for this new script activity and connect the output of this script activity as an input of the next activity in sequence.
  8. Save the process and launch the offering from IBM Cloud Orchestrator dashboard.

    Note: Introducing the script activity within the Business Process of an offering is an one time activity.

  9. For the above print statements, check the log at /home/opt/ibm/ico/BPM/v8.5/profiles/Node1Profile/logs/SingleClusterMember1/SystemOut.log location. An example result of parameters are as follows:

    For example:

    <variable type="VolumeManager[]">
       <item type="VolumeManager">
           <volume type="Volume">
               <status_type="String"></status>
               <display_name_type="String">
                     <![CDATA[param1]]>
               </display_name>
               <availability_zone type="String"></availability_zone>
               <Volume_type type="String"></volume_type>
               <id type="String"></id>
               <size type="Integer">
                    ![CDATA[1]>
               </size>
               <display_description type="String"></display_description>
               <attachments type="Volume_Attachment[]" />
               <firstAttachment type="Volume_Attachment" />
               <volumeMetadata type="String"></volumeMetadata>
               <attachmentData type="AttachVolumesToInstanceRequestData"
           </Volume>
           <iaasRegion type="String">
                <![CDATA[Param2]]>
           </iaasRegion>
           <availability_zone type="String">
                <![CDATA[Param3]]>
           </availability_zone>
           <image type="Image">
              <id type="String">
                  <![CDATA[param4]]>
              </id>
              <name type="String">
                 <![CDATA[param5]]>
              </name>
           </image>
       </item>
    </Variable>
    
  10. Search for this string inputParameterObject: in systemout.log and copy all the parameter values.

    Note: You need to take the values that are within CDATA. In this example, the parameter type in <iaasRegion type="String"> is iaasRegion and the value is "Param2" that is within CDATA. If there are nested parameters, then the format of representation in Cloud Automation Manager user interface is <parent>-<child>. For example, the id tag that is within the image is represented in Cloud Automation Manager as image-id.

  11. In the Service Composer, when you drag and drop the corresponding IBM Cloud Orchestrator offering as an activity in the middle canvas, these variables are displayed in the Parameters section on the right-hand side of the composer.
  12. Enter the values based on the parameter values you copied from systemout.log.