Skip to content
Demostration of a cluster deployment with Docker Swarm Mode and Træfɪk
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
traefik
README.md
app-compose.yaml
config.sh
deploy_apps.sh
setup_cluster.sh
setup_infra.sh
setup_infra_network.sh
setup_infra_portainer.sh
setup_infra_traefik.sh
swarm.sh
test.sh
traefik-compose.yaml

README.md

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.

It then deploys Portainer and Træfɪk as well as a couple of replicated test applications.

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.

Scripts

  • ./setup_cluster.sh spins up the virtual machines and connects them to a swarm mode cluster.
  • ./setup_infra.sh deploys Portainer and Træfɪk.
  • ./deploy_apps.sh deploys a test application several times into the cluster.
  • ./test.sh performs some tests on the application.

Run ./swarm.sh to run all the scripts in sequence.

Open issues

  • 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?

Prerequisites

  • You need to have docker installed with a version of at least 1.12 (includes support for docker swarm mode). The docker binaries docker and docker-machine must be in your path.
  • You need to have VirtualBox installed to manage the VMs.
  • curl for testing.

Recommended Reading

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.

You can’t perform that action at this time.