Running Production High Availability Docker Services on CoreOS using Fleet, Flannel, Etcd, Confd & Nginx
- View the diagram of what's going on: https://drive.google.com/file/d/0B74l6vUHf9HrMzNrYUlyMm40RWs/view?usp=sharing
coreos
: server machine clustering via a shared cloud-config.ymletcd
: key value store for service registration and discoveryfleet
: scheduling/failover of docker containers across coreos clusterflannel
: Gives each docker container a unique ip that allows you to access the internal port (i.e. port 80 not 32679)confd
: watch etcd for nodes arriving/leaving - template nginx configuration files / reload nginx on change
willrstern/node-sample
: a sample node.js app that simply echoes it's APPNAME environment variablewillrstern/nginx-lb
: a reusable nginx + confd image- uses confd to watch etcd and configure nginx to load balance for multiple docker containers
- watches etcd
keys/services/<servicename>/upstream/*
and reloads nginx with an updated config when upstream nodes change - requires 2 env variables:
SERVICE_NAME
andETCD
so it knows which servicename to watch in etcd's registry
willrstern/nginx-dns
: an nginx + confd image for dynamic DNS based off of etcdkeys/subdomain/*
entries- requires 1 env variable:
ETCD
the ip address + port of the etcd instance it's watching
- requires 1 env variable: