Puppet Dashboard Installation on Amazon Linux based EC2 Server

19 / Jun / 2015 by prashant varshney 0 comments

Puppet Dashboard is a puppet user interface that gives you a bird eye view of system configurations. It shows the list of nodes that can be in changed, unchanged, pending, failed or unreported state. You can manage all your nodes from the dashboard without login into the puppet master server

Requirements:

Puppet Master (2.7.25)

Install MYSQL Server

yum -y install mysql-server
/etc/init.d/mysqld start

Create Database for puppet Dashboard

mysql -u root -p
mysql> create database puppetdash;
mysql> exit

Install Puppet-Dashboard

rpm -i http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-1.noarch.rpmyum -y install puppet-dashboard
yum -y install puppet-dashboard

Configure Puppet Dashboard

mv /usr/share/puppet-dashboard/config/database.yml.rvm /usr/share/puppet-dashboard/config/database.yml
vim /usr/share/puppet-dashboard/config/database.yml
production:
database: puppetdash
username: root
password: <mysqlrootpassword>
encoding: utf8
adapter: mysql

Make the file look like above and comment all other lines

Install Dependencies

1.Install compatible ruby

yum install -y gcc zlib zlib-devel wget
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p330.tar.gz
tar xvf ruby-1.8.7-p330.tar.gz
cd ruby-1.8.7-p330
./configure --enable-pthread
make
make install

2.Use the latest installed ruby

update-alternatives --config ruby

By default when you install puppet master ruby comes with it and that ruby version i.e. 2.0.0 creates some conflicts during further puppet dashboard configuration.So we use the manually installed ruby for further configuration.

3.Install the compatible RubyGems

yum -y install rubygems18*
#This will install gems 1.8.25
gem install stomp
gem install rakegem install ruby-mysqlgem install ruby-mysql
gem install ruby-mysql

Migrate the database

cd /usr/share/puppet-dashboard
/usr/bin/rake RAILS_ENV=production db:migrate

db:migrate command will modify the schema of your database.

Add reporting to puppet.conf

vim /etc/puppet/puppet.conf
[master]
report = true
reports = store, http
reporturl = http://xx.xx.xx.xx:3000/reports/upload

Here we are commanding the puppet master server to  start sending the reports on a specified report url, you can specify your private ip over here for reporturl

Run puppet manually

chown puppet-dashboard /usr/share/puppet-dashboard/log/
/sbin/chkconfig puppet-dashboard on
/sbin/chkconfig puppet-dashboard-workers on
/sbin/chkconfig mysqld on
/etc/init.d/puppet-dashboard restart
/etc/init.d/puppet-dashboard-workers restart

Access the Dashboard as http://xx.xx.xx.xx:3000/reports/upload where xx.xx.xx.xx is your public ip

dash2

FOUND THIS USEFUL? SHARE IT

Leave a comment -