The infrastructure project focuses on building the OpenStack private cloud that will host the online tutorial application and eventually the whole of puppetize.net. It builds on the OpenStack modules developed by Dan Bode (@bodepd) at PuppetLabs and includes Vagrant boxes and RSpec definitions for test-driven development.
The goal is to make it extremely easy to participate in the development of the site itself and its underlying technology stack, such as OpenStack and Puppet.
Before you begin, make sure that you have Vagrant, VeeWee and Rake installed and working.
Clone the infrastructure repository recursively, including all referenced submodules.
$ git clone --recursive [email protected]:puppetize/infrastructure
Base boxes for the included Vagrant boxes can be built using VeeWee and there is a Rake task which makes this a one-step process.
$ (cd boxes/base && rake install)
This will download the installation media for all supported operating systems, perform a non-interactive installation, build Vagrant box packages (in the boxes/base directory) and install those packages into Vagrant.
You can free up some disk space afterwards by deleting the Vagrant box package files, or you can keep them around to install them elsewhere.
$ (cd boxes/base && rake destroy)
The OpenStack cloud controller includes a self-contained installation of OpenStack, much like devstack but is entirely provisioned via Puppet. The cloud controller provides Horizon, a web-based management interface for OpenStack at http://cloud.puppetize.net.
Try it out locally by starting the "cloud" box.
$ (cd boxes/cloud && vagrant up)
When Vagrant has finished provisioning the box, open http://localhost:8080/horizon in a web browser and log in using the username "admin" and password "changeme".
There are other Vagrant boxes in the boxes
directory, such as
"vagrant", which aren't part of the main infrastructure but are used
for development. Each Vagrantfile normally contains the provisioning
instructions or the name of the top-level Puppet class which defines its
role. Take a look and modify them, or add boxes as you wish.
Execute RSpec code examples for Vagrant boxes using the top-level task "spec:boxes". This will perform some testing on the important Vagrant boxes, such as the "cloud" box.
$ rake spec:boxes
/usr/bin/ruby1.9.1 -S rspec ./spec/boxes/cloud_spec.rb ./spec/boxes/vagrant_spec.rb -c -fd -t vagrant
Run options:
include {:vagrant=>true}
exclude {:basebox=>#<Proc:./spec/support/vagrant.rb:8>}
Vagrant box 'cloud'
with any basebox
running OpenStack Dashboard
presents a login screen
Vagrant box 'vagrant'
with any basebox
has a Vagrant 1.0.x executable in PATH
has a "vagrant basebox" command (VeeWee)
Finished in 3 minutes 50.83 seconds
3 examples, 0 failures
Continuous integration is provided by Travis CI, but is currently limited as those builds don't include the Vagrant examples.