lauantai 30. lokakuuta 2010

Puppet on Centos 5.5

I've been fooling around with cobbler and puppet, and I had a lot of problems when trying to get puppet running on Centos 5.5

In short, puppet supports version 1.8.6 of Ruby and ActiveRecord 2.1

Use version 1.8.6. I tried following versions without luck.
- 1.8.5 didn't support activerecord, or so I thought. Should have tried to install older version of activerecord
- 1.9.1, 1.8.7 from sources, puppet doesn't support and they don't tell you clearly what version of ruby is supported
- 1.8.6 worked, but newest activerecord doesn't support -> use active record 2.1 (gem install activerecord -v 2.1 after you've installed rubygems)

The dependency to version 1.8.6 seems to be because "exec" -function in somewhere in Ruby or in its default libraries has changed in x.z.1 release..

Dependencies for compiling ruby:
-openssl, openssl-devel
-zlib-devel, comes with openssl-devel
Just yum install openssl openssl-devel

Compiling ruby
-get sources from
- ./configure && make
- make install
Install rubygems
-Just get sources from, untar and run "ruby setup.rb"

Get puppet and facter as gems from
- gem install facter-x.y.z.gem
- gem install puppet-x.y.z.gem

Create user "puppet" and group "puppet"
- For me, puppetmasterd --mkusers failed when doing this, but it was because I had ruby 1.8.7 installed.
Run puppetmasterd --no-daemonize --verbose

Running puppetmasterd should create necessary configuration directories.