
In this video I'll walk you through installing the basic components of Puppet that you will need to follow along with the interactive terminal sessions that I'll do throughout the course.
I recommend that you start by installing Vagrant (see http://vagrantup.com) and then downloading the vagrant.tar.gz file that is available to download in this section. Using Vagrant, we'll create a working Puppet server and agent environment to learn on
In this section, I will introduce you to the concept of Puppet Resources. Resources are the building blocks of Puppet and everything you do with Puppet will ultimately be to manage the state of resources. I'll begin by walking you through what a resource is and explaining the concepts of resource types and providers in Puppet and introduce you to the Resource Abstraction Layer (the RAL). Later I will demonstrate how you can use the puppet resource command to interact with the RAL to manage resources on the command line.
Now that you have an understanding of Puppet resources and how Puppet uses the Resource Abstraction Layer to manage them, we'll now look at how you will be configuring resources, using the Puppet language (DSL).
In this section I'll introduce the Puppet Server and Puppet Agent. We will begin by looking at how the agent and server communicate with eachother using authenticated SSL, then I will give you an overview of what actually takes place during a puppet run, including introducing concepts such as facter and the puppet catalog.
At the end of this section, you will be able to deploy your first Puppet module to an agent.
Summary
In this section we look deeper into Puppet resources, starting with some commonly used resource types such as package and service, we then move on to look at the exec resource, a special resource type used for executing shell commands as a puppet resource and then we take a look at a concept in Puppet known as namevar.
Contents
The package resource type
The service resource type
The exec resource type
The notify resource type
An overview of Puppet resource uniqueness and an introduction to the concept of namevar
Summary
In this section we look at serving and managing static files from Puppet using the file resource.
Contents
In this section we look at how to define relationships between Puppet resources to ensure things are managed in the right order
Summary
In this section you will learn about relationships in Puppet. We use relationships to configure ordering and dependencies between resources in the catalog. We can use relationships not only to ensure that we configure things in the right order but also to take actions on resources based on state changes in other resources. I'll talk about the ordering behaviour of Puppet and we will walk through some examples of using relationships in your Puppet manifests.
Contents
Summary
This is a check point exercise to re-cap on what you've learnt so far and tie the various concepts together. We have covered
This exercise is designed to help you bring together your understanding of all of the above concepts and create a Puppet module that uses all of them. You can either attempt to do this exercise on your own, and then watch the video for a demo, or follow along with the video at your own pace.
The Exercise
Write a new Puppet module called apache
The module should;
Summary
In this section we take a close look at variables in Puppet, including using arrays within resource declarations and hashes. We will then revisit facter and learn how to use variables from facter, facts, within your Puppet manifests.
This modules includes;
Variables
Arrays
Hashes
Top level variables and facts
Using variables in resource declarations
Summary
This chapter looks at controlling Puppet code using one of the variety of available conditionals within the Puppet language. We will cover case statements, selectors and if/else statements and then use that knowledge to expand our Apache Puppet module to support multiple operating systems
Summary
Puppet 4 introduced much better handling of data types, in this section we look at how to define and work with the various different data types in the Puppet language
This module covers;
An introduction to data types
A look at the core data types including String, Array, Hash, Integer, Optional and Undef
How to use data types to validate variables
Summary
I will cover Puppet functions in this section, introducing you to the newest features of Puppet introduced in version 4.0 including Puppet based (non ruby) functions, iterators and loops and how to write functions.
This module covers;
The role of functions in the Puppet ecosystem
Legacy Puppet Functions
Modern Puppet DSL functions
Modern Ruby API functions
Using data types in functions
Summary
In this section we continue where we left off with file serving, and cover serving dynamic files using Puppet and EPP templates.
This module covers;
An introduction to EPP templates
Using data types in templates
Calling templates from Puppet manifests
Serving dynamic files from Puppet using templates
Summary
In this part you will learn how to turn basic classes into parameterized classes to make Puppet modules more sharable and re-usable, we will finish this section by expanding our Apache module to make it more customisable by adding parameters.
This module covers;
An introduction to adding parameters to Puppet classes
Using data types to validate parameters
Defining and declaring parameterized classes
Using parameters to manage the contents of files
Summary
I will introduce you to the concept of the defined resource type. We use defined resource types to create a template of a configuration model that can be instantiated multiple times in a Puppet run. After looking at the concepts we will use defined resource types to manage Apache virtual hosts on a Puppet agent.
Summary
Puppet 4.0 introduced many new features in the language for declaring resources. In this final section on Puppet language I will walk through these features and show you how to write clean, understandable code utilising some of the lesser known syntax.
Thank you for taking this course to the conclusion. In this course we covered the core concepts of Puppet but there is so much more in the Puppet eco system that will enable you to better automate your infrastructure. I recommend following up by enrolling to my new Hiera Masterclass which is an in depth course dedicated to Hiera, the data lookup subsystem of Puppet. Together with the knowledge you have gained in this course, it will give you a solid grounding in managing large infrastructures with Puppet and related tools.
You can enroll for Hiera: A Puppet Masterclass by clicking the link in the "Resources" dropdown of this lesson
Over ten years ago Puppet took the IT world by storm at the time the DevOps movement was beginning to emerge and deliver a fundamental shift in how we deploy, configure and manage infrastructure. Today Puppet is used by thousands of organisations world wide and continues to be a central pillar in the DevOps toolchain space. With over 10 years experience working with Puppet and publishing many open source projects and insightful articles that have changed the way people use Puppet, industry expert Craig Dunn brings you this concise training course where he will teach you many of the advanced features of Puppet and it's language so that you can achieve DevOps success in your organisation by leveraging the power of this essential tool.
This training course focuses on the advanced language features of Puppet to write powerful Puppet modules to automate your infrastructure. Designed to take you from complete beginner to power user over the course of several instalments.
Each section contains a series of slide presentations with lectures followed by interactive demos in a terminal session that you can follow along to.
We will begin with a basic introduction to the concepts of configuration management and where Puppet fits in to your toolchain. We then look at Puppet resources, the building blocks of Puppet and how resources are used internally by Puppet to manage your configuration. We then introduce the Puppet language (DSL) and walk you through how to write Puppet resource as code, build Puppet modules and serve that configuration to your agent nodes.
The second part of this course will give you a deep dive into the Puppet language. Everything in this course is kept up to date with the very latest developments and you will the language to a very advanced level incorporating all of the newest features introduced in the latest versions of Puppet.