From f95e9f7c723f937c74b39380a899ed46576a91c9 Mon Sep 17 00:00:00 2001 From: Arnaud Porterie Date: Thu, 10 Sep 2015 16:12:00 -0700 Subject: [PATCH] Add builtin nodes discovery Use `pkg/discovery` to provide nodes discovery between daemon instances. The functionality is driven by two different command-line flags: the experimental `--cluster-store` (previously `--kv-store`) and `--cluster-advertise`. It can be used in two ways by interested components: 1. Externally by calling the `/info` API and examining the cluster store field. The `pkg/discovery` package can then be used to hit the same endpoint and watch for appearing or disappearing nodes. That is the method that will for example be used by Swarm. 2. Internally by using the `Daemon.discoveryWatcher` instance. That is the method that will for example be used by libnetwork. Signed-off-by: Arnaud Porterie --- docs/reference/commandline/daemon.md | 8 ++++++++ experimental/network_overlay.md | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/reference/commandline/daemon.md b/docs/reference/commandline/daemon.md index 1fbfdcde7d..8b343373c1 100644 --- a/docs/reference/commandline/daemon.md +++ b/docs/reference/commandline/daemon.md @@ -22,6 +22,8 @@ weight=1 -D, --debug=false Enable debug mode --default-gateway="" Container default gateway IPv4 address --default-gateway-v6="" Container default gateway IPv6 address + --cluster-store="" URL of the distributed storage backend + --cluster-advertise="" Address of the daemon instance to advertise --dns=[] DNS server to use --dns-opt=[] DNS options to use --dns-search=[] DNS search domains to use @@ -484,6 +486,12 @@ Be careful setting `nproc` with the `ulimit` flag as `nproc` is designed by Linu set the maximum number of processes available to a user, not to a container. For details please check the [run](run.md) reference. +## Nodes discovery + +`--cluster-advertise` specifies the 'host:port' combination that this particular +daemon instance should use when advertising itself to the cluster. The daemon +should be reachable by remote hosts on this 'host:port' combination. + ## Miscellaneous options IP masquerading uses address translation to allow containers without a public diff --git a/experimental/network_overlay.md b/experimental/network_overlay.md index 9827d993b7..9270418cc7 100644 --- a/experimental/network_overlay.md +++ b/experimental/network_overlay.md @@ -5,10 +5,10 @@ Using the above experimental UI `docker network`, `docker service` and `--publis Since `network` and `service` objects are globally significant, this feature requires distributed states provided by the `libkv` project. Using `libkv`, the user can plug any of the supported Key-Value store (such as consul, etcd or zookeeper). -User can specify the Key-Value store of choice using the `--kv-store` daemon flag, which takes configuration value of format `PROVIDER:URL`, where +User can specify the Key-Value store of choice using the `--cluster-store` daemon flag, which takes configuration value of format `PROVIDER:URL`, where `PROVIDER` is the name of the Key-Value store (such as consul, etcd or zookeeper) and `URL` is the url to reach the Key-Value store. -Example : `docker daemon --kv-store=consul:localhost:8500` +Example : `docker daemon --cluster-store=consul://localhost:8500` Send us feedback and comments on [#14083](https://github.com/docker/docker/issues/14083) or on the usual Google Groups (docker-user, docker-dev) and IRC channels.