简体   繁体   中英

Tool to automate Docker Swarm

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:

  • it has built-in automatic clustering and scaling
  • the installation is performed automatically and you'll get full access to the cluster via intuitive UI
  • containers are running directly on bare metal, so no need to reserve full VMs for each service (and you can choose the datacenter you want to run your project on)
  • the payment is done based on actual consumption of RAM and CPU
  • containers are automatically distributed across different hardware servers that increases high availability

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM