Puppet3 is installed in CentOS6.5 cluster, puppet3centos6.5

Source: Internet
Author: User

Puppet3 is installed in CentOS6.5 cluster, puppet3centos6.5

Environment: three hosts,

The IP addresses are 10.211.55.11, 12, and 13 respectively.

Install puppet master on 10.211.55.11

Puppet agent is installed on 10.211.55.11, 12, and 13

 

1. Install the EPEL LibraryTo install puppet Dashboard later

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

The source can be replaced with a domestic image.

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

Add an attribute at the end of [epel]

priority=11

It means that yum first goes to the official site for source check, and the official site does not go to the epel site for source check.

 

2. Install the dnsmasq domain name resolution service on 10.211.55.11.

Yum install dnsmasqchkconfig dnsmasq onservice dnsmasq startlokkit-p 53: udp (Open Port iptables 53) echo "10.211.55.11 node01.myhost.com">/etc/hosts

Modify dnsmasq. conf

interface=eth0listen-address=10.211.55.11bind-interfacesresolv-file=/etc/resolv.confaddn-hosts=/etc/hosts

Enter

echo “nameserver 10.211.55.11” >> /etc/resolv.conf

Change Host Name

Change vi/etc/sysconfig/network to node01.myhost.com, node02.myhost.com, and node03.myhost.com respectively.

Verify that DNS is successful

netstat -tunlp|grep 53dig node02.myhost.com

 

3. Install the time synchronization server on 10.211.55.11.

yum install ntpchkconfig ntpd onservice ntpd start

(To be improved)

 

4. Install Puppet

Install official sources

rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm

Import the GPG key (verify the integrity of the package)

rpm --import http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs

 

Install

yum install puppet-serverservice puppetmaster startservice puppet startchkconfig puppetmaster onchkconfig puppet on

Edit/etc/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. conf (configuration file)/usr/share/puppet (installation location) puppet config print modulepath (View module location) puppet agent-t -- summarize (View Report)

 

5. Install DashboardInstall

yum install -y mysql mysql-devel mysql-server httpd mod_passenger puppet-dashboard

Mod_passenger enables apache to support ruby

Configuration:

/Etc/my. cnf,

Add the last line in the [mysqld] Field

# Allowing 32MB allows an occasional 17MB row with plenty of spare roommax_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 the 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

Configure 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 12   PassengerPoolIdleTime 1500   PassengerStatThrottleRate 120   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

At this time, you can see the data in Dashbaord.

 

6. Install Foreman(To be improved)

 

Refer:

Http://www.chenshake.com/puppet-study-notes/

Http://acooly.iteye.com/blog/1993484

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.