Docker Swarm:Native Docker Clustering
COURSE INTRODUCTION
By scmGalaxy.com
About Me
DevOps@RajeshKumar.XYZ
Related Courses
To get you up and running...
Docker and Containers:The Big Picture
- Course Intro
- What are Containers
- What is Docker
- Preparing to Thrive in a
- Container World
- What Kind of Work Will
- Containers Do?
- Docker Hub and Other
- Container Registries
Docker Deep Dive
- Course Intro
- Introducing Containers
- Installing Ubuntu Linux and
- CentOS Linux
- Installing and Updating Docker
- Major Docker Components
- A Close Look at Images and
- Containers
- Container Management
- Building from a Dockerfile
- Working with Registries
Why is this course
- Docker and container are hoht!
worth my time?
- Companies are starting to use them in production at scale!
- Swarm is all about production and scale
# docker run --restart=unless-stopped -d -p 3375:2375 swarm manage ... I
# liocker run -d swarm join --addr=nodel:2375 consul://1O.e.e.2:85ee I
# iocker run -d swarm join --addr=node2:2375 consul://1O.O.e.2:85ee
# docker run -d swarm join --addr=node3:2375 consul://le.e.e.2:85ee
Docker swarm
Basic Docker Architecture:
Architecture & Terminology
Discovery service
Discovery service
- Key-value store
- Stores cluste state and config
- Needed for the ckter to operate properly
Swarm Manager
Swarm Manager
- ClusteR admin
- Accets Docker Commands
-
ExecuteS Commands on the
cluster
Swarm Discovery Service
swarm manager
Required to administer and program the
cluster
Supports HA
1 x Primary (sends all commands to the cluster)
N x Secondaries(proxys commands to Primary)
• Automatically take over in the event
of the Primary going down
Filtering & scheding
Filtering
$ sudo docker info
Containers: 3
Images: 2
Server Version: .1.10.1
Storage Driver: aufs
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 3.13.0-74-qener -
Operating System: Ubuntu 14.04.3 LTS
Cluster store: consul://172.31.21.211:8500
Cluster advertise: 172.31.21.211:2375
Custom labels
Scheiuling
Random
Spread
Binpack
Contribute your own
(https://github.com/docker/docker/pkg/discovery)
scheduling strategies
R6Ndom
Spread
Bnpack
Cluster strategy: Spread
summary
Coming up next...
Buildinc the infrstructure
Building Your Infrastructure
Coming up next...
What this can look like in AWS
Coming up next...
Building a Swarm cluster!!!
Building Your Swarm Cluster
plan
Step 1
- Build the discovery service
- Consul, etcd, Zookeeper
- Configure 3 for High Availability (HA)
Step 2
- Build the Swarm managers
- Configure 3 for High Availability (HA)
- Install on same nodes as discovery service
plan
Step 1
- Build the discovery service
- Consul
- Configure 3 for High Availability (HA)
Step 2
- Build the Swarm managers
-
Configure 3 for High Availability (HA)
- Install on same nodes as discovery service
plan
Step 1
- Build the discovery service
- Consul
- Configure 3 for High Availability (HA)
Step 2
- Build the Swarm managers
- Configure 3 for High Availability (HA)
- Install on same nodes as discovery service
plan
Step 1
- Build the discovery service
- Consul
- Configure 3 for High Availability (HA)
Step 2
- Build the Swarm managers
- Configure 3 for High Availability (HA)
- Install on same nodes as discovery service
Securing Your Swarm Cluster
Security is a top priority for all organizations
plan
- Intro to public key infrastructure
- Build a basic PKI
- Certificate Authorities (CA) and certificates
- Install certificates
- Configure Docker Engine daemons for TLS
- Configure Swarm Managers for TLS
- Configure a Docker client and test
The following demo is NOT how
to buiId a production - worthy
certificate authority (CA)
It is intended solely as a demonstration
vehicle so that people can follow along
with the labs!
plan
- Intro to public key infrastructure
- Build a basic PKI
- Certificate Authorities (CA) and certificates
- Install certificates
- Configure Docker Engine daemons for TLS
- Configure Swarm Managers for TLS
- Configure a Docker client and test
plan
- Intro to public key infrastructure
- Build a basic PKI
- Certificate Authorities (CA) and certificates
- Install certificates
- Configure Docker Engine daemons for TLS
- Configure Swarm Managers for TLS
- Configure a Docker client and test
Systemd-based systems:/etc/systemd/system/docker. service. d
plan
- Intro to public key infrastructure
- Build a basic PKI
- Certificate Authorities (CA) and certificates
- Install certificates
- Configure Docker Engine daemons for TLS
- Configure Swarm Managers for TLS
- Configure a Docker client and test
plan
- Intro to public key infrastructure
- Build a basic PKI
- Certificate Authorities (CA) and certificates
- Install certificates
- Configure Docker Engine daemons for TLS
- Configure Swarm Managers for TLS
- Configure a Docker client and test
plan
- Scheduling
- Filtering
- Affinity filters
- Standard constraint filters
- Custom constraint filters
Integrations with Other Tools
Coming up...
What to do next!
questions?