Scaling Services with rancheros like with docker-compose

I have set my cloud-config.yml with several services that starts with rancheros and I ve set a small 6 nodes swarm that works well with the “docker service” commands for creating and scaling services … however I can’t find the proper way to scale the services set in my cloud-config.yml like we could do with “docker-compose scale servicename=4”.
I’ve tried the “ros service scale servicename=4” command but the “ros” seems no to be related to the swarm anyway and says it can not scale named services and services that specifie a port since it scales on the localhost.

So how to scale the services of my yml file to the swarm?

The services started via cloud-config.yml are basically the same as if you ran “docker run” on the command line. They aren’t controlled as services in the swarm, so you can’t do much with them centrally.

Instead you would want to not start those containers via cloud-config.yml and instead use the “docker service” commands via the swarm master to create & scale them.

1 Like