Friday, July 30, 2010

Puppet on Centos 5

Didn't think it would be so complicated that I have to blog it to remind myself  :)

Setting up puppet master:

1> wget http://puppetlabs.com/downloads/facter/facter-latest.tgz
2> wget http://puppetlabs.com/downloads/puppet/puppet-2.6.0.tar.gz
tar xzvf facter-latest.tgz  (then: ruby install.rb)
tar xzvf puppet-2.6.0.tar.gz (then: ruby install.rb)

Some spelling errors on code:

Run:  puppetmasterd --genconfig|grep factpath
Should look like this:  factpath = /var/lib/puppet/lib/facter:/var/lib/puppet/facts
Should not look: factpath = /var/lib/puppet/lib/facter/${File::PATH_SEPARATOR}$/var/lib/puppet/facts

If bad factpath, edit default.rb in lib/puppet directory and reinstall. Grep for PATH_SEPARATOR and replace the line with:

:factpath => {:default => "$vardir/lib/facter:$vardir/facts",

Go to the conf dir and copy the server.init to /etc/init.d

Make sure /etc/hosts on both client and server know how to ping each other.

Mount your vmware vmdk file(s).

Why do people make it harder than it should be in their howtos?

Here is how to mount your vmware vmdk files.


1. List your partitions:  
vmware-mount.pl -p Servername.vmdk

2. Mount the partition number you want(2):  
vmware-mount Servername.vmdk 2  /mount/point