Detailed understanding of architecture of puppet and its components and application of puppet

Last updated on May 27 2022
Sarika Tak

Table of Contents

Detailed understanding of architecture of puppet and its components and application of puppet

Puppet Architecture

Puppet uses master-slave or client-server architecture. Puppet client and server interconnected by SSL, which is a secure socket layer. It is a model-driven system.

Page 1 Image 1 69
Puppet Architecture

Here, the client is referred to as a Puppet agent/slave/node, and the server is referred to as a Puppet master.

Let’s see the components of Puppet architecture:

Puppet Master

Puppet master handles all the configuration related process in the form of puppet codes. It is a Linux based system in which puppet master software is installed. The puppet master must be in Linux. It uses the puppet agent to apply the configuration to nodes.

This is the place where SSL certificates are checked and marked.

Puppet Slave or Agent

Puppet agents are the real working systems and used by the Client. It is installed on the client machine and maintained and managed by the puppet master. They have a puppet agent service running inside them.

The agent machine can be configured on any operating system such as Windows, Linux, Solaris, or Mac OS.

Config Repository

Config repository is the storage area where all the servers and nodes related configurations are stored, and we can pull these configurations as per requirements.

Facts

Facts are the key-value data pair. It contains information about the node or the master machine. It represents a puppet client states such as operating system, network interface, IP address, uptime, and whether the client machine is virtual or not.

These facts are used for determining the present state of any agent. Changes on any target machine are made based on facts. Puppet’s facts are predefined and customized.

Catalog

The entire configuration and manifest files that are written in Puppet are changed into a compiled format. This compiled format is known as a catalog, and then we can apply this catalog to the target machine.

The above image performs the following functions:

  • First of all, an agent node sends facts to the master or server and requests for a catalog.
  • The master or server compiles and returns the catalog of a node with the help of some information accessed by the master.
  • Then the agent applies the catalog to the node by checking every resource mentioned in the catalog. If it identifies resources that are not in their desired state, then makes the necessary adjustments to fix them. Or, it determines in no-op mode, the adjustments would be required to reconcile the catalog.
  • And finally, the agent sends a report back to the master.

Puppet Master-Slave Communication

Puppet master-slave communicates via a secure encrypted channel through the SSL (Secure Socket Layer). Let’s see the below diagram to understand the communication between the master and slave with this channel:

Page 3 Image 2 10
Puppet Master-Slave

The above diagram depicts the following:

  • Puppet slave requests for Puppet Master Certificate.
  • Puppet master sends the Master Certificate to the puppet slave in response to the client request.
  • Puppet master requests to the Puppet slave for the slave certificate.
  • Puppet slave sends the requested slave certificate to the puppet master.
  • Puppet slave sends a request for data to the puppet master.
  • Finally, the master sends the data to the puppet slave as per the request.

Puppet Components

Following are the key components of Puppet:

  • Manifests
  • Module
  • Resource
  • Factor
  • M-collective
  • Catalogs
  • Class
  • Nodes

Let’s understand these components in detail:

Manifests

Puppet Master contains the Puppet Slave’s configuration details, and these are written in Puppet’s native language.

Manifest is nothing but the files specifying the configuration details for Puppet slave. The extension for manifest files is .pp, which means Puppet Policy. These files consist of puppet scripts describing the configuration for the slave.

Module

The puppet module is a set of manifests and data. Here data is file, facts, or templates. The module follows a specific directory structure. These modules allow the puppet program to split into multiple manifests. Modules are simply self-contained bundles of data or code.

Let’s understand the module by the following image:

Page 4 Image 3 9
Module

Resource

Resources are a basic unit of system configuration modeling. These are the predefined functions that run at the backend to perform the necessary operations in the puppet.

Each puppet resource defines certain elements of the system, such as some particular service or package.

Factor

The factor collects facts or important information about the puppet slave. Facts are the key-value data pair. It contains information about the node or the master machine. It represents a puppet client states such as operating system, network interface, IP address, uptime, and whether the client machine is virtual or not.

These facts are used for determining the present state of any agent. Changes on any target machine are made based on facts. Puppet’s facts are predefined and customized.

M-Collective

