In this chapter, we are going to write our first module to deploy our first containerized application. The application that we are going to deploy is Consul from HashiCorp (https://www.consul.io/). We will talk about Consul a little later in the chapter. The first thing we will look at is how to construct a Puppet module with the correct file structure, unit tests, and gems. Once we have our module skeleton, we will look at the two ways to deploy Consul with Puppet in a container. The first will be to use resource declarations in a manifest and the second will be to use Docker Compose as a template .erb
file. These are the topics that we will cover in this chapter:
Building a Puppet module skeleton
Coding using resource declarations
Coding using
.erb
files