简体   繁体   中英

Docker Swarm on AWS Cloudformation explaination

I am looking at this CloudFormation template:

http://editions-us-east-1.s3.amazonaws.com/aws/stable/18.03.0/Docker.tmpl

This template creates a docker swarm cluster using EC2 instances on AWS. The process is relatively straightforward:

  • Create a network for the swarm
  • Create scaling groups for the workers and managers
  • Initialize the managers and reach quorum
  • Initialize the workers and join the swarm

I grasp at a high level what is occourng, and have manually created Docker Swarms on a local machine without difficulty. However, I am failing to grasp some key concepts.

  1. How do the workers join the swarm? I see that the manager IP is published to a Dynamo DB table, but where would the workers get the tokens to join the swarm, and where are the commands being run, I don't see anything along the lines of docker swarm join ... in the template file
  2. What is the purpose of the ELB (Elastic Load Balancer)? All the nodes are included in the balancer, so what is it really balancing?

Those two things are quite confusing as it seems that Docker is creating this swarm out of thin air without the use of tokens or even running the necessary docker command! I'd love a clarification on how these work!

Yea that's one of the problems with those depreciated templates, they are no longer getting updates and much of what their doing isn't open source. I haven't seen documentation on what you're asking about.

For Docker EE, Docker has the new Docker Certified Infrastructure templates (Terraform plus Ansible).

For Docker CE, Docker has no currently-supported cloud infrastructure templates. There are talks of doing something with those AWS/Azure templates , but right now it's just ideas.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM