Building, Testing, and Deploying Professional Puppet Modules

This course takes your Puppet skills from knowledge of basic manifests to writing professional-quality modules. You will learn to create modules, test with rspec, separate site-specific data from code with Hiera and validate your modules using Vagrant.
Course info
Rating
(15)
Level
Intermediate
Updated
Jul 20, 2016
Duration
3h 54m
Table of contents
Course Overview
Course Introduction
Real World Workflow with Git
Bootstrapping with Vagrant
Local Environment Setup (OS X/Linux)
Local Environment Setup (Windows)
Just the Facts
Using Hiera
Making Modules
Environments
Using Puppet in Your Own Environment
Description
Course info
Rating
(15)
Level
Intermediate
Updated
Jul 20, 2016
Duration
3h 54m
Description

Puppet is one of the most widely deployed configuration management tools available. In Building, Testing, and Deploying Professional Puppet Modules, you'll learn how to create Puppet modules using Puppet Best Practices as a guideline. First, you'll learn how to set up your development workstation with the right tools that will help you identify errors sooner and write code faster. Next, you'll learn how to use Hiera to separate site-specific data from Puppet code, allowing you to reuse your modules anywhere. Finally, you'll learn in-depth knowledge of how to create a Puppet module and test it using rspec. When you are finished with this course, you'll have the skills and knowledge needed to build professional-quality Puppet modules suitable for any size environment.

About the author
About the author

Will Button is a 20 year veteran of IT Operations and Software Engineering.

More from the author
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hey, everyone. My name's Will Button, and welcome to my course, Building, Testing, and Deploying Professional Puppet Modules. I'm on the DevOps team at Trax Technologies and I've worked on both the development and operations sides of the house for over two decades. Well writing your first puppet manifest is pretty easy, but writing top quality modules, like the ones you see on the puppet forge, can seem overwhelming in contrast. This course is everything I wish someone had taught me when I first started using puppet. In this course, I start off by showing you how to set up your development environment, and that's something you may not even think about, but by taking the time to incorporate your work station as part of the development process, I show you how to write better code faster. You'll learn how tools such as puppet-lint can catch errors before they happen and how vagrant can launch a femoral test servers to validate your puppet code before sending it off to your production servers. You'll learn how to write tests using RSpec to confirm your module does what it's supposed to do. And I'll teach you how to write modules for different operating systems, including Windows. By the end of this course, you're going to have a great understanding of how to build your puppet modules according to puppet best practices, and include tests and documentation so that others can easily incorporate your great modules into their applications. I hope you'll join me on this journey to learn puppet with the building, testing, and deploying professional puppet modules course at Pluralsight.

Local Environment Setup (OS X/Linux)
I'm Will Button. This is Local Environment Setup for OS X and Linux. We spent a lot of time configuring the Vagrant environment to use shared files, so now let's configure our text editor to read them. In this module, we'll configure our Atom text editor with support for syntax highlighting and puppet linting. We'll also install tmux, a terminal multiplexer. This will allow us to launch our entire Vagrant environment and ssh into the boxes with a single command. This module's primary targeted at OS X and Linux users. The next module covers Windows, but if you're a Windows user, stick around for this demo. It's only about a minute, and it will give you a great overview of what it's like to develop on OS X or Linux, and if what I show you piques your interest, I invite you to stick around for the rest of the module as well. I'm going to show you the finished product first so you have an idea of what we're building and why this module is an important one for your future puppet productivity.

Local Environment Setup (Windows)
Hi, I'm will Button, and this is Local Environment Setup for Windows. In this module, we're going to set up our Windows development environment, to make our workflow fast, efficient, and repeatable. Our goal is to create an environment that allows us to focus on writing quality code, not managing our environment. To meet that goal, we'll add syntax highlighting and linting support to our text editor, as well as installing some third party tools like Commander, that allow us to launch our environment easily. A picture is worth a thousand words, and a video is worth even more, so let me show you a brief demo, to better illustrate what I mean.

Just the Facts
Hi, I'm Will Button and this is Just the Facts. You know what puppet can be used to install software such as the Apache Web Server. You may also know that on Red Hat-based distributions, the Apache package is called HTTPD while on Debian-based distributions, it's called Apache 2. But in either case, puppet knows what to do without you having to tell it the name of the package. The question is, how does puppet know? And the answer is facter. In this module, I will teach you what facter is, the core facts, the changes to core facts introduced in version 3 and higher, how to view facts, how to create custom facts, and how to create external facts.

Using Puppet in Your Own Environment
I'm Will Button, and this is using Puppet in your own environment. Here in this course, you learned how to use Git to track your Puppet configuration and management. I showed you how to set up your workstation for more efficient workflow, and run your Puppet code on your own environment built with Vagrant. We touched on facts and Hiera, but just enough to understand how it integrates into the larger Puppet architecture. And then, armed with that knowledge, we built a Puppet module that included tests and can be integrated across multiple environments. One of the key concepts I tried to emphasize throughout this course was reproducibility. The best Puppet code in the world has limited value if it's trapped behind long, tedious deployment and built configuration steps. Reproducing our work environment from the last 10 modules is as simple as checking out the repo and typing vagrant up. Well, that was our goal, anyway. Let's try it and see.