Chapter 8. Maintaining Systems Using Chef and Puppet

In this chapter, we will cover the following recipes:

  • Maintaining consistent systems using scheduled convergence
  • Creating environments
  • Using Chef encrypted data bags and Hiera-eyaml with Puppet
  • Using Chef Vault encryption
  • Accessing and manipulating system information with Ohai
  • Automating application deployment (a WordPress example)
  • Using a TDD workflow
  • Planning for the worse – train to rebuild working systems

Introduction

We've previously seen how to automate systems with code and how to properly test this code. Now we're ready for prime time; there's a whole set of features, constraints, and objectives to be properly set. We'll want to isolate environments such as dev, staging, and production. We'll need our infrastructure code to stay consistent without our intervention. Security and confidentiality will start becoming an issue, and maybe those passwords and secret keys should not be stored in clear text at all. After a few months, our automated infrastructure will grow into a large number of managed nodes, and it will become critical to have coherent behaviour according to systems profiles—we'll need to gather and process system information. We'll eventually end up deploying web applications directly from Chef. To keep a high level of quality while our code base gets more and more complex, we'll switch to the Test-Driven Development (TDD) approach for our workflow. And finally, we'll make sure we're always ready to redeploy any part of the infrastructure at any time (think of a disaster).

All recipes are based on Chef. However, when possible, we'll try to show how things work similarly with Puppet, Chef's direct alternative.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.171.193