Puppet Dashboard was created by Puppetlabs, a company that supports Puppet development, and is a Ruby on Rails program. Can be used as a enc (external node classifier) and as a reporting tool, and is becoming an integrated interface with many puppet new features, such as auditing and resource management functions. Puppet Dashboard is a ruby on Rails program that displays information about Puppet master and the agent. It allows you to view graphical and report data aggregated from one or more puppet master. It collects asset data from the puppet agent (the host's fact and other information) from one or more puppet master at the same time. Finally, it can be used as a enc to configure the puppet node and specify the classes and parameters on those nodes.
Configuration of Puppet dashboard:
On the master side
Install the required packages
Yum Install puppet-dashboard-1.2.23-1.el6.noarch.rpm mysql-server rubygem-rake-0.8.7-2.1.el6.noarch.rpm Ruby-mysql-2.8.2-1.el6.x86_64.rpm-y
/etc/init.d/mysqld startmysql> create database dashboard_production character SET utf8;mysql> CREATE USER ' dashboard ' @ ' localhost ' IDENTIFIED BY ' Westos ';mysql> grant all privileges on dashboard_production.* to ' Dashboard ' @ ' localhost ';vim /usr/share/puppet-dashboard/config/database.yml #这里只使用了生产环境配置 production: database: dashboard_production username: dashboard password: westos encoding: utf8 adapter: mysqlcd /usr/share/puppet-dashboard/configrake rails_env=production db:migrate #建立 dashboard Required databases and tables
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/83/C5/wKiom1d7uSnx8dixAAG8MNlK07A392.png-wh_500x0-wm_3 -wmp_4-s_3261368438.png "title=" screenshot from 2016-07-05 20_11_35.png "alt=" Wkiom1d7usnx8dixaag8mnlk07a392.png-wh _50 "/>
Modify the Puppet-dashboard time zone
Vim/usr/share/puppet-dashboard/config/settings.yml time_zone: ' Beijing '
Use the following command to view the available time zones
Rake time:zones:local
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/83/C4/wKioL1d7uTqC4AidAACntAO6BOE778.png-wh_500x0-wm_3 -wmp_4-s_1046396885.png "title=" screenshot from 2016-07-05 20_13_29.png "alt=" Wkiol1d7utqc4aidaacntao6boe778.png-wh _50 "/>
/etc/init.d/puppet-dashboard start
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/83/C5/wKiom1d7uUmD54M6AABckSA68a8644.png-wh_500x0-wm_3 -wmp_4-s_1496326006.png "title=" screenshot from 2016-07-05 20_14_30.png "alt=" Wkiom1d7uumd54m6aabcksa68a8644.png-wh _50 "/>
chmod 666/usr/share/puppet-dashboard/log/production.log/etc/init.d/puppet-dashboard-workers Start
Set up report totals
vim/etc/puppet/puppet.conf [main] reports = http Reporturl=http://172.25.254.1:3000/reports/etc/puppetmast ER Reload
Login http://172.25.9.1:3000 go to the test page
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/83/C5/wKiom1d7uV6zORfmAADq7sZlm24928.png-wh_500x0-wm_3 -wmp_4-s_3407262705.png "title=" screenshot from 2016-07-05 20_22_37.png "alt=" Wkiom1d7uv6zorfmaadq7szlm24928.png-wh _50 "/>
No report generated at this time we need to open the report on the client side to synchronize with this data to see the information
vim/etc/puppet/puppet.conf [agent] report =truepuppet agent--server=server1.example.com--NO-DAEMONIZE-VT # Manual Sync Puppet not running in the background
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/83/C4/wKioL1d7uceREoTYAACQzZb1AD0408.png-wh_500x0-wm_3 -wmp_4-s_2033418008.png "title=" screenshot from 2016-07-05 11_23_22.png "alt=" Wkiol1d7ucereotyaacqzzb1ad0408.png-wh _50 "/>
Then refresh the site again to see the report.
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/83/C5/wKiom1d7uhahvWkiAADuXVROqaw742.png-wh_500x0-wm_3 -wmp_4-s_1981244812.png "title=" screenshot from 2016-07-05 11_24_59.png "alt=" Wkiom1d7uhahvwkiaaduxvroqaw742.png-wh _50 "/>
Click on the node to see the specific log information
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/83/C4/wKioL1d7ujrwxVabAAEck53J_LI367.png-wh_500x0-wm_3 -wmp_4-s_135953569.png "title=" screenshot from 2016-07-05 11_47_00.png "alt=" Wkiol1d7ujrwxvabaaeck53j_li367.png-wh_ "/>
In the case of automatic client side synchronization, the client side should do the following:
Vim/etc/sysconfig/puppetpuppet_server=puppet.example.com #puppet Master's address puppet_port=8140 #puppet listening Port Puppet_lo G=/var/log/puppet/puppet.log #puppet Local Log #puppet_extra_opts=--waitforcert=500 #默认同步的时间这里没有打开而是在下面的文件配置的
Modify the default synchronization time
vim/etc/puppet/puppet.conf [agent] runinterval =300 #单位为秒/etc/init.d/puppet start
Nginx+passenger:
Puppet uses Ruby-based webrickhttp to handle HTTPS requests by default, but the built-in webserver purpose of these languages is only for the convenience of debugging code, and its performance is very poor, while using common web The server software can significantly improve the performance of the puppetmaster of a single station. This is the use of nginx to improve the performance of puppetmaster
To install the required dependencies:
Yum install-y gcc gcc-c++ curl-devel zlib-devel openssl-devel ruby-devel pcre-develgem Install Passenger-5.0.15.gem rack- 1.6.4.gem #没有联网的情况下需要gem包, direct gem install rack Passengerpassenger-install-nginx-module #脚本会自动安装 nginx Support in the case of networking, follow the instructions
Change Nginx configuration after installation.
vim /opt/nginx/conf/nginx.conf server { listen 8140; server_name server1.example.com; root /etc/ Puppet/rack/public; passenger_enabled on; passenger_set_ header x_client_dn $ssl _client_s_dn; passenger_set_header x_client_ verify $ssl _client_verify; ssl on; ssl_session_ Timeout 5m; ssl_certificate /var/lib/puppet/ssl/certs/server1.example.com.pem ; ssl_certificate_key /var/lib/puppet/ssl/private_keys/server1.example.com.pem; ssl_client_certificate /var/lib/puppet/ssl/ca/ca_crt.pem; ssl_crl /var/lib/puppet/ssl/ca/ca_crl.pem; ssl_verify_client optional; ssl_ciphers sslv2:-low:-export:rc4+rsa; ssl_prefer_server_ciphers on; ssl_verify_depth 1; ssl_session_cache shared:ssl:128m ; }mkdir /etc/puppet/rack/{public,tmp} -pcp /usr/share/puppet/ext/rack/ config.ru /etc/puppet/rack/chown puppet.puppet -r /etc/puppet/rack//etc/init.d/ puppetmaster stop #puppetmaster不需要再启动了, puppetmaster/opt/nginx/sbin/nginx -t # is automatically called after Nginx is started Detection nginx/opt/nginx/sbin/nginx
Monitoring: The client side can be synchronized to prove successful.
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/83/C6/wKiom1d7ukmQosHXAACQzZb1AD0542.png-wh_500x0-wm_3 -wmp_4-s_1339746069.png "title=" screenshot from 2016-07-05 11_23_22.png "alt=" Wkiom1d7ukmqoshxaacqzzb1ad0542.png-wh _50 "/>
Puppet Reporting System dashboard and Puppet+nginx