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
4. Cd into this new folder (“yournewcfyenv”)
5. Activate the virtual environment
6. Install the Cloudify CLI
pip install cloudify
7. Run cfy –version to ensure the cli tool was successfully installed
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
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.
4. Save it under the same name without the template suffix
5. To start the actual bootstrap run the following commands:
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
2. Upload the blueprint to the manager
cfy blueprints upload –b myblueprint –p cloudify-nodecellar-docker-example/blueprint/docker-vcloud-blueprint.yaml
3. Open the manager ip in a web browser (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.