项目作者: christian-blades-cb

项目描述 :
service publication for docker containers in a distributed cluster
高级语言: Go
项目地址: git://github.com/christian-blades-cb/desoto.git
创建时间: 2015-09-16T18:04:39Z
项目社区:https://github.com/christian-blades-cb/desoto

开源协议:

下载


DeSoto

Service discovery and publication for docker containers.

DeSoto is designed to solve the problem of publishing containerized services in a distributed cluster. An instance of DeSoto runs on each node in the cluster, watching for changes to service definitions and docker containers. It then updates the appropriate VulcanD backend, which handles routing incoming requests.

Usage

Service Definition

A service definition defines what type of vulcand backend (http, tcp, etc), what container port, and a container name pattern.

Fields

  • type - see vulcand documentation
  • container port - which container port to publish*
  • name_pattern - regex pattern for the container name (optional, defaults to /^\-app-\S+/)

* container port MUST be mapped to a host port

Example

  1. $ docker ps
  2. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  3. 3e571a34a564 alpine:3.2 "bundle exec rackup" 7 seconds ago Up 2 seconds 0.0.0.0:25454->8080/tcp super-web-app-1
  4. $ etcdctl set /publication/super-web '{ "type": "http", "container_port": 8080, "name_pattern": "^super-web-app-\\d+" }'

* Note that regex escapes must be properly escaped for JSON