Contact Info
London Office :
Denizli Office :
Pamukkale Üniversitesi Teknoloji Geliştirme Merkezi B Blok Oda:Z17, 20070 Denizli
+88 (0) 101 0000 000
Certified Kubernetes Administrator Certified Developer on Apache Cassandra


Container Orchestration

  What is Docker Swarm?
  • Native cluster management and orchestration for Docker
  • A pool of Docker hosts to a single, virtual Docker host
  • Docker Swarm serves the standard Docker API
  • Standalone Swarm before Docker version 1.12
  • In Docker 1.12 and higher, Swarm Mode integrated with Docker Engine
Key Features
  • Integrated cluster management with Docker engine
  • Declarative service model with YAML based files
  • Scaling with declaring the number of tasks
  • Make sure apps are up and running with Desired state reconciliation
  • Managed Multi-host networking
  • Service discovery with unique DNS names
  • Load balancing
  • Secure by default with TLS mutual authentication and encryption for communications
  • Rolling updates for delaying deployments and rollback
Docker Swarm Concepts
  • Nodes: An instance of the Docker engine participating in the swarm
  • Manager: Performs the orchestration and cluster management. Dispatches unit of works to worker nodes.
  • Worker: Receives and executes tasks dispatched from manager nodes
  • Task: Atomic scheduling unit of swarm. A running container which is part of a swarm service and managed by a swarm manager, as opposed to a standalone container
  • Service: The definition of the tasks to execute on swarm cluster. Replicated Services and Global Services
  • Stack: The definition of the services to execute on swarm cluster
  • Load Balancing: Swarm manager uses ingress load balancing to expose the services via PublishedPort
Docker Compose Vs. Docker Stack
  • docker-compose -f docker-compose.yml up -d
  • docker stack deploy -c docker-compose.yml stack_name
  • Docker stack is ignoring “build” instructions.
  • Docker compose is a Python project. Origin is “fig”. You should install docker-compose separately to use it.
  • Docker Stack is included with the Docker Engine from version 1.12
  • To use Docker Stack, Swarm mode should be enabled
  • Docker Stack not supporting docker-compose files which are written according to Version 2 specification. Docker Compose supports Version 2 and 3
How Nodes Work   Manager nodes handle cluster management tasks:
  • maintaining cluster state
  • scheduling services
  • serving swarm mode HTTP API endpoints
For fault-tolerance features, use an odd number of manager nodes An N manager cluster tolerates the loss of at most (N-1)/2 managers Docker recommends maximum 7 manager node Worker nodes not handle cluster management tasks. By default, all Manager nodes are also workers. How Services Work
  • To deploy an application image in swarm mode, we must create a service.
  • When we create a service, we specify some options;
    • Image name
    • Commands
    • Port
    • Networking
    • Resources
    • Rolling update policy
    • Replica count

Post a Comment

Retype the CAPTCHA code from the image
Change the CAPTCHA codeSpeak the CAPTCHA code