This content originally posted as a technote by IBM support here.
Sometimes a single component is installed multiple times on the same agent. This is a pattern we have seen in a number of circumstances. Sometimes a service is installed once per customer that is accessing it, and a single (virtual) machine can manage the demand of several customers. Other times the component is installed twice to support a blue / green scenario. At any given time one copy is that backup of a previous version of the component while the other is live. While both versions are available directly for testing, only one version is exposed through a load balancer for production usage at time.
Regardless, the idea that a single version of a component is running on a box can fall down in a range of scenarios. So how do we add a single component multiple times while keeping track of the unique settings or purposes of each box. The instructions from the support team below help:
Proceed as follows:
- Create a component with a Resource property, as in the following example:
- 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):
- Create a Top-Level Group under Resources
- Add an Agent to the Top-Level Group
- Add two Resource Groups called Group1 and Group2 under the Agent
- Add the same Component MyComp twice, once under Group1 and once under Group2:
- Note that every time you add the Component, you are prompted to specify values for the
- Run the process. You will get results like the following:
- Note that the environment is reported to be compliant with 2/2 components deployed: