[proxy] Documenting TLS autoconfig

This commit is contained in:
Paul Bellamy committed 2015-09-16 10:44:18 +01:00
1 parent dbf39403d3
commit 0820c484d6
2 files changed
+21 -17

No files matched your search

+4 -8
View File
@@ -15,15 +15,11 @@ instructions. First, we need to get Boot2Docker running:
Assuming you have fetched the 'weave' script via curl or similar, and Assuming you have fetched the 'weave' script via curl or similar, and
it is in the current directory, launch weave on the Boot2Docker VM and it is in the current directory, launch weave on the Boot2Docker VM and
configure our shell. Because Boot2Docker uses TLS, we have to pass a configure our shell. Boot2Docker uses TLS, but weave will auto-detect
few extra options when launching the docker API proxy: that, and configure things appropriately.
host1$ ./weave launch-router host1$ weave launch
host1$ ./weave launch-proxy --tls \ host1$ eval "$(weave env)"
--tlscacert /var/lib/boot2docker/tls/ca.pem \
--tlscert /var/lib/boot2docker/tls/server.pem \
--tlskey /var/lib/boot2docker/tls/serverkey.pem
host1$ eval "$(./weave env)"
Now, we can use the docker command to run our containers, as shown in Now, we can use the docker command to run our containers, as shown in
the [proxy documentation](proxy.html): the [proxy documentation](proxy.html):
+17 -9
View File
@@ -45,8 +45,9 @@ argument, e.g.
host1$ weave launch-proxy -H tcp://127.0.0.1:9999 host1$ weave launch-proxy -H tcp://127.0.0.1:9999
When launching the proxy via TLS, `-H` and/or [TLS options](#tls) are If no TLS or listening interfaces are set, TLS will be autoconfigured
required. based on the docker daemon's settings, and listening interfaces will
be autoconfigured based on your docker client's settings.
Multiple `-H` arguments can be specified. If you are working with a Multiple `-H` arguments can be specified. If you are working with a
remote docker daemon, then any firewalls inbetween need to be remote docker daemon, then any firewalls inbetween need to be
@@ -204,13 +205,20 @@ to the proxy, the specified label has precedence over the container's name.
## <a name="tls"></a>Securing the docker communication with TLS ## <a name="tls"></a>Securing the docker communication with TLS
If you are If you are [connecting to the docker daemon with
[connecting to the docker daemon with TLS](https://docs.docker.com/articles/https/), TLS](https://docs.docker.com/articles/https/), you will probably want
you will probably want to do the same when connecting to the to do the same when connecting to the proxy. The proxy will
proxy. That is accomplished by launching the proxy with the same automatically detect the docker daemon's TLS configuration, and
TLS-related command-line flags as supplied to the docker daemon. For attempt to duplicate it. In the standard auto-detection case you will
example, if you have generated your certificates and keys into the be able to launch a TLS-enabled proxy with:
docker host's `/tls` directory, we can launch the proxy with:
host1$ weave launch-proxy
You can also manually configure the proxy's TLS. This is accomplished
by launching the proxy with the same TLS-related command-line flags as
supplied to the docker daemon. For example, if you have generated your
certificates and keys into the docker host's `/tls` directory, we can
launch the proxy with:
host1$ weave launch-proxy --tls-verify --tls-cacert=/tls/ca.pem \ host1$ weave launch-proxy --tls-verify --tls-cacert=/tls/ca.pem \
--tls-cert=/tls/server-cert.pem --tls-key=/tls/server-key.pem --tls-cert=/tls/server-cert.pem --tls-key=/tls/server-key.pem