Instead of having everyone to install Razor to demo it during the OpenStack Summit in Portland, I created a Razor appliance. Installing and configuring Razor is not difficult, but could be a little time consuming if you do not have either Puppet or Chef already set up and configured. You can, of course, install it manually or go the Vagrant route: https://github.com/blueboxgroup/razor-vagrant-lab.
Slides for the OpenStack Summit tutorial can be found here: http://www.slideshare.net/mattray/bare-metal-to-openstack-with-razor-and-chef (thanks @mattray)
Razor VM
For creating Razor VM, I used Ubuntu 12.04 server. It has the following installed and configured:
Razor (installed using chef: https://github.com/bbg-cookbooks/razor)
TFTP server
DHCP server
MongoDB
Chef server (loaded with Rackspace Private Cloud cookbooks https://github.com/rcbops/chef-cookbooks)
MicroKernel and Ubuntu server ISO loaded
The VM needs to have 2 nics, one for internal, and one for external traffic.
Download VM from here (3.6 GB download): https://ushnishtha.files.wordpress.com/razor.tar and un-tar it.
Load it either into VMware Fusion or VirtualBox. Please see bellow for special instructions for either!
Login, and switch to root:
username: anystacker
password: razor
Verify Razor is running:
-
root@razor:~# /opt/razor/bin/razor_daemon.rb status
If it is not running, start it up:
-
root@razor:~# /opt/razor/bin/razor_daemon.rb start
Now you can start using Razor. Here are some useful commands:
-
razor image
-
razor node
-
razor active_model
-
razor model
-
razor broker
-
razor policy
Running Razor is not very interesting, unless you try to create a new VM and watch Razor boot it. For this to happen, you will need to create a new VM in either Fusion or VirtualBox. The new VM needs to have a nic on internal network in order to be booted by razor. There are a couple special considerations, depending whether you are using VirtualBox or VMware Fusion.
VMware Fusion
While importing the appliance into Fusion, you may be presented with some errors/warnings. Dismiss them, it should work anyways.
If you are using Fusion, under Preferences/Network, make sure DHCP is disabled for the private network:
Razor appliance will need two nics, public and private. Make sure nic #1 is public:
Razor appliance nic #2 should be set to be on private network. Any subsequent VM to be booted by Razor should also be on private network:
Virtual Box
If you are using Virtual Box:
Make sure the extension pack is installed. To verify it, on command line type the following:
- VBoxManage list extpacks
If you do not have extention pack, get it here:
When importing Razor appliance, accept all default settings, do not change anything. When creating a new VM to be booted by Razor, change boot order and set network to be internal.
For changing the boot order to include network boot, after creating a new VM, go to it’s Settings and under System, and select network boot order.
Once the boot order is set, change the VM network to be attached to internal network. It should look similar to this:
Now, once the new VM is powered on, it should start booting. If you are presented with an option to select a start up disk, cancel out of it. If Razor is listening on the right network, and your VM settings are correct, you should see something like this:
It should be followed by Razor Mikro Kernel loading information and then regular installation.
vSphere
I did not try this myself, but @VMRandy was able to import the appliance into vSphere. First he uploaded it to Workstation, upgraded to hardware version 9, and then uploaded to vSphere. Once the VM was loaded and network configured, he was able to boot new nodes in vSphere using Razor.
If Things Don’t Work
Most likely, it is the network.
- Check the settings, make sure Razor appliance has two nics, a public and a private.
- Make sure there are no other DHCP servers affecting things and confusing your new VM.
- Make sure the new VM is connecting on Private Network.
- Make sure Razor appliance eth1 is listening on 172.16.16.1.
- Make sure Razor is running.
- Make sure MongoDB is running.
- If using Virtual Box, install extension pack.
- If using Virtual Box, set boot order.
There are a few other things that could go wrong, but usually, it’s the network.
Everything Is Working, Now What?
Congratulations, you were able to download a large file from the internets, successfully imported into your favorite virtualization software, and deployed your first VM using Razor. If you list the Razor policies setup, you will notice that there are two of them. The second policy is for servers with two nics, and will install OpenStack for you on such servers. Go ahead and try- when creating a new server, make sure both nics are on private network. This time, spinning up a new server will take a little longer, as the Razor hands off the new node to the broker. The broker, in turn, will install chef client on it and run the initial run list. In our case, it is OpenStack installation.
Don’t stop at two servers! Try adding different policies and tags, and create servers with different configurations to match them. Check the “razor active_model” command, and see how it matches up with the “knife node list” command.
Have fun!
-eglute
P.S.: about the making of USB sticks: https://anystacker.com/2013/04/the-making-of-cloud-of-usb-sticks/
P.S.S.: youtube video of the OpenStack Summit presentation: http://www.youtube.com/watch?feature=player_detailpage&v=Lal3aL5JH3o#t=183s