Skip to main content

How puppet works in your IT infrstructure


What is Puppet?

Puppet is IT automation software that helps system administrators manage infrastructure throughout its lifecycle, from provisioning and configuration to orchestration and reporting. Using Puppet, you can easily automate repetitive tasks, quickly deploy critical applications, and proactively manage change, scaling from 10s of servers to 1000s, on-premise or in the cloud.


How the puppet works?

It works like this..Puppet agent is a daemon that runs on all the client servers(the servers where you require some configuration, or the servers which are going to be managed using puppet.)

All the clients which are to be managed will have puppet agent installed on them, and are called nodes in puppet.


Puppet Master:This machine contains all the configuration for different hosts. Puppet master will run as a daemon on this master server.


Puppet Agent:This is the daemon that will run on all the servers, which are to be managed using puppet. Puppet agent will go and ask the configuration for itself from the puppet master server at a specific time interval.

The connection between puppet agent and master is made in a secure encrypted channel with the help of SSL.
If suppose the puppet agent has already applied the required configuration and there are no new changes then it will do nothing.

Note: You can also manually ask puppet agent to go and fetch the configuration from the puppet master server whenever required. People manage puppet agent to fetch configuration through a cron. But managing puppet agent to automatically fetch data, by running it as a daemon on every node is a good idea.

30 minutes is the default interval when puppet agent daemon will go and fetch config data from puppet master.



As shown in the above figure puppet master server has all the configuration options for Host 1(or call it the first node), Host 2(node 2),Host 3(node 3).

An important fact to note is that it is the client(puppet agent or nodes) who go and fetches the configuration data from the puppet master server at a regular interval.
Now there are multiple steps involved whenever a puppet agent of any node connects to a puppet master server for fetching data. These steps are mentioned below.

Step 1:Whenever a client node connects to the master, the master server analyzes the configuration to be applied to the node, and how to apply that configs on the node.

Step 2:Puppet master server Takes and collects all the resources and configurations to be applied to the node, and compiles it and make it a catalog. This catalog is given to the puppet agent of the node.


Step 3: Puppet agent will apply the configuration on the node, according to the catalog, and then reply back, and submit the report of the configuration applied to the puppet master server.


How does Puppet Work with Different Platforms?


This is possible with the help of a tool called as Facter. Whenever the agent connects to the puppet master server for configuration data, Facter tool is used to give the complete details about the node(agent) to the puppet master. Facter will provide almost all information about the agent node. The information is very much detailed. See an example output of Facter below.

[root@myvm1 ~]# facter
architecture => i386
augeasversion => 0.10.0
boardmanufacturer => Intel Corporation
boardproductname => 440BX Desktop Reference Platform
boardserialnumber => None
domain => sarath.com
facterversion => 1.6.6
fqdn => myvm1.sarath.com
hardwareisa => i686
hardwaremodel => i686
hostname => myvm1
id => root
interfaces => eth0,lo,sit0
ipaddress => 192.168.159.128
ipaddress_eth0 => 192.168.159.128
ipaddress_lo => 127.0.0.1
is_virtual => true
kernel => Linux
kernelmajversion => 2.6
kernelrelease => 2.6.18-128.el5
kernelversion => 2.6.18
lsbdistcodename => Tikanga
the output of facter is much more detailed than the above example output shown.

Puppet master gets the complete information about the node, and takes a decision with the help of that information on how to apply the configuration.
For example if suppose the node is debian then to install a package puppet will use apt-get instead of yum.
You can do stuff's like if the IP address is this, then apply this gateway to the server. And you can also add custom made facts to a node, and do configuration based on that fact(this makes puppet much more customizable).
You require Facter tool to be installed on all the nodes, where you want to apply configuration using puppet. Without Facter, there is no way through which puppet server will get all information about the agent.

Puppet detailed workflow





















Comments

  1. In today's fiercely competitive business landscape, customer retention has become a top priority for companies seeking sustainable growth. VcallGlobal, a leading outsourcing company, offers specialized Customer Retention Outsourcing services designed to help businesses enhance customer loyalty, reduce churn, and drive long-term success. In this SEO-friendly article, we will explore the key benefits and solutions provided by VcallGlobal in optimizing customer retention strategies.

    ReplyDelete
  2. MVNO solutions are comprehensive platforms tailored for companies entering the telecom market without building their own network infrastructure. These solutions include billing, provisioning, and network management tools, empowering MVNOs to efficiently offer mobile services, customize plans, and compete effectively in the wireless industry while minimizing upfront investments.

    ReplyDelete
  3. "Explorer Studio Preschool" is an educational institution focused on fostering early childhood development. This preschool provides a nurturing environment where young children can explore, learn, and develop essential skills. It encourages curiosity, creativity, and a love for learning, preparing youngsters for a successful educational journey ahead.

    ReplyDelete
  4. Telgoo5 specializes in comprehensive BSS Business Support System solutions, empowering telecom operators worldwide. Our cutting-edge technology streamlines operations, enabling efficient billing, customer management, and service provisioning. With a robust suite of customizable tools, we optimize workflows, enhance customer experiences, and drive revenue growth. Telgoo5 is committed to delivering tailored BSS solutions that propel telecom businesses towards sustained success and innovation.

    ReplyDelete
  5. Site Reliability Engineering Training
    SRE Training in Hyderabad
    Site Reliability Engineering Training in Hyderabad
    Site Reliability Engineering Online Training
    Site Reliability Engineering Training Institute in Hyderabad
    SRE Training Course in Hyderabad
    SRE Online Training in Hyderabad

    ReplyDelete
  6. The main thing to consider is your ability to pay for a repair or replacement out of pocket if something happens to your vehicle.
    Get Insuring Small Businesses in Florida

    ReplyDelete

Post a Comment

Popular posts from this blog

WSO2 ESB tuning performance with threads

I have written several blog posts explaining the internal behavior of the ESB and the threads created inside ESB. With this post, I am talking about the effect of threads in the WSO2 ESB and how to tune up threads for optimal performance. You can refer [1] and [2] to understand the threads created within the ESB. [1] http://soatutorials.blogspot.com/2015/05/understanding-threads-created-in-wso2.html [2] http://wso2.com/library/articles/2012/03/importance-performance-wso2-esb-handles-nonobvious/ Within this blog post, I am discussing about the "worker threads" which are used for processing the data within the WSO2 ESB. There are 2 types of worker threads created when you start sending the requests to the server 1) Server Worker/Client Worker Threads 2) Mediator Worker (Synapse-Worker) Threads Server Worker/Client Worker Threads These set of threads will be used to process all the requests/responses coming to the ESB server. ServerWorker Threads will be used to pr

How to configure timeouts in WSO2 ESB to get rid of client timeout errors

WSO2 ESB has defined some configuration parameters which controls the timeout of a particular request which is going out of ESB. In a particular  scneario, your client sends a request to ESB, and then ESB sends a request to another endpoint to serve the request. CLIENT->WSO2 ESB->BACKEND The reason for clients getting timeout is that ESB timeout is larger than client's timeout. This can be solved by either increasing the timeout at client side or by decreasing the timeout in ESB side. In any of the case, you can control the timeout in ESB using the below properties. 1) Global timeout defined in synapse.properties (ESB_HOME\repository\conf\) file. This will decide the maximum time that a callback is waiting in the ESB for a response for a particular request. If ESB does not get any response from Back End, it will drop the message and clears out the call back. This is a global level parameter which affects all the endpoints configured in ESB. synapse.global_timeout_inte