Serve the Apache Zookeeper API but back it with an etcd cluster
Switch branches/tags
Clone or download
gyuho README: update travis-ci links
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Latest commit 51c7721 Aug 8, 2018
Permalink
Failed to load latest commit information.
cmd *: update import paths to "etcd-io" Aug 8, 2018
docker docker: add drill dockerfile Apr 10, 2017
integration *: update import paths to "etcd-io" Aug 8, 2018
scripts *: update import paths to "etcd-io" Aug 8, 2018
vendor vendor: bump etcd to 3.2.6 Sep 1, 2017
version zetcd: print version and git sha on start Aug 7, 2017
xchk *: update import paths to "etcd-io" Aug 8, 2018
zk *: update import paths to "etcd-io" Aug 8, 2018
.dockerignore scripts: builds Docker image Jul 3, 2017
.gitignore scripts: builds Docker image Jul 3, 2017
.travis.yml *: update import paths to "etcd-io" Aug 8, 2018
CONTRIBUTING.md zetcd: initial coreos commit Oct 20, 2016
DCO zetcd: initial coreos commit Oct 20, 2016
Dockerfile scripts: builds Docker image Jul 3, 2017
LICENSE zetcd: initial coreos commit Oct 20, 2016
Makefile *: update import paths to "etcd-io" Aug 8, 2018
NOTICE zetcd: initial coreos commit Oct 20, 2016
Procfile zetcd: initial coreos commit Oct 20, 2016
README.md README: update travis-ci links Aug 8, 2018
auth.go zetcd: initial coreos commit Oct 20, 2016
authconn.go zetcd: ruok support May 8, 2017
bench_test.go *: fix gosimple warnings Sep 8, 2017
bufpool.go zetcd: add bufpool to cache message buffers Apr 5, 2017
client.go zetcd: initial coreos commit Oct 20, 2016
code-of-conduct.md update CoC Jan 4, 2018
conn.go zetcd: add bufpool to cache message buffers Apr 5, 2017
constants.go *: fix unused warnings Sep 8, 2017
encode.go *: fix staticcheck warnings Sep 8, 2017
glide.lock vendor: bump etcd to 3.2.6 Sep 1, 2017
glide.yaml *: update import paths to "etcd-io" Aug 8, 2018
op.go zetcd: initial coreos commit Oct 20, 2016
path.go zketcd: use correct root path for root checks May 24, 2017
pool.go *: fix unused warnings Sep 8, 2017
server.go *: fix unused warnings Sep 8, 2017
session.go *: fix unused warnings Sep 8, 2017
stat.go zetcd: fix stat data for root directory Aug 8, 2017
structs.go zetcd: initial coreos commit Oct 20, 2016
watches.go zetcd, xchk: fix watch interface to forward event type Jun 13, 2017
zk.go zketcd: multiop support Jun 1, 2017
zketcd.go zketcd: support deleting directories left empty by ephemeral nodes Nov 8, 2017
zketcd_path.go zketcd: short and debug path encodings May 9, 2017
zketcd_path_debug.go zketcd: short and debug path encodings May 9, 2017
zketcd_path_old.go zketcd: short and debug path encodings May 9, 2017
zklog.go zetcd: initial coreos commit Oct 20, 2016

README.md

zetcd

Build Status

A ZooKeeper "personality" for etcd. Point a ZooKeeper client at zetcd to dispatch the operations on an etcd cluster.

Protocol encoding and decoding heavily based on go-zookeeper.

Getting started

Running zetcd

Forward ZooKeeper requests on :2181 to an etcd server listening on localhost:2379:

go get github.com/etcd-io/zetcd/cmd/zetcd
zetcd --zkaddr 0.0.0.0:2181 --endpoints localhost:2379

Simple testing with zkctl:

go get github.com/etcd-io/zetcd/cmd/zkctl
zkctl watch / &
zkctl create /abc "foo"

Running zetcd on Docker

Official docker images of tagged zetcd releases for containerized environments are hosted at quay.io/etcd-io/zetcd. Use docker run to launch the zetcd container with the same configuration as the go get example:

docker run --net host -t quay.io/etcd-io/zetcd -endpoints localhost:2379

Cross-checking

In cross-checking mode, zetcd dynamically tests a fresh isolated "candidate" zetcd cluster against a fresh isolated ZooKeeper "oracle" cluster for divergences. This mode dispatches requests to both zetcd and ZooKeeper, then compares the responses to check for equivalence. If the responses disagree, it is flagged in the logs. Use the flags -zkbridge to configure a ZooKeeper endpoint and -oracle zk to enable checking.

Cross-check zetcd's ZooKeeper emulation with a native ZooKeeper server endpoint at localhost:2182 like so:

zetcd --zkaddr 0.0.0.0:2181 --endpoints localhost:2379 --debug-zkbridge localhost:2182  --debug-oracle zk --logtostderr -v 9

Contact

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

License

zetcd is under the Apache 2.0 license. See the LICENSE file for details.