Thursday, November 3, 2011

Puppet Dashboard On and external node using external database



 Install and configure puppet dashboard in a host other than puppet master and using an external DB server



 Installation.


package requirements:

ruby-augeas
ruby
ruby-shadow
ruby-rdoc
ruby-mysql
ruby-libs
rubygems
ruby-devel
rubygem
ruby-irb


Gem packages

gem update --system 1.3.6

gem install rack --no-ri --no-rdoc

gem install rake -v 0.9.2 --no-ri --no-rdoc




Download puppet dashboard

wget http://www.puppetlabs.com/downloads/dashboard/puppet-dashboard-1.2.2.tar.gz


tar zxf puppet-dashboard-1.2.2.tar.gz

mv puppet-dashboard puppet_dash
cd puppet_dash
cp config/database.yml.example config/database.yml
cp config/settings.yml.example config/settings.yml


edit the config/database.yml and update database settings.

Add the following entry as it will not there by default

under production settings:

production:
  database: puppetdash_prod
  username: dashboard
  password: yourpasswd
  encoding: utf8
  adapter: mysql
  host: puppethost

Update mysql privileges

create databases

rake RAILS_ENV=production db:create

create table structure

rake RAILS_ENV=production db:migrate


start the server

./script/server -e production


Enable reporting in slave and master


In each client puppet.conf add the following entry

[agent]
report = true



In the puppet master puppet.conf add the following entry


[master]
reports = http, store
reporturl = http://puppetdashboard:3000/reports/upload



Restart the puppet master and all the clients with the new configuration. Now the puppet dashboard should be populated with the new data.