In my previous post, I described how you can deploy containers on your laptop using Nirmata and boot2docker. While deploying containers on your laptop is great for dev/test, you may want to deploy containers on your cloud resources as your application moves through your deployment pipeline. Nirmata makes this extremely easy via its policy based orchestration. The same application can be deployed on your laptop or on any of the supported clouds without any changes.
In this post, I will describe the steps to deploy containerized applications on VMWare vCloud Air.
Setup vCloud Air
- Create virtual data center (VDC)
- Add a public IP to the gateway and create a SNAT rule to allow virtual machines created in this VDC communicate with the internet
- Create firewall rule to allow outbound traffic.
- Add DNS Servers to your network. This needs to be done by selecting the network and clicking on “Manage in vCloud Air”.
Create VM Template
Note: you need to ensure that the selected operating system support Linux containers
- Next install docker. For instructions on installing docker, see https://docs.docker.com/installation/
- Once docker is installed, you can install Nirmata agent using the command:
sudo curl -sSL http://www.nirmata.io/nirmata-host-agent/setup-nirmata-agent.sh | sudo sh -s vcloud
Note: Prior to adding the vApp to Catalog, you can edit the VM properties to modify ‘Guest OS Customization’
Now you are ready to start using the VM template in Nirmata.
- In Nirmata, you need to create a cloud provider to allow Nirmata to access vCloud Air via the APIs. Go to Cloud Providers tab and click on Add Cloud Provider to launch the wizard. Select the cloud provider type as vCloud Air and in the Settings tab, provide the ‘Endpoint URL’, ‘Tenant Id’ (Organization name) and the credentials. You can find the Organization name in vCloud Director on Administration->Settings-General page. Click on Next to Validate the account access.
- Next, go to Host Groups section, click on vCloud Air tab and launch the Host Group Wizard.
- Select the previously created Cloud Provider and on the Settings page, select your VDC, VM template and flavor (VM type) to create the VMs.
- Once the wizard is completed, Nirmata will start creating the VMs based on the selected template.
Once the VMs start, they will connect to Nirmata SaaS and will be available to deploy applications. Now you can import existing application blueprints to create an application and deploy it to you vCloud Air VMs.
Take advantage of the $300 credit offered by VMWare vCloud Air to deploy containerized applications using Nirmata today!
If you are attending VMWorld 2015, come talk to us in the DevOps zone.