Puppet Learning-default Webrick installation Dashboard

Source: Internet
Author: User

Dashboard is the puppet console for displaying information about puppet Master and puppet agents. This article provides Web services with the default Webrick. DashBoard installed in master.test.com. And in the client configuration file do the following configuration

#vim/etc/puppet/puppet.conf

[Agent]

Report = True

First, install dependent packages

#rpm-IVH http://yum.puppetlabs.com/el/6Server/products/x86_64/puppetlabs-release-6-6.noarch.rpm

#yum-y install mysql mysql-devel mysql-server ruby ruby-devel ruby-irb ruby-mysql ruby-rdoc ruby-ri rubygems

#gem Install Rake

Second, install the dashboard package

#yum install-y Puppet-dashboard

Third, configuration Dashboard

1 Creating a Database

#vim/etc/my.cnf

Max_allowed_packet = 32M

#service mysqld Start

#chkconfig mysqld on

#mysql

Mysql>create database dashboard CHARACTER SET UTF8;

Mysql>create user ' dashboard ' @ ' localhost ' identified by ' dashboard ';

Mysql>grant all privileges in dashboard.* to ' dashboard ' @ ' localhost ';

Mysql>flush privileges;

2 Modifying a configuration file

#vim/usr/share/puppet-dashboard/config/database.yml

Production

Database:dashboard

Username:dashboard

Password:dashboard

Encoding:utf8

Adapter:mysql

#vim/usr/share/puppet-dashboard/config/settings.yml

Time_zone: ' Asia/shanghai '

3 Import the database, start the service

#cd/usr/share/puppet-dashboard/config

#rake rails_env=production Db:migrate

#service Puppet-dashboard Start

#chkconfig Puppet-dashboard on

#rake rails_env=production db:raw:optimize #优化数据库

4 Importing an existing report

#cd/usr/share/puppet-dashboard

#rake rails_env=production Reports:import

5 Configuring Live Send Report

#vim/etc/puppet/puppet.conf

reports = Store,tagmail,log,puppet_dashboard,http

Reporturl = Http://172.16.30.220:3000/reports

6 Opening a report

#rake rails_env=production jobs:work 2 &>1 &

7 Visit Dashboard

http://172.16.30.220:3000/reports

Iv. Database Management

1 when puppet dashboard data is too large, the database needs to be optimized and commands can be used:

#rake rails_env=production Db:raw:optimize

2 cleanup Dashborad data for one months ago:

#rake rails_env=production Reports:prune upto=1 Unit=mon

3 Backing up the puppet Dashborad database:

#rake rails_env=production File=/my/backup/file.sql Db:raw:dump

4 Recovering data:

#rake rails_env=production File=production.sql Db:raw:restore



This article is from the "Bremen Band" blog, declined reprint!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.