Note : this project is under developpement. Your are welcome to contribute.
etcd image for docker build on nuagebec/ubuntu:14.04 image
etcd, a highly-available key value store for shared configuration and service discovery.
etcd is inspired by Apache ZooKeeper and doozer, with a focus on being:
- Simple: curl'able user facing API (HTTP+JSON)
- Secure: optional SSL client cert authentication
- Fast: benchmarked 1000s of writes/s per instance
- Reliable: properly distributed using Raft
etcd is written in Go and uses the Raft consensus algorithm to manage a highly-available replicated log.
Use etcdctl for a simple command line client.
Or, feel free to just use curl, as in the example below :
/data/persistent to persist
Note : using ETCD discovery URL as docker env. variable is mandatory (for now)
A simply way to obtain this variable is using this script
#/bin/sh # If env. var. named ETCD_DISCOVERY isn't set, discover it if [[ -z "$ETCD_DISCOVERY" ]] then ETCD_DISCOVERY=$(wget https://discovery.etcd.io/new -O - ) && \ export ETCD_DISCOVERY ; fi
As discovery URL, starting your own is suggested.
To bootstrap a cluster for discovery, use this URL to retreive a Profile and it's configuration :
After, start docker using "docker-env-file" generated by "./gen-pub-discovery-URL.sh <cluster size>" ( this script erase and create new env. file each times) :
docker run -d -p 4001:4001 -p 7001:7001 -env-file docker_env_file nuagebec/etcd:latest
Related links :
- nuagebec/ubuntu: https://registry.hub.docker.com/u/nuagebec/ubuntu/
- zookeeper: http://zookeeper.apache.org/
- doozer: https://github.com/ha/doozerd
- raft: http://raftconsensus.github.io/
- etcdctl: http://github.com/coreos/etcdctl/