IBM Support

How to add the same component multiple times under the same Top Resource

Question & Answer


Question

How do you add the same component multiple times under the same Top Level Resource, making sure that it has different resource properties in each case and that each instance is recorded in the Environment separately, using IBM UrbanCode Deploy v6.0.1?

Cause

You need to deploy the same component in multiple locations on the same target environment, but in each location it must have its own specific property values. When you examine the results of the deployment, you want to be able to detect that each instance of the component was added to the inventory.

Answer

ANSWER

Proceed as follows:

  1. Create a component with a Resource property, as in the following example:



  2. Create a Component Process of type Shell, that echoes that variable, as in the following screen shot (Note that code completion for variable names is available as of 6.0.1):



  3. Create a Top-Level Group under Resources

  4. Add an Agent to the Top-Level Group

  5. Add two Resource Groups called Group1 and Group2 under the Agent

  6. Add the same Component MyComp twice, once under Group1 and once under Group2:


  7. Note that every time you add the Component, you are prompted to specify values for the
    Resource properties:


  8. Run the process. You will get results like the following:


  9. Note that the environment is reported to be compliant with 2/2 components deployed:

[{"Product":{"code":"SS4GSP","label":"IBM UrbanCode Deploy"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General Information","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF022","label":"OS X"},{"code":"PF034","label":"Windows Mobile"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"6.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21661382