
This video provides an overview of the entire title.
Installation of the required setup and working environment.
To deal with large infrastructures, manage and deploy them, configuration management has become the industry wide accepted solution. We will look at problems addressed by configuration management and the advantages.
Before diving deep into learning a technology, it is important that we make ourselves aware of the unique terminologies of the concerned tool. We learn about the most important components and terminologies of Puppet.
To learn about how to manage infrastructure with a tool, a deep understanding of the workflow of the tool is extremely necessary. We learn about the relation of the Puppet components with each other and how they work together to achieve a managed infrastructure.
To get started with a tool, it is essential to be able to obtain the software and know how to install them on the system. We learn about installing the Puppet components and explore the directory structure of Puppet to know what lies where.
After obtaining the required tools, the procedure to make the components work with each other is necessary to master. We learn to create basic content on the Puppet server and make the agents get them after successful authentication.
To use a running Puppet infrastructure, it is important to be able to add meaningful content to it so that agents are able to get more and more functionalities. We learn about modules and their structure. We also learn to add features to modules to make them applicable to a diverse infrastructure.
While default settings are enough for a small infrastructure, often parameters need to be tweaked to get optimal performance as infrastructures scale. We learn to change parameters to suit our needs and manage certificates on the Puppet server.
With an ever growing community, there has been a trend in creating community modules which can be used by users and organizations without having to write new modules themselves. We learn about community modules, where to find them and how to contribute.
When using community modules or a module with loads of dependent modules or classes, all the dependencies need to be mentioned in the module specifically and need to be present on the system during various phases such as Puppet agent runs or testing. We learn to manage these modules.
Keeping all modules in a single location has its own disadvantages such as dangers of breaking the module tree when trying to test a new module or a change. Environments can be configured to address this problem. We learn to configure and manage environments.
As the functionalities keep getting added to Puppet agent nodes, the list of modules to be included in the node definitions keep increasing. To address this problem and keep node definitions clean and efficient, the concept of roles and profiles is applied.
Writing a module has become a complex process as new features and workflows are added each day. With ever increasing list of directories and files in a module, it is necessary that we know the function of each of them. We learn to create and manage a module.
One of the recent attempts to create generic modules includes steps to separate logic and data. Hiera enables users to keep data separated from module logic and reuse modules by just changing Hiera data.
Although not seen as mandatory or crucial in module development, test driven development should be adopted and followed by all organizations managing infrastructure using Puppet. We get an overview of Puppet module testing.
When writing long and complex modules, it is easy to miss characters or keywords here and there and to not be able to follow style guides. Syntax tests make it easy for developers to find out problems in code files and conform to the standard development style guide.
The methodology of writing tests first and then writing code to fulfill the tests is widely practiced in the industry for almost all programming languages. Puppet development is no exception. Using rspec-puppet, we learn to write unit tests for Puppet modules.
Once modules are written, it should be tested on a running system and the configured components should be verified before the modules can be pushed to production. The Beaker testing tool helps us to create acceptance tests using Serverspec for Puppet modules.
To test modules on running systems and verify configured components, there are more than one tool and we have options to choose from. Test-kitchen is another excellent tool which helps us to run acceptance tests using Serverspec.
Being able to publish modules in an automated manner is as important as being able to write and test them. Puppet-blacksmith helps us to create releases and publish modules to Puppet Forge in an automated manner.
Being able to run test one by one is fun and easy to do when developing modules. However, to be able to produce production code continuously and efficiently, being able to test the code in an automated fashion is important and can be achieved by a tool such as Jenkins. We learn to use Jenkins to run Puppet test suites.
After being able to run test suites in Jenkins, controlling the code management workflow is the next important task in the process. Creating a workflow for developers to be able to push new code to production without breaking existing infrastructure is what we will learn here.
This video will give an overview of the entire course.
Configuration and management of infrastructure is important. Equally important is the process of reporting, without which there would be no way to find out if the infrastructure is behaving the way we want it to.
PuppetDB already provides us with enormous possibilities to find out extremely granular details of our infrastructure. Puppetboard, a community project, leverages the features of PuppetDB to provide a very decent dashboard for reporting.
Puppetexplorer is another community project to assist users in reporting and displaying an attractive dashboard to use PuppetDB data.
Dashboards are definitely useful for viewing reports. However, their usefulness increases many folds as soon as we are able to manipulate data on the dashboard and integrate it with tools such as Puppet to manage the infrastructure. Foreman is one such tool.
Apart from acting as a reporting dashboard for Puppet, Foreman has additional features such as acting as an External Node Classifier for Puppet. With minimum changes to the configuration, an efficient ENC can be configured on the Foreman.
The community has huge support of all kinds and the number of resources that can be found to be used readily are overwhelming. However, at times, the need to build custom solutions is unavoidable. Puppet has support for custom reporting which can be used to create reporting mechanisms of various types.
Puppetboard and Puppetexplorer are definitely great resources for readily implementing Puppet reporting. However, Puppet is flexible enough to allow us to create our own reports from PuppetDB by querying the data.
One of the excellent dashboard platform out in the infrastructure space is the Elastic stack created with Elasticsearch, Logstash, and Kibana. It has taken data collection and dashboards to a whole new level and Puppet can also take advantage of it by sending reports to Logstash and viewing data in Kibana.
One of the oldest monitoring tool in the infrastructure space, Nagios has its exclusive Puppet types available. When used with PuppetDB, it can create a dynamic and efficient monitoring workflow.
Using Puppet to deploy changes is great but making sure that Puppet is running when it is supposed to run is one of the critical tasks to keep in mind. Using a custom script and the power of Nagios, this task can be make very simple and elegant.
In a fairly large infrastructure, making sure that only valid hosts are able to get catalogs from the Puppet server is of utmost importance. With policy based certificate signing feature of Puppet, this additional security step is possible.
Complex workflows often require that some configurations or data are kept restricted for special nodes or resources. Restricted mount points can be configured in Puppet to exactly implement this requirement by modification of few configuration files.
Tracking active changes or finding what will change without actually changing them is often a requirement in highly critical infrastructures and can also be used for audit purposes. Puppet metaparameters are extremely helpful in implementing such workflows.
Identifying vulnerable system components and then keeping them secure is one of the base requirements of any infrastructure. The enormous database of community modules provide us with a lot of modules which are specifically created to help with this process.
No tool or platform can be deployed successfully without running into errors and problems. It can be tedious to find out underlying problems from error messages. However, some of the most common problems and errors can be readily identified with some help.
This video provides an overview of the entire course.
As infrastructure grows to hundreds and thousands of nodes, the capacity of the Puppet server reaches a limit. Load balancing in multiple Puppet servers is an optimal way to handle load and provide redundancy.
As infrastructure grows, isolating the Puppet server components is a better way to manage them, rather than having a monolithic Puppet server node. Let’s take a look at isolating and centralizing the Puppet certificate authority service, which is an important step in this process.
With the growth in the number of agent nodes, maintaining a database and the history of node configuration and metadata is crucial for any infrastructure. PuppetDB helps to maintain this database and also aids in configuration via exported resources.
Infrastructure management involves services with server and client based models. The server has to push or pull the data from various nodes in the infrastructure for which it needs the node specific information. To automate this process, the methods of exporting and collecting in Puppet modules are extremely useful.
After the data from thousands of nodes are stored in a database, they are not very useful, unless they can be queried and visualized using structured querying mechanisms. Different Puppet query mechanisms and dashboards helps in solving these problems.
As the number of nodes and service roles grow in an infrastructure, it is important to have proper node classification mechanisms so that nodes are able to receive catalogs correctly and without latency. Proper manageable node classification methods are also desirable.
Hostname based node classification often gets very complex and it is easier to switch to other node classification methods. Apart from providing data isolation from code, Hiera can also be an effective framework to provide node classification data based on metadata such as facts.
Running Puppet components in Docker containers is a bit different than doing it on a physical or virtual machine. It is important to understand how the service components work in an isolated manner and also in the form of an application stack.
Running Puppet agent in Docker Containers to automate them is different from the general process; given the fact that container based dynamic environments don’t have hostnames for the containers and system based process control systems are unavailable in containers.
The fact that containers are able to be spawned within few seconds is true. This is due to the fact that Docker images already have all the configurations baked in them and provisioning during the container launch is not required, thus bringing down the deployment time. Creating images is a crucial step in container based environments.
Once Puppet server side components and containers are ready to be spawned using Docker images, it is important that we are able to launch application stacks involving multiple components such as application and database. Docker Compose can be managed efficiently by use of respective Puppet modules and help us in managing container based application stacks.
Once infrastructure reaches a considerable size, a requirement is to be able to perform specific tasks on specific nodes. Managing and maintaining an inventory of role based nodes is a tedious process. MCollective can be a very efficient tool in implementing orchestration which helps us to target nodes based on metadata and run specific tasks
Although facter provides a lot of system facts, often in complex environments, they are not enough. By writing custom facts based on our infrastructure, we can add meaningful custom data to our infrastructure nodes based on which complex tasks can be performed.
Puppet built-in types are very helpful in writing configurations. However, for simplified use of Puppet modules, often writing custom types are very important. For users who don’t wish to get into the complex methods of writing Ruby based Puppet types, resource types are a simpler alternative where custom types can be written using the Puppet language.
With the numerous tools and services available in the infrastructure ecosystem, it is quite exhausting and time consuming to write Puppet modules for them from scratch using built-in Puppet types. For such scenarios, advanced Puppet types can be written using Ruby which can simplify custom tasks.
Puppet types are useful in defining custom tasks and processes, however without Providers, Puppet types are unable to do much. If Puppet types are the interface to create custom configurations, providers are the backend logic which actually performs the tasks on the systems. Multiple providers can be written for systems or services with different behaviors.
Although Puppet types and Providers help us in creating advanced tasks and interfaces, for some smaller tasks and scenarios, it is enough to create functions. Custom functions can be created in the Puppet language and Ruby to handle such scenarios.
With the ever increasing challenges of IT infrastructures, the need to automate common activities has become the major requirements in many large organizations. Puppet is one of the most efficient configuration management tool that allows to manage and automate all your IT infrastructure. So, if you looking forward to master the automation techniques of Puppet, then go for this Learning Path.
Packt’s Video Learning Paths are a series of individual video products put together in a logical and stepwise manner such that each video builds on the skills learned in the video before it.
The highlights of this Learning Path are:
Let's take a quick look at your learning journey. You will start off with a complete understanding of the Puppet environment followed by detailed steps to configure your own Puppet infrastructure. You will write tests for modules right from the beginning, build an efficient and scalable codebase, and create continuous integration pipelines with CI tools such as Jenkins. You will also learn about procedures to secure the Puppet deployments and methods to harden infrastructure using community modules. You’ll then get to run the Puppet components in Docker containers, using Puppet to create Docker images, and running applications on Docker along with orchestration using Mcollective. Finally, you will learn how to write custom plugins for Puppet such as facts, resource types, providers, and functions.
By the end of this Learning Path, you'll have a solid working knowledge of Puppet and be a confident Puppet user.
Meet Your Expert:
We have the best works of the following esteemed author to ensure that your learning journey is smooth: