Rework documentation to use weave dns-lookup

This commit is contained in:
Adam Harrison committed 2015-07-14 17:36:30 +01:00
1 parent 6832ae20b0
commit 41834478d7
2 files changed
+12 -11

No files matched your search

+3 -10
View File
@@ -296,13 +296,9 @@ returned. So now
host2$ ping 10.2.1.132
will work, and, more interestingly, we can ping our `a1` application
container, which is residing on `$HOST1`, after finding its IP
address:
container, which is residing on `$HOST1`:
host1$ weave ps a1
a1 1e:88:d7:5b:77:68 10.2.1.2/24
host2$ ping 10.2.1.2
host2$ ping $(weave dns-lookup a1)
Multiple subnet addresses can be exposed or hidden with a single
invocation:
@@ -337,11 +333,8 @@ explained [above](#host-network-integration), i.e.
Then we add a NAT rule to route from the outside world to the
destination container service.
host1$ weave ps a1
a1 1e:88:d7:5b:77:68 10.2.1.2/24
host2$ iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 2211 \
-j DNAT --to-destination 10.2.1.2:4422
-j DNAT --to-destination $(weave dns-lookup a1):4422
Here we are assuming that the "outside world" is connecting to `$HOST2`
via 'eth0'. We want TCP traffic to port 2211 on the external IPs to be
+9 -1
View File
@@ -16,6 +16,7 @@ hosts.
* [Load balancing](#load-balancing)
* [Fault resilience](#fault-resilience)
* [Adding and removing extra DNS entries](#add-remove)
* [Resolve weaveDNS entries from host](#resolve-weavedns-entries-from-host)
* [Hot-swapping service containers](#hot-swapping)
* [Retaining DNS entries when containers stop](#retain-stopped)
* [Configuring a custom TTL](#ttl)
@@ -133,7 +134,6 @@ one of the `pingme` containers and re-run the ping tests, eventually
[cache expiry time](#ttl)) we will only be hitting the address of the
container that is still alive.
## <a name="add-remove"></a>Adding and removing extra DNS entries
If you want to give the container a name in DNS *other* than its
@@ -157,6 +157,14 @@ $ weave dns-remove 10.2.1.27 $C
When queried about a name with multiple IPs, weaveDNS returns all IPs
available in a random order.
## <a name="resolve-weavedns-entries-from-host"></a>Resolve weaveDNS entries from host
You can resolve entries from any host running weaveDNS with `weave
dns-lookup`:
host1$ weave dns-lookup pingme
10.40.0.1
## <a name="hot-swapping"></a>Hot-swapping service containers
If you would like to deploy a new version of a service, keep the old