Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Autopilot pattern etcd

Autopilot Pattern implementation of etcd

DockerPulls DockerStars ImageLayers Join the chat at

This repo is a demonstration of etcd designed for self-operation according to the Autopilot pattern.

An etcd cluster needs an external source of data for all the nodes to find each other initially. This can be a bootstrap service (another etcd cluster) or an SRV record. Triton CNS does not yet support SRV records, so until it does we're standing up a temporary single-node cluster to bootstrap the cluster. After the cluster is scaled-up we can remove the bootstrap node.

Getting started

  1. Get a Joyent account and add your SSH key.
  2. Install the Docker Toolbox (including docker and docker-compose) on your laptop or other environment.
  3. Install the Triton Docker CLI when utilizing this pattern on Triton as well. This provides both triton-docker and triton-compose.
  4. Install the the Joyent Triton CLI (triton replaces our old sdc-* CLI tools) and set up your Triton profile.

At this point you're ready to start the cluster. A script ./ has been provided. It detects your deployment options, either Triton or local Docker, and uses Docker Compose to create each node. An initial bootstrap node is created along with a discovery token (see the etcd docs on cluster discovery for details) before the cluster can be scaled up. You can pass an environment variable SCALE to the ./ script to set the cluster size to something other than the default 3 nodes.


$ ./
Using discovery node for bootstrapping local 3-node cluster.
Starting e_bootstrap_1
e_bootstrap_1 is up-to-date
Creating e_etcd_3
Creating e_etcd_2
Creating e_etcd_1
Desired container number already achieved
Stopping bootstrap node, no longer required
Displaying cluster health
member 4ed7a60797acad53 is healthy: got healthy result from
member aef40bf222ea5e2f is healthy: got healthy result from
member c329c4aa339bb6f7 is healthy: got healthy result from
$ docker ps
CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                                                                       NAMES
8e65eb4e319c        autopilotpattern/etcd   "/usr/local/bin/et..."   12 minutes ago      Up 12 minutes>2379/tcp,>2380/tcp,>4001/tcp   e_etcd_1
ef351973dd19        autopilotpattern/etcd   "/usr/local/bin/et..."   12 minutes ago      Up 12 minutes>2379/tcp,>2380/tcp,>4001/tcp   e_etcd_2
930804bf69fd        autopilotpattern/etcd   "/usr/local/bin/et..."   12 minutes ago      Up 12 minutes>2379/tcp,>2380/tcp,>4001/tcp   e_etcd_3


$ COMPOSE_PROJECT_NAME=e docker-compose -f local-compose.yml stop
Stopping e_etcd_1 ... done
Stopping e_etcd_2 ... done
Stopping e_etcd_3 ... done

You can also run the previous example with COMPOSE_PROJECT_NAME=e triton-compose stop.


A service for autodiscovery and configuration of applications running in containers







No releases published


No packages published