Puppet 3 Cookbook
eBook - ePub

Puppet 3 Cookbook

  1. 274 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Puppet 3 Cookbook

About this book

In Detail

A revolution is happening in web operations. Configuration management tools can build servers in seconds, and automate your entire network. Tools like Puppet are essential to taking full advantage of the power of cloud computing, and building reliable, scalable, secure, high-performance systems. More and more systems administration and IT jobs require some knowledge of configuration management, and specifically Puppet.

"Puppet 3 Cookbook" takes you beyond the basics to explore the full power of Puppet, showing you in detail how to tackle a variety of real-world problems and applications. At every step it shows you exactly what commands you need to type, and includes full code samples for every recipe.

The book takes the reader from a basic knowledge of Puppet to a complete and expert understanding of Puppets latest and most advanced features, community best practices, writing great manifests, scaling and performance, and extending Puppet by adding your own providers and resources. It starts with guidance on how to set up and expand your Puppet infrastructure, then progresses through detailed information on the language and features, external tools, reporting, monitoring, and troubleshooting, and concludes with many specific recipes for managing popular applications.

The book includes real examples from production systems and techniques that are in use in some of the worlds largest Puppet installations, including a distributed Puppet architecture based on the Git version control system. It covers common problems and errors and shows you how to troubleshoot your Puppet manifests. Youll be introduced to powerful tools that work with Puppet such as Hiera and MCollective. Youll learn how to use objection orientation and classes to write powerful, reusable manifests, and how to embed Ruby code in templates. Youll find out how to extend Puppet with custom resource types and providers. The book also explains managing Rails applications and databases, building web servers, load balancers, high-availability systems with Heartbeat, and many other state-of-the-art techniques.

Approach

"Puppet 3 Cookbook" is written in a Cookbook style, showing you how to set up and expand your Puppet infrastructure. It not only gives you everything you need to become a Puppet expert, but includes powerful code samples and techniques developed over many years of production experience. With it, youll save time and effort by automating tedious manual processes, impress your boss by delivering better business value from IT, and future-proof your career by getting to grips with the new technologies revolutionizing the industry.

Who this book is for

"Puppet 3 Cookbook" is for anyone who builds and administers servers, especially in a web operations context. It requires some experience of Linux systems administration, including familiarity with the command line, file system, and text editing. No programming experience is required.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Puppet 3 Cookbook


Table of Contents

Puppet 3 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Puppet Infrastructure
Introduction
Linux distributions
Puppet versions
Installing Puppet
Getting ready...
How to do it...
Creating a manifest
How to do it...
Managing your manifests with Git
Getting ready...
How to do it...
How it works...
There's more...
Creating a decentralized Puppet architecture
Getting ready
How to do it...
How it works...
There's more...
Writing a papply script
How to do it...
How it works...
Running Puppet from cron
Getting ready...
How to do it...
How it works...
There's more...
Deploying changes with Rake
Getting ready
How to do it...
How it works...
There's more...
Bootstrapping Puppet with Rake
Getting ready...
How to do it...
How it works...
Automatic syntax checking with Git hooks
How to do it…
How it works…
2. Puppet Language and Style
Introduction
Using community Puppet style
How to do it…
Indentation
Quoting
Variables
Parameters
Symlinks
There's more…
Checking your manifests with puppet-lint
Getting ready
How to do it...
There's more...
See also
Using modules
How to do it…
How it works…
There's more…
Templates
Facts, functions, types, and providers
Autogenerating module layout
Third party modules
Module organization
See also
Using standard naming conventions
How to do it…
There's more…
Using inline templates
How to do it…
How it works…
There's more...
See also
Iterating over multiple items
How to do it…
How it works…
There's more…
Using hashes
Creating arrays with the split function
Writing powerful conditional statements
How to do it…
How it works…
There's more…
Elsif branches
Comparisons
Combining expressions
See also
Using regular expressions in if statements
How to do it…
How it works…
There's more…
Capturing patterns
Regular expression syntax
See also
Using selectors and case statements
How to do it…
How it works…
Selector
Case statement
There's more…
Regular expressions
Defaults
Using the in operator
How to do it…
There's more…
Using regular expression substitutions
How to do it…
How it works…
There's more
See also
3. Writing Better Manifests
Introduction
Using arrays of resources
How to do it…
How it works…
See also
Using definitions
How to do it…
How it works…
There's more…
See also
Using dependencies
How to do it…
How it works…
There's more…
Using tags
How to do it...
There's more…
Using run stages
How to do it…
How it works…
There's more…
See also
Using node inheritance
How to do it…
How it works…
There's more…
See also
Passing parameters to classes
How to do it…
How it works…
There's more…
See also
Using class inheritance and overriding
How to do it…
How it works…
There's more…
Removing inherited attributes
Adding extra values using +>
Disabling resources
See also
Writing reusable, cross-platform manifests
How to do it…
How it works...
There's more…
See also
Getting information about the environment
How to do it…
How it works…
There's more…
See also
Importing dynamic information
Getting ready
How to do it…
How it works…
There's more…
See also
Passing arguments to shell commands
How to do it…
How it works…
4. Working with Files and Packages
Introduction
Making quick edits to config files
How to do it…
How it works…
There's more…
Using Augeas to automatically edit config files
How to do it…
How it works…
There's more…
Building config files using snippets
How to do it…
How it works…
There's more…
See also
Using ERB templates
How to do it…
How it works…
There's more…
See also
Using array iteration in templates
How to do it…
How it works…
There's more…
See also
Using GnuPG to encrypt secrets
Getting ready
How to do it...
How it works...
There's more...
See also
Installing packages from a third-party repository
How to do it…
How it works…
There's more...
See also
Building packages automatically from source
How to do it…
How it works…
There's more…
See also
Comparing package versions
How to do it…
How it works…
5. Users and Virtual Resources
Introduction
Using virtual resources
How to do it…
How it works…
There's more…
Managing users with virtual resources
How to do it…
How it works…
There's more...
See also
Managing users' SSH access
How to do it…
How it works…
There's more…
Managing users' customization files
How to do it…
How it works…
See also
Efficiently distributing cron jobs
How to do it…
How it works…...

Table of contents

  1. Puppet 3 Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Puppet 3 Cookbook by John Arundel in PDF and/or ePUB format, as well as other popular books in Computer Science & Data Processing. We have over one million books available in our catalogue for you to explore.