One of the neat features of UrbanCode Deploy with Patterns (UCDP) is the ability to deploy blueprints to multiple clouds. Last time around I wrote about hooking up UCDP to an OpenStack cloud. In this post I’ll look at how to setup UCDP to connect to Amazon EC2.
As with the last post I’ll go through one installation path, mostly providing relevant links to the UCDP Knowledge Centre and adding pictures/information where necessary:
– installing a new OpenStack HEAT engine with UCDP custom types
– install a new UCDP design server
– connect UCDP to AWS EC2
– connect UCDP to an existing instance of UCD 18.104.22.168
In other words the topology looks like this (taken from the UCDP Knowledge Centre):
1 installing a new OpenStack HEAT engine
I follow the steps in “Installing engines” , specifying the IP address of my OpenStack Keystone server and the tenant id of the administrative tenant on the OpenStack Cloud.
Now the engine installer also installs the “cloud discovery service” which uses my AWS access ID and secret key to retrieve information about EC2 resources. For the purposes of this post I just use the access keys from my AWS root account, obtained from the Security Credentials page in the AWS Management Console.
The engine installer adds the credentials to the
/etc/ibm-cloud-discovery.conf. It also adds a few dummy AMI ids to the image list section. So I edit this file and add a list of my own (real) AMI ids to it.
[credentials] access_id: ABC12345 secret_key: 67890DEF [images] image_list: [ "ami-8997afe0", "ami-8d667ce4", "ami-aede32c6" ]
I then fire up the discovery service with
python /opt/ibm/everglade/http/everglade_server.py &
only to have it fail with an error about non-existent EC2 Image Types , so I edit (“hack”?)
/usr/lib/python2.6/site-packages/libcloud/compute/drivers/ec2.py which has hard-coded sizes in it and removed non-existent instance_types from
This time the discovery service starts fine, identifying 3 images from EC2:
# python /opt/ibm/everglade/http/everglade_server.py &  15252 # Sat Jul 5 12:54:39 2014 Loading EC2 Images.. Please wait.. Identified 3 images from Amazon Identified 3 images from Amazon Sat Jul 5 12:54:39 2014 Everglade Server Started - :7575
2. install a new UCDP design server
I follow the instructions in Installing the design server, choosing to connect to an existing UCD server and specifying UCD connection details.
I also accept the default
"http://localhost:7575" for the URI for the cloud discovery service.
3. connect UCDP to AWS EC2
Once the UCDP design server starts up following the instructions at “Creating OpenStack Identity service authentication realms“, I login using “ucdpadmin/ucdpadmin”.
Click Settings > Users.
In the Type list, I select OpenStack Identity Service.
In the OpenStack Identity Service section the location of my identity service is “http://172.31.25.225:5000/v2.0/“.
I clear the Use default orchestration engine check box, and specify the location of my new HEAT engine, “http://172.31.16.210:8004“.
I specify the administrator user name, password, and tenant for my OpenStack server, click Save and then click Import User, to import users into UCDP.
To allow the “demo” OpenStack user to use UCDP features, I follow “Configuring teams” to add the user to the pre-existing “Internal Team” and grant it the “Admin” role.
I log out and log back in as the OpenStack “demo” user. Then I select the cloud system to use by clicking the current cloud at the top of the page, clicking Change Cloud Provider, and selecting the “Amazon EC2” cloud type.
Now when I start creating a new blueprint I can access and use EC2 resources from the various drawers in the palette on the right.
I chose to have the installer connect UCDP to UCD so I can also access and use components defined in UCD.
Finally I follow the instructions in the first step at “Connecting to IBM UrbanCode Deploy” to connect UCD to UCDP and can pick a UCDP blueprint when creating new environments in UCD.
So other than a minor hiccup, I was able to connect UrbanCode Deploy with Patterns to AWS to use EC2 resources fairly easily.