Book Image

Puppet Cookbook

Book Image

Puppet Cookbook

Overview of this book

Table of Contents (17 chapters)
Puppet Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Managing your manifests with Git


It's a great idea to put your Puppet manifests in a version control system such as Git or Subversion (Git is the de facto standard for Puppet). This gives you several advantages:

  • You can undo changes and revert to any previous version of your manifest

  • You can experiment with new features using a branch

  • If several people need to make changes to the manifests, they can make them independently, in their own working copies, and then merge their changes later

  • You can use the git log feature to see what was changed, and when (and by whom)

Getting ready

In this section, we'll import your existing manifest files into Git. If you have created a Puppet directory in a previous section use that, otherwise, use your existing manifest directory.

In this example, we'll create a new Git repository on a server accessible from all our nodes. There are several steps we need to take to have our code held in a Git repository:

  1. Install Git on a central server.

  2. Create a user to run Git and...