GithubHelp home page GithubHelp logo

jangocheng / discoveryserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from etcd-io/discoveryserver

0.0 1.0 0.0 3.83 MB

Public etcd Discovery Service

Dockerfile 0.72% Go 93.97% Shell 5.31%

discoveryserver's Introduction

discovery.etcd.io

Docker Repository on Quay

This code powers the public service at https://discovery.etcd.io. The API is documented in the etcd clustering documentation.

Building with Docker

Requirements

Docker, using one of the following configurations:

  • macOS You can either use Docker for Mac or docker-machine. See installation instructions here.
  • Linux with local Docker Install Docker according to the instructions for your OS.

To build the image with Docker run:

$ cd path/to/discoveryserver

$ docker build -t discoveryserver .

To create and execute the discoveryserver container run:

docker run discoveryserver

Building on a local OS/shell environment

Go

Discoveryserver is written in Go. If you don't have a Go development environment, please set one up.

discoveryserver requires Go
0.1 =>1.11

Go modules

Discovery server uses Go modules, so that we need a Go version greater than or equal to 1.11.

Build the binary:

go build -v -o ./bin/discovery .

Test

./test.sh

Configuration

The service has three configuration options, and can be configured with either runtime arguments or environment variables.

  • --addr / DISC_ADDR: the address to run the service on, including port.
  • --host / DISC_HOST: the host url to prepend to /new requests.
  • --etcd / DISC_ETCD: the url of the etcd endpoint backing the instance.

Production Configuration

See https://github.com/etcd-io/discovery.etcd.io for how the service is run on Kubernetes.

History

This package implements a super minimal etcd v2 API built on the currently incomplete [v2v3 package]. We need to do this because the public etcd discovery service has been running on the inefficient v2 storage engine and causing operational burden.

Further, to solve operational issues using the v3 API will enable us to use the backup features of the etcd Operator.

Run Cloudbuild

Cloudbuild is a GCP service that can be used to build and deploy discoveryserver. cloudbuild.dev.yaml builds discoverserver, publishes the docker image, and deploys to the dev environment. Cloudbuild.prod.yaml deploys a built docker image to the production environment.

$ export ENV=(dev|prod)
$ gcloud builds submit . --config=cloudbuild.$ENV.yaml --substitutions=COMMIT_SHA=`git rev-parse HEAD`

discoveryserver's People

Contributors

eduartua avatar victortrac avatar

Watchers

 avatar

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.