2

I want to run services in our office in containers. The problem I have is that we do not have a spare machine available to act as the dedicated host.

So I am considering creating a swarm using everyone's desktop workstations as the workers. But if the manager node (my computer) is shutdown then the entire swarm stops.

I envisioned a swarm where every worker can act as a manager if needed. When the manager dies, another worker assumes the role as manager and the service continues running uninterrupted.

Is it possible to create a decentralized swarm where any available node can assume the role as a manager as needed?

1
  • While Peter is correct, the idea you have about desktops in a dynamic swarm has lots of concerns and potential issues in its design. Swarm managers need to be an odd number and generally only 3-7 of them in a Swarm. Nodes must have well-connected networks to each other with a list of ports open and no NAT between them. Your idea sounds fun, but is not what Swarm was designed for unless your desktops are all Linux hosts that mostly stay up and managers are on fixed IP's. Commented Feb 22, 2018 at 3:25

2 Answers 2

2

By Docker Swarm design it is dencentralized, so you can promote any node to a manager. Normally, 3 managers are enough, for landscapes with thousands of nodes 5 are enough.

https://docs.docker.com/engine/swarm/admin_guide/

0
0
  1. Every swarm manager is/has worker functionality by default (which can be changed).
    However, the number of functioning docker managers has a very important component when it comes to the ratio of the available number of managers to the active number of managers known as "the quorum of managers". For more info on the administration of the swarm and the quorum here : https://docs.docker.com/engine/swarm/admin_guide/#maintain-the-quorum-of-managers
  2. In your particular case, instead of using actual hardware machines (desktop workstation/laptop/server) you can use virtual machines where the docker can be installed. For their automated management, you can use vagrant. However, it is all about managing the available hardware resource of your entire system. You can also add to the "docker swarm network" any number of other workstations either areas docker hosts or the virtual-machine hosts.

Note: I suggest you consider looking at Podman as a substitute for Docker if your project is in its early stage of development.

P.S. You might want to specify the idea of your project in order to get better advice than currently can be given.

Good luck and have a nice day.

Your Answer

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

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