How can you automatically provision new machines when docker swarm detects there are not enough resources to schedule all services?
I use a setup with rancher and the docker swarm scheduler, and if there are not enough resources, the service creation fails:
exit status 1: Creating stresstest2_workerb1_1 Creating stresstest2_workerb2_1 no resources available to schedule container
I can poll for this status and call docker machine when needed, but rancher will not attempt to re-schedule the missing services. I wonder if there is a more integrated solution, maybe a hook within docker swarm that can be used to dynamically call docker-machine to create or remove machines.
I'm currently deciding between Rancher with Docker 1.11 + Docker Swarm or Docker 1.12 in Swarm Mode, so a solution for any would be fine.