Update docs following merge of proxy & router.
Notes: - Deleted trailing whitespaces on modified files. - Added documentation for launch --proxy=false.
This commit is contained in:
1 parent
cb614f01c3
commit
cbf1230f6d
7 files changed
+23
-21
No files matched your search
@@ -37,17 +37,14 @@ See [Dynamically Attaching and Detaching Containers](/site/using-weave/dynamical
|
|||||||
### <a name="weave-api-proxy"></a>Setting Up The Weave Net Docker API Proxy
|
### <a name="weave-api-proxy"></a>Setting Up The Weave Net Docker API Proxy
|
||||||
|
|
||||||
The proxy sits between the Docker client (command line or API) and the
|
The proxy sits between the Docker client (command line or API) and the
|
||||||
Docker daemon, and intercepts the communication between the two. You can
|
Docker daemon, and intercepts the communication between the two.
|
||||||
start it simultaneously with the router and weaveDNS via `launch`:
|
It is started along with the router and weaveDNS when you run:
|
||||||
|
|
||||||
host1$ weave launch
|
host1$ weave launch
|
||||||
|
|
||||||
or independently via `launch-proxy`:
|
**N.B.**: Prior to version 2.0, the `launch-proxy` command allowed to pass configuration options and to start the proxy independently.
|
||||||
|
This command has been removed in 2.0 and `launch` now also accepts configuration options for the proxy.
|
||||||
|
|
||||||
host1$ weave launch-router && weave launch-proxy
|
|
||||||
|
|
||||||
The first form is more convenient. But only `launch-proxy` can be passed configuration arguments.
|
|
||||||
Therefore if you need to modify the default behaviour of the proxy, you must use `launch-proxy`.
|
|
||||||
|
|
||||||
By default, the proxy decides where to listen based on how the
|
By default, the proxy decides where to listen based on how the
|
||||||
launching client connects to Docker. If the launching client connected
|
launching client connects to Docker. If the launching client connected
|
||||||
@@ -56,7 +53,7 @@ the launching client connects over TCP, the proxy listens on port
|
|||||||
12375, on all network interfaces. This can be adjusted using the `-H`
|
12375, on all network interfaces. This can be adjusted using the `-H`
|
||||||
argument, for example:
|
argument, for example:
|
||||||
|
|
||||||
host1$ weave launch-proxy -H tcp://127.0.0.1:9999
|
host1$ weave launch -H tcp://127.0.0.1:9999
|
||||||
|
|
||||||
If no TLS or listening interfaces are set, TLS is auto-configured
|
If no TLS or listening interfaces are set, TLS is auto-configured
|
||||||
based on the Docker daemon's settings, and the listening interfaces are
|
based on the Docker daemon's settings, and the listening interfaces are
|
||||||
@@ -81,14 +78,12 @@ Alternatively, the proxy host can be set on a per-command basis with
|
|||||||
|
|
||||||
host1$ docker $(weave config) ps
|
host1$ docker $(weave config) ps
|
||||||
|
|
||||||
The proxy can be stopped independently with
|
The proxy can be stopped, along with the router and weaveDNS, with
|
||||||
|
|
||||||
host1$ weave stop-proxy
|
host1$ weave stop
|
||||||
|
|
||||||
or in conjunction with the router and weaveDNS via `stop`.
|
|
||||||
|
|
||||||
If you set your `DOCKER_HOST` to point at the proxy, you should revert
|
If you set your `DOCKER_HOST` to point at the proxy, you should revert
|
||||||
to the original settings prior to stopping the proxy.
|
to the original settings prior to running `stop`.
|
||||||
|
|
||||||
|
|
||||||
**See Also**
|
**See Also**
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Additionally, the hostname is matched against a regular expression `<regexp>` an
|
|||||||
|
|
||||||
For example, you can launch the proxy using all three flags, as follows:
|
For example, you can launch the proxy using all three flags, as follows:
|
||||||
|
|
||||||
host1$ weave launch-router && weave launch-proxy --hostname-from-label hostname-label --hostname-match '^aws-[0-9]+-(.*)$' --hostname-replacement 'my-app-$1'
|
host1$ weave launch --hostname-from-label hostname-label --hostname-match '^aws-[0-9]+-(.*)$' --hostname-replacement 'my-app-$1'
|
||||||
host1$ eval $(weave env)
|
host1$ eval $(weave env)
|
||||||
|
|
||||||
>**Note:** regexp substitution groups must be pre-pended with a dollar sign
|
>**Note:** regexp substitution groups must be pre-pended with a dollar sign
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ To start a container without connecting it to the Weave network, pass
|
|||||||
If you do not want an IP to be assigned by default, the proxy needs to
|
If you do not want an IP to be assigned by default, the proxy needs to
|
||||||
be passed the `--no-default-ipalloc` flag, for example:
|
be passed the `--no-default-ipalloc` flag, for example:
|
||||||
|
|
||||||
host1$ weave launch-proxy --no-default-ipalloc
|
host1$ weave launch --no-default-ipalloc
|
||||||
|
|
||||||
In this configuration, containers using no `WEAVE_CIDR` environment
|
In this configuration, containers using no `WEAVE_CIDR` environment
|
||||||
variable are not connected to the Weave network.
|
variable are not connected to the Weave network.
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ IP instead of the Weave IP, or you require name resolution for
|
|||||||
Docker-managed networks), the proxy must be launched using the
|
Docker-managed networks), the proxy must be launched using the
|
||||||
`--no-rewrite-hosts` flag.
|
`--no-rewrite-hosts` flag.
|
||||||
|
|
||||||
host1$ weave launch-router && weave launch-proxy --no-rewrite-hosts
|
host1$ weave launch --no-rewrite-hosts
|
||||||
|
|
||||||
**See Also**
|
**See Also**
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ attempts to duplicate it.
|
|||||||
|
|
||||||
In the standard auto-detection case you can launch a TLS-enabled proxy as follows:
|
In the standard auto-detection case you can launch a TLS-enabled proxy as follows:
|
||||||
|
|
||||||
host1$ weave launch-proxy
|
host1$ weave launch
|
||||||
|
|
||||||
To disable auto-detection of TLS configuration, you can either pass
|
To disable auto-detection of TLS configuration, you can either pass
|
||||||
the `--no-detect-tls` flag, or you can manually configure the proxy's TLS using
|
the `--no-detect-tls` flag, or you can manually configure the proxy's TLS using
|
||||||
@@ -22,7 +22,7 @@ daemon.
|
|||||||
For example, if you generated your certificates and keys
|
For example, if you generated your certificates and keys
|
||||||
into the Docker host's `/tls` directory, launch the proxy using:
|
into the Docker host's `/tls` directory, launch the proxy using:
|
||||||
|
|
||||||
host1$ weave launch-proxy --tlsverify --tlscacert=/tls/ca.pem \
|
host1$ weave launch --tlsverify --tlscacert=/tls/ca.pem \
|
||||||
--tlscert=/tls/server-cert.pem --tlskey=/tls/server-key.pem
|
--tlscert=/tls/server-cert.pem --tlskey=/tls/server-key.pem
|
||||||
|
|
||||||
The paths to your certificates and key must be provided as absolute
|
The paths to your certificates and key must be provided as absolute
|
||||||
|
|||||||
@@ -45,13 +45,13 @@ This command substitutes the Weave network settings when the container has a
|
|||||||
Weave Net IP. If a container has more than one Weave Net IP, then the inspect call
|
Weave Net IP. If a container has more than one Weave Net IP, then the inspect call
|
||||||
only includes one of them.
|
only includes one of them.
|
||||||
|
|
||||||
host1$ weave launch-router && weave launch-proxy --rewrite-inspect
|
host1$ weave launch --rewrite-inspect
|
||||||
|
|
||||||
### Multicast Traffic and Launching the Weave Proxy
|
### Multicast Traffic and Launching the Weave Proxy
|
||||||
|
|
||||||
By default, multicast traffic is routed over the Weave network.
|
By default, multicast traffic is routed over the Weave network.
|
||||||
To turn this off, for example, because you want to configure your own multicast
|
To turn this off, for example, because you want to configure your own multicast
|
||||||
route, add the `--no-multicast-route` flag to `weave launch-proxy`.
|
route, add the `--no-multicast-route` flag to `weave launch`.
|
||||||
|
|
||||||
### Other Weave Proxy options
|
### Other Weave Proxy options
|
||||||
|
|
||||||
@@ -61,6 +61,13 @@ route, add the `--no-multicast-route` flag to `weave launch-proxy`.
|
|||||||
* `--no-restart` -- remove the default policy of `--restart=always`, if
|
* `--no-restart` -- remove the default policy of `--restart=always`, if
|
||||||
you want to control start-up of the proxy yourself
|
you want to control start-up of the proxy yourself
|
||||||
|
|
||||||
|
### Disabling Weave Proxy
|
||||||
|
|
||||||
|
If for some reason you need to disable the proxy, but still want to start other Weave Net components (router, weaveDNS), you can do so using:
|
||||||
|
|
||||||
|
weave launch --proxy=false
|
||||||
|
|
||||||
|
|
||||||
**See Also**
|
**See Also**
|
||||||
|
|
||||||
* [Setting Up The Weave Docker API Proxy](/site/weave-docker-api.md)
|
* [Setting Up The Weave Docker API Proxy](/site/weave-docker-api.md)
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ the hostname is not in the weaveDNS domain, the container is *not*
|
|||||||
registered, but it will still use weaveDNS for resolution.
|
registered, but it will still use weaveDNS for resolution.
|
||||||
|
|
||||||
To disable an application container's use of weaveDNS, add the
|
To disable an application container's use of weaveDNS, add the
|
||||||
`--without-dns` option to `weave launch-proxy`. To
|
`--without-dns` option to `weave launch`. To
|
||||||
disable weaveDNS itself, launch weave with the `--no-dns` option.
|
disable weaveDNS itself, launch weave with the `--no-dns` option.
|
||||||
|
|
||||||
**See Also**
|
**See Also**
|
||||||
|
|||||||
Reference in new issue
Block a user