Puppet 4 Essentials Review

Guest contributor John Arundel, a Puppet consultant and writer, reviews my book Puppet 4 Essentials - Second Edition.

When I first started using Puppet, in late 2006, there were no Puppet books. There was barely any documentation. Now there are lots of books, and lots of documentation. These two things are quite different, of course. Documentation is for people who already understand the product, who know what they want to do, and just need to know how to do it.

Technical books serve a fundamentally different purpose: to explain what the product does, for people who don’t already know. Alas, some authors do not understand even this, and produce books which are, in effect, merely documentation neatly sandwiched in cardboard.

Felix Frank, a key Puppet contributor, module maintainer, and long-time Puppet power user, and Martin Alfke, a well-respected Puppet consultant and trainer, get it. They have produced a concise, tightly-focused book which, as the title suggests, gives you the essentials of Puppet, for the intelligent and technically-literate reader with no time to waste on waffle.

Perhaps you remember with disfavour rather dull language lessons at school, where you spent a semester learning about grammar, syntax, and spelling, before you ever wrote a meaningful sentence. That is the documentation approach: tell you everything there is to know, and leave it to you to extract the bits which you might actually be able to use.

Instead, clued-up language teachers now recognise that the purpose of language is to communicate with people, not to study the declensions of nouns. Accordingly, they get students speaking and writing the language right away, with useful phrases and constructions, and learning a functional core vocabulary. Grammar rules will come later, along with a deepening understanding.

Frank and Alfke’s ‘Puppet 4 Essentials’ has you running Puppet by page 2 of Chapter 1, and by page 5 you are learning how to write Puppet manifests to manage system services (starting, logically enough, with Puppet itself). By the time we get to the theory of Puppet internals—facts, types, and providers—we have already mastered a range of practical tasks.

The book is well-paced, moving quickly from topic to topic, with never a wasted paragraph, and there is at least one code example on every page, so that you are never left wondering “This is all very well, but how do I actually use it?”

‘Essentials’ doesn’t mean ‘basics’; we are soon on to fairly advanced techniques such as defined types, dependency graphs, and design patterns for custom classes. Puppet 4 introduces many important new language features, including data types, iterators, and EPP templates, and these are covered too.

Commendably, the authors devote a significant chunk of the book to Puppet’s most important subsystem, Hiera. Understanding and using Hiera effectively is the key to modern Puppet codebases, including structuring your configuration data, supplying parameters to modules, and dynamically generating Puppet resources from Hiera data itself.

Writing a good technical book is a lot harder than it looks, as I can testify; there are a lot of ways to get it wrong. Frank and Alfke have hit the sweet spot with ‘Puppet 4 Essentials’: diving into the detail where it matters, and sweeping away the clutter where it doesn’t.

Ten years ago, there were no Puppet books; now there are many. Some of them are bad, most of them are merely average, but very few of them are actually essential. This one is.

John Arundel is the author of the Puppet 4.10 Beginner’s Guide.