DevOps Classroom Series – 10/Nov/2020

Docker Multihost Networking and Swarm

  • Create 3 servers connected to each other with in a network and install docker on all the three servers Preview

  • How can we enable communication b/w two container running on different hosts Preview

  • Docker has network driver which is called as overlay which can help in connecting two containers running on different hosts

  • Refer Here to understand overlay networks Preview

  • When we are working with multiple docker hosts. It becomes extreemly important for us to ensure

    • avoid failures
    • Scale the containers
    • Simplicity
    • Zero Downtime deployments
  • What we are looking for some software which manages this cluster and Orchestrate. This is exactly where Docker Swarm, Kubernetes and Apache mesos (many more) come into play.

  • Docker Swarm creates an overlay network b/w multiple nodes. Refer Here

  • Docker Swarm is a cluster and it has two types of nodes

    • Manager Node:
      • This is point of contact for us to execute the desired state (Service).
      • This nodes dispatches a unit of work (task) to the worker nodes
      • You can have multiple manager nodes (only one will be primary manager)
    • Worker Node:
      • They recieve and execute the tasks dispatched from manager nodes
      • Mulitple Nodes can be created
      • Agent that runs on this node reports the status of tasks assigned to it back to manager
  • Docker Swarm Representation Preview

  • Create the docker swarm cluster as mentioned in the above link Preview Preview Preview Preview Preview Preview

  • Generally docker services will be exposed to the outside world using load balancers.

  • Experiment by doing

    • docker network ls (on manager and worker nodes)
  • Some reference applications for conterization

    • openmrs
    • shopizer
    • nopcommerce (linux)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin