Deploying UrbanCode Deploy Blueprint Designer Cloud Applications Part 5 – Provisioning Your First Blueprint
In blog entry Part 4 we designed our first blueprint. Now we are finally at the point where we are ready to provision our first blueprint to an AWS EC2 cloud.
Configuring the Blueprint Provisioning
We are finally ready to execute the blueprint. In the upper left of the blueprint screen, select the Provision… button. A dialog window will appear to configure the provisioning. The first text box is the name of the application environment to create in UCD. By default, the name of application environment is the name of the blueprint file. The second text box is the name of the cloud project. This is greyed out and comes from the Keystone Identity project you used to connect to the AWS cloud. The third text box is a drop down asking to either create a configuration file or use an existing one. The configuration file will hold the provisioning parameters we are about to set. Select Create Configuration… . Another dialog window appears. For type select Configuration for Amazon (If you are connected to multiple cloud providers there will be multiple values from which to choose). Give the configuration file a name, a location, and a description. Refer to Figure 1.
Figure 1 – Creating a Provisioning Configuration File
Click Save. The original dialog window will present an option in blue text – Set the Parameter Values For This Environment. When this is clicked, you will be present with three options for parameters Agent Parameters, Image Parameters, and Network Parameters. These values represent parameter groups. Refer to Figure 2.
Figure 2 – Configure Provisioning Parameters
Click Agent Parameters. The first parameter is the UrbanCode Deploy Password. This can be either a token or a password. Next enter the UCD Relay URL, the UrbanCode Deploy Server URL, and the UCD User. If you have a token, leave the user default PasswordIsAuthToken. Refer to Figure 3.
Figure 3 – Configuring Agent Parameters
Next click Image Parameters. Enter the t2.micro for the Flavor and the select the Key Name for the AWS region. Refer to Figure 4.
Figure 4 – Configuring Image Parameters
Click Network Parameters. Under Availability Zone, select a zone. These are the AWS zones under the AWS cloud region to which you connected and Amazon limits what you can select. Make sure your key is defined in this zone. For Referenced Network, select the available network. Check Save changes to configuration file: <configuration file name>. Refer to Figure 5.
Figure 5 – Configure Network Parameters
Provisioning the Blueprint
When you click the Provision button on the dialog window the configuration file will be saved and you will be presented with a screen showing the progress of the provision as shown in Figure 6. The configuration file will be found in the Files drawer in the Menu bar on the left side of the browser page.
Figure 6 – Provisioning in Progress
Understanding the Provisioning Process
So what actually happened? First, the instance in Amazon was created. You can see it in the instances view in AWS.
Figure 7 – Provisioned Amazon Instance
As soon as the instance exists, the agent is downloaded to /tmp, installed silently into /opt/ibm-ucd, and started. If you log into the newly created Amazon instance you should see a java process running.
Figure 8 – Deploying the Agent
The provisioning creates resource tree is created in UCD.
Figure 9 – Provisioned Resource Tree in UCD
The application environment is created and is mapped to the environment view in the Blueprint Designer. Note the name of the application environment matches the Environment given on the provision dialog.
Figure 10 – Provisioned Application Environment
Finally the component is deployed.
Figure 11 – Component Process Request
Click on the View Request link to see the component process execution results.
Figure 12 – Component Process Execution
Tearing It All Down
In the Blueprint Designer, select Environments in the menu bar on the left. The page that opens shows a list of all of the current blueprint environments that currently exist. Selecting the trash can on the right side of a listed environment will destroy the provisioned environment. The provisioned AWS instance is terminated, the application environments and resource trees in UCD are deleted, but the component request remains.
Figure 13 – Provisioned Blueprint
The Blueprint Designer manages the creation and destruction of the environment. This means that it understands the VM(s) it created in the cloud. Because of this, users should avoid manually deleting VMs in Amazon (or any cloud) the Blueprint Designer creates. Take it from the writer who has done so. Upon destruction, BPD will think the instance is still there and fail on destruction leaving a stale environment in BPD. The only way to clear out the stale environment in BPD is to modify the application code temporarily (or permanently) which is out of scope and not supported.
David J. Arnone
is an ALM and DevOps Architect specializing in IBM CLM and UrbanCode Deploy solutions and services. As a certified Rational CLM Architect, David joined Zilker Technology in January, 2017 and is part of the growing Zilker DevOps practice team.David Arnone. View more blogs by David Arnone
Don't miss out! Get updates on new webcasts, events, and blogs.