PacktLib: Puppet 3 Beginner’s Guide

Puppet 3 Beginner's Guide

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Introduction to Puppet

The problem

Solving the problem

Infrastructure as code

What is Puppet?

Summary

First steps with Puppet

What you'll need

Time for action – preparing for Puppet

Time for action – installing Puppet

Your first manifest

Organizing your manifests

Time for action – creating a directory structure

Time for action – creating a node declaration

Summary

Packages, Files, and Services

Packages

Time for action – installing Nginx

Modules

Time for action – creating an Nginx module

Time for action – making a "puppet apply" command

Services

Time for action – adding the Nginx service

Files

Time for action – deploying a virtual host

Summary

Managing Puppet with Git

What is version control?

Time for action – importing your manifests into Git

Time for action – committing and inspecting changes

Distributing Puppet manifests

Time for action – creating a master Git repo

Time for action – cloning the repo to a new machine

Time for action – adding a new node

Time for action – pushing changes to the master repo

Time for action – automatic pull-and-apply script

Learning more about Git

Summary

Managing users

Users

Time for action – creating a user

Access control

Time for action – adding an SSH authorized key

Time for action – deploying an SSH configuration file

User privileges

Time for action – deploying a sudoers file

Summary

Tasks and templates

Running commands with exec resources

Time for action – running an arbitrary command

Scheduled tasks

Time for action – scheduling a backup

Distributing files

Time for action – using a recursive file resource

Using templates

Time for action – templating an Nginx virtual host

Summary

Definitions and Classes

Grouping resources into arrays

Definitions

Time for action – creating a definition for Nginx websites

Classes

Time for action – creating an NTP class

Summary

Expressions and Logic

Conditionals

Expressions

Regular expressions

Arrays and hashes

Summary

Reporting and troubleshooting

Reporting

Time for action – generating a report

Debug output

Monitoring

Errors

Summary

Moving on Up

Puppet style

Puppet learning resources

Projects

Last word

Index