Tosca is an emerging standard by Oasis for modeling distributed applications orchestration,.
vCloudAir is VMWare public cloud offering.
Cloudify let you automate the workflows on nodes modeled using the Tosca spec.

In this post, I will explain how you can run your first application orchestration on vCloudAir using Cloudify.

We will start by installing the cloudify CLI locally, then bootstrap a Cloudify manager and finally upload and deploy our web application blueprint on to the vCloudAir cloud using the manager.

A video that demonstrate this process can be seen at http://getcloudify.org/vmware-hybrid-cloud.html

To get started, you will need to have vCloudAir account credential for a subscription account (onDemand support will come soon).

In addition, you need to create a Ubuntu template that can support docker (version 14.04 or older with kernel upgrade).
Add to this template the ability to passwordless ssh into it by generating an ssh key and adding the ssh public key to the user .ssh/authorized_keys file.

We will start by installing the Cloudify command line tool (CLI):
1. Make sure you have Python 2.7 and pip package manager (if pip is not installed, please installing using these instructions: https://pip.pypa.io/en/latest/installing.html)
2. Install python virtualenv
pip install virtualenv
3. Create a new virtual environment
virtualenv yournewcfyenv
4. Cd into this new folder (“yournewcfyenv”)
5. Activate the virtual environment
source ./bin/activate
6. Install the Cloudify CLI
pip install cloudify
7. Run cfy –version to ensure the cli tool was successfully installed
c
After we have Cloudfy CLI installed, we want to deploy a Cloduify manager on to our vCloudAir cloud.
Cloudify is built using a pluggable architecture. Support for clouds is provided by a cloud specific plugin, which contains the manager blueprint – a blueprint that installs the Cloudify manager application the same way we will later install our application blueprint.

1. Get the vCloudAir cloud plugin from github
wget https://github.com/cloudify-cosmo/tosca-vcloud-plugin/archive/1.0m2.zip
unzip 1.0m2.zip

2. Go into the tosca-vcloud-plugin folder.
3. Under the manager_blueprint folder, edit the inputs.json .template file and complete all of the empty properties.

{
"vcloud_username": "",
"vcloud_password": "",
"vcloud_url": "https://vchs.vmware.com",
"vcloud_service": "<#########-####>",
"vcloud_vcd": "<#########-####>",
"manager_server_name": "",
"manager_server_catalog": "",
"manager_server_template": "",
"management_network_name": "",
"floating_ip_gateway": "<#########-####>",
"floating_ip_public_ip": "###.###.###.###",
"manager_private_key_path": "",
"agent_private_key_path": "<~/.ssh/vcloud.pem>"

}

4. Save it under the same name without the template suffix
5. To start the actual bootstrap run the following commands:
cfy init
cfy local install-plugins –p ./manager_blueprint/vcloud.yaml
cfy bootstrap –p ./manager_blueprint/vcloud.yaml –i ./manager_blueprint/inputs.json

6. You should see quite a long console output that should finish with an IP address of your newly created Cloudify manager.

Once the Cloudify manager is up, it is time to upload our blueprint, but first, we need to get it
1. Download the example blueprint
wget https://github.com/cloudify-cosmo/cloudify-nodecellar-docker-example/archive/vcloud-plugin.zip
unzip vcloud-demo.zip
2. Upload the blueprint to the manager
cfy blueprints upload –b myblueprint –p cloudify-nodecellar-docker-example/blueprint/docker-vcloud-blueprint.yamlnodecellar_create_deployment
3. Open the manager ip in a web browser nodecellar_deployment_completed(the ip can be obtained by running cfy status)
4. Select “myblueprint” blueprint and a topology view that describes the deployment is shown
5. Click the “create deployment” button
6. In the pop-up dialog fill all the fields and name the deployment.
7. Click deploy and the deployment will start its initialization process
8. Once it is done, select the install workflow inside the deployment view and the install workflow will start
9. When all nodes become green, you application is ready for viewing

 

 

 

In this post we went over a simple scenario of deploying a cloudify manager on vCloudAir and afterwards, upload a TOSCA inspired blueprint and deploy it to the cloud.

This allow you to model your devops procedures in an easy to read and maintain documents that can be executed using Cloudify on vCloudAir, vSphere as well as hybrid cloud environments.

* The Cloudify vCloudAir plugin is under development and this preview is considered an Alpha. In this version, each VM we assign a floating IP to (DNAT rule) holds exclusively this public IP. Therefore to have a manager and the blueprint VM running as explained above you will need at least two public IP that do not have any NAT rules defined. For the plugin release, we will remove this limitation and allow you to define port level NAT rules.
Advertisements
Link | This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s