Giter Site home page Giter Site logo

etcd-charm's Introduction

Etcd

Etcd is a highly available distributed key value store that provides a reliable way to store data across a cluster of machines. Etcd gracefully handles master elections during network partitions and will tolerate machine failure, including the master.

Your applications can read and write data into etcd. A simple use-case is to store database connection details or feature flags in etcd as key value pairs. These values can be watched, allowing your app to reconfigure itself when they change.

Advanced uses take advantage of the consistency guarantees to implement database master elections or do distributed locking across a cluster of workers.

Etcd allows storing data in a distributed hierarchical database with observation.

Usage

We can deploy a single node easily with

juju deploy cs:~kubernetes/trusty/etcd

Add and capacity with:

juju add-unit -n 2 etcd

Its recommended to run an odd number of machines as it has greater redundancy than even number (ie. 4, you can lose 1 before quorum is lost, where as 5, you can 2).

Advanced Usage

This charm also supports a proxy relation, when using the ETCD cluster as a discovery service for your own applications. Reference the upstream documentation to learn more about this feature of ETCD

juju add-relation <service>:<relation> etcd:proxy

For each node in the cluster, you will receive a cluster-string that you can use to point your application into the cluster and join the gossip.

Health

Health of the cluster can be checked by verified via juju actions

juju action do etcd/0 health
<return response uuid>
juju action fetch <uuid>

Usage Caveats

This charm requires Leader Election, which is a feature of Juju >= 1.23.2. The charm will panic and refuse to continue if the leader_election binary is not found. Please take care when deploying this charm on older versions of Juju.

Credits

The etcd charm was originally written by Kapil Thangavelu (@kapilt).

Mantainers:

The kubernetes team maintains this charm:

Upstream Project Information

etcd-charm's People

Contributors

whitmo avatar lukasa avatar

Stargazers

 avatar

Watchers

James Cloos avatar Matt Bruzek avatar  avatar

etcd-charm's Issues

Consider setting GOMAXPROCS

etcd by default runs single-threaded unless you set the GOMAXPROCS environment variable to something other than 1. It might be worth explicitly setting this to something like the number of cores on the machine.

Update ETCD to compile from source

The current charm vendors in an old binary. This is not a sustainable model for deployment, unless we were to update with an option to depreciate the binary, and optionally pull in from an external source.

Since it makes no sense for us to maintain an ETCD repository, lets get this compiling from source.

The etcd charm requires Juju version > 1.22, as it uses "is_leader"

Neil Wilson reported that they tried to use the kubernetes charms on the Juju that installs with Ubuntu and was not able to run the etcd charm.

We should attempt to fix this problem and if we can not, document that as a limitation in the Kubernetes work and in the etcd readme file.

Thanks to Neil Wilson for reporting this problem!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.