Jump to ratings and reviews
Rate this book

Mastering Puppet

Rate this book
Pull the strings of Puppet to configure enterprise-grade environments for performance optimization If you are a system administrator or developer who has used Puppet in production and are looking for ways to easily use Puppet in an enterprise environment, this book is for you. This book assumes an intermediate knowledge of Puppet and is intended for those writing modules or deploying Puppet in an enterprise environment. Puppet is a configuration management system written for system administrators to manage a large number of systems efficiently and help maintain order. Mastering Puppetdeals with the issues faced in larger deployments such as scaling and duplicate resource definitions. It will show you how to fit Puppet into your organization and keep everyone working. The concepts presented can be adapted to suit any size organization. This book starts with setting up and installing Puppet in your organization and then moves on to implementing version control in Puppet, creating custom modules, and extending your Puppet infrastructure. Finally, you will learn tips and tricks that are useful when troubleshooting Puppet and the best practices to make you a pro.

264 pages, Paperback

First published January 1, 2014

3 people are currently reading
12 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
6 (27%)
4 stars
11 (50%)
3 stars
4 (18%)
2 stars
1 (4%)
1 star
0 (0%)
Displaying 1 - 5 of 5 reviews
Profile Image for Phil Wilkins.
Author 2 books5 followers
September 9, 2014
Packt’s Mastering Puppet kicks off with substantial first chapter on how to setup Puppet in a manner that can then scale. The core of this is driven by an explanation of the constituent parts of a Puppet solution and where the workload is. In terms of execution this is as much about understanding the configuration of things like Apache, Passenger and Ningx as it is Puppet. As part of the explanation there are indicative numbers in terms of supportable scale which reflects the knowledge of the product.

Looking at configuration distribution for headless deployments with Git is a solid well considered piece and the writing suggests considers all the needs of a solid deployment of a production quality solution such as access control, whilst supporting collaborative working etc. it would be interesting to have seen how that would have stacked against capabilities such as Zookeeper.

As we move through the chapters the books continues with more advanced themes such as using Hiera as a object hierarchical framework for managing configuration and on into leveraging Puppet forge and various Git repositories (and the challenges when linking to git repositories of the latest code vs a release). With the repositories we can draw in additional tooling and how to incorporate these capabilities into a deployment. This includes looking at several modules that practical experience from the author would recommend.

By chapter 6 we’re into writing our own custom modules and facts and deploying them. So you can do things such as create modules to manage your custom solutions.

The next natural step is to look at the reporting aspects of Puppet, orchestration through marionette collective (mCollective). Obviously to report you need to gather the activity information, so the book touches on the out of the box (OOTB) approach and moves onto the idea of using IRC; presentation via Foreman and Puppet Dashboard. Finally then with a reporting view, the next step is to dynamically query the nodes in Puppet environment which uses mcollective to communicate back & forth with the nodes.

So now we have a dynamically configurable set of Nodes, which can report and have dynamic querying against the nodes. Final chapters cover the use of things like PuppetDB, roles & profiles and developing and debugging your puppet environment.

Reading the book, I get the feeling that a fair grasp of Linux system administration would help (i.e. a bit more than the average developer). There are a few useful touches that I think could have been included, such as external references such as man pages for RPM or site for the Pulp tool mentioned. But, as criticisms go, this as much me being too lazy to Google. The only other refinement would be inclusion of some diagrams to support the words. As they say a picture can tell a 1000 words, even if this was to just show the hierarchy or directory structures involved.

Compared to the recently reviewed Puppet Reporting book, this book isn’t for someone starting out with Puppet (but the Packt site says as much). You atleast need to have got some basic understanding or practical exposure to Puppet, and exposure to a development environment is an added bonus. So if you’re setting out with Puppet you might consider starting with the Puppet 3 Beginner’s Guide (Amazon) or Instant Puppet 3 Starter (Amazon). Having got those under your belt, try this book to to really develop the use of Puppet configuration and deployment. When it comes to reporting I’d look at this book along with reporting book (reviewed here). This book feels like more options are on offer, but Puppet Reporting is a lot richer (but you’d expect that given the different book emphasis).

In summary – good solid book, full of practical experience and ideas. But don’t try to use this as a jumpstart to Puppet.

for more see http://blog.mp3monster.org
4 reviews
August 26, 2014
This book can be specially helpful for those starting (some Puppet knowledge is recommended) or those who have already taken the first steps implementing Puppet as the author, Thomas Uphill, walks through many useful topics, like scalability, types/providers, reporting, exported resources, etc.

Through all the book, the topics are well explained and with a strong hands-on approach which I really appreciated, as it can be taken as an starting point to improve the reader's knowledge about Puppet's ecosystem.

Sometimes, the reader really needs to keep in mind what the chapter is really about, as it easy to think that some topics are not explained deeply enough but if the chapter is about reporting, then the topic is not Puppet dashboard or the Foreman, they are just mentioned as tools for the reader to get an idea on how to make use of their reporting facilities.

