Book Image

Puppet for Containerization

By : Scott Coulton
Book Image

Puppet for Containerization

By: Scott Coulton

Overview of this book

This book teaches you how to take advantage of the new benefits of containerization systems such as Docker, Kubernetes, Docker Swarm, and Docker UCP, without losing the panoptical power of proper configuration management. You will learn how to integrate your containerized applications and modules with your Puppet workflow. You will also understand how to manage, monitor, and orchestrate hosts to keep deployed containers running seamlessly. With the help of this book, you can efficiently automate and document with containers, as a part of your system. The book will also cover use cases of deploying Puppet within a containerized environment.
Table of Contents (16 chapters)

Service discovery


This is a fairly important topic in the world of containers, when we start to move into multinode applications and Docker schedulers. The question is what is service discovery? Is it limited to containers? What are the types of service discovery for us to make smart design choices in our Puppet modules.

The theory

Service discovery is essential when we start to work with multinode applications, as it allows our applications to talk to each other as they move from node to node. So, as you can see in the world of containers, this is fairly important. We have a few choices when we choose a service discovery backend. The two big names in this space are etcd (https://coreos.com/etcd/), which again is from CoreOS, and Consul from HashiCorp (https://www.consul.io/).

You might remember that we have already written a consul module. So for this chapter, we are going to choose the same, as we already have the written code. First, let's look at the architecture of Consul so we can understand...