So you may have realised by now that Cody and I wrote a book to help you all get up to speed with the ubiquitous Open Source Cloud Computing platform, OpenStack. Like any good tech book, it’s full of “At the time of writing…” which covers our ass when people type in things on newer versions. For OpenStack, this happens quite often and the recent release of Icehouse has seen some changes to what we presented in the book. To overcome some of the shortcomings of publishing we maintain scripts that follow the processes and commands in the book as much as possible. You can find these at our Git Repo @ https://github.com/OpenStackCookbook/OpenStackCookbook.
What you can do is checkout the supporting scripts and run a multi-node OpenStack setup using Git, Vagrant and VirtualBox.
Ensure you have
- the latest Vagrant from http://www.vagrantup.com/
- the latest VirtualBox from http://www.virtualbox.org/
- An internet connection
Also ensure you’ve something decent to run this all on. A PC or Mac with 8Gb should be enough – but my Mac has 16Gb and gets toasty so YMMV.
The Icehouse OpenStack Cookbook scripts also give you a suggestion to install vagrant-cachier. We use this to speed up installations of the VMs as we pull down a lot of packages when installing OpenStack.
To install vagrant-cachier (ensure you have Vagrant 1.5+) run the following:
vagrant plugin install vagrant-cachier
The Icehouse Vagrant scripts have been updated to use Ubuntu’s latest and greatest, Trusty Tahr 14.04. Icehouse is default in this release.
When you run these scripts you will end up with the following
4 x VMs: Controller, Network, Compute and Cinder.
Host network (on eth1): Controller 172.16.0.200 | Compute 172.16.0.201 | Network 172.16.0.202 | Cinder 172.16.0.203
Provider (Neutron) network (on eth2)
External network (on eth3): Controller 192.168.100.200 | Compute 192.168.100.201 | Network 192.168.100.202 | Cinder 192.168.100.203
You’d interact with the OpenStack API on the host network (172.16.0.0/24) and when you create an external floating network, you’d create it on the 192.168.100.0/24 network.
Icehouse is here!
After some hacking and slashing, and a little bit of cleanup here and there, the scripts have now been updated to work for Icehouse. You want some? Follow the steps below:
- Grab the code from Github
git clone https://github.com/OpenStackCookbook/OpenStackCookbook.git
- Checkout the Icehouse version
git checkout icehouse
- Run all the things with a simple single liner
- Vagrant-Cachier will prompt you for your system admin password as it modifies /etc/exports to allow the cached areas to be presented to VirtualBox. Once done sit back for 20 mins, head over to Amazon and purchase a book, then come back and play with OpenStack!
- Once done you will end up with 4 machines – check they’re running
The output should look like below:
Current machine states:
controller running (virtualbox) network running (virtualbox) compute running (virtualbox) cinder running (virtualbox)
This environment represents multiple VMs. The VMs are all listed above with their current state. For more information about a specific VM, run `vagrant status NAME`.
- Connect to the controller
vagrant ssh controller
- The credentials have been written to your /vagrant directory [which is the directory of your git clone on your host presented to all your VMs]. Source them in with
(Credentials: username=admin, password=openstack, tenant=cookbook)
- Now you can use OpenStack as it was intended. To quickly create some networking and spin an instance up run the following (check out the script to see how you can use OpenStack once it’s running)
- You can always visit the OpenStack Dashboard to at http://172.16.0.200/ using the admin/openstack credentials.
Any problems – leave us a note! Happy OpenStacking.