Part 3: Installing puppet-dashboard on CentOS / Puppet 2.6.1

Puppet Dashboard

Puppet dashboard is a fairly new app with loads of future potential and is great for monitoring your puppet estate. This is a quick guide to getting it running on puppet 2.6.1. Be sure you have the correct yum repos and ruby versions installed, see Part 1 and Part 2 for more details.

Install the puppet-dashboard package.

punch# yum –enablerepo=puppetlabs,ruby,epel install puppet-dashboard […] Installing for dependencies: mysql i386 5.0.77-4.el5_5.3 ruby-irb i686 ruby-mysql i686 2.7.4-1 ruby-rdoc i686 rubygem-rake noarch 0.8.7-2.el5 rubygems noarch 1.3.1-1.el5 Install 7 Package(s) Upgrade 0 Package(s)   Total download size: 11 M Is this ok [y/N]: y […]

Create a MySQL database for puppet-dashboard

Create a database for puppet-dashboard to use and set up a user with all privileges to use it. This can be done on a seperate host.

mysql> CREATE DATABASE puppetdash; Query OK, 1 row affected (0.00 sec)   mysql> GRANT ALL PRIVILEGES ON puppetdash.* TO puppet@’%’ IDENTIFIED BY ‘punchandjudy’; Query OK, 0 rows affected (0.00 sec)

Configure database.yaml

cd /usr/share/puppet-dashboard vi config/database.yaml

Add your database parameters to the development section, note that host: can be ommitted if you are using local sockets to connect to MySQL.

development: host: database: puppetdash username: puppet password: punchandjudy encoding: utf8 adapter: mysql

Migrate the database

punch# rake RAILS_ENV=development db:migrate […] (in /usr/share/puppet-dashboard) == BasicSchema: migrating ==================================================== — create_table(:assignments, {:force=>true}) -> 0.0072s — create_table(:nodes, {:force=>true}) -> 0.0030s — create_table(:services, {:force=>true}) -> 0.0026s == BasicSchema: migrated (0.0132s) =========================================== […]

Copy reports module to site_ruby

I hate doing this but puppetmasterd explicitly looks for reports in puppet/reports and so far I haven’t found a clean workaround to tell it to look in /usr/share/puppet-dashboard for it. If anyone knows of a way, please email me.

punch# cp /usr/share/puppet-dashboard/ext/puppet/puppet_dashboard.rb /usr/lib/ruby/site_ruby/1.8/puppet/reports

Edit your puppet.conf

Include the following in the [master] section, changing to your puppet server

[master] reports = puppet_dashboard,store reportdir = /var/lib/puppet/reports reporturl =

Restart puppetmaster and start puppet-dashboard

punch# service puppetmaster restart Stopping puppetmaster: [ OK ] Starting puppetmaster: [ OK ] punch# service puppet-dashboard start Starting puppet-dashboard: [ OK ]

Test web GUI

Go to the following link in your browser (replacing the hostname with your fqdn)

Configure the client

Edit puppet.conf

Make sure the following things are set in the [agent] section of puppet.conf on your client node.

judy# vi /etc/puppet/puppet.conf
[agent] report = true

Run puppet in noop mode on the client

judy# puppetd –noop –test

Refresh browser

If all has gone well, you should now see your reports in puppet dashboard for your client node.

Subscribe to Craig Dunn

Sign up now to get access to the library of members-only issues.
Jamie Larson