Install puppet-dashboard on RedHat/CentOS 5

March 11, 2010    linux puppet puppet-dashboard Sys Admin

If you have a puppet network in place you will want to use puppet-dashboard. It is a fairly new project and still has some misssing pieces but overall a good way to tell the health of your puppet network. The thing I really like about it is that you can see when the last check in time is for a client and if it had any errors or warnings during its runs so you can fix them.

The big issue is that out of the box its a bit hard to get running on Redhat/CentOS. No worries I spent some time to make it work and passing it on to you.

Install Rake

rpm -ivh http://mirrors.tummy.com/pub/fedora.redhat.com/epel/5/x86_64/rubygems-1.3.1-1.el5.noarch.rpm

rpm -ivh http://mirrors.tummy.com/pub/fedora.redhat.com/epel/5/x86_64/rubygem-rake-0.8.3-1.el5.noarch.rpm

Install MySQL bindings for Ruby

rpm -ivh http://mirrors.tummy.com/pub/fedora.redhat.com/epel/5/x86_64/ruby-mysql-2.7.3-1.el5.x86_64.rpm

Install git if needed

yum install git

I like to install non-rpmed apps in /opt so that is where I will clone the git project

cd /opt

git clone git://github.com/reductivelabs/puppet-dashboard.git

Now lets config the database. As of writing this, there is an error in the sample configs but one of the authors told me he was doing to fix them. It is in user and pass, they should be username and password

So here is my sample config

cd puppet-dashboard

cat config/database.yml

Here are the contents



development:
    adapter: mysql
    database: puppet_dash
    username: puppet
    password: master
    encoding: utf8
    host: 192.168.100.5 
Now create the database
rake install
Now lets config our puppet clients to make sure they send reports back to the servers. So edit the following file on the clients
/etc/puppet/puppet.conf
In the [puppetd] section add the following
report = true
Then on the puppetmaster server edit the following file
/etc/sysconfig/puppetmaster
Find the following line
#PUPPETMASTER_EXTRA_OPTS=–noca
Change it to
PUPPETMASTER_EXTRA_OPTS=”––reports puppet_dashboard”
Now move the puppet_dashboard file. This should be the same for 64bit and 32bit. I am using 64bit and it works
cp /opt/puppet-dashboard/puppet/lib/puppet_dashboard.rb /usr/lib/ruby/site_ruby/1.8/puppet/reports/
Now restart puppetmaster
service puppetmaster restart
Now run puppet-dashboard
/opt/puppet-dashboard/script/server

I also wrote a post on setting up a init.d script for puppet-dashboard



comments powered by Disqus