1

Imagine you want to reset your Docker swarm from time to time.

How do you distribute join tokens to those zillions of nodes? How much automation is possible here?

2 Answers 2

2

Have the Swarm Manager place the worker join token in a Key/Value store. We use AWS Parameter Store but I believe Consul would be another option (I don't use it).

Each node can then retrieve the token while it is bootstrapping.

2
  • what if you have more than 1 manager?
    – Ta Mu
    Jan 26, 2018 at 7:21
  • The manager join token can be stored in a K/V store as well. The initial manager token is the starting point for rebuilding or bootstrapping the Swarm.
    – swysocki
    Jan 26, 2018 at 13:05
1

Simple answer with infrastructure as code, you don't rejoin nodes, you trash old nodes and bring fresh nodes to join the cluster.

2
  • still you need to tell the new nodes as well how they join as worker either manager. Or do you mean once a token is there you bake it into their IaC?
    – Ta Mu
    Jan 26, 2018 at 7:22
  • 1
    I just mean same principle as building a new cluster, code your cluster building process and then when you want to reset, build a new and trash the old one. How you code this is fairly personal ...
    – Tensibai
    Jan 26, 2018 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.