Manhood is patience. Mastery is nine times patience.
—Ursula K. Le Guin, 'A Wizard of Earthsea'
In this chapter, we will apply ideas from all the previous chapters to see what a complete, working Puppet infrastructure looks like, using a demonstration repo that illustrates all the principles explained in this book. You can use it as the basis of your own Puppet code base, adapting and expanding it as needed.
The demo repo is available on GitHub, and you can clone it, in the same way as for the example repo for this book, by running this command:
git clone https://github.com/bitfield/control-repo
The demo repo contains everything you'll need to manage nodes with Puppet:
A Vagrantfile is also included, so you can try out the repo on a Vagrant VM.
If you are going to use the demo repo as a basis for your own Puppet repo, you need to make a copy of it so that you can edit and maintain it yourself.
You can do this in two ways. One is to fork the repo to your own GitHub account. To do this, log in to GitHub and browse to the demo repo URL:
https://github.com/bitfield/control-repo.git
Look for the Fork button at the top right-hand side of the page and click it. This will create a new repo under your account, which contains all the code and history from the demo repo.
Alternatively, you can follow these steps:
puppet
, or control-repo
, or whatever you prefer).git clone https://github.com/bitfield/control-repo cd control-repo
git remote rename origin upstream
origin
remote (using the URL for your repo that you noted earlier):git remote add origin YOUR_GIT_URL
git push origin production
Your repo now contains a complete copy of the demo repo, which you can edit and customize as you like.
As the original repo is updated in the future, you will be able to pull these changes into your own version. To get changes from upstream, run the following commands:
git fetch upstream git rebase upstream/production
3.16.217.58