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.

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.

Configure 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.

Migrate the database

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.

Edit your puppet.conf

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

Restart puppetmaster and start puppet-dashboard

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.

Run puppet in noop mode on the client

Refresh browser

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

Follow and share if you liked this

Part 2: Puppet 2.6.1, configure puppetmaster and puppetd

Configure Puppetmaster

For installing puppetmaster 2.4.1 on CentOS please click here for Part 1

In Part 1 we covered installing the Puppetmaster and Puppetd packages on Centos 5.5. We will now configure a very basic client/server model to serve the /etc/resolv.conf file to our client. Simple enough!

Create your first module

Our first module will be called networking::resolver, it’s job will be to push out a resolve.conf file to clients.

Create the directory structure under /etc/puppet

Create your resolv.conf file

Create your module manifest

Configure your site and nodes

Create a minimal site.pp

Create a tempates file

Create your node file

Don’t forget to replace with the fqdn of your client server

Set up puppetmaster parameters

Create default configuration

This is a minimal puppet.conf file, a more detailed file can be produced with puppetmasterd –genconfig

The autosign will automatically sign certs for new clients, this is discouraged in a production environment but useful for testing. For information on running puppetmaster without autosign see the puppetca documentation.

Set permissions for your fileserver.
Note that this allows everything, you should restrict this in a production environment.

Start puppetmaster

The puppet client

Configure puppetd
On your client, edit puppet.conf and add the following in the [agent] section, remembering to change to the fqdn of your Puppetmaster.

Allow puppetrunner

Create a file called namespaceauth.conf and add the following, note in a production environment this should be restricted to the fqdn of your puppet master

Start puppetd

View pending changes

Use –test along with –noop to do a dry run to view the changes that puppetd will make

Now you can run puppetd without –noop to pull in your new resolv.conf file

This is a very basic demonstration of creating a server/client pair with puppet. There is much more documentation on configuring and managing puppet here

Next: Installing Puppet Dashboard

Follow and share if you liked this

Part 1: Installing puppet 2.6.1 on CentOS with YUM/RPM

Installing Puppetmaster 2.6.1

Assuming, like me, the thought of letting rubygems vommit all over your filesystem is not a pleasant one, then how to get the latest puppet 2.6.1 installed on CentOS 5.5 with yum isn’t very clear. Things may differ on other peoples systems, but the below worked for me.

Set up yum repositories.

Do this on both the client and the server
Add the following files and save them to /etc/yum.repos.d/




Note that we include ruby and puppetlabs as the next steps in this tutorial will be to configure puppet and install puppet-dashboard. We want to upgrade to ruby 1.8.6 in order to run puppet-dashboard, doing this now will save you some pain down the line.

Upgrade Ruby to 1.8.6

Do this on both the client and the server
As mentioned above, use the ruby repo to upgrade.

Install Puppet Server

On your puppetmaster server:

On your puppet client

That’s it, in part 2 and 3 we will install our client and server and install dashboard.

Part 2 Configuring Puppetmaster and Puppetd

Follow and share if you liked this