Book description
Jump-start your Puppet deployment using engaging and practical recipes
In Detail
Puppet is a configuration management system that automates all your IT configurations, giving you control of what you do to each node, when you do it, and how you do it.
Puppet Cookbook Third Edition takes the reader from a basic knowledge of Puppet to a complete and expert understanding of Puppet's latest and most advanced features. Updated with the latest advancements and best practices, it gives you a clear view on how to "connect the dots" and expands your knowledge to successfully use and extend Puppet.
This book delves into various aspects of writing good Puppet code, which includes using Puppet community style, checking your manifests with puppet-lint, and learning community best practices, with an emphasis on real-world implementation.
What You Will Learn
- Install and set up Puppet for the first time
- Discover the latest, most advanced, and experimental features of Puppet
- Bootstrap your Puppet installation
- Master techniques to deal with centralized and decentralized Puppet deployments
- Use exported resources and forge modules
- Create efficient manifests to streamline your deployments
- Automate Puppet master deployment using Git hooks, r10k, and PuppetDB
- Make Puppet reliable, performant, and scalable
Table of contents
-
Puppet Cookbook Third Edition
- Table of Contents
- Puppet Cookbook Third Edition
- Credits
- About the Authors
- About the Reviewers
- www.PacktPub.com
- Preface
-
1. Puppet Language and Style
- Introduction
- Adding a resource to a node
- Using Facter to describe a node
- Installing a package before starting a service
- Installing, configuring, and starting a service
- Using community Puppet style
- Creating a manifest
- Checking your manifests with Puppet-lint
- Using modules
- Using standard naming conventions
- Using inline templates
- Iterating over multiple items
- Writing powerful conditional statements
- Using regular expressions in if statements
- Using selectors and case statements
- Using the in operator
- Using regular expression substitutions
- Using the future parser
-
2. Puppet Infrastructure
- Introduction
- Installing Puppet
- Managing your manifests with Git
- Creating a decentralized Puppet architecture
- Writing a papply script
- Running Puppet from cron
- Bootstrapping Puppet with bash
- Creating a centralized Puppet infrastructure
- Creating certificates with multiple DNS names
- Running Puppet from passenger
- Setting up the environment
- Configuring PuppetDB
- Configuring Hiera
- Setting node-specific data with Hiera
- Storing secret data with hiera-gpg
- Using MessagePack serialization
- Automatic syntax checking with Git hooks
- Pushing code around with Git
- Managing Environments with Git
-
3. Writing Better Manifests
- Introduction
- Using arrays of resources
- Using resource defaults
- Using defined types
- Using tags
- Using run stages
- Using roles and profiles
- Passing parameters to classes
- Passing parameters from Hiera
- Writing reusable, cross-platform manifests
- Getting information about the environment
- Importing dynamic information
- Passing arguments to shell commands
-
4. Working with Files and Packages
- Introduction
- Making quick edits to config files
- Editing INI style files with puppetlabs-inifile
- Using Augeas to reliably edit config files
- Building config files using snippets
- Using ERB templates
- Using array iteration in templates
- Using EPP templates
- Using GnuPG to encrypt secrets
- Installing packages from a third-party repository
- Comparing package versions
- 5. Users and Virtual Resources
- 6. Managing Resources and Files
- 7. Managing Applications
- 8. Internode Coordination
-
9. External Tools and the Puppet Ecosystem
- Introduction
- Creating custom facts
- Adding external facts
- Setting facts as environment variables
- Generating manifests with the Puppet resource command
- Generating manifests with other tools
- Using an external node classifier
- Creating your own resource types
- Creating your own providers
- Creating custom functions
- Testing your puppet manifests with rspec-puppet
- Using librarian-puppet
- Using r10k
- 10. Monitoring, Reporting, and Troubleshooting
- Index
Product information
- Title: Puppet Cookbook - Third Edition
- Author(s):
- Release date: February 2015
- Publisher(s): Packt Publishing
- ISBN: 9781784394882
You might also like
book
Puppet 5 Cookbook - Fourth Edition
Write custom plugins for Puppet, including facts, providers, and functions About This Book Grasp recipes that …
book
Mastering Puppet - Second Edition
Master Puppet for configuration management of your systems in an enterprise deployment About This Book This …
book
Puppet 5 Beginner's Guide - Third Edition
Puppet 5 Beginner’s Guide, Third Edition is a practical guide that gets you up and running …
book
Puppet Best Practices
If you maintain or plan to build Puppet infrastructure, this practical guide will take you a …