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)

Docker_bitbucket (manifest resources)


In this topic, we are going to write our module that will install Atlassian's Bitbucket. The application will be comprised of two containers, among which one will be Postgres as we mentioned earlier. We are actually going to tweak the container to secure the backend and make it only accessible to Bitbucket. Then, we will run the Bitbucket container, configure the user it will run as, and then map the filesystem from the host machine to the container.

Creating our module skeleton

This is just going to be a quick refresher, as we covered this in the last chapter. If you are still not feeling comfortable with this step, I would recommend you to go over the last chapter again until you have a good grasp of the process.

So, we are going to open up our terminal and change directory or cd into the root of our Vagrant repo. Then, we will type vagrant up, and once the box is up, we will use SSH into it with vagrant ssh. The next step is to change to root (sudo ...