For the more experienced reader, there are always new tricks to be learned. I personally found some topics explained in a very detailed way and as I haven't started to implement them in a production environment, it's always good to know what and how other people is using them.
Profile Image for Jascha.
151 reviews
January 11, 2016
A very few people know that Puppet was released more than 10 years ago. Only recently, with the explosion of the cloud and the Internet of Things, having infrastructures able to scale out, deploying machines that self-configure themselves, that feeble buzz became a powerful roar and configuration management tools emerged as an indispensable tool in the belt of any DevOps populating planet Earth. Among the many flavors we can pick from, Puppet, which recently reached version 4, is a mature and solid choice. Still, the shelves of the book stores only provide a limited amount of titles to feed the hunger of knowledge of the many Puppetteers out there, who are often forced to spend the day either on the IRC support channel or browsing Stack Overflow. Mastering Puppet, which covers the previous version of Puppet, is an excellent companion for any experienced Puppetteer looking for a discussion on advanced topics.

Before discussing the content of the book, as stated above, it is very important to make it crystal clear that Mastering Puppet does not cover Puppet 4, but the previous version of the software, that is 3. Significant non backward compatible changes were made to both the language and its configuration. While, as I will discuss in a moment, the book is still very valuable, it does require the reader to be aware of it and, mainly, to be already aware of what changed and thus, what, of the topics discussed by the author, no longer apply to the current stable version of Puppet. On the other hand, it is also true that many companies are waiting a bit longer before switching to Puppet 4, mostly because their code need to be refactored and also because tools, such as Foreman, are still being ported.

As mentioned when introducing this review, Mastering Puppet, as the title suggests, does cover advanced topics. The reader is expected to know how to properly configure Puppet and write his own classes and modules. Concepts such as types and providers are supposed to be known. So, rather than introducing the language features and the basic commands to get started, the author focuses on topics such as deploying Puppet either as a master/slaves or masterless.

The first chapter, for example, does exactly this. Not only does the author show both approaches, with their pros and cons; he also discusses how the scenario changes when the number of nodes significantly increases, making it impossible for a single master to take care of the whole infrastructure. While the differences of the different approaches can be already known to the reader, what I find interesting here is the approach of the author: presenting different solutions to a problem, taking into account scalability. What are the options? When is this solution better than the other? Why?

As stated several times already, the book covers Puppet 4. This new version of Puppet strongly relies on Hiera as an external source of data. This means that, for example, chapter 2, which covers different strategies to organize the data, is somehow outdated, now. Still, the chapter is worth the read, not only because there are many infrastructure still relying on Puppet 3, but also because it is very informative to see how the author presents and compares different solutions to that common problem. Something similar happens in chapter 3, which is about environments. Puppet 4 enforces environments, but these pages are still very worth a read. Here the author presents different approaches to exploit environments to organize the data: a single hierarchy with the environment as a hierarchy item; and multiple hierarchies where the path to the hieradata comes from the environment setting itself.

Among the other topics covered are reporting, where the author presents Syslog, IRC, Foreman and the Puppet Dashboard; and exported resources. Exported resources and puppetdb, which are part of chapter 8, are one of the concepts that I have particularly enjoyed reading. The examples presented by the author are clear and easy to follow and the concepts are concisely and exhaustively discussed.

On top of all of this, throughout the book we find plenty of small boxes with tips to get the most out of a concept just discussed or to avoid common pitfalls. If I have to find something negative about this book, well, I could complain that chapter 9, which is about design patterns and roles, was too short. That is a very complex and important topic that, probably, deserves a book on its own.

Overall, an excellent book. I am very happy with it. Despite being outdated, it still delivers much to any Puppetteers looking for material covering advanced topics. Definitely a suggested read.
Profile Image for Tamas Szasz.
1 review4 followers
October 13, 2014
I just received 3 weeks ago a copy of this book from Packt publishing. After reading over the book, I would say it's something what worth read if somebody is working with puppet in an enterprise and not only with 5-10 servers. I'm working with puppet since 3 years and had a lot of problem with scalability and dynamic structure in the past. Many of this problems are well described in this book with possible solutions over examples. I definitely recommend this book for professionals, who are working with number of servers more then 25-50, and on multiple environment / location. I only give 4 stars because the programming part (types and providers) is not well enough described compared with other books focused on implementing types and providers. The chapters scaling, organizing, reporting are especially interesting and worth to read *before* starting to use puppet in an enterprise with hundred of nodes.
Profile Image for Johan.
2 reviews
October 17, 2014
'Mastering Puppet' certainly provides a good overview of the possible options to maintain a Puppet ecosystem beyond the scope of a POC or small environment. The book covers traditional topics such as scalability, mcollective, modules, facts, custom types/providers, puppetdb, exported resources and reporting via dashboard. It also covers a number of topics which sets it apart from other Puppet books: configuration of a masterless environment, use of librarian and r10k to manage puppet modules, git workflow with commit hooks and a description of the roles/profiles pattern. Even though few topics are not entirely described in depth, they still offer a good starting point.
'Mastering Puppet' is very hands-on and contains plenty of small tips that make it easier to manage your environment, point out subtle differences in new puppet versions or encourage the reader to reflect on design decisions.
New puppet users should first gain a basic puppet knowledge prior to reading the book.
Displaying 1 - 5 of 5 reviews

Can't find what you're looking for?

Get help and learn more about the design.