Using Puppet From Source
Puppet is currently implemented in Ruby and uses standard Ruby libraries. You should be able to run Puppet on any Unix-style host with Ruby. Windows support is planned but not currently available.
Before you Begin
Make sure your host has Ruby version 1.8.2 or later:
$ ruby -v
and, if you want to run the tests, rake:
$ rake -V
While Puppet should work with 1.8.1, there have been many reports of problems with this version.
Make sure you have Git:
$ git --version
Get the Source
Puppet currently relies on another Reductive Labs tool, Facter. Create a working directory and get them both:
$ SETUP_DIR=~/git $ mkdir -p $SETUP_DIR $ cd $SETUP_DIR $ git clone git://reductivelabs.com/facter $ git clone git://reductivelabs.com/puppet
You will need to periodically run:
git pull origin
From your repositories to periodically update your clone to the latest code.
If you want access to all of the tags in the git repositories, so that you can compare releases, for instance, do the following from within the repository:
$ git fetch --tags
Then you can compare two releases with something like this:
$ git diff 0.23.1 0.23.2
Most of the development on puppet is done in branches based either on features or the major revision lines. You can change to and track branches by using the following:
git checkout --track -b 0.24.x origin/0.24.x
Tell Ruby How to Find It
Last, we need to put the puppet binaries into our path and make the Puppet and Facter libraries available to Ruby:
$ PATH=$PATH:$SETUP_DIR/facter/bin:$SETUP_DIR/puppet/bin $ RUBYLIB=$SETUP_DIR/facter/lib:$SETUP_DIR/puppet/lib $ export PATH RUBYLIB
Facter changes far less often than Puppet and it is very minimal (a single library file and a single executable), so it is probably worth just installing it:
$ cd facter $ sudo ruby ./install.rb
Test That It Works
Now you can test that it is working. The best way to do that is described in the TestingGuide, and involves writing a short site manifest. Another option is to run through all of the unit tests that ship with Puppet:
$ cd $SETUP_DIR/puppet/test $ rake
This tends to take a long time, however, and is probably only useful if you already know there's a problem and want to report a bug or if you are planning on doing development. It is worth noting that some of these tests necessarily modify your system, so unless you know what you are doing, it is unadvisable to run them as root*, and certainly not on a production system. (We're working on making the tests safer.)