Mastering Puppet
eBook - ePub

Mastering Puppet

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

Mastering Puppet

About this book

In Detail

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.

Approach

Presented in an easy-to-follow, step-by-step tutorial format and packed with examples, this book will lead you through making the best out of Puppet in an enterprise environment.

Who this book is for

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.

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

Mastering Puppet


Table of Contents

Mastering Puppet
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. Dealing with Load/Scale
Divide and conquer
Puppet with passenger
Splitting up the workload
Certificate signing
Reporting
Storeconfigs
Catalog compilation
Keeping the code consistent
Rsync
NFS
Clustered filesystem
Git
One more split
One last split or maybe a few more
Conquer by dividing
Creating an rpm
Creating the YUM repository
Summary
2. Organizing Your Nodes and Data
Getting started
Organizing the nodes with ENC
A simple example
Hostname strategy
Modified ENC using hostname strategy
LDAP backend
OpenLDAP configuration
Hiera
Configuring hiera
Using hiera_include
Summary
3. Git and Environments
Environments
Environments and hiera
Multiple hierarchies
Single hierarchy for all environments
Dynamic environments
Git
Why Git?
A simple Git workflow
Git Hooks
Using post-receive to set up environments
Puppet-sync
Playing nice with other developers
Not playing nice with others
Git for everyone
Summary
4. Public Modules
Getting modules
Using GitHub for public modules
Modules from the Forge
Using librarian
Using r10k
Using modules
concat
inifile
firewall
lvm
stdlib
Summary
5. Custom Facts and Modules
Module manifest files
Module files and templates
Naming a module
Creating modules with a Puppet module
Comments in modules
Multiple definitions
Custom facts
Creating custom facts
Creating a custom fact for use in hiera
Summary
6. Custom Types
Parameterized classes
Defined types
Types and providers
Creating a new type
Summary
7. Reporting and Orchestration
Turning on reporting
Syslog
Store
IRC
Foreman
Installing Foreman
Attaching Foreman to Puppet
Using Foreman
Puppet Dashboard
Using passenger with Dashboard
Linking Dashboard to Puppet
Processing reports
mcollective
Installing activemq
Configuring nodes to use activemq
Connecting a client to activemq
Using mcollective
Summary
8. Exported Resources
Configuring puppetdb – using the forge module
Manually installing puppetdb
Installing Puppet and puppetdb
Installing and configuring PostgreSQL
Configuring puppetdb to use PostgreSQL
Configuring Puppet to use puppetdb
Exported resource concepts
Declaring exported resources
Collecting exported resources
Simple example: a host entry
Resource tags
Exported SSH keys
sshkey collection for laptops
Putting it all together
Summary
9. Roles and Profiles
Design pattern
Creating an example CDN role
Creating a sub-CDN role
Dealing with exceptions
Summary
10. Troubleshooting
Connectivity issues
Catalog failures
Full trace of a catalog compile
The classes.txt file
Debugging
Personal and bugfix branches
Echo statements
Scope
Profiling and summarizing
Summary
Index

Mastering Puppet

Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2014
Production reference: 1090714
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-218-9
www.packtpub.com
Cover image by Gagandeep Sharma ()

Credits

Author
Thomas Uphill
Reviewers
Ugo Bellavance
C. N. A. Corrêa
Jeroen Hooyberghs
Johan De Wit
Commissioning Editor
Edward Gordon
Acquisition Editor
Meeta Rajani
Content Development Editor
Sharvari Tawde
Technical Editors
Veena Pagare
Anand Singh
Copy Editors
Sarang Chari
Mradula Hegde
Project Coordinator
Danuta Jones
Proofreaders
Faye Coulman
Maria Gould
Indexers
Mariammal Chettiyar
Tejal Soni
Priya Subramani
Graphics
Sheetal Aute
Ronak Dhruv
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade

About the Author

Thomas Uphill is an RHCA who has been using Puppet since version 0.24. He has been a system administrator for nearly 20 years, more than 10 of which have been with Red Hat Linux and its derivatives. He has presented tutorials on Puppet at LOPSA-East and has spoken at PuppetConf 2013. He enjoys teaching others how to use Puppet to automate as much system administration tasks as possible. When he's not at the Seattle Puppet Meetup, you can find him at http://ramblings.narrabilis.com.

Table of contents

  1. Mastering Puppet

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 Mastering Puppet by Thomas Uphill in PDF and/or ePUB format, as well as other popular books in Computer Science & Operating Systems. We have over one million books available in our catalogue for you to explore.