Puppet introduction

    16-08-2018

Puppet

Puppet is an open-source configuration management tool. It provides the Puppet language. You can use the Puppet language to create configuration manifests and save them to a server, and use the server for centralized configuration enforcement and management.

Puppet network framework

Figure 1 Puppet network framework

 

As shown in Figure 1, Puppet operates in a client/server network framework. In the framework, the Puppet master (server) stores configuration manifests for Puppet agents (clients). The Puppet agents establish SSL connections to the Puppet master to obtain their respective latest configurations.

Puppet master

The Puppet master runs the Puppet daemon process to listen to requests from Puppet agents, authenticates Puppet agents, and sends configuration to Puppet agents on demand.

Puppet agent

H3C devices run Puppet 3.7.3 to act as Puppet agents. A Puppet agent communicates with the Puppet master by using the following steps:

1.        The Puppet agent sends an authentication request to the Puppet master.

2.        The Puppet agent checks with the Puppet master for the authentication result at an interval. Once the Puppet agent passes the authentication, a connection is established to the Puppet master.

3.        After the connection is established, the Puppet agent periodically sends a request to the Puppet master to obtain the latest configuration.

4.        After obtaining the latest configuration, the Puppet agent compares the configuration with its running configuration. If a setting difference exists, the Puppet agent updates the current setting with the obtained setting.

5.        After completing configuration comparison and update, the Puppet agent sends a feedback to the Puppet master.

Puppet resources

A Puppet resource is a unit of configuration. Puppet uses manifests to store resources.

Puppet manages types of resources. Each resource has a type, a title, and one or more attributes. Every attribute has a value. The value specifies the state desired for the resource. You can specify the state of a device by setting values for attributes without caring about how the device enters the state.

H3C has defined a series of Puppet resources for the Puppet master to configure Puppet agents.

新华三官网