Download and install the following on your workstation:
Note: please ensure that VirtualBox's DHCP server is not running,
otherwise the razor client nodes may recieve IP address in the
192.168.0.0.
range:
VBoxManage list dhcpservers # should show no dhcp servers
VBoxManage dhcpserver remove --netname NETWORK_NAME # otherwise, run this
Now clone this project repo to your workstation.
All you should have to type in the project directory is:
$ ./script/bootstrap
Follow any directions given and possibly re-run the bootstrap script.
$ vagrant up razor
$ vagrant up chef
$ vagrant up puppet
To see Razor in action, several "slices" have to be set up in order to execute a policy on a node. Several quickstart examples have been provided which will set up all nodes to install Ubuntu 12.04 LTS. To run the script, login to the razor node and become the root user:
$ vagrant ssh razor
$ sudo su - root
This will set up a Chef broker to run after nodes are provisioned. Run it from the Vagrant-provided mount:
$ /vagrant/contrib/razor_for_chef_ubuntu.sh
For a list of configuration overrides (such as the ISO download URL), please run:
$ /vagrant/contrib/razor_for_chef_ubuntu.sh help
This will set up a Puppet broker to run after nodes are provisioned. Run it from the Vagrant-provided mount:
$ /vagrant/contrib/razor_for_puppet_ubuntu.sh
For a list of configuration overrides (such as the ISO download URL), please run:
$ /vagrant/contrib/razor_for_puppet_ubuntu.sh help
This will set up a basic setup with no brokers running. Run it from the Vagrant-provided mount:
$ /vagrant/contrib/razor_for_bare_ubuntu.sh
For a list of configuration overrides (such as the ISO download URL), please run:
$ /vagrant/contrib/razor_for_bare_ubuntu.sh help
$ vagrant up node1
There are by default 3 nodes available (i.e. node1, node2, node3),
but you can set a higher/lower number by setting RAZOR_NODES=10
in your
shell environment:
$ export RAZOR_NODES=10
$ vagrant status
Current VM states:
razor running
chef not_created
puppet not_created
node1 not created
node2 not created
node3 not created
node4 not created
node5 not created
node6 not created
node7 not created
node8 not created
node9 not created
node10 not created
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`.
$ vagrant up
The base boxes were built with the VeeWee gem. The Razor and Puppet nodes are using an Opscode provided Ubuntu 12.04 base box, built from VeeWee definitions in a project called Bento. To simulate unprovisioned bare metal instances, a special base box called blank-amd64 was created and was built from VeeWee definitions in a project called veewee-definitions.
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make.
Author:: Fletcher Nichol (fnichol@nichol.ca)
Copyright 2012, Blue Box Group, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.