Book Image

Vagrant Virtual Development Environment Cookbook

Book Image

Vagrant Virtual Development Environment Cookbook

Overview of this book

Table of Contents (17 chapters)
Vagrant Virtual Development Environment Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Appendix B. A Puppet Development Environment

While we covered the use of Puppet as a provisioning environment in Chapter 4, Provisioning with Configuration Management Tools, the use of Vagrant to create a development environment for configuration management is something that is worth covering in a little more depth. While this appendix will cover the use of Vagrant to create Vagrant development environment, many of the same principles apply to other configuration management environments (particularly the configuration management tools that rely on a master/agent architecture).

There are many ways to set up a Puppet development environment. A few common approaches are as follows:

  • The use of a single machine environment and the puppet apply provisioner to develop single Puppet modules. This is a common setup to create and test a single module.

  • The use of a multimachine environment to simulate a Puppetmaster or Puppet agent environment. This scenario allows for not only a full test of the interaction of agent and master, but also makes setting up a cluster of machines for software testing a bit simpler. (For example, a scenario that allows a developer to set up a multi-tier application or a load-balanced web cluster.)

Using configuration management tools can allow an entire development stack to be created locally, either as a development workstation or perhaps within a continuous integration environment. In this appendix, we'll take a deeper look at a few ways to use Vagrant as a Puppet development environment.

Before we can set up a development environment, we'll note the two ways that we can apply puppet manifests to a node:

  • With the puppet apply provisioner: This allows us to apply a Puppet manifest

  • With the puppet agent provisioner: This boots a virtual machine and configures a Puppet agent to retrieve a catalog from a remote Puppet server

In this example, we'll look at creating environments using these two techniques.