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? Commented 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. Commented 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? Commented 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 ... Commented Jan 26, 2018 at 8:36

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.