docker-swarm-consul

Toward a Production-Ready Docker Swarm Cluster with Consul

Toward a Production-Ready Docker Swarm Cluster with Consul

Wherein I explore the requirements of, and develop a repeatable process for, standing up a moderately opinionated, production-ready Docker cluster using the community standard Engine, Machine, Swarm and Compose. HashiCorp Consul will be used as the key-value store for Swarm as well as providing a common discovery mechanism across all nodes.

Guiding Principles

  • Highly available and fault-tolerant key-value store
  • Highly available Swarm masters
  • Overlay networking
  • Repeatable, automation-ready setup
  • All cluster and node services delivered as containers
  • Smarter-than-default logging
  • Memory accounting configured in kernel

Getting Started

Initially this project is setup to support only Digital Ocean droplets running Ubuntu 15.10. It should be trivial to support other virtualization providers. See drivers/digitalocean.env

Install Docker Engine, Compose, and Machine

See: * docker-engine v1.10.2 downloads. * docker-compose v1.6.2 installation instructions. * docker-machine v0.6.0 installation instructions.

Digital Ocean API Access Token

Mosey on over to Digital Ocean and setup an access token called docker-swarm-consul (or whatever floats your boat) and create a rcfile named ~/.digitalocean/docker-swarm-consul with content that looks something like this:

export DIGITALOCEAN_ACCESS_TOKEN="my-super-cool-access-token-hash"

This will be picked up automatically by drivers/digitalocean.env and sourced. If no such file exists you will want to otherwise setup an environment variable named DIGITALOCEAN_ACCESS_TOKEN before these humble scripts will work.

A Docker Swarm cluster leveraging Consul

Related Repositories

docker-swarm-consul

docker-swarm-consul

Toward a Production-Ready Docker Swarm Cluster with Consul ...

load-balancing-swarm

load-balancing-swarm

This repository contains the files for the docker image, that will create the load balancing configuration for nginx using consul template ...

EcoSystem

EcoSystem

Different projects using technologies such as docker swarm, consul, kubernetes, rancher etc ...

docker-consul-tyk-swarm

docker-consul-tyk-swarm

Demo of a docker swarm cluster that uses consul for service discovery and registrator for service registration ...

vagrant-docker-swarm-boilerplate

vagrant-docker-swarm-boilerplate

Vagrant + Docker + Swarm + Weave + Compose + Consul + Registrator ...


Top Contributors

dweomer BraunreutherA