All Projects → upfluence → etcdenv

upfluence / etcdenv

Licence: other
Use your etcd keys as environment variables

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to etcdenv

Golb
🐙 Yet another load balancer
Stars: ✭ 315 (+1269.57%)
Mutual labels:  service-discovery, etcd
seagull
Configuration server submodule for all SeaSerives
Stars: ✭ 19 (-17.39%)
Mutual labels:  service-discovery, etcd
kongsul
Kong Api Gateway with Consul Service Discovery (MicroService)
Stars: ✭ 35 (+52.17%)
Mutual labels:  service-discovery
hydra-router
A service aware router for Hydra Services. Implements an API Gateway and can route web socket messages.
Stars: ✭ 59 (+156.52%)
Mutual labels:  service-discovery
ais-service-discovery-go
Cloud application library for Golang
Stars: ✭ 77 (+234.78%)
Mutual labels:  service-discovery
perseus
Perseus is a set of scripts (docker+javascript) to investigate a distributed database's responsiveness when one of its three nodes is isolated from the peers
Stars: ✭ 49 (+113.04%)
Mutual labels:  etcd
microservices4vaadin
Sample application to show the secured integration of microservices and vaadin
Stars: ✭ 30 (+30.43%)
Mutual labels:  service-discovery
Rssdp
Really Simple Service Discovery Protocol - a 100% .Net implementation of the SSDP protocol for publishing custom/basic devices, and discovering all device types on a network.
Stars: ✭ 216 (+839.13%)
Mutual labels:  service-discovery
dnsdisco
DNS service discovery library
Stars: ✭ 25 (+8.7%)
Mutual labels:  service-discovery
cetcd
Cetcd is a C client library for etcd with full features support
Stars: ✭ 66 (+186.96%)
Mutual labels:  etcd
Uragano
Uragano, A simple, high performance RPC library. Support load balancing, circuit breaker, fallback, caching, intercepting.
Stars: ✭ 28 (+21.74%)
Mutual labels:  service-discovery
sshproxy
Proxy SSH connections on a gateway
Stars: ✭ 75 (+226.09%)
Mutual labels:  etcd
go-bmi
Body Mass Index(BMI) application developed by go-chassis microservice framwork
Stars: ✭ 14 (-39.13%)
Mutual labels:  service-discovery
etcdircd
An ircd backed by etcd
Stars: ✭ 76 (+230.43%)
Mutual labels:  etcd
opsbro
Ops Best friend
Stars: ✭ 37 (+60.87%)
Mutual labels:  service-discovery
etcd3-py
Pure python client for etcd v3 (Using gRPC-JSON-Gateway)
Stars: ✭ 97 (+321.74%)
Mutual labels:  etcd
minietcd
☁️ Super small and "dumb" read-only client in Go for coreos/etcd (v2).
Stars: ✭ 12 (-47.83%)
Mutual labels:  etcd
juno-agent
juno-agent
Stars: ✭ 46 (+100%)
Mutual labels:  service-discovery
sample-envoy-proxy
custom implementation of service discovery with envoy and inter-service communication for spring-boot applications
Stars: ✭ 29 (+26.09%)
Mutual labels:  service-discovery
kstone
Kstone is an etcd management platform, providing cluster management, monitoring, backup, inspection, data migration, visual viewing of etcd data, and intelligent diagnosis.
Stars: ✭ 592 (+2473.91%)
Mutual labels:  etcd

etcdenv

Etcdenv provide a convenient way to populate environments variables from one your etcd directory

Installation

Easy! You can just download the binary from the command line:

  • Linux
curl -sL https://github.com/upfluence/etcdenv/releases/download/v0.0.1/etcdenv-linux-amd64-0.0.1 > etcdenv
  • OSX
curl -sL https://github.com/upfluence/etcdenv/releases/download/v0.0.1/etcdenv-darwin-amd64-0.0.1 > etcdenv

If you would prefer compile the binary (assuming buildtools and Go are installed) :

git clone [email protected]:upfluence/etcdenv.git
cd etcdenv
go get github.com/tools/godep
GOPATH=`pwd`/Godeps/_workspace go build -o etcdenv .

Usage

Options

Option Default Description
server, s http://127.0.0.1:4001 Location of the etcd server
namespace, n /environments/production Etcd directory where the environment variables are fetched. You can watch multiple namespaces by using a comma-separated list (/environments/production,/environments/global)
shutdown-behaviour, b exit Strategy to apply when the process exit, further information into the next paragraph
watched, w "" A comma-separated list of environment variables triggering the command restart when they change

Shutdown strategies

  • restart: etcdenv rerun the command when the wrapped process exits
  • exit: The etcdenv process exits with the same exit status as the wrapped process's
  • keepalive: The etcdenv process will stay alive and keep looking for etcd changes to re-run the command

Command line

The CLI interface supports all of the options detailed above.

Example

Assuming a etcd server is launched on your machine

You can print env variables fetched from the / directory of your local node of etcd

$ curl -XPOST -d "value=bar" http://127.0.0.1:4001/v2/keys/FOO
$ etcdenv -n / -r false printenv
# ... your local environment variables
FOO=bar
$

You can also follow the changes of the directory

$ curl -XPOST -d "value=bar" http://127.0.0.1:4001/v2/keys/FOO
$ etcdenv -n / printenv &
# ... your local environment variables
FOO=bar
$ curl -XPOST -d "value=buz" http://127.0.0.1:4001/v2/keys/FOO
2014/12/29 00:30:00 Restarted
# ... your local environment variables
FOO=buz

To watch a set of keys only

$ curl -XPOST -d "value=google.com" http://127.0.0.1:4001/v2/keys/GOOGLE_URL
$ etcdenv -n / -w "FOO,GOOGLE_URL" printenv &
# ... your local environment variables
GOOGLE_URL=google.com
$ curl -XPOST -d "value=foo" http://127.0.0.1:4001/v2/keys/BAR
# ... the running command does not restart
$ curl -XPOST -d "value=baz" http://127.0.0.1:4001/v2/keys/FOO
# ... your local environment variables
FOO=baz

Contributing

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].