Need help with etcd-aws-cluster?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

203 Stars 104 Forks BSD 3-Clause "New" or "Revised" License 51 Commits 3 Opened issues


A container to assist in managing a etcd2 cluster from an Amazon auto scaling group

Services available


Need anything else?

Contributors list


This container serves to assist in the creation of an etcd (2.x) cluster from an AWS auto scaling group. It writes a file to /etc/sysconfig/etcd-peers that contains parameters for etcd:

    • either

    • used to specify whether we are creating a new cluster or joining an existing one
    • the name of the machine joining the etcd cluster
    • this is obtained by getting the instance if from amazon of the host (e.g. i-694fad83)
    • this is a list of the machines (id and ip) expected to be in the cluster, including the new machine
    • e.g., "i-5fc4c9e1=,i-694fad83="

This file can then be loaded as an EnvironmentFile in an etcd2 drop-in to properly configure etcd2:



  • get the instance id and ip from amazon
  • fetch the autoscaling group this machine belongs to
  • obtain the ip of every member of the auto scaling group
  • for each member of the autoscaling group detect if they are running etcd and if so who they see as members of the cluster

if no machines respond OR there are existing peers but my instance id is listed as a member of the cluster

- assume that this is a new cluster
- write a file using the ids/ips of the autoscaling group 


- assume that we are joining an existing cluster
- check to see if any machines are listed as being part of the cluster but are not part of the autoscaling group
  -  if so remove it from the etcd cluster  
- add this machine to the current cluster
- write a file using the ids/ips obtained from query etcd for members of the cluster


docker run -v /etc/sysconfig/:/etc/sysconfig/ monsantoco/etcd-aws-cluster

Environment Variables * PROXYASG - If specified forces into proxy=on and uses the vaue of PROXYASG as the autocaling group that contains the master servers * ASGBYTAG - If specified in conjunction with PROXYASG uses the value of PROXYASG to look up the server by the Tag Name * ETCDCLIENTSCHEME - defaults to http * ETCDPEERSCHEME - defaults to http


We have created a CloudFomation script that shows sample usage of this container for creating a simple etcd cluster:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.