http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html
yum install puppet-dashboard
Create database and database account, something like this:
CREATE DATABASE dashboard;
CREATE USER 'dashboard'@'%' IDENTIFIED BY 'passwordhere';
GRANT ALL PRIVILEGES ON dashboard.* TO 'dashboard'@'%';
Allow 32M packet either from my.cnf (require restart) and update running variable:
# Allowing 32MB allows an occasional 17MB row with plenty of spare room
max_allowed_packet = 32M
and
mysql> set global max_allowed_packet = 33554432;
Set database account properties here:
#vi /usr/share/puppet-dashboard/config/database.yml
production:
database: dashboard
username: dashboard
password: passwordhere
encoding: utf8
adapter: mysql
Setup tables etc:
rake RAILS_ENV=production db:migrate
Create puppet-dashboard log file:
touch /usr/share/puppet-dashboard/log/production.log
chmod 0666 /usr/share/puppet-dashboard/log/production.log
Allow INBOUND port 3000 to puppetmaster and OUTBOUND port 3000 to puppet-dashboard.
On each agent, make sure that all agents have reporting turned on:
# vi /etc/puppet/puppet.conf (on each agent)
[agent]
report = true
On puppetmaster, add [master]:
# vi /etc/puppet/puppet.conf
[master]
reports = store, http
reporturl = http://127.0.0.1:3000/reports/upload
Restart puppetmaster:
service puppetmaster restart
Start puppet-dashboard:
cd /usr/share/puppet-dashboard
sudo -u puppet-dashboard ./script/server -e production
or
sudo -u puppet-dashboard ./script/server -e production -d
Monitor /var/log/message and /usr/share/puppet-dashboard/log/production.log
After client sends reports, you need delayed worker to process reports. To run 4 delayed worker (best practices is to match number of cpu):
cd /usr/share/puppet-dashboard
$ sudo -u puppet-dashboard env RAILS_ENV=production script/delayed_job -p dashboard -n 4 -m start
However it’s not advised to run this manually, because if you run it on less cpu, the delay worker may stop working for sometimes. Therefore just run the puppet-dashboard-workers:
$ service puppet-dashboard-workers restart
Enjoy your dashboard:
http://x.x.x.x:3000
If delayed worker not working or too many pending tasks, simply kill delayed_job.x_monitor and rerun puppet.]]>