Puppet installation Tutorial (iv) How the--puppet works and how it works

Source: Internet
Author: User
Tags ssl connection

Before using any software, we need to understand how it works, otherwise it will cause a lot of inconvenience to the subsequent use. Puppet uses a very simple C/s architecture, all data interaction through SSL, to ensure security. It is shown in Workflow 1.

650) this.width=650; "title=" Figure 1 Puppet Workflow "src=" Http://ipad-cms.csdn.net/cms/attachment/201209/5048569d92738.jpg " height= "325" width= "377" style= "border:none;"/>

Figure 1 Puppet Workflow

1. The client puppetd initiates an authentication request to master, or uses a signed certificate.

2. Master tells the client that you are legal.

3. The client puppetd calls Facter,facter to detect some variables of the host, such as host name, memory size, IP address, and so on. The puppetd sends this information over an SSL connection to the server side.

4. The server-side puppet master detects the host name of the client, and then finds the node configuration for the manifest, and resolves that portion of the content. Facter sent to the information can be used as variable processing, node involved in the code to parse, and other non-involved code does not parse. Parsing is divided into several stages, the first is the grammar check, if the syntax error errors, if the syntax is correct, continue to parse, the results of the parse to generate an intermediate "pseudo-code" (Catelog), and then send the pseudo-code to the client.

5. The client receives "pseudo-code" and executes.

6. When executing, the client determines that there are no file files, and if so, initiates a request to fileserver.

7. The client determines that there is no configuration report, and if configured, sends execution results to the server.

8. The server side writes the execution result of the client to the log and sends it to the reporting system.

This is the puppet workflow. The most important thing is puppet-master to manage node's configuration files.


In the process of learning puppet, the data will be repeatedly referred to Module,class,resource and other keywords. Let's talk about the relationship between them.

Module: modules, different modules to achieve different functions.

Class: Can be understood as classes, modules are composed of classes, the module contains a class or more than one class

Resource: Resources, I personally understand the smallest constituent unit of a puppet management configuration file, in the same vein, a class is made up of one or more resources. These resources can be files (file), users (user), Groups (group), Services (service), software (package), and so on. Later in this article we will continue to introduce the details of resource.


This article from "Linux Rookie" blog, reproduced please contact the author!

Puppet installation Tutorial (iv) How the--puppet works and how it works

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.