Migration from standard to swarm

Hi basically question is simple. I have running project then runs many nodeclusters and services. Right now I’m pretty happy with what I have, easy to scale, manage, route either cli or web interface. But as I can see that standard mode soon or late will be replaced with swarm, it would be nice to have some kind of manual how to migrate running project, or just migrate from standard to swarm and keep all services, nodes tags etc.


If your using compose you can make the change to swarm pretty easily with a few changes to your yml file.

1 Like

Would this also work the other way around? Migrating from swarm to regular node?

Not sure what you mean… a node can simply leave a swarm with docker swarm leave (on the node that should leave the swarm), though you also need to remove the node that left the swarm on one of your master nodes: docker swarm node rm ${nodeid of the left node}. You might want to migrate configuration items underneath “service.deploy” back to their docker-compose v2 counterparts.

Let’s say there is a single node swarm, which is is the master, after removing swarm on it I should be able to deploy the containers again?

If a node leaves a swarm, it will return to the “single engine mode”. It does everything, it did before you initilized the swarm. If you have plain docker containers running while leaving the swarm, they will not be affected at all.

Though if you had swarm services running, they will be gone, together with their scheduled tasks (which create the containers). You would need to re-deploy them with docker-compose.