Book description
Get hands-on recipes to automate and manage Linux containers with the Docker 1.6 environment and jump-start your Puppet development
About This Book
Successfully deploy DevOps with proven solutions and recipes
Automate your infrastructure with Puppet and combine powerful DevOps methods
Deploy and manage highly scalable applications using Kubernetes
streamline the way you manage your applications
Who This Book Is For
This Learning Path is for developers, system administrators, and DevOps engineers who want to use Puppet, Docker, and Kubernetes in their development, QA, or production environments. This Learning Path assumes experience with Linux administration and requires some experience with command-line usage and basic text file editing.
What You Will Learn
Discover how to build high availability Kubernetes clusters
Deal with inherent issues with container virtualization and container concepts
Create services with Docker to enable the swift development and deployment of applications
Make optimum use of Docker in a testing environment
Create efficient manifests to streamline your deployments
Automate Puppet master deployment using Git hooks, r10k, and PuppetDB
In Detail
With so many IT management and DevOps tools on the market, both open source and commercial, it’s difficult to know where to start. DevOps is incredibly powerful when implemented correctly, and here’s how to get it done.This Learning Path covers three broad areas: Puppet, Docker, and Kubernetes. This Learning Path is a large resource of recipes to ease your daily DevOps tasks. We begin with recipes that help you develop a complete and expert understanding of Puppet’s latest and most advanced features. Then we provide recipes that help you efficiently work with the Docker environment. Finally, we show you how to better manage containers in different scenarios in production using Kubernetes.
This course is based on these books:
Puppet Cookbook, Third Edition
Docker Cookbook
Kubernetes Cookbook
Style and approach
This easy-to-follow tutorial-style guide teaches you precisely how to configure complex systems in Puppet and manage your containers using Kubernetes.
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
-
DevOps: Puppet, Docker, and Kubernetes
- Table of Contents
- DevOps: Puppet, Docker, and Kubernetes
- Credits
- Preface
-
1. Module 1
-
1. Puppet Language and Style
- Introduction
- Adding a resource to a node
- Using Facter to describe a node
- Installing a package before starting a service
- Installing, configuring, and starting a service
- Using community Puppet style
- Creating a manifest
- Checking your manifests with Puppet-lint
- Using modules
- Using standard naming conventions
- Using inline templates
- Iterating over multiple items
- Writing powerful conditional statements
- Using regular expressions in if statements
- Using selectors and case statements
- Using the in operator
- Using regular expression substitutions
- Using the future parser
-
2. Puppet Infrastructure
- Introduction
- Installing Puppet
- Managing your manifests with Git
- Creating a decentralized Puppet architecture
- Writing a papply script
- Running Puppet from cron
- Bootstrapping Puppet with bash
- Creating a centralized Puppet infrastructure
- Creating certificates with multiple DNS names
- Running Puppet from passenger
- Setting up the environment
- Configuring PuppetDB
- Configuring Hiera
- Setting node-specific data with Hiera
- Storing secret data with hiera-gpg
- Using MessagePack serialization
- Automatic syntax checking with Git hooks
- Pushing code around with Git
- Managing Environments with Git
-
3. Writing Better Manifests
- Introduction
- Using arrays of resources
- Using resource defaults
- Using defined types
- Using tags
- Using run stages
- Using roles and profiles
- Passing parameters to classes
- Passing parameters from Hiera
- Writing reusable, cross-platform manifests
- Getting information about the environment
- Importing dynamic information
- Passing arguments to shell commands
-
4. Working with Files and Packages
- Introduction
- Making quick edits to config files
- Editing INI style files with puppetlabs-inifile
- Using Augeas to reliably edit config files
- Building config files using snippets
- Using ERB templates
- Using array iteration in templates
- Using EPP templates
- Using GnuPG to encrypt secrets
- Installing packages from a third-party repository
- Comparing package versions
- 5. Users and Virtual Resources
- 6. Managing Resources and Files
- 7. Managing Applications
- 8. Internode Coordination
-
9. External Tools and the Puppet Ecosystem
- Introduction
- Creating custom facts
- Adding external facts
- Setting facts as environment variables
- Generating manifests with the Puppet resource command
- Generating manifests with other tools
- Using an external node classifier
- Creating your own resource types
- Creating your own providers
- Creating custom functions
- Testing your puppet manifests with rspec-puppet
- Using librarian-puppet
- Using r10k
- 10. Monitoring, Reporting, and Troubleshooting
-
1. Puppet Language and Style
-
2. Module 2
- 1. Introduction and Installation
-
2. Working with Docker Containers
- Introduction
- Listing/searching for an image
- Pulling an image
- Listing images
- Starting a container
- Listing containers
- Looking at the logs of containers
- Stopping a container
- Deleting a container
- Setting the restart policy on a container
- Getting privileged access inside a container
- Exposing a port while starting a container
- Accessing the host device inside the container
- Injecting a new process to a running container
- Returning low-level information about a container
- Labeling and filtering containers
-
3. Working with Docker Images
- Introduction
- Creating an account with Docker Hub
- Creating an image from the container
- Publishing an image to the registry
- Looking at the history of an image
- Deleting an image
- Exporting an image
- Importing an image
- Building images using Dockerfiles
- Building an Apache image – a Dockerfile example
- Accessing Firefox from a container – a Dockerfile example
- Building a WordPress image – a Dockerfile example
- Setting up a private index/registry
- Automated builds – with GitHub and Bitbucket
- Creating the base image – using supermin
- Creating the base image – using Debootstrap
- Visualizing dependencies between layers
- 4. Network and Data Management for Containers
- 5. Docker Use Cases
- 6. Docker APIs and Language Bindings
- 7. Docker Performance
-
8. Docker Orchestration and Hosting Platforms
- Introduction
- Running applications with Docker Compose
- Setting up cluster with Docker Swarm
- Setting up CoreOS for Docker orchestration
- Setting up a Project Atomic host
- Doing atomic update/rollback with Project Atomic
- Adding more storage for Docker in Project Atomic
- Setting up Cockpit for Project Atomic
- Setting up a Kubernetes cluster
- Scaling up and down in a Kubernetes cluster
- Setting up WordPress with a Kubernetes cluster
- 9. Docker Security
-
10. Getting Help and Tips and Tricks
- Introduction
- Starting Docker in debug mode
- Building a Docker binary from the source
- Building images without using cached layers
- Building your own bridge for container communication
- Changing the default execution driver of Docker
- Selecting the logging driver for containers
- Getting real-time Docker events for containers
-
3. Module 3
- 1. Building Your Own Kubernetes
-
2. Walking through Kubernetes Concepts
- Introduction
- An overview of Kubernetes control
- Working with pods
- Working with a replication controller
- Working with services
- Working with volumes
- Working with secrets
- Working with names
- Working with namespaces
- Working with labels and selectors
- 3. Playing with Containers
- 4. Building a High Availability Cluster
- 5. Building a Continuous Delivery Pipeline
- 6. Building Kubernetes on AWS
- 7. Advanced Cluster Administration
- 8. Logging and Monitoring
- B. Bibliography
- Index
Product information
- Title: DevOps: Puppet, Docker, and Kubernetes
- Author(s):
- Release date: March 2017
- Publisher(s): Packt Publishing
- ISBN: 9781788297615
You might also like
book
Hands-On Microservices with Kubernetes
Enhance your skills in building scalable infrastructure for your cloud-based applications Key Features Learn to design …
book
Kubernetes - A Complete DevOps Cookbook
Leverage Kubernetes and container architecture to successfully run production-ready workloads Key Features Implement Kubernetes to orchestrate …
book
Hands-On Kubernetes on Windows
Build and deploy scalable cloud applications using Windows containers and Kubernetes Key Features Run, deploy, and …
book
Practical Docker with Python: Build, Release, and Distribute Your Python App with Docker
Learn the fundamentals of containerization and get acquainted with Docker. This second edition builds upon the …