- [Instructor] Similar to Chef,
Puppet is another configuration management tool
that we want to look at.
This is Cisco's preferred solution for their own devices
and probably the most popular orchestration solution
at the time of this recording.
Catalyst and Nexus switches
as well as the Cisco Unified Computing System
all support the use of Puppet.
Similar to Chef,
Puppet is also a client server configuration
that uses a pull model for configuration management.
In Puppet, the server is referred to as a Puppet master
while the clients being managed
are referred to as Puppet agents.
These agents are installed locally on each device
that's under the management of Puppet
such as switches or servers.
Puppet uses its own configuration language based on Ruby,
that was designed with accessibility in mind
for administrators,
because it requires very little programming experience
to understand the syntax, this is what's referred to
as Domain Specific Language or DSL.
The Puppet master is a machine that contains
all of the configurations for the different clients
that are being managed.
This is a master server where configurations
are created and edited.
This is also a Linux-based machine that's responsible
for all of the configurations or Puppet codes.
Any programmed automation tasks are executed
within the Puppet Console and stored
in the Puppet Database or the Puppet DB for short.
Agents will pull configuration information
from this database and apply those locally.
The Puppet agents or in other words,
the devices being managed are populated
with Puppet agent software.
This software can support Windows, Mac OS, Linux,
Solaris, basically any of the most popular operating systems
that you might run across in an enterprise network.
Communication between the master and the agents happens
over a secured SSL connection
managed by secure certificates.
Once the SSL connections are authenticated,
data that are referred to as facts
are sent from the agent machines
to the Puppet master server.
This will include important information about each agent
including the IP address, the host name,
file information, and so on.
Once these facts are gathered, the Puppet master
will compare these to the desired state
that each agent should be in.
In other words, it will take a look at the configuration
that seems to be currently on the device
based on the facts received
and decide if changes need to be made on that device.
Once these facts are gathered, the Puppet master compiles
a list of configuration changes that need to take place
on the agent in something called a catalog.
The contents of a catalog can be almost anything,
it can be file creation, user deletion software
and much, much more.
The agent receives a catalog from the Puppet master
and interprets the catalog, which will describe
the desired state that the agent should be in.
These changes will be applied accordingly
by the Puppet agent,
and this process will repeat periodically
to make sure that everything is kept up to date.
One really nice function of Puppet is that each agent
can get its own specialized catalog
with built in conditional logic and functions,
this makes sure that each agent is receiving
only the necessary instructions, and therefore that reduces
the CPU and memory consumption of the agent,
and it generally makes it much quicker
as opposed to sending out a catalog that's the same
across the board and performing functions
that might not need to be performed necessarily.
When an agent requests a catalog from the Puppet master,
it sends several important pieces of information
to the server.
It sends the name of the device
where the agent is installed,
which should match the name on the SSL certificate.
It sends the certificate itself,
containing the agent machines certain name
and the previously mentioned facts about the agent.
The structures found within the catalogs shared from
the Puppet master include resources, manifests and modules.
Resources are very simply just a description
of the desired state that the system should be in,
such as if a certain file or user should exist
or if a particular package should be installed.
They are the smallest building block of this language
and they represent a single element.
Manifests are essentially Puppet programs,
they're composed of Puppet coding
and they use the dot PP file extension,
and they describe how resources should be configured.
Puppet manifests can consist of files or templates,
and a collection of manifests is called a module.
These collections are used to manage
a specific infrastructure task
such as the complete deployment
of a new server on the network.
You can also download and install pre-made modules
from the Puppet Forge website,
which is an online repository of modules for automation.
At the time of this recording,
there are over 6,000 modules found on the site.
For example, here's a module
for managing Cisco catalyst devices
that you can customize for your own needs.
So that's a look at the Puppet automation tool
and how those components interact with each other.