Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

TOSCA Orchestration for VMware—Hybrid Cloud Made Simple

DZone's Guide to

TOSCA Orchestration for VMware—Hybrid Cloud Made Simple

· DevOps Zone
Free Resource

The Nexus Suite is uniquely architected for a DevOps native world and creates value early in the development pipeline, provides precise contextual controls at every phase, and accelerates DevOps innovation with automation you can trust. Read how in this ebook.

[This article was written by Yoram Weinreb.]

Cloudify VMware | TOSCA  Orchestration | VMware/OpenStack | OpenStack/VMware| VMware Hybrid Cloud | Hybrid Cloud | TOSCA

We've recently been working closely with VMware to make hybrid cloud a reality.  Most enterprise organizations choose a multi-cloud strategy for numerous reasons. They start with VMware and OpenStack for their private cloud environment and a combination of public cloud for dev/test or access capacity scenario. What's more, many large Telcos are also transitioning from costly hardware appliances into a virtualized data center (Network Functions Virtualization) based on a stack similar to that used by enterprises.

That's why it was an important target for Cloudify to be able to expand its already broad support of cross-cloud orchestration, to support VMware's virtualization and cloud offerings.

Cloudify's TOSCA orchestration for VMware allows you to transition and migrate workloads easily between your VMware infrastructure and any cloud - and back again, all with the same blueprint.


In this post, I will explain how you can run your first application orchestration on vCloud Air - VMware's public cloud offering -  using Cloudify to automate the workflows on nodes modeled using the TOSCA spec.

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

You can watch this video that demonstrates the implementation of this process step by step below.

To get started, you will need to have vCloud Air account credentials through a subscription account (on demand support will come soon).

In addition, you need to create an Ubuntu template that can support Docker (version 14.04 or older with kernel upgrade).  You will need to add to this template the ability for "passwordless SSH" by generating an SSH key, and then 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 installed (if pip is not installed, please do so using these instructions).

  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

After we have Cloudfy CLI installed, we want to deploy a Cloudify manager to our vCloud Air cloud. Cloudify is built using a pluggable architecture, where support for clouds is provided by a cloud-specific plugin, which contains the manager blueprint.  This is the blueprint that installs the Cloudify manager application in the same way we will later install our application blueprint.

  1. Get the vCloud Air 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 actually get it.

nodecellar_create_deployment nodecellar_deployment_completed

  1. Download the sample 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.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 (Figure 1)

  6. In the popup dialog fill in all the fields, and name the deployment.

  7. Click deploy, and the deployment will then start its initialization process.

  8. Once this is completed, select install workflow inside the deployment view, and the workflow will begin installing.

  9. When all nodes become green, your application is ready for viewing in the UI.

In this post we went over a simple scenario of deploying a Cloudify manager on vCloud Air and afterwards, uploading a TOSCA-based blueprint, and finally deploying it to the cloud.

This allows you to model your DevOps processes in a humanly readable format, maintain documents that can be executed using Cloudify on vCloud Air, vSphere, as well as hybrid cloud environments.

** Quick Note:**

The Cloudify vCloud Air plugin is currenly under development, and this preview is considered in Alpha. In this version, each VM was assigned a floating IP (DNAT rule) to exclusively hold this public IP. Therefore, to have a manager and the blueprint VM running as explained above, you will need at least two public IPs 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.

The DevOps Zone is brought to you in partnership with Sonatype Nexus.  See how the Nexus platform infuses precise open source component intelligence into the DevOps pipeline early, everywhere, and at scale. Read how in this ebook

Topics:

Published at DZone with permission of Cloudify Community, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}