update README

This commit is contained in:
Matthias Radestock committed 2014-10-24 13:43:15 +01:00
1 parent 579f3469c8
commit dba8760187
1 file changed
+15 -16
+15 -16
View File
@@ -55,20 +55,20 @@ containers, one on each host.
On $HOST1 run (as root) On $HOST1 run (as root)
host1# weave launch 10.0.0.1/16 host1# weave launch
host1# C=$(weave run 10.0.1.1/24 -t -i ubuntu) host1# C=$(weave run 10.0.1.1/24 -t -i ubuntu)
The first line starts the weave router, in a container. This needs to The first line starts the weave router, in a container. This needs to
be done once on each host. We tell weave that its IP address should be done once on each host.
be 10.0.0.1, and that the weave network is on 10.0.0.0/16.
The second line runs our application container. We give it an IP The second line runs our application container. We give it an IP
address and network (a subnet of the weave network). `weave run` address and network, in
invokes `docker run -d` with all the parameters following the IP [CIDR notation](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation).
address and network. So we could be launching any container this way; `weave run` invokes `docker run -d` with all the parameters following
here we just take a stock ubuntu container and launch a shell in the IP address and network. So we could be launching any container
it. There's also a `weave start` command, which invokes `docker start` this way; here we just take a stock ubuntu container and launch a
for starting existing containers. shell in it. There's also a `weave start` command, which invokes
`docker start` for starting existing containers.
If our application consists of more than one container on this host we If our application consists of more than one container on this host we
simply launch them with a variation on that second line. simply launch them with a variation on that second line.
@@ -81,15 +81,14 @@ unique.
We repeat similar steps on $HOST2... We repeat similar steps on $HOST2...
host2# weave launch 10.0.0.2/16 $HOST1 host2# weave launch $HOST1
host2# C=$(weave run 10.0.1.2/24 -t -i ubuntu) host2# C=$(weave run 10.0.1.2/24 -t -i ubuntu)
The only difference, apart from the choice of IP addresses for the The only difference, apart from the choice of IP address for the
weave router and the application container, is that we tell our weave application container, is that we tell our weave that it should peer
that it should peer with the weave on $HOST1 (specified as the IP with the weave on $HOST1 (specified as the IP address or hostname by
address or hostname by which $HOST2 can reach it). NB: if there is a which $HOST2 can reach it). NB: if there is a firewall between $HOST1
firewall between $HOST1 and $HOST2, you must open port 6783 for TCP and $HOST2, you must open port 6783 for TCP and UDP.
and UDP.
Note that we could instead have told the weave on $HOST1 to connect to Note that we could instead have told the weave on $HOST1 to connect to
$HOST2, or told both about each other. Order does not matter here; $HOST2, or told both about each other. Order does not matter here;