Docker Swarm Demo
This is a demo to test and demonstrate a cloud deployment with Docker Swarm Mode and Træfɪk.
The script starts several VMs with
docker-machine and connects them together to a swarm mode cluster.
The goals of this project are:
- to show that setting up a production-ready swarm mode cluster is rather easy and quick.
- to provide an environment on which to simulate rolling updates, server crashes and the like.
- to test whether Træfɪk can act as a replacement for HAProxy as the production load-balancer.
./setup_cluster.shspins up the virtual machines and connects them to a swarm mode cluster.
./setup_infra.shdeploys Portainer and Træfɪk.
./deploy_apps.shdeploys a test application several times into the cluster.
./test.shperforms some tests on the application.
./swarm.sh to run all the scripts in sequence.
- Test how the cluster behaves when an error occurs during a rolling update.
- How can we monitor Træfɪk's health automatically? Is there a New Relic plugin?
- Can we use rewrite rules on path-based routes?
- You need to have docker installed with a version of at least 1.12 (includes support for docker swarm mode). The docker binaries
docker-machinemust be in your path.
- You need to have VirtualBox installed to manage the VMs.
This "application" relies on quite a few technologies and concepts. I recommend you familiarize yourself with them before trying to understand the stuff happening in this demo.