Installing the Razor-Client and Creating a Repository

This is part three in the Razor Series. In part #2 we saw how to configure DHCP ad TFTP and as I mentioned in a previous post, the client is now a separate component.

1. Installing Razor - Yes the New Version..
2. Razor - DHCP and TFTP
3. Installing the Razor client and creating a repository
4. Installers, Policies and Tags
5. Razor - What Lies Within the installer?
6. Installing ESXi with Razor

Here is how you would go about installing the razor-client which will allow you to interact with the server.
I installed it in my $HOME folder

First we will clone the code from Github.

git clone https://github.com/puppetlabs/razor-client

git clone

Change directory to the razor-client folder and install the required gems

cd razor-client
bundle install


Next create an alias that will include the url to the razor server (substitute the correct IP address / Hostname of course), and you should add this to your profile if you want the command to be available each time you login.

alias razor="$PWD/bin/razor -u"

create alias

As you can see it is possible to install the client on the same machine as the server. If you are doing this then then you will not need the url - because it defaults to http://localhost:8080/api

And if you run the razor command you should see the following output


At the moment there is nothing there so looking at the repos/brokers/policies/nodes/tags will not give you much - yet…

razor commands

First some terminology.

  • Nodes - Nodes are the clients that connect into the system.
  • Brokers - Brokers are responsible for handing a node off to a config management system, like Puppet or Chef.
  • Tags - A tag consists of a unique name and a rule. The rule is a characteristic present on the the node
  • Repos - A repository where the installation files of an Operating System reside
  • Policies - This is a defined set of steps that tie all the other bits and pieces in Razor together, and are what gets ultimately applied to a node.
  • Installers - This will be the set of actions needed to deploy the operating system - you can think as a set of kick start instructions.
Creating a repo, for that you will need to provide a URL to the installation ISO.
razor create-repo --name=ESXi_5_1 --iso-url http://webserver/VMware-VMvisor-Installer-5.1.0.update01-1065491.x86_64.iso
What currently happens is that razor will return an ID for the repo and begin the import process. The file is
extracted to /tmp and eventually moved to the repo location that we defined in config file
(/var/lib/razor/repo-store). A new directory will be created according to the repo name. 
import files
(Just as a side note - the repo is extracted into the /tmp folder but removed there after - so make sure you have adequate space on your razor server - or alternatively delete the temp files after the repo is created. There is currently a bug open on this issue.)
When you now run razor repos you should see the repository you just created.

razor repos

razor repos

In the next post we will see how we create a policy and see what we can do with tags.