Puppet latest source code package installation Study Notes

Source: Internet
Author: User
Tags ssl connection

Recently I interviewed the O & M of two major e-commerce websites. The company has high requirements on system automation management, virtualization, mysql cluster, system performance optimization, and shell and python programming, although the interview was not successful, I also understood my goal in 2013.
As we all know, spring is the season of sowing, and the season of recovery of all things. Only the seeds of hope are planted in spring, summer can blossom, and autumn can produce results, in winter, the boss can raise his salary ......, let's learn how to install puppet together.
1. Puupet Introduction
Puppet is an open-source automated configuration and deployment tool. puppet is based on the C/S architecture. The server is called Puppet master, and the client software is called Puppet agent, the Puppet master server stores all the configuration code for the client server. The Puppet agent communicates with the Puppet master through a link encrypted and verified using the standard SSL protocol.
2. How Puupet works
1) The client Puppetd initiates an authentication request to the Master.
2) The client puppet calls Facter and Factert detects the host variable information. Puppetd sends the information to the server through an SSL connection.
3) The Puppet Master on the server detects the host name of the client, finds the node configuration corresponding to manifest, parses the content, and sends the pseudo code to the client.
5) The client receives and executes the pseudo code and returns the execution result to the server.
6) The server writes the execution result of the client to the log.
3. Physical Environment
Master: 192.168.1.244 Centos 5.5 hostname: master.puppet.net
Slave: 192.168.1.247 Centos 5.5 hostname: slave.puppet.net
4. Obtain the puppet Software Package
Download the latest installation package puppet-3.1.1.tar.gz on puppet's official website https://puppetlabs.com. You can also download it using wget on a Linux terminal.
Wget http://puppetlabs.com/downloads/puppet/puppet-3.1.1.tar.gz -- no-check-certificate
Wget http://puppetlabs.com/downloads/facter/facter-1.6.18.tar.gz -- no-check-certificate

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q43T7-0.jpg "alt =" "/>


5. puppet installation Configuration
5.1 configure the host name. Puppet communicates through the host name FQDN. Add the following two lines to the/etc/hosts file of the master and agent.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q4J07-1.jpg "alt =" "/>
5.2 install Puppet master.
1) Puppet is developed in ruby. Therefore, you must install ruby before installing puppet.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q43L3-2.jpg "alt =" "/>

2) install facter.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q45S1-3.jpg "alt =" "/>

3) install puppet.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q41N0-4.jpg "alt =" "/>

4) Start the puppet master process.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q45040-5.jpg "alt =" "/>

5.3 Install Puppet slave.
1) Puppet is developed in ruby. Therefore, you must install ruby before installing puppet.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q45059-6.jpg "alt =" "/>

2) install facter.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q43125-7.jpg "alt =" "/>

3) install puppet.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q44S8-8.jpg "alt =" "/>

6. puppet agent certificate application process.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q432D-9.jpg "alt =" "/>

7. Test the Puppet master-slave client.

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/194Q42L2-10.jpg "alt =" "/>

Summary:
1. Puppet is a tool for managing system configuration, including software installation, file configuration, system service, file management, user addition/deletion, and scheduled configuration. In puppet, the management tasks listed above are called resources.
2. Generate the configuration file. The conf file in the 3.1.1 source package does not contain the puppet configuration file. You can use the following method to generate the configuration file.
Puppet master -- genconfig>/etc/puppet. conf to generate the master configuration file
Puppet agent -- genconfig>/etc/puppet. conf to generate the agent configuration file
3. when the agent requests a certificate, the following error occurs in puppet agent -- no-daemonize -- verbose -- server = master.puppet.net. change pluginsync = ture to pluginsync = false in the conf configuration file.

650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131227/194Q41J0-11.jpg "/>
4. When the agent requests a certificate, the following error occurs in puppet agent -- no-daemonize -- verbose -- server = master.puppet.net. Add the alias 192.168.1.244 master.puppet.net puppet to the agent host file.

650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131227/194Q42024-12.jpg "/>


 

 

 

This article from the "simple dream catcher" blog, please be sure to keep this source http://sfzhang88.blog.51cto.com/4995876/1160131

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.