From a9e3320e7cfda5be74ccb96ff1ab2601f98a96c2 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Thu, 25 Jun 2015 14:32:08 +0100 Subject: [PATCH] Update documentation --- site/features.md | 2 -- site/proxy.md | 17 +++++++++++++---- site/weavedns.md | 24 +++++++++++++++++++----- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/site/features.md b/site/features.md index af72ffdc..8692affe 100644 --- a/site/features.md +++ b/site/features.md @@ -141,10 +141,8 @@ Let's begin by configuring weave's allocator to manage multiple subnets: host1$ weave launch -iprange 10.2.0.0/16 -ipsubnet 10.2.1.0/24 - host1$ weave launch-dns && weave launch-proxy host1$ eval $(weave proxy-env) host2$ weave launch -iprange 10.2.0.0/16 -ipsubnet 10.2.1.0/24 $HOST1 - host2$ weave launch-dns && weave launch-proxy host2$ eval $(weave proxy-env) This delegates the entire 10.2.0.0/16 subnet to weave, and instructs diff --git a/site/proxy.md b/site/proxy.md index 04861579..0514e30b 100644 --- a/site/proxy.md +++ b/site/proxy.md @@ -23,11 +23,18 @@ instead of `weave run`. ## Setup The proxy sits between the Docker client (command line or API) and the -Docker daemon, intercepting the communication between the two. +Docker daemon, intercepting the communication between the two. You can +start it simultaneously with the router and weaveDNS via `launch`: -To start the proxy, run + host1$ weave launch - host1$ weave launch-proxy +or independently via `launch-proxy`: + + host1$ weave launch-router && weave launch-dns && weave launch-proxy + +The first form is more convenient, however you can only pass proxy +related configuration arguments to `launch-proxy` so if you need to +modify the default behaviour you will have to use the latter. By default, the proxy listens on port 12375, on all network interfaces. This can be adjusted with the `-H` argument, e.g. @@ -49,10 +56,12 @@ Alternatively, the proxy host can be set on a per-command basis with host1$ docker $(weave proxy-config) ps -The proxy can be stopped with +The proxy can be stopped independently with host1$ weave stop-proxy +or in conjunction with the router and weaveDNS via `stop`. + If you set your `DOCKER_HOST` to point at the proxy, remember to revert to the original setting. diff --git a/site/weavedns.md b/site/weavedns.md index 0720ab77..c97d80d5 100644 --- a/site/weavedns.md +++ b/site/weavedns.md @@ -28,13 +28,23 @@ hosts. WeaveDNS is deployed as a set of containers that communicate with each other over the weave network. One such container needs to be started -on every weave host, by invoking the weave script command -`launch-dns`: +on every weave host, either simultaneously with the router and proxy +via `launch`: ```bash -host1$ weave launch && weave launch-dns && weave launch-proxy +host1$ weave launch host1$ eval $(weave proxy-env) ``` +or independently via `launch-dns`: + +```bash +host1$ weave launch-router && weave launch-dns && weave launch-proxy +host1$ eval $(weave proxy-env) +``` + +The first form is more convenient, however you can only pass weaveDNS +related configuration arguments to `launch-dns` so if you need to +modify the default behaviour you will have to use the latter. Application containers will use weaveDNS automatically if it is running at the point when they are started. They will use it for name @@ -67,7 +77,11 @@ however specify an address in CIDR format manually. In this case you are responsible for ensuring that the IP addresses specified are uniquely allocated and not in use by any other container. -Finally, WeaveDNS containers can be stopped with `stop-dns`. +Finally, weaveDNS can be stopped independently with + + host1$ weave stop-dns + +or in conjunction with the router and proxy via `stop`. ## How it works @@ -112,7 +126,7 @@ Returning to our earlier example, let us start an additional `pingme` container, this time on the 2nd host, and then run some ping tests... ```bash -host2$ weave launch && weave launch-dns && weave launch-proxy +host2$ weave launch host2$ eval $(weave proxy-env) host2$ docker run -dti --name=pingme ubuntu