Manage continuous delivery in the dynamic cloud environment using IBM UrbanCode Deploy

Learn how to configure dynamic environments in IBM UrbanCode Deploy. Using the scenario DevOpsInACloud, explore how to use UrbanCode Deploy to dynamically change environments based on workload.

Share:

Ilaria Gorga (ilaria.gorga@it.ibm.com), Software Engineer , IBM

Author1 photoIlaria Gorga has worked as a software engineer in the IBM Tivoli Rome Lab since 2008. She has been on the Tivoli Workload Scheduler quality assurance team since 2010 and focuses on test automation optimization. Ilaria has written several other articles and presented at conferences, such as Eclipse-IT.



Fabio Barillari (fabio.barillari@it.ibm.com), Senior Software Engineer , IBM

Photo of BarillariFabio Barillari is a senior software developer and designer. He works as Quality Assurance Architect at IBM. He defined DevOps processes for IBM Workload Automation.



29 April 2014

Introduction

Learn how to configure dynamic environments in IBM® UrbanCode Deploy in the context of a continuous delivery solution. The solution is based on a real case study, the "DevOpsInACloud" scenario, which uses UrbanCode Deploy to create, update, and manage environments dynamically, based on workload.


Description of the DevOpsInACloud scenario

As shown in Figure 1, each DevOpsInACloud server environment is composed of two images of operating systems. One image is the primary node and the other is the secondary node. When a new server environment is needed, it can be dynamically created in the cloud, based on the requirements of the workload. These environments are maintained dynamically with UrbanCode Deploy.

Figure 1. DevOpsInACloud architecture
architecture

This article describes how to configure a dynamic environment in UrbanCode Deploy, so that each time a new server environment is created, it is automatically added to the UrbanCode Deploy environment.


Configure the UrbanCode Deploy agent on new environments

In a cloud environment, new environments are generated from the cloud image template. You can configure the UrbanCode Deploy agent on the newly provisioned environment in two ways:

  1. Start from a template without the UrbanCode Deploy agent installed. You can then install and configure the agent right after machine deployment.
  2. Start from a template with the UrbanCode Deploy agent pre-installed. You can then re-configure the agent name and the agent ID attributes before starting the agent. The name of the agent has to be configured using the following naming convention each time a new environment is created.
	<ENV_TYPE>_<NODE_TYPE>_<ENV_ID>
  • ENV_TYPE: Indicates the type of environment type (for example, QA or Production)
  • NODE_TYPE: Specifies whether this is a primary (P) or secondary (S) node
  • ENV_ID: Specifies a number (1 to n) that represents a particular environment

Use UrbanCode Deploy to configure dynamic environments

To configure UrbanCode Deploy so that the newly provisioned virtual machines are automatically added to the specific dynamic environment, use the following steps:

  1. Define a resource template.
  2. Define a top-level group resource.
  3. Define an application blueprint.
  4. Create the application environment.
  5. Configure the environment to dynamically manage the agents.

Step 1. Define a resource template

To define a new resource template in the UrbanCode Deploy server, click Resource > Resource Template to get the Resource Template shown in Figure 2.

  1. In the Primary nodes group define a new Agent Prototype and add the relative primary node components:
    1. Click Actions on the Primary nodes group row and click Add Agent Prototype.
    2. Click Actions on the Agent prototype row you just created and click Add Component.
  2. Repeat Step 1 to define the Secondary nodes group row.
Figure 2. Define a new resource in the resource template
Resource template from UrbanCode Deploy

Click to see larger image

Figure 2. Define a new resource in the resource template

Resource template from UrbanCode Deploy

Step 2. Define a top-level group resource

Define a new Top-Level Group resource in Resources. This group is the root of the environment.

As shown in Figure 3 in the Resource tab, click Create Top-Level Group resource and specify a name, for example, DevOpsInACloud_Group.

Figure 3. Top-level group resource definition
UrbanCode Deploy window to create a new resource

Step 3. Define an application blueprint

To define a new application blueprint:

  1. Click the Application tab and select your application.
  2. Click the Blueprints tab and then click Create New Blueprint.
  3. Specify a name for the blueprint and the name of the resource template defined previously, as shown in Figure 4.
Figure 4. Blueprint definition
UrbanCode Deploy tab to create a new blueprint

Click to see larger image

Figure 4. Blueprint definition

UrbanCode Deploy tab to create a new blueprint

Step 4. Create the application environment

To create a new application environment:

  1. Click the Application tab and select your application. In this case, the application is the DevOpsInACloud application.
  2. Click the Environments tab and then click Create New Environment
  3. As shown in Figure 5, specify:
    • Name: Type the name of the environment you want to create.
    • BluePrint: Select the blueprint created in Step 3.
    • Base Resource: Select the Top-Level Group resource. In this case, the group is the DevOpsInACloud_Group created in Step 2.
  4. Click Save to save the new environment.
Figure 5. Environment definition
UrbanCode Deploy window: Create a new environment

As soon as you save the new environment, you can find it in the list of application environments, as shown in Figure 6.

Figure 6. List of application environments
UrbanCode Deploy window lists defined environments

Click to see larger image

Figure 6. List of application environments

UrbanCode Deploy window lists defined environments

Step 5. Configure the environment to manage the agents

The environment is automatically created in the top-level group resource, but the environment is not automatically populated with the agents.

Figure 7. Application environment in the top-level group resource
UrbanCode Deploy Resources tab

To configure the groups (created in Step 2) to manage group members automatically, click the Resources tab and then:

  1. Find the group you want manage dynamically (for example Primary nodes group) and click the Edit resourceedit resource icon icon.
  2. Click Manage Members automatically and define a regular expression for the specific group.

In the DevOpsInACloud scenario, two groups are configured: Primary nodes group and Secondary nodes group.

In this example, Primary node group is specified as a regular expression based on the agent name. All of the agents with names that fit the pattern QA_P_.* are included in this group, as shown in Figure 8.

Figure 8. Resource group definition for primary nodes
Edit resource for the Primary nodes group

The Secondary node group is specified as a regular expression based on the agent name. All of the agents with names that fit the pattern QA_S_.* are included in this group as shown in Figure 9.

Figure 9. Resource group definition for secondary nodes
Edit resource for the Secondary nodes group

Automatically, the agents that are already installed are included in the environment.

The components specified in the specific agent prototype in the resource template (created in Step 1) are associated with the corresponding physical agents, as shown in Figure 10.

Figure 10. Result of resources configuration
Deploy resources tab for QA environment

Click to see larger image

Figure 10. Result of resources configuration

Deploy resources tab for QA environment

As soon as a new sub-environment QA is deployed, it is automatically included in the DevOpsInACloud environment and the correct components are associated to the agent.


Conclusion

To ensure continuous delivery solution in a cloud environment you need to manage environments that can change dynamically. In the DevOpsInACloud scenario, UrbanCode Deploy is used to dynamically create new environments based on workload.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into DevOps on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=DevOps
ArticleID=969785
ArticleTitle=Manage continuous delivery in the dynamic cloud environment using IBM UrbanCode Deploy
publish-date=04292014