etcd

command module
v3.2.0-rc.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

README

etcd

Go Report Card Build Status Build Status Docker Repository on Quay.io

Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in order to get stable binaries.

the etcd v2 documentation has moved

etcd Logo

etcd is a distributed reliable key-value store for the most critical data of a distributed system, with a focus on being:

  • Simple: well-defined, user-facing API (gRPC)
  • Secure: automatic TLS with optional client cert authentication
  • Fast: benchmarked 10,000 writes/sec
  • Reliable: properly distributed using Raft

etcd is written in Go and uses the Raft consensus algorithm to manage a highly-available replicated log.

etcd is used in production by many companies, and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as Kubernetes, fleet, locksmith, vulcand, Doorman, and many others. Reliability is further ensured by rigorous testing.

See etcdctl for a simple command line client.

Getting started

Getting etcd

The easiest way to get etcd is to use one of the pre-built release binaries which are available for OSX, Linux, Windows, rkt, and Docker. Instructions for using these binaries are on the GitHub releases page.

For those wanting to try the very latest version, build the latest version of etcd from the master branch. This first needs Go installed (version 1.8+ is required). All development occurs on master, including new features and bug fixes. Bug fixes are first targeted at master and subsequently ported to release branches, as described in the branch management guide.

Running etcd

First start a single-member cluster of etcd:

./bin/etcd

This will bring up etcd listening on port 2379 for client communication and on port 2380 for server-to-server communication.

Next, let's set a single key, and then retrieve it:

ETCDCTL_API=3 etcdctl put mykey "this is awesome"
ETCDCTL_API=3 etcdctl get mykey

That's it! etcd is now running and serving client requests. For more

etcd TCP ports

The official etcd ports are 2379 for client requests, and 2380 for peer communication.

Running a local etcd cluster

First install goreman, which manages Procfile-based applications.

Our Procfile script will set up a local example cluster. Start it with:

goreman start

This will bring up 3 etcd members infra1, infra2 and infra3 and etcd proxy proxy, which runs locally and composes a cluster.

Every cluster member and proxy accepts key value reads and key value writes.

Running etcd on Kubernetes

To run an etcd cluster on Kubernetes, try etcd operator.

Next steps

Now it's time to dig into the full etcd API and other guides.

Contact

Contributing

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

Reporting bugs

See reporting bugs for details about reporting any issues.

License

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

Documentation

Overview

Package main is a simple wrapper of the real etcd entrypoint package (located at github.com/coreos/etcd/etcdmain) to ensure that etcd is still "go getable"; e.g. `go get github.com/coreos/etcd` works as expected and builds a binary in $GOBIN/etcd

This package should NOT be extended or modified in any way; to modify the etcd binary, work in the `github.com/coreos/etcd/etcdmain` package.

Directories

Path Synopsis
Package alarm manages health status alarms in etcd.
Package alarm manages health status alarms in etcd.
Package auth provides client role authentication for accessing keys in etcd.
Package auth provides client role authentication for accessing keys in etcd.
Package client provides bindings for the etcd APIs.
Package client provides bindings for the etcd APIs.
Package clientv3 implements the official Go etcd client for v3.
Package clientv3 implements the official Go etcd client for v3.
Package compactor implements automated policies for compacting etcd's mvcc storage.
Package compactor implements automated policies for compacting etcd's mvcc storage.
contrib
Package discovery provides an implementation of the cluster discovery that is used by etcd.
Package discovery provides an implementation of the cluster discovery that is used by etcd.
Package e2e implements tests built upon etcd binaries, and focus on end-to-end testing.
Package e2e implements tests built upon etcd binaries, and focus on end-to-end testing.
Package embed provides bindings for embedding an etcd server in a program.
Package embed provides bindings for embedding an etcd server in a program.
Package error describes errors in etcd project.
Package error describes errors in etcd project.
etcdctl is a command line application that controls etcd.
etcdctl is a command line application that controls etcd.
Package etcdmain contains the main entry point for the etcd binary.
Package etcdmain contains the main entry point for the etcd binary.
Package etcdserver defines how etcd servers interact and store their states.
Package etcdserver defines how etcd servers interact and store their states.
Package integration implements tests built upon embedded etcd, and focus on etcd correctness.
Package integration implements tests built upon embedded etcd, and focus on etcd correctness.
Package lease provides an interface and implemetation for time-limited leases over arbitrary resources.
Package lease provides an interface and implemetation for time-limited leases over arbitrary resources.
Package mvcc defines etcd's stable MVCC storage.
Package mvcc defines etcd's stable MVCC storage.
pkg
proxy
Package raft sends and receives messages in the Protocol Buffer format defined in the raftpb package.
Package raft sends and receives messages in the Protocol Buffer format defined in the raftpb package.
Package rafthttp implements HTTP transportation layer for etcd/raft pkg.
Package rafthttp implements HTTP transportation layer for etcd/raft pkg.
Package snap stores raft nodes' states with snapshots.
Package snap stores raft nodes' states with snapshots.
Package store defines etcd's in-memory key/value store.
Package store defines etcd's in-memory key/value store.
tools
Package version implements etcd version parsing and contains latest version information.
Package version implements etcd version parsing and contains latest version information.
wal
Package wal provides an implementation of a write ahead log that is used by etcd.
Package wal provides an implementation of a write ahead log that is used by etcd.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL