Many tools are designed to implement, set up and manage servers, for example, Chef, Puppet, Ansible and SaltStack. However, at the moment, Puppet’s tool had become the best option for system administrators and DevOps. This is because it can facilitate your tasks like implementing, setting up, and managing several servers’ status in a simple and automatic form.
Whether you are looking to increase agility through automation, modernize your operations or embrace digital transformation, Symphonica has you covered. Symphonica, our no-code provisioning automation engine, takes the complexity out of service and network operations so you can focus on growing your business. Let us handle the OSS.
Puppet is a tool developed by Puppetlabs to manage OP Unix and Windows system settings by declarative the form. The user describes the resources and their final status in the system.
Puppet’s agent (pre-installed machines) figures out how to get the relevant settings.
To give a Puppet example, we can use a virtual machine or use Docker.
In this case, the example will make a container base on the picture centos 6.
Puppet’s Installation Agent
Now you have to make the following steps in the new container:
- we install and enable a Puppet Labs’ repository
sudo yum install -y http://yum.puppetlabs.com/-release-pc1-el-7.noarch.rpm
- Now we install Puppet Agent
yum install -y puppet-agent
After these steps, we’ll have installed Puppet Agent, and we can make an example.
How does Puppet work?
First, you have to generate a manifest that describes the system’s resources and their status. This is based on the language Puppet specifies and offers. Throughout Facter, it is possible to discover how the manifests are compiled in a specific catalog of the system, which has the resources and its dependencies. It is worth noting that this catalog is executed in the destination system.
What is Facter?
Facter is Puppet’s multi-platform system profiles library. It discovers and informs acts that are available in their Puppet’s manifests like variables.
What are manifests?
Manifests contain the description of the system configuration and are saved with the .pp extension.
This example resource declaration includes:
- file: The resource type.
- my_file_test.txt: The resource title.
- path: An attribute.
- Ensure: What state the package should be in
[root @ 48c02e0c79af manifests] # cat my_manifiests.pp file { 'my_file_test.txt': path => ‘/tmp/’, ensure => present, mode => '0644', replace => true, content => "Somewhere in la Mancha, in a place whose name I do not care to remember, ... \ n", }
To run the manifest, we run the following command.
puppet apply my_manifiests.pp
Now, if we make a cat of the generated file, we can see the following:
As observed from the manifest, Puppet is capable of generating a file in the tmp folder with the name my_manifiests.txt ‘ with the content “Somewhere in la Mancha, in a place whose name I do not care to remember, … \ n”. This is a clear example that shows that we did not tell Puppet how to do things but rather what to do.
Although we only installed the Puppet agent tool, we generated and compiled the manifest within the same machine, and there was not a complete exercise of configuring a master server with several servers with different operating systems configured as agents. Even so, we can appreciate that puppet can help us simplify or show us exactly how the configuration and administration of multiple environments.