Book Image

Puppet 3: Beginner's Guide

By : John Arundel
Book Image

Puppet 3: Beginner's Guide

By: John Arundel

Overview of this book

<p>Everyone's talking about Puppet, the open-source DevOps technology that lets you automate your server setups and manage websites, databases, and desktops. Puppet can build new servers in seconds, keep your systems constantly up to date, and automate daily maintenance tasks. <br /><br />"Puppet 3 Beginner's Guide" gets you up and running with Puppet straight away, with complete real world examples. Each chapter builds your skills, adding new Puppet features, always with a practical focus. You'll learn everything you need to manage your whole infrastructure with Puppet.<br /><br />"Puppet 3 Beginner’s Guide" takes you from complete beginner to confident Puppet user, through a series of clear, simple examples, with full explanations at every stage.</p> <p>Through a series of worked examples introducing Puppet to a fictional web company, you'll learn how to manage every aspect of your server setup. Switching to Puppet needn't be a big, long-term project; this book will show you how to start by bringing one small part of your systems under Puppet control and, little by little, building to the point where Puppet is managing your whole infrastructure.</p> <p>Presented in an easy-to-read guide to learning Puppet from scratch, this book explains simply and clearly all you need to know to use this essential IT power tool, all the time applying these solutions to real-world scenarios.</p>
Table of Contents (17 chapters)
Puppet 3 Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Puppet style


Just like everyone else, I want to be a nonconformist, too. But when it comes to programming, conformity is a virtue. When your code looks the same as everybody else's, it's easy to read, easy to understand, and easy to maintain. Here are some simple Puppet style tips you can adopt now to help those who work on your code in the future, including yourself.

Break out code into modules

Logical separation of your manifest into modules is a big help when it comes to understanding and maintaining your code. Although you can structure your modules any way you want—it makes no difference to Puppet—I find the best strategy is to have each module control some more or less independent chunk of functionality.

For example, if you're writing code that manages a particular customer-facing service, such as a website or an API, that could be a module. Similarly, code that manages a specific piece of software such as Apache, MySQL, or Hadoop should have its own module.

Modules can then be connected...