The DevOps 2.1 Toolkit: Docker Swarm

Viktor Farcic's latest book, The DevOps 2.1 Toolkit: Docker Swarm, shows you how to successfully integrate Docker Swarm into your DevOps toolset.
Preview in Mapt

The DevOps 2.1 Toolkit: Docker Swarm

Viktor Farcic

Viktor Farcic's latest book, The DevOps 2.1 Toolkit: Docker Swarm, shows you how to successfully integrate Docker Swarm into your DevOps toolset.

Quick links: > What will you learn?> Table of content

Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99 p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


The DevOps 2.1 Toolkit: Docker Swarm Book Cover
The DevOps 2.1 Toolkit: Docker Swarm
$ 39.99
$ 28.00
DevOps: Puppet, Docker, and Kubernetes Book Cover
DevOps: Puppet, Docker, and Kubernetes
$ 79.99
$ 56.00
Buy 2 for $35.00
Save $84.98
Add to Cart

Book Details

ISBN 139781787289703
Paperback436 pages

Book Description

Viktor Farcic's latest book, The DevOps 2.1 Toolkit: Docker Swarm, takes you deeper into one of the major subjects of his international best seller, The DevOps 2.0 Toolkit, and shows you how to successfully integrate Docker Swarm into your DevOps toolset.

Viktor shares with you his expert knowledge in all aspects of building, testing, deploying, and monitoring services inside Docker Swarm clusters. You'll go through all the tools required for running a cluster. You'll travel through the whole process with clusters running locally on a laptop. Once you're confident with that outcome, Viktor shows you how to translate your experience to different hosting providers like AWS, Azure, and DigitalOcean.

Viktor has updated his DevOps 2.0 framework in this book to use the latest and greatest features and techniques introduced in Docker. We'll go through many practices and even more tools. While there will be a lot of theory, this is a hands-on book. You won't be able to complete it by reading it on the metro on your way to work. You'll have to read this book while in front of the computer and get your hands dirty.

Table of Contents

Chapter 1: Continuous Integration with Docker Containers
Defining a fully Dockerized manual Continuous Integration flow
Running unit tests and building service binary
Building service images
Running staging tests
Pushing images to the registry
Chapter 2: Setting Up and Operating a Swarm Cluster
Scalability
Axis scaling
Clustering
Docker Swarm Mode
Setting up a Swarm cluster
Deploying services to the Swarm cluster
Scaling services
Failover
What now?
Chapter 3: Docker Swarm Networking and Reverse Proxy
Setting up a cluster
Requirements of secured and fault tolerant services running with high availability
Running a database in isolation
Running a service through a reverse proxy
Creating a reverse proxy service in charge of routing requests depending on their base URLs
Load balancing requests across all instances of a service
What now?
Chapter 4: Service Discovery inside a Swarm Cluster
What would Docker Swarm look like without?
What does standalone Docker Swarm look like with service discovery?
Service discovery in the Swarm cluster
Do we need service discovery?
Setting up Consul as service registry inside a Swarm cluster
Problems when scaling stateful instances
Using service registry to store the state
Discovering addresses of all instances that form a service
Using service registry or key value store to store service state
What now?
Chapter 5: Continuous Delivery and Deployment with Docker Containers
Defining the Continuous Delivery environment
Setting up Continuous Delivery clusters
Using node labels to constrain services
Creating services
Walking through Continuous Delivery steps
Walking the extra mile from Continuous Delivery to Continuous Deployment
What now?
Chapter 6: Automating Continuous Deployment Flow with Jenkins
Jenkins architecture
Production environment setup
Jenkins service
Jenkins failover
Jenkins agent
Creating services in production and production-like environments
Automating Continuous Deployment flow with Jenkins
Creating Jenkins Pipeline jobs
What now?
Chapter 7: Exploring Docker Remote API
Setting up the environment
Operating Docker Swarm through the Docker Remote API
Using Docker Remote API to automate proxy configuration
Combining the Swarm listener with the proxy
What now?
Chapter 8: Using Docker Stack and Compose YAML Files to Deploy Swarm Services
Swarm cluster setup
Creating Swarm services through Docker stack commands
Deploying more stacks
To stack or not to stack
Cleanup
Chapter 9: Defining Logging Strategy
The need for centralized logging
Setting up ElasticSearch as the logging database
Setting up LogStash as the logs parser and forwarder
Forwarding logs from all containers running anywhere inside a Swarm cluster
Exploring logs
Discussing other logging solutions
What now?
Chapter 10: Collecting Metrics and Monitoring the Cluster
The requirements of a cluster monitoring system
Choosing the right database to store system metrics
Creating the cluster
Prometheus metrics
Exporting system wide metrics
Scraping, querying, and visualizing Prometheus metrics
Using Grafana to create dashboards
Exploring Docker Swarm and container overview dashboard in Grafana
Adjusting services through dashboard metrics
Monitoring best practices
What now?
Chapter 11: Embracing Destruction: Pets versus Cattle
What now?
Chapter 12: Creating and Managing a Docker Swarm Cluster in Amazon Web Services
Installing AWS CLI and setting up the environment variables
Setting up a Swarm cluster with Docker Machine and AWS CLI
Setting up a Swarm cluster with Docker for AWS
Automatically setting up a Swarm cluster with Docker for AWS
Setting up a Swarm cluster with Packer and Terraform
Choosing the right tools to create and manage Swarm clusters in AWS
Chapter 13: Creating and Managing a Docker Swarm Cluster in DigitalOcean
Setting up the environment variables
Setting up a Swarm cluster with Docker Machine and DigitalOcean API
Setting up a Swarm cluster with Packer and Terraform
Choosing the right tools to create and manage Swarm clusters in DigitalOcean
To DigitalOcean or not to DigitalOcean
Chapter 14: Creating and Managing Stateful Services in a Swarm Cluster
Exploring the twelve-factor app methodology
Setting up a Swarm cluster and the proxy
Running stateful services without data persistence
Persisting stateful services on the host
Persisting stateful services on a Network File System
Data volume orchestration
Persisting stateful services with REX-Ray
Choosing the persistence method for stateful services
Adding REX-Ray to packer and terraform
Persisting stateful services without replication
Persisting stateful services with synchronization and replication
Persisting docker flow proxy state
Persisting MongoDB state
Initializing MongoDB replica set through a swarm service
What now?
Chapter 15: Managing Secrets in Docker Swarm Clusters
Creating secrets
Consuming secrets
A real-world example of using secrets
Using secrets with Docker Compose
Common ways to use secrets
What now?
Chapter 16: Monitor Your GitHub Repos with Docker and Prometheus
Docker, Prometheus, and Grafana
Getting started
Configuration
Post configuration
Install dashboard
Conclusion
About the author

What You Will Learn

  • Learn all aspects of Docker Swarm from building, testing, deploying, and monitoring services inside Docker Swarm clusters, available since Docker 1.12.
  • Master the deeper logic of DevOps with Viktor, so that you can successfully apply that logic across any specific set of tools you’re working with.
  • Translate a deep understanding to different hosting providers like AWS, Azure, DigitalOcean, among others.
  • You’ll go beyond simple deployment: you will explore with Viktor how to create a continuous deployment process. Accomplish zero-downtime deployments, and what to do in case of a failover.
  • Know how to run services at scale, how to monitor the systems, and how to make it heal itself.

Authors

Table of Contents

Chapter 1: Continuous Integration with Docker Containers
Defining a fully Dockerized manual Continuous Integration flow
Running unit tests and building service binary
Building service images
Running staging tests
Pushing images to the registry
Chapter 2: Setting Up and Operating a Swarm Cluster
Scalability
Axis scaling
Clustering
Docker Swarm Mode
Setting up a Swarm cluster
Deploying services to the Swarm cluster
Scaling services
Failover
What now?
Chapter 3: Docker Swarm Networking and Reverse Proxy
Setting up a cluster
Requirements of secured and fault tolerant services running with high availability
Running a database in isolation
Running a service through a reverse proxy
Creating a reverse proxy service in charge of routing requests depending on their base URLs
Load balancing requests across all instances of a service
What now?
Chapter 4: Service Discovery inside a Swarm Cluster
What would Docker Swarm look like without?
What does standalone Docker Swarm look like with service discovery?
Service discovery in the Swarm cluster
Do we need service discovery?
Setting up Consul as service registry inside a Swarm cluster
Problems when scaling stateful instances
Using service registry to store the state
Discovering addresses of all instances that form a service
Using service registry or key value store to store service state
What now?
Chapter 5: Continuous Delivery and Deployment with Docker Containers
Defining the Continuous Delivery environment
Setting up Continuous Delivery clusters
Using node labels to constrain services
Creating services
Walking through Continuous Delivery steps
Walking the extra mile from Continuous Delivery to Continuous Deployment
What now?
Chapter 6: Automating Continuous Deployment Flow with Jenkins
Jenkins architecture
Production environment setup
Jenkins service
Jenkins failover
Jenkins agent
Creating services in production and production-like environments
Automating Continuous Deployment flow with Jenkins
Creating Jenkins Pipeline jobs
What now?
Chapter 7: Exploring Docker Remote API
Setting up the environment
Operating Docker Swarm through the Docker Remote API
Using Docker Remote API to automate proxy configuration
Combining the Swarm listener with the proxy
What now?
Chapter 8: Using Docker Stack and Compose YAML Files to Deploy Swarm Services
Swarm cluster setup
Creating Swarm services through Docker stack commands
Deploying more stacks
To stack or not to stack
Cleanup
Chapter 9: Defining Logging Strategy
The need for centralized logging
Setting up ElasticSearch as the logging database
Setting up LogStash as the logs parser and forwarder
Forwarding logs from all containers running anywhere inside a Swarm cluster
Exploring logs
Discussing other logging solutions
What now?
Chapter 10: Collecting Metrics and Monitoring the Cluster
The requirements of a cluster monitoring system
Choosing the right database to store system metrics
Creating the cluster
Prometheus metrics
Exporting system wide metrics
Scraping, querying, and visualizing Prometheus metrics
Using Grafana to create dashboards
Exploring Docker Swarm and container overview dashboard in Grafana
Adjusting services through dashboard metrics
Monitoring best practices
What now?
Chapter 11: Embracing Destruction: Pets versus Cattle
What now?
Chapter 12: Creating and Managing a Docker Swarm Cluster in Amazon Web Services
Installing AWS CLI and setting up the environment variables
Setting up a Swarm cluster with Docker Machine and AWS CLI
Setting up a Swarm cluster with Docker for AWS
Automatically setting up a Swarm cluster with Docker for AWS
Setting up a Swarm cluster with Packer and Terraform
Choosing the right tools to create and manage Swarm clusters in AWS
Chapter 13: Creating and Managing a Docker Swarm Cluster in DigitalOcean
Setting up the environment variables
Setting up a Swarm cluster with Docker Machine and DigitalOcean API
Setting up a Swarm cluster with Packer and Terraform
Choosing the right tools to create and manage Swarm clusters in DigitalOcean
To DigitalOcean or not to DigitalOcean
Chapter 14: Creating and Managing Stateful Services in a Swarm Cluster
Exploring the twelve-factor app methodology
Setting up a Swarm cluster and the proxy
Running stateful services without data persistence
Persisting stateful services on the host
Persisting stateful services on a Network File System
Data volume orchestration
Persisting stateful services with REX-Ray
Choosing the persistence method for stateful services
Adding REX-Ray to packer and terraform
Persisting stateful services without replication
Persisting stateful services with synchronization and replication
Persisting docker flow proxy state
Persisting MongoDB state
Initializing MongoDB replica set through a swarm service
What now?
Chapter 15: Managing Secrets in Docker Swarm Clusters
Creating secrets
Consuming secrets
A real-world example of using secrets
Using secrets with Docker Compose
Common ways to use secrets
What now?
Chapter 16: Monitor Your GitHub Repos with Docker and Prometheus
Docker, Prometheus, and Grafana
Getting started
Configuration
Post configuration
Install dashboard
Conclusion
About the author

Book Details

ISBN 139781787289703
Paperback436 pages
Read More

Read More Reviews

Recommended for You

DevOps: Puppet, Docker, and Kubernetes Book Cover
DevOps: Puppet, Docker, and Kubernetes
$ 79.99
$ 56.00
Jenkins Essentials - Second Edition Book Cover
Jenkins Essentials - Second Edition
$ 31.99
$ 22.40
Linux: Powerful Server Administration Book Cover
Linux: Powerful Server Administration
$ 79.99
$ 56.00
DevOps with Kubernetes Book Cover
DevOps with Kubernetes
$ 39.99
$ 28.00
Reactive Android Programming Book Cover
Reactive Android Programming
$ 31.99
$ 22.40
The DevOps 2.0 Toolkit Book Cover
The DevOps 2.0 Toolkit
$ 39.99
$ 28.00