Book Image

Mastering Puppet - Second Edition

By : Thomas Uphill
Book Image

Mastering Puppet - Second Edition

By: Thomas Uphill

Overview of this book

Puppet is a configuration management system and a language. It was written for and by system administrators to manage large numbers of systems efficiently and prevent configuration drifts. Mastering Puppet deals with the issues faced when scaling out Puppet to handle large numbers of nodes. It will show you how to fit Puppet into your enterprise and allow many developers to work on your Puppet code simultaneously. In addition, you will learn to write custom facts and roll your own modules to solve problems. Next, popular options for performing reporting and orchestration tasks will be introduced in this book. Moving over to troubleshooting techniques, which will be very useful. The concepts presented are useful to any size organization. By the end of the book, you will know how to deal with problems of scale and exceptions in your code, automate workflows, and support multiple developers working simultaneously.
Table of Contents (17 chapters)

Chapter 10. Troubleshooting

Inevitably, you will run into problems with your Puppet runs but having a good reporting mechanism is the key to knowing when failures occur. The IRC report mechanism we discussed in Chapter 7, Reporting and Orchestration, is useful to detect errors quickly, when most of your Puppet runs are error-free.

Note

If you have more than the occasional error, then the IRC report will just become a noise that you'll learn to ignore. If you are having multiple failures in your code, you should start looking at the acceptance testing procedures. Puppet Labs provides a testing framework known as Puppet beaker. More information on Puppet beaker is available at https://github.com/puppetlabs/beaker. A simpler option is rspec-puppet. More information on rspec-puppet is available at http://rspec-puppet.com/tutorial/.

Most of the Puppet failures I've come across end up in two buckets. These buckets are, as follows:

  • Connectivity to Puppet and certificates

  • Catalog failure

We'll examine...