Environment: 3 main units,
IP is 10.211.55.11, 12, 13, respectively
Puppet Master installed in 10.211.55.11
Puppet agent installed in 10.211.55.11, 12, 13
1, install the Epel library behind the installation puppet dashboard need
Yum Install YUM-PRIORITIESRPM-IVH https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm rpm- Import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
Where the source can be replaced with a domestic mirror
http://mirrors.ustc.edu.cn/fedora/epel/epel-release-latest-6.noarch.rpmhttp://mirrors.ustc.edu.cn/fedora/epel/ Rpm-gpg-key-epel-6
Modify the/etc/yum.repos.d/epel.repo file at the end of [Epel] Add a property priority=11 means Yum first go to the official source, the official did not go to Epel source to find
2. Install DNSMASQ domain name resolution service on 10.211.55.11
Modify Dnsmasq.conf
Interface=eth0listen-address=10.211.55.11bind-interfacesresolv-file=/etc/resolv.confaddn-hosts=/etc/hosts
Each of the three hosts is entered separately
echo "NameServer 10.211.55.11" >>/etc/resolv.conf
Change host Name
Vi/etc/sysconfig/network respectively to node01.myhost.com, node02.myhost.com, node03.myhost.com
Verify that DNS is successful
Netstat-tunlp|grep 53dig node02.myhost.com
3, in 10.211.55.11 installation time synchronization server
Yum install NTP chkconfig ntpd on service ntpd start (ready to be perfected)
4, installation Puppet
Install the official source RPM-IVH http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm Import GPG key (verify package integrity) RPM--import/http Yum.puppetlabs.com/rpm-gpg-key-puppetlabs Installation
Yum Install Puppet-serverservice puppetmaster startservice puppet startchkconfig puppetmaster onchkconfig puppet on
Edit/etc/puppet/puppet.conf
[Agent]server = node01.myhost.com
Automatic signature
Cat >/etc/puppet/autosign.conf <
Test Connection Puppet agent-t Delete certificate Find/var/lib/puppet/ssl-name localhost.pem-delete Common Information
Puppet cert List-all (view all certificates) Cat/etc/sysconfig/puppet (default configuration)/var/lib/puppet (Agent certificate location)/etc/puppet/puppet.conf (config file)/usr/share/puppet (installation location) puppet config print modulepath (view module location) Puppet agent-t--summarize (View report)
5, install dashboard installation
Yum install-y mysql mysql-devel mysql-server httpd mod_passenger Puppet-dashboard
Mod_passenger is let Apache support Ruby configuration:/ETC/MY.CNF, in the [Mysqld] field, add last line # allowing 32MB allows an occasional 17MB row with plenty of spare Max_allowed_packet = 32M
/etc/init.d/mysqld startchkconfig mysqld onchkconfig httpd onservice httpd startmysqladmin-u root password ' password '
Create a Dashboard database
Mysql-uroot-ppassword <
Edit/usr/share/puppet-dashboard/config/database.yml
Production: database:dashboard username:dashboard password:password Encoding:utf8 Adapter: Mysql
Modify Time zone/USR/SHARE/PUPPET-DASHBOARD/CONFIG/ENVIRONMENT.RB
#config. Time_zone = ' UTC ' config.time_zone = ' Beijing '
Initialize database Cd/usr/share/puppet-dashboard/rake rails_env=production db:migrate configuration Apache
Cat >/etc/httpd/conf.d/passenger.conf << eofloadmodule passenger_module modules/mod_passenger.so passengerroot/usr/share/rubygems/gems/passenger-3.0.17 Passengerruby/usr/bin/ruby Passengerhighperformance on passengermaxpoolsize passengerpoolidletime Passengerstatthrottlerate railsautodetect on ServerName node01.myhost.com documentroot "/usr/share /puppet-dashboard/public/" <directory"/usr/share/puppet-dashboard/public/"> Options None allowoverride authconfig Order allow,deny allow from all errorlog/var/log/httpd/node01.myhost.com_ Error.log LogLevel warn customlog/var/log/httpd/node06.chenshake.com_access.log combined Serversignature on eof/etc/init.d/httpd startchkconfig httpd onlokkit-p 80:tcp
Configure Puppet
# puppet.conf (on puppet master) [master] reports = store, http reporturl = http://node06.chenshake.com:80/ Reports/upload
/etc/init.d/puppetmaster Restart Import Report
Cd/usr/share/puppet-dashboardrake gems:refresh_specsrake rails_env=production reports:importDelayed Job Workersenv Rails_env=production/usr/share/puppet-dashboard/script/delayed_job-p dashboard-n 4-m Startps-ef|grep delayed_job| Grep-v grepenv rails_env=production/usr/share/puppet-dashboard/script/delayed_job-p dashboard-n 4-m Stop
This time you can see the data in the Dashbaord.
6. Installation Foreman (to be perfected)
Reference: http://www.chenshake.com/puppet-study-notes/http://acooly.iteye.com/blog/1993484
Puppet3 installation under the CentOS6.5 cluster