In a couple of previous posts, I described step-by-step how to deploy Rackspace Private Cloud v4.1.x powered by OpenStack Grizzly with nova-network and Rackspace Private Cloud v4.2.x powered by OpenStack Havana with Neutron Networking using Vagrant on top of VirtualBox or VMware Fusion.
Those posts are useful if you want to see each step to setup the environment. However, I frequently spin up fresh Rackspace Private Cloud environments, and it is much more convenient to have all the steps within the Vagrantfile so you can run vagrant up
, go make a sandwich, and come back to a multi-node Rackspace Private Cloud environment. Below are a handful of Vagrantfiles to do just this. This post will be continually updated with additional and up-to-date Vagrantfiles.
Before moving on, I recommend your workstation to have at least 2 physical CPUs and 8GB of RAM. If your workstation does not meet these recommended specifications, you can lower the amount of vCPUs and RAM assigned to each virtual machine in the Vagrantfile with the added risk of running into problems due to low resources.
Setup Vagrant
Download and install the latest version of Vagrant for your operating system.
Jump to either the Vagrant with VirtualBox or Vagrant with VMware Fusion section depending on what you want to use.
Using Vagrant with VirtualBox is free compared to using VMware Fusion which cost about $140.00 total.
Vagrant with VirtualBox
Download and install the latest version of VirtualBox for your operating system.
Once VirtualBox is installed, jump to the Rackspace Private Cloud Vagrantfiles section.
Vagrant with VMware Fusion
First, purchase ($59.99), download, and install the latest version of VMware Fusion 5 or 6.
In addition, purchase ($79.00) the Vagrant VMware Provider License from HashiCorp; you cannot use Vagrant with VMware Fusion without this license.
Second, once you have purchased the plugin, open Terminal, and install the Vagrant VMware Fusion Provider Plugin:
vagrant plugin install vagrant-vmware-fusion
HashiCorp should have emailed you the Vagrant VMware Fusion Provider License by now. License the provider with the following command (save the license in a safe place, Vagrant will copy the license to it’s own directory as well):
vagrant plugin license vagrant-vmware-fusion ~/Downloads/license.lic
Verify everything is working by running any of the Vagrant commands. An error message will be thrown if there is something wrong.
Once VMware Fusion and the Vagrant Provider License are installed, jump to the Rackspace Private Cloud Vagrantfiles section.
Rackspace Private Cloud Vagrantfiles
Create a directory somewhere on your workstation to save your Vagrantfile and change into that directory:
mkdir -p ~/Vagrant/rackspace-private-cloud
cd ~/Vagrant/rackspace-private-cloud
Run one of the following commands based on which version of Rackspace Private Cloud you want to install and what operating system you want to install it on top of:
Deploy Rackspace Private Cloud v4.2.2 on Ubuntu Server 12.04.4 LTS with Neutron Networking
curl https://raw.githubusercontent.com/jameswthorne/vagrantfiles-rpc/master/vagrantfile-rpcv422-ubuntu-neutron-networking.txt -o Vagrantfile
Deploy Rackspace Private Cloud v4.2.2 on Ubuntu Server 12.04.4 LTS with HA Neutron Networking
curl https://raw.githubusercontent.com/jameswthorne/vagrantfiles-rpc/master/vagrantfile-rpcv422-ubuntu-ha-neutron-networking.txt -o Vagrantfile
Deploy Rackspace Private Cloud v4.2.2 on CentOS 6.5 with Neutron Networking
curl https://raw.githubusercontent.com/jameswthorne/vagrantfiles-rpc/master/vagrantfile-rpcv422-centos-neutron-networking.txt -o Vagrantfile
Deploy Rackspace Private Cloud v4.2.2 on CentOS 6.5 with HA Neutron Networking
curl https://raw.githubusercontent.com/jameswthorne/vagrantfiles-rpc/master/vagrantfile-rpcv422-centos-ha-neutron-networking.txt -o Vagrantfile
Deploy Rackspace Private Cloud v4.1.5 on Ubuntu Server 12.04.4 LTS with nova-network
curl https://raw.githubusercontent.com/jameswthorne/vagrantfiles-rpc/master/vagrantfile-rpcv415-ubuntu-nova-network.txt -o Vagrantfile
Deploy Rackspace Private Cloud v4.1.5 on CentOS 6.5 with nova-network
curl https://raw.githubusercontent.com/jameswthorne/vagrantfiles-rpc/master/vagrantfile-rpcv415-centos-nova-network.txt -o Vagrantfile
Vagrant Up
You are now ready to deploy a Rackspace Private Cloud environment with “essentially” one command.
If you are using VirtualBox, simply run vagrant up
.
If you are using VMware Fusion, simply run vagrant up --provider vmware_fusion
.
Time to completion is roughly 30 minutes, but it largely depends on the speed of your internet connection.
Once you see the All Done! output from your terminal, proceed to the Next Steps section.
Next Steps
At this point, Rackspace Private Cloud should be installed. Now what?
If you deployed with nova-network, see the Spinning Up Your First Instance on Rackspace Private Cloud using nova-network post for the next steps to follow.
If you deployed with Quantum/Neutron Networking, see the Spinning Up Your First Instance on Rackspace Private Cloud using Quantum/Neutron Networking post for the next steps to follow.
Current Problems
The Vagrantfiles above rely on several external resources to create a Rackspace Private Cloud environment on your workstation. If any of these external resources are not accessible, the Vagrantfile may not build properly. 95% of the time the Vagrantfile is going to build without problems, but I have randomly encountered the following problems after running vagrant up
:
- curl download of the Chef Server Debian or RPM package stalls
- wget download of the Chef Client Debian or RPM package never completes
apt-get update
fails with hash sum mismatch- chef-client run fails at verify-system-status
git submodule update
could not resolve host github.com
A more significant problem with the Vagrantfiles using VMware Fusion is when the build gets to the part where the virtual machine’s NIC is added to an Open vSwitch Bridge. The moment this is done, Vagrant loses SSH connectivity to the virtual machine. I have not been able to figure out why this happens (it doesn’t occur when I only use VMware Fusion to create the virtual machines). I opened a GitHub Issue Ticket on the Vagrant GitHub repository that provides a test case. The only workaround I have right now is to remove that step within the Vagrantfiles and do it manually after the rest of the build completes.