In the last few blogs post we have created ESXi .box templates, but in order to create a complete virtual lab using vagrant we will also need a vCenter Server Appliance virtual machine. The vCSA comes as a .ova template, so we will need to convert it to a vagrant-vmware-ovf .box template before we can use it with vagrant.
In this post we will need several packages installed, that we have covered in the last few posts:
If you followed the steps in one of the two previous posts, you have a ESXi .box template in the vagrant-vmware-ovf format. This format allows for deploying the exact same template to vCenter, vCloud Director or vCloud Air, by simply specifying a different provider in vagrant. This post will cover deploying to vCenter, since that is the most readily available of the three.
In this post we will again talk about the following helpful gosddc project:
In the previous post I demonstrated using packer to create a ESXi .box template on OS X with fusion and the vagrant vmware provider. Both of these pieces of software have a cost associated with their usage, so in this post I will demonstrate how to use CentOS 6.5 and ESXi for the same results.
In this post we will again talk about two helpful gosddc projects:
gosddc/packer-post-processor-vagrant-vmware-ovf. This repo contains a packer post processor that leverages VMware OVF Tool to create a vmware_ovf Vagrant box that is compatible with vagrant-vcloud, vagrant-vcenter and vagrant-vcloudair vagrant providers.
I’ve been recently working on using packer to create vagrant .box files rather than manually creating them as I documented in a previous post. For this post I will be using fusion and the vagrant vmware provider, each of which have an associated cost, but I will cover a free alternative using packer and CentOS in a future post.
Several github projects by gosddc have helped me in getting packer up and running on my Macbook:
In this post I’m setting out to explain how to create a CentOS 6.4 vm, from template, in vCHS (or a vCloud Director instance) and then install vagrant-vcloud on that.
1. Create a CentOS 6.x minimal virtual machine from a template in a vCHS organization. I will demonstrate creating a new CentOS vm in vCHS using a template, but you could just as easily create a new CentOS virtual machine from scratch in vCloud Director.
While continuing to explore what the vagrant-vsphere provider is capable of I came across the vagrant-vcloud provider, which had recently released a new version. I work for the vCHS operations group, so I figured it would be interesting to compare the feature differences of the vsphere & vcloud providers.
Over the next few blog posts I intend to cover the following vagrant-vcloud provider related topics:
Installing Vagant and the vagrant-vcloud plugin on a CentOS 6.
This post will cover configuring Vagrant to automatically run a Puppet manifest on the vm created by “vagrant up.” This capability allows you to test your Puppet manifests, make changes and test again, all quickly and easily. Let’s get started:
1. Create the Puppet manifest & modules we will be using for our Vagrant tests. For testing purposes we will be creating a Puppet manifest that ensures NTP is installed and is configured to use the following NTP servers:
This post will pick up where we left off by demonstrating more vagrant-vsphere provider settings using the CentOS template we customized in the last blog post. Let’s get started:
1. Create a new customization specification in the vSphere web client. This customization specification will allow us to set the hostname of the vm created by “vagrant up” to the same name as the virtual machine. Go to Home | Customization Specification Manager: Click the “Create a new specification” button: Select “Linux” for the “Target VM Operating System” and name the customization specification.
This post will continue our examination of using the vagrant-vsphere plugin, by customizing a CentOS template for integration with Vagrant. Having a Vagrant customize template will allow us to deploy this template and SSH to the cloned vm using the “vagrant ssh” command, as well automatically run puppet manifests when we deploy a vm using Vagrant. Let’s get started:
1. Ensure you have a DHCP server on the network you will be connecting the Vagrant deployed templates to.
Some readers might find this post to be a little “in the weeds” and cover details they are already familiar with. I struggled in my first attempts to get Vagrant working on CentOS, because I couldn’t find any good tutorials that covered the entire process. If you get bored with basic network configuration or have another preferred method for installing Ruby, please understand I’m trying to provide as much detail as possible to those without much linux experience.