You are previewing Puppet for Containerization.
O'Reilly logo
Puppet for Containerization

Book Description

Learn about configuration management and gain complete control of your Docker containers using Puppet

About This Book

  • This is the first book that focuses specifically on the combination of containerization and configuration management tools as the landscape for system administration changes

  • It demonstrates to administrators how to seamlessly integrate containerization without disrupting their entire system

  • It provides a canny way for you to grow your tool kit and embrace new tech such as Docker while building on your existing skill set

  • Who This Book Is For

    This book is designed for system administrators who are looking to explore containerization. Intermediate experience and expertise with Puppet is presumed.

    What You Will Learn

  • Write Puppet modules to build Docker

  • Create Docker Compose templates with .erb files

  • Get to know the architecture of Docker schedulers

  • Create a Docker network and service discovery framework

  • Build a fully functional Docker scheduler with Puppet

  • Make Docker production ready with Puppet

  • In Detail

    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.

    Style and approach

    This book uniquely focuses on the pain point of making containerization part of a bigger, established workflow of system administration. It will begin with the presumption that one has a use for Docker containers, and a background in system administration. Then, step by step, it takes you through the concepts and methods necessary to integrate this new time-saving technology into a well-managed configuration run by Puppet.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Puppet for Containerization
      1. Table of Contents
      2. Puppet for Containerization
      3. Credits
      4. About the Author
      5. About the Reviewer
      6. www.PacktPub.com
        1. eBooks, discount offers, and more
          1. Why subscribe?
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Installing Docker with Puppet
        1. Installing Vagrant
          1. The installation
            1. VirtualBox
            2. Vagrant
          2. Vagrantfile
        2. Welcome to the Puppet Forge
          1. The Puppet Forge
          2. Creating our puppetfile
        3. Installing Docker
          1. Setting our manifests
        4. Summary
      9. 2. Working with Docker Hub
        1. Working with Docker Hub
          1. An overview of Docker Hub
          2. Creating a Docker Hub account
          3. Exploring official images
        2. Automated builds in Docker Hub
          1. Automated builds
          2. Pushing to Docker Hub
        3. Working with official images
          1. Dockerfiles
          2. Docker Compose
          3. Puppet manifest
        4. Summary
      10. 3. Building a Single Container Application
        1. Building a Puppet module skeleton
          1. The Puppet module generator
        2. Coding using resource declarations
          1. File structures
          2. Writing our module
          3. Running our module
        3. Coding using .erb files
          1. Writing our module with Docker Compose
          2. Docker Compose up with Puppet
        4. Summary
      11. 4. Building Multicontainer Applications
        1. Decoupling a state
          1. State versus stateless
        2. Docker_bitbucket (manifest resources)
          1. Creating our module skeleton
          2. Let's code
          3. Running our module
        3. Docker_bitbucket (Docker Compose)
          1. Let's code – take 2
          2. Running our module – take 2
        4. Summary
      12. 5. Configuring Service Discovery and Docker Networking
        1. Service discovery
          1. The theory
          2. The service discovery module
        2. Docker networking
          1. The prerequisites
          2. The code
        3. Summary
      13. 6. Multinode Applications
        1. The design of our solution
          1. The Consul cluster
          2. The ELK stack
        2. Putting it all together
          1. The server setup
          2. The Consul cluster
          3. The ELK stack
        3. Summary
      14. 7. Container Schedulers
        1. Docker Swarm
          1. The Docker Swarm architecture
          2. Coding
        2. Docker UCP
          1. The Docker UCP architecture
          2. Coding
        3. Kubernetes
          1. The architecture
          2. Coding
        4. Summary
      15. 8. Logging, Monitoring, and Recovery Techniques
        1. Logging
          1. The solution
          2. The code
            1. Logstash
        2. Monitoring
          1. Monitoring with Consul
        3. Recovery techniques
          1. Built-in HA
        4. Summary
      16. 9. Best Practices for the Real World
        1. Hiera
          1. What data belongs in Hiera
          2. Tips and tricks for Hiera
        2. The code
          1. UCP
          2. Kubernetes
        3. Summary
      17. Index