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

Course Agenda

cource agenda
cource agenda1
cource agenda2
# 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
						

Introducing Swarm

Docker swarm

docker swarm

Basic Docker Architecture:

client server

Scaling Challenges

scaling challenges
scaling challenges1
scaling challenges2
scaling challenges3

Architecture & Terminology

Discovery service
discovery service
Discovery service
  • Key-value store
  • Stores cluste state and config
  • Needed for the ckter to operate properly
Swarm Manager
swarm manager

Swarm Manager

  • ClusteR admin
  • Accets Docker Commands
  • ExecuteS Commands on the cluster
docker service

Swarm Discovery Service

swarm discover service

swarm manager

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
filtering

Filtering

filtering1
$ 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

custom labels

Scheiuling

Random

Spread

Binpack

Contribute your own (https://github.com/docker/docker/pkg/discovery)

scheduling strategies

R6Ndom

sceduling strategies

Spread

scheduling strategies1

Bnpack

scheduling strategies2
scheduling strategies3
scheduling strategies4
scheduling strategies5
scheduling strategies6
scheduling strategies7

Cluster strategy: Spread

cluster strategy

summary

summary

Coming up next...

Buildinc the infrstructure

Building Your Infrastructure

building a/c

High Availability (HA)

building1
building2
building3
building4
building5

Coming up next...

What this can look like in AWS

Infrastructure in Aws

aws
aws1
aws2
aws3
aws4
aws5
docker swarm api

Aws vpc operations

Coming up next...

Building a Swarm cluster!!!

Building Your Swarm Cluster

swarm cluster
swarm cluster
swarm cluster
swarm cluster1
swarm cluster2

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

Step 3

  • Add nodes to the cluster

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

Step 3

  • Add nodes to the cluster

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

Step 3

  • Add nodes to the cluster

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

Step 3

  • Add nodes to the cluster

summary

manager
manager1
manager2
manager3
manager4
manager5
manager6

Securing Your Swarm Cluster

Security is a top priority for all organizations

security
security1

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

PKI basics

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! production
ca
ca key pair
ca key pair1
ca key pair2

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

Install Certificates

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
cluster service

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

summary

ca1
ca-key-pair3

Coming up next...

Filtering and Scheduling

Filtering and Scheduling

plan

  • Scheduling
    • CPU and RAM reservations
  • Filtering
    • Affinity filters
    • Standard constraint filters
    • Custom constraint filters
docker cli
docker cli1

summary

summary1
summary2
summary3
summary4
summary5

Integrations with Other Tools

docker data center

Coming up...

What to do next!

What next?

native-docker
pluralsight

questions?

questions

THANKS!!!