M-collective is a framework that enables parallel execution of several jobs on multiple Slaves. This framework performs several functions, such as:

  • This is used to interact with clusters of puppet slaves; they can be in small groups or very large deployments.
  • To transmit demands, use a broadcast model. All Slaves receive all requests at the same time, requests have filters attached, and only Slaves matching the filter can act on requests.
  • This is used to call remote slaves with the help of simple command-line tools.
  • This is used to write custom reports about your infrastructure.

Catalogs

The entire configuration and manifest files that are written in Puppet are changed into a compiled format. This compiled format is known as a catalog, and then we can apply this catalog to the target machine.

All the required states of slave resources are described in the catalog.

Class

Like other programming languages, the puppet also supports a class to organize the code in a better way. Puppet class is a collection of various resources that are grouped into a single unit.

Nodes

The nodes are the location where the puppet slaves are installed used to manage all the clients and servers.

Application of Puppet

Many organizations are using Puppet. There are different types and different sizes of the organizations that are using puppet. Puppet is adopted by many organizations for the following reasons:

Consistency and Scalability

The earlier infrastructures were experiencing unusual growth and required its infrastructure to keep speed with the industry. But script-based solutions and manual strategies were not enough for their requirements.

Puppet is more beneficial to the organizations in enhancing the organization’s growth and fulfilling infrastructural needs. Hence, Puppet is considered a better option than the manual approaches and scripting solution.

Portable Infrastructure

The earlier infrastructure needed a way so that it can achieve a consistent configuration management approach in both public cloud and private data centers.

Puppet provides consistent configuration management techniques to their public clouds and data centers.

Flexibility

Since the property of each infrastructure is different from others, it was very difficult for the team to fix the correct configuration to each system quickly.

Puppet provides the flexibility to match the right configuration with the right machine. So that organizations can remain quite more flexible by using Puppet.

Infrastructure Insights

For the outstanding infrastructure, automatic visualization of each system’s properties is necessary.

Organizations can describe all machine properties with the help of Puppet and can access infrastructure insights to manage the servers.

Collaboration

As we know, the puppet is a model-driven framework. Because of this feature, it is easy to share the configuration across the organization. Puppet allows the developers and operations staff to work together to ensure new service delivery is of extremely high quality.

So, this brings us to the end of blog. This Tecklearn ‘Detailed understanding of architecture of puppet and its components and application of puppet’ blog helps you with commonly asked questions if you are looking out for a job in DevOps. If you wish to learn Puppet and build a career in DevOps domain, then check out our interactive, Continuous Deployment: Configuration Management using Puppet Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/continuous-deployment-configuration-management-using-puppet/

Continuous Deployment: Configuration Management using Puppet Training

About the Course

Tecklearn has specially designed this Continuous Deployment: Configuration Management using Puppet Training Course to advance your skills for a successful career in this domain. The course will cover different components of Git and GitHub and how they are used in software development operations. The course consists of Configuration Management using Puppet, Puppet Components, important concepts like Puppet Lifecycle, Puppet Language and Puppet Installation. You will get an in-depth knowledge of these concepts and will be able to work on related demos. Upon completion of this online training, you will hold a solid understanding and hands-on experience with Puppet.

Why Should you take Configuration Management using Puppet Training?

  • Average salary of Puppet Professional is $90k – Payscale.com
  • Uber, Salesforce, PayPal, Booking.com, MIT, Starbucks. & many other MNC’s worldwide use Puppet across industries.
  • According to Grand View Research, the DevOps market size is estimated to be worth $12.85 billion by 2025. DevOps professionals are highly paid and in-demand throughout industries including retail, eCommerce, finance, and technology.

What you will Learn in this Course?

Introduction to DevOps

  • What is Software Development
  • Software Development Life Cycle
  • Why DevOps?
  • What is DevOps?
  • DevOps Lifecycle
  • DevOps Tools
  • Benefits of DevOps
  • How DevOps is related to Agile Delivery
  • DevOps Implementation

Continuous Deployment: Configuration Management using Puppet

  • Need of Configuration Management
  • What is Puppet
  • Puppet Architecture
  • Puppet Components
  • Puppet Lifecycle
  • Setting up Master Slave using Puppet
  • Puppet Manifests
  • Puppet Modules
  • Applying configuration using Puppet
  • Puppet File Server
  • Hands On

0 responses on "Detailed understanding of architecture of puppet and its components and application of puppet"

Leave a Message

Your email address will not be published. Required fields are marked *