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.
- 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
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
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:
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.