Git Product home page Git Product logo

etcd-docker's Introduction

etcd-v3/confd docker image

Docker Build Status License

Quick Guide (Docker)

$ docker run --rm -it -p 2379:2379 -p 2380:2380 --name etcd chai2010/etcd

$ curl 127.0.0.1:2379/version
$ curl 127.0.0.1:2379/v2/keys

$ curl http://127.0.0.1:2379/v2/keys/message -XPUT -d value="Hello world"

$ curl 127.0.0.1:2379/v2/keys
$ curl http://127.0.0.1:2379/v2/keys/message

Quick Guide (Cluster/Docker Compose)

# start 3 node, port on :2379/:3379/:4379
$ docker-compose up -d

$ curl 127.0.0.1:2379/version
$ curl 127.0.0.1:2379/v2/keys

$ curl http://127.0.0.1:2379/v2/keys/message -XPUT -d value="Hello world"

$ curl 127.0.0.1:2379/v2/keys
$ curl http://127.0.0.1:2379/v2/keys/message

# get from other etcd node
$ curl 127.0.0.1:3379/v2/keys

Quick Guide (confd/etcd)

# start etcd, 3 nodes
$ docker-compose up -d

# start confd on macOS
# windows: make confd-win
# linux: make confd-linux
$ make confd-macos

# view generated ./conf-data/etc/myapp/myapp.json

# change config value in etcd
$ curl http://127.0.0.1:2379/v2/keys/myapp/database/user -XPUT -d value="new value"

# view generated ./conf-data/etc/myapp/myapp.json

Connect to host from docker container

Run Test

make debug
make test
make clean

License

The Apache License.

etcd-docker's People

Contributors

chai2010 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

etcd-docker's Issues

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.