etcd-mesos

module
v0.1.0-alpha-target-23... Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2015 License: Apache-2.0

README

[ALPHA] etcd-mesos

This is an Apache Mesos framework that runs an etcd cluster. It performs periodic health checks to ensure that the cluster has a stable leader and that raft is making progress. It replaces nodes that die.

Guides:

features

  • runs, monitors, and administers an etcd cluster of your desired size
  • recovers from n/2-1 failures by reconfiguring the etcd cluster and launching replacement nodes
  • optionally persists framework ID in zookeeper for framework failover purposes
  • reconstructs framework state during failover using surviving task metadata
  • etcd proxy configurer and optional SRV record support via mesos-dns
  • recovers from up to n-1 failures by picking a survivor to re-seed a new cluster (ranks survivors by raft index, prefering the replica with the highest commit)

running

First, build the project:

make

The important binaries (etcd-mesos-scheduler, etcd-mesos-proxy, etcd-mesos-executor) are now present in the bin subdirectory.

A typical production invocation will look something like this:

/path/to/etcd-mesos-scheduler \
    -log_dir=/var/log/etcd-mesos \
    -master="zk://zk1:2181,zk2:2181,zk3:2181/mesos" \
    -framework-name="etcd-mycluster" \
    -cluster-size=5 \
    -executor-bin=/path/to/etcd-mesos-executor \
    -etcd-bin=/path/to/etcd \
    -zk-framework-persist="zk://zk1:2181,zk2:2181,zk3:2181/etcd-mesos"

service discovery

Options for finding your etcd nodes on mesos:

  • Run the included proxy binary locally on systems that use etcd. It retrieves the etcd configuration from mesos and starts an etcd proxy node. Note that this it not a good idea on clusters with lots of tasks running, as the master will iterate through each task and spit out a fairly large chunk of JSON, so this approach should be avoided in favor of mesos-dns on larger clusters.
etcd-mesos-proxy --master=zk://localhost:2181/mesos --framework-name=etcd-mycluster
  • Use mesos-dns or another system that creates SRV records and have an etcd proxy use SRV discovery:
etcd --proxy=on --discovery-srv=etcd-mycluster.mesos
  • Use Mesos DNS or another DNS SRV system and have clients resolve _etcd-server._client.<framework name>.mesos

  • Use another system that builds configuration from mesos's state.json endpoint. This is how #1 works, so check out the code for it in cmd/etcd-mesos-proxy/app.go if you want to go this route. Be sure to minimize calls to the master for state.json on larger clusters, as this becomes an expensive operation that can easily DDOS your master if you are not careful.

  • Current membership may be queried from the etcd-mesos-scheduler's /members http endpoint that listens on the --admin-port (default 23400)

Directories

Path Synopsis
Godeps
_workspace/src/github.com/coreos/etcd/raft
Package raft provides an implementation of the raft consensus algorithm.
Package raft provides an implementation of the raft consensus algorithm.
_workspace/src/github.com/coreos/etcd/raft/raftpb
Package raftpb is a generated protocol buffer package.
Package raftpb is a generated protocol buffer package.
_workspace/src/github.com/coreos/go-systemd/journal
Package journal provides write bindings to the systemd journal
Package journal provides write bindings to the systemd journal
_workspace/src/github.com/gogo/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
_workspace/src/github.com/gogo/protobuf/proto/proto3_proto
Package proto3_proto is a generated protocol buffer package.
Package proto3_proto is a generated protocol buffer package.
_workspace/src/github.com/golang/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
_workspace/src/github.com/mesos/mesos-go/detector
The detector package houses implementation of master detectors.
The detector package houses implementation of master detectors.
_workspace/src/github.com/mesos/mesos-go/detector/zoo
Zookeeper-based mesos-master leaderhip detection.
Zookeeper-based mesos-master leaderhip detection.
_workspace/src/github.com/mesos/mesos-go/executor
Package executor includes the interfaces of the mesos executor and the mesos executor driver, as well as an implementation of the driver.
Package executor includes the interfaces of the mesos executor and the mesos executor driver, as well as an implementation of the driver.
_workspace/src/github.com/mesos/mesos-go/mesosproto
Package mesosproto is a generated protocol buffer package.
Package mesosproto is a generated protocol buffer package.
_workspace/src/github.com/mesos/mesos-go/messenger
Package messenger includes a messenger and a transporter.
Package messenger includes a messenger and a transporter.
_workspace/src/github.com/mesos/mesos-go/messenger/testmessage
Package testmessage is a generated protocol buffer package.
Package testmessage is a generated protocol buffer package.
_workspace/src/github.com/mesos/mesos-go/scheduler
Package scheduler includes the interfaces for the mesos scheduler and the mesos executor driver.
Package scheduler includes the interfaces for the mesos scheduler and the mesos executor driver.
_workspace/src/github.com/mesos/mesos-go/upid
Package upid defines the UPID type and some utilities of the UPID.
Package upid defines the UPID type and some utilities of the UPID.
_workspace/src/github.com/pborman/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_workspace/src/github.com/samuel/go-zookeeper/zk
Package zk is a native Go client library for the ZooKeeper orchestration service.
Package zk is a native Go client library for the ZooKeeper orchestration service.
_workspace/src/github.com/stretchr/objx
objx - Go package for dealing with maps, slices, JSON and other data.
objx - Go package for dealing with maps, slices, JSON and other data.
_workspace/src/github.com/stretchr/testify/assert
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
_workspace/src/github.com/stretchr/testify/mock
Provides a system by which it is possible to mock your objects and verify calls are happening as expected.
Provides a system by which it is possible to mock your objects and verify calls are happening as expected.
_workspace/src/github.com/ugorji/go/codec
High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json.
High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json.
_workspace/src/github.com/ugorji/go/codec/codecgen
codecgen generates codec.Selfer implementations for a set of types.
codecgen generates codec.Selfer implementations for a set of types.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
cmd
package config implements configuration data structures and parsing.
package config implements configuration data structures and parsing.

Jump to

Keyboard shortcuts

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