Description
Deploy, configure, and run clusters of Docker containers with Swarm
About This Book
• Get to grips with Docker Swarm, one of the key components of the Docker ecosystem.
• Optimize Swarm and SwarmKit features for scaling massive applications through containers.
• Learn about Docker’s scheduling tricks, high availability, security, and platform scalability.
Who This Book Is For
If you are a Linux admin or a Docker user who wants to natively manage Docker clusters, then this is the book for you.
What You Will Learn
• Create and manage Swarm Mode clusters of any size
• Get a backstage view of the biggest Swarms ever built : Swarm2k and Swarm3k, with their 2,300 and 4,700 nodes
• Discovery mechanisms and Raft
• Deploy your containerized app on Swarm
• Administer Swarm clusters on AWS, Azure, and DigitalOcean
• Integrate Flocker volumes with Swarm
• Create and manage Swarms on OpenStack Magnum
In Detail
Docker Swarm serves as one of the crucial components of the Docker ecosystem and offers a native solution for you to orchestrate containers. It’s turning out to be one of the preferred choices for Docker clustering thanks to its recent improvements.
This book covers Swarm, Swarm Mode, and SwarmKit. It gives you a guided tour on how Swarm works and how to work with Swarm. It describes how to set up local test installations and then moves to huge distributed infrastructures. You will be shown how Swarm works internally, what’s new in Swarmkit, how to automate big Swarm deploy
Chapter
Chapter 1: Welcome to Docker Swarm
Clustering tools and container managers
Real world use case examples
Kubernetes versus Fleet versus Mesos
The Swarm v1 architecture
Getting started with Swarm
Check that Docker Machine is available – all systems
Create 4 cluster nodes with Docker Machine
Configuring the Docker hosts
Chapter 2: Discover the Discovery Services
Re-architecting the example of Chapter 1 with token
Re architecting the example of Chapter 1 with Etcd
Re architecting the example of Chapter 1 with Consul
Towards a decentralized discovery service
Chapter 3: Meeting Docker Swarm Mode
How a manager chooses the best node for a task
The heart of SwarmKit: swarmd
The controller of SwarmKit: swarmctl
Provisioning a SwarmKit cluster with Ansible
Creating a service on SwarmKit
Old versus new Swarm versus SwarmKit
Integration into the engine
Etcd's Raft is integrated already
Chapter 4: Creating a Production-Grade Swarm
An HA Topology for Swarm2k
Provisioning the infrastructure with belt
Securing Managers with Docker Machine
Understanding some Swarm internals
Live Upgrading the Managers
InfluxDB Time-Series Database
Swarm3k Setup and Workload
Swarm performance at a scale
Swarm2k and Swarm3k lessons learned
Chapter 5: Administer a Swarm Cluster
Backing up the cluster configuration
Graphical interfaces for Swarm
Chapter 6: Deploy Real Applications on Swarm
Deploy a replicated nginx
Integrated load balancing
Connecting services: A WordPress example
Swarm scheduling strategies
Docker Compose and Swarm mode
Introducing Docker stacks
Distributed Application Bundles
Another app: Apache Spark
Spark standalone without Swarm
Spark standalone on Swarm
Chapter 7: Scaling Up Your Platform
Storage configuration and architecture
Generating Flocker certificates
Installing the control node
Installing the cluster nodes
Testing whether everything is up and running
Installing and configuring Swarm
Monitoring Swarm hosting apps
Installing a monitoring system
Importing Prometheus in Grafana
Chapter 8: Exploring Additional Features of Swarm
Container Networking Model
Encryption and routing mesh
Chapter 9: Securing a Swarm Cluster and the Docker Software Supply Chain
Securing a Swarm: Best practices
Certification Authorities
Certificates and Mutual TLS
Add TLS with Docker Machine
Form a cluster on a private network
Introducing Docker secrets
Chapter 10: Swarm and the Cloud
[The (deprecated) nova-docker driver]
The (deprecated) nova-docker driver
The reality – OpenStack the friendly way
Architecture and core concepts
Install HA Magnum on Mirantis OpenStack
Configure an HA Magnum installation
Create a Swarm cluster on Magnum
Chapter 11: What is next?
The challenge of provisioning
Software defined infrastructure
TUF – The Update Framework
Docker stacks and Compose
CaaS – Containers as a Service