Puppet Dasshboard is created by the company Puppetlabs that supports Puppet development, and is the Ruby on Rails program. Can serve as a enc (external node classifier) and a reporting tool, and is increasingly becoming an integrated interface that includes many puppet new features, such as auditing and resource management capabilities.
Puppet Dashboard is a ruby on Rails program that displays information about Puppet master and the agent. It allows you to view graphics and report data that is summarized from one or more puppet master. It collects asset data from one or more puppet master from the puppet Agent (fact and other information for the host). Finally, it can be used as a enc to configure the puppet nodes and specify the classes and parameters on those nodes.
1 Preliminary preparatory work
The current version of the Puppet Dashboard (1.2.3) program can only be installed in Ruby 1.8.x (Dashboard is not working under 1.9.x or newer versions), only MySQL is supported as a database backend.
Rake version 0.8.3 or newer
MySQL Database Server version 5.x
Ruby-mysql bindings version 2.7.x or 2.8.x
Note: For more details please refer to: http://docs.puppetlabs.com/dashboard/
2 Installing related Packages
[Root@puppetserver nodes]# yum install ruby-mysql mysql-server
3 Configuration dashboard (including a combination with the database section)
3.1 Create a MySQL database account with admin dashboard and authorize
[root@puppetserver rpms]#/etc/rc.d/init.d/mysqld Restart
[ Root@puppetserver ~]# chkconfig mysqld on
[root@puppetserver rpms]# mysqladmin-uroot password 123.com
[Root@pupp Etserver rpms]# mysql–p123.com
mysql> CREATE database dashboard character set UTF8;
mysql> grant all on Das hboard.* to ' dashboard ' @ ' localhost ' identified by "123.com";
Mysql> flush Privileges;
[root@puppetserver rpms]# mysql-udashboard-p123.com #测试账号是否创建成功
...
Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql>
3.2 Optimizing the database configuration file my.cnf
[Root@puppetserver rpms]# vim/etc/my.cnf
[Mysqld]
# allowing 32MB allows a occasional 17MB row with plenty of spare room
Max_allowed_packet = 32M
...
[Root@puppetserver rpms]#/etc/rc.d/init.d/mysqld Restart #重启MySQL生效
Stopping mysqld: [OK]
Starting mysqld: [OK]
3.3 Edit Dashboard Yaml configuration file (database.yml) to specify the database
[Root@puppetserver rpms]# Vim/usr/share/puppet-dashboard/config/database.yml
Production
Database:dashboard
Username:dashboard
Password:123.com
Encoding:utf8
Adapter:mysql
...