O'Reilly logo

Puppet for Containerization by Scott Coulton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding using resource declarations

In this section, we are going to use our module skeleton to build our first Docker application. We are going to write it using standard Puppet manifests.

But first, why is the first module that we are writing Consul? I chose this application for a few reasons. First, Consul has a lot of awesome features such as service discovery and health checks, and can be used as a key/value store. The second reason is that we will use all the features I just mentioned later in the book. So, it will come in handy when we look at Docker Swarm.

File structures

Let's create two new files, install.pp and params.pp, in the manifests folder. The structure should look as shown in the following screenshot:

Writing our module

Let's start ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required