Puppet Introduction and Mastery of the puppet work principle (Principle article)

Source: Internet
Author: User

For the mastery of puppet, understanding the work principle of Puppet is a necessary stage, only after understanding the work principle of Puppet to better apply Puppet, let us together to understand the working principle of learning Puppet:

When it comes to how puppet works, it has to be seen from the following four aspects, as follows:

(1) Definition: Basic configuration information is defined using puppet specific language. Usually we write this information in modules.

(2) Template: Detects code before configuration execution, but does not actually execute.

(3) execution: defined automatic deployment of the configuration. Detects and records the part that has changed.

(4) Report: Send expected changes, actual changes and any changes to the reporting system.

Working data flow as shown below for puppet

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7E/83/wKiom1cDLgKy1XY6AABjtukUGU4580.png "title=" puppet . PNG "alt=" Wkiom1cdlgky1xy6aabjtukugu4580.png "/>

Data Flow Description:

    1. First all nodes node node sends facts and native information to master

    2. master tells node how to configure this information to be passed to node after it is written to the catalog.

    3. node node performs code parsing validation and execution on this machine, giving the results back to master.

    4. master sends data to analysis tools through the API. Reports can be fully integrated through open APIs or with other systems.

The direction of the entire data flow is based on the SSL security protocol, as shown in:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7E/80/wKioL1cDM_mhIfxdAAC_01l6yr4158.png "title=" puppet . PNG "width=" 648 "height=" 381 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:648px;height:381px; "alt=" wkiol1cdm_ Mhifxdaac_01l6yr4158.png "/>

The template file processing process is described below:

Puppet compiles the compiled code into the catalog by compiling the contents of the manifest (that is, the contents of the template). The code is validated before execution, and the state that is defined at the very beginning is completed. Code compilation process:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7E/85/wKiom1cDUvDxzvTpAACnEvSauho578.png "title=" puppet . PNG "width=" 648 "height=" 484 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:648px;height:484px; "alt=" Wkiom1cduvdxzvtpaacnevsauho578.png "/>

The detailed interaction between the agent and Master is shown as follows for the entire puppet automatic deployment process:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/85/wKiom1cDWDvT6ao2AADZUDsO3KY688.png "title=" puppet . PNG "width=" 648 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:648px;height:600px; "alt=" Wkiom1cdwdvt6ao2aadzudso3ky688.png "/>

Process Description:

1. The puppet client Agent sends the node name and facts information to master.

2. The puppet server Master classifies the requested client by classification and what it will do. This judgment is defined by the NODE.PP configuration file contained in the SITE.PP.

3. Puppet Server master compiles the required class information into the catalog and sends it to the puppet client Agent to complete the first interaction.

4. The puppet client Agent performs code validation (syntax checking and error checking) on the catalog. It is primarily the validation of the code and writes the information and results of the execution process to the log.

5. The puppet client Agent eventually reaches the state defined at the beginning, and sends the results and any execution data to the puppet server Master in the form of an open API.


The above is Puppet's work principle needs to Note is: Because the entire process is based on the SSL implementation, so the first is to ensure that the agent and master can be based on SSL communication!


This article is from the "Rookie Growth" blog, please be sure to keep this source http://blief.blog.51cto.com/6170059/1760439

Puppet Introduction and Mastery of the puppet work principle (Principle article)

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.