I have followed the Docker Docs about setting up Swarm on Virtualbox. I suppose it is the same procedure to set it up on AWS, Azure or DigitalOcean. It is a lot to do manually every time .
Is there a tool to automate this?
I would like to use something to set up and scale Swarm like Compose does for Docker .
Maybe I would start with one AWS instance and 2-3 containers and then scale them up to 100 containers and the instances to scale accordingly. Then I would want to scale down to 2 instances and the rest would shut down.
Does something like this exist ?
If you want to avoid manual configurations but still get the required high availability and cost efficiency, try to run Docker Swarm template pre-packaged by Jelastic:
The details about the package and installation steps are in this article .
You can use Docker Machine for provisioning hosts and configuring swarm easily ( example ).
The Docker Ecosystem includes also managed solutions like Tutum or Docker Cloud to achieve easily what you want.
You can use Ansible for configuring the Swarm master, Swarm nodes, and all the required cluster discovery. Ansible is a general IT automation tool, but it comes with a very powerful Docker module that allows to set up Docker Swarm easily.
This GitHub repository shows a good example how to set up Swarm with Ansible.
查看devopsbyte.com博客,其中介绍了如何使用ansible设置docker swarm 集群
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.