How Puppet works!
How does Puppet work?
In this blog i will explain how Puppet works and how easy and powerfull Puppet is!
There are 2 key components:
- Puppet Master
- Puppet Agent
The puppet master is a deamon that runs on the master machine.
The master machine contains all configurations for all the (different) hosts
The puppet agent is a deamon that runs on the hosts that you want to manage.
The agent will automatically connect every 30 minutes to the puppet master and check if there are new configurations. You can manually let the agent check for new configurations.
The puppet agent connects to the puppet master, and the facter will send the host details to the puppet master. Based on this information the puppet master can send host specific configuration.
This is for example needed because the install commands on several linux distributions are different. (yum vs apt-get)
The information that the facter collects can be used for every possible usage.
What about linux machines with the same linux distribution, but within different networks.
Based on the domain or ipaddress you can give the host different configurations.
Because the puppet master needs these facts, it’s necessary that facter is installed on every agent.
Whenever the server configuration changes or services won’t start, puppet will automatically try to fix the problem. This is because the puppet agent will compare the configuration on the host with the configuration he received from the puppet master.
All puppet code is written in Ruby.
Ruby is a language that is easy to learn and understand.
Think about the infinity of possibilities you have when maintaining your hosts.
It even doesn’t really matter if you manage several or thousands of hosts.
Self healing hosts and always a known configuration that never can and will change without your permission.