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

Creating clusters of Vagrant machines


While the scenario of mimicking defined application architectures (for example, the two-tier or three-tier web application) can be accomplished using simple hosts files and hosts file modifications, creating clusters of Vagrant machines will require a bit of additional complexity, namely, the ability for machines to discover one another using either DNS servers or through service discovery.

In this example, we will create a cluster of Vagrant machines that can communicate with DNS connections using two additional tools:

  • Consul (https://consul.io): This is a tool that allows services and machines to discover one another over a distributed network. In our case, we will use Consul very simply and set up a single Consul server that will serve multiple agents. We will, for this example, also limit our use of Consul to node discovery. This will essentially define a local DNS infrastructure.

  • Dnsmasq (http://www.thekelleys.org.uk/dnsmasq/doc.html): This is a...