If you want to play with the new razor-server version but don’t feel like installing all the bits by hand, try out a little vagrant script I wrote at https://github.com/eglute/razor-server-vagrant. So far, it has been tested with the WMware Fusion, and is somewhat of a work in progress. Keep in mind, that it takes a very long time to set it up, as it downloads, installs and configures the following bits:
curl git dnsmasq postgresql java JRuby TorqueBox razor-client razor microkernel ubuntu server image
Once the vagrant is up and running, you will have a fully functional razor-server, setup with a policy and ready to install ubuntu server to the VMs attached to the newly created private network. The base policy will look for VMs with 1 processor.
The Vagrantfile comes with some IPs baked in. If you do not like the IPs I have picked, change them. Please take care that the IPs are in appropriate ranges.
config.vm.provision "shell", path: "provision.sh", :args =>"172.16.2.137 172.16.2.150 172.16.2.255"
First IP, or $IP_ADDRESS will be the IP of razor-server on the private network created. Note that it will be on eth1.
Second IP, or $IP_RANGE is going to be passed into dnsmasq configuration file for the DHCP range upper limit. The lower limit is the $IP_ADDRESS.
The third IP, or the $IP_BROADCAST is the IP used for broadcast in the ntp.conf. In this case, we have our own ntp server because in some cases you may really need accurate time.
So, check out the code. Then, add a vagrant box:
vagrant box add precise_fusion http://files.vagrantup.com/precise64_vmware.box
Once that is done, you are ready to do vagrant up:
vagrant up --provider=vmware_fusion
Now, go and have some coffee while vagrant does all the work for you!
Once vagrant is done with all the hard work, you can do
vagrant ssh sudo su - razor
and use razor commands. They will be a bit slow since razor client is using JRuby instead of a proper version of ruby (the author was cutting corners).
To install a new VM in VMware Fusion, create a new custom VM, add a new network device and specify the newly created vmnet (look for the latest vmnet2 or vmnet3). If all went well, your new VM will do a pxe boot off of a razor, and you will have a new node with Ubuntu server installed.
Happy vagranting and razoring!
-eglute