Merge pull request #581 from inercia/weave-573
Added some documentation for the local domain argument Fixes #573.
This commit is contained in:
commit
8a8c4bae76
2 files changed
+19
-4
No files matched your search
@@ -134,6 +134,21 @@ that you can use unqualified hostnames. Use `--dns-search=.` to make
|
|||||||
the resolver use the container's domain, or e.g.,
|
the resolver use the container's domain, or e.g.,
|
||||||
`--dns-search=weave.local` to make it look in `weave.local`.
|
`--dns-search=weave.local` to make it look in `weave.local`.
|
||||||
|
|
||||||
|
### Using a different local domain
|
||||||
|
|
||||||
|
By default, WeaveDNS uses `weave.local.` as the domain for names on the
|
||||||
|
Weave network. In general users do not need to change this domain, but you
|
||||||
|
can force WeaveDNS to use a different domain by launching it
|
||||||
|
with the `--domain` argument. For example,
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ weave launch-dns 10.2.254.1/24 --domain="mycompany.local."
|
||||||
|
```
|
||||||
|
|
||||||
|
The local domain should end with `local.`, since these names are
|
||||||
|
link-local as per [RFC6762](https://tools.ietf.org/html/rfc6762),
|
||||||
|
(though this is not strictly neccessary).
|
||||||
|
|
||||||
### Adding containers to DNS
|
### Adding containers to DNS
|
||||||
|
|
||||||
If DNS is started after you've attached a container to the weave
|
If DNS is started after you've attached a container to the weave
|
||||||
|
|||||||
+4
-4
@@ -21,7 +21,7 @@ func main() {
|
|||||||
justVersion bool
|
justVersion bool
|
||||||
ifaceName string
|
ifaceName string
|
||||||
apiPath string
|
apiPath string
|
||||||
localDomain string
|
domain string
|
||||||
dnsPort int
|
dnsPort int
|
||||||
httpPort int
|
httpPort int
|
||||||
wait int
|
wait int
|
||||||
@@ -36,7 +36,7 @@ func main() {
|
|||||||
flag.BoolVar(&justVersion, "version", false, "print version and exit")
|
flag.BoolVar(&justVersion, "version", false, "print version and exit")
|
||||||
flag.StringVar(&ifaceName, "iface", "", "name of interface to use for multicast")
|
flag.StringVar(&ifaceName, "iface", "", "name of interface to use for multicast")
|
||||||
flag.StringVar(&apiPath, "api", "unix:///var/run/docker.sock", "path to Docker API socket")
|
flag.StringVar(&apiPath, "api", "unix:///var/run/docker.sock", "path to Docker API socket")
|
||||||
flag.StringVar(&localDomain, "localDomain", weavedns.DefaultLocalDomain, "local domain (ie, 'weave.local.')")
|
flag.StringVar(&domain, "domain", weavedns.DefaultLocalDomain, "local domain (ie, 'weave.local.')")
|
||||||
flag.IntVar(&wait, "wait", 0, "number of seconds to wait for interface to be created and come up")
|
flag.IntVar(&wait, "wait", 0, "number of seconds to wait for interface to be created and come up")
|
||||||
flag.IntVar(&dnsPort, "dnsport", weavedns.DefaultServerPort, "port to listen to DNS requests")
|
flag.IntVar(&dnsPort, "dnsport", weavedns.DefaultServerPort, "port to listen to DNS requests")
|
||||||
flag.IntVar(&httpPort, "httpport", 6785, "port to listen to HTTP requests")
|
flag.IntVar(&httpPort, "httpport", 6785, "port to listen to HTTP requests")
|
||||||
@@ -79,7 +79,7 @@ func main() {
|
|||||||
srvConfig := weavedns.DNSServerConfig{
|
srvConfig := weavedns.DNSServerConfig{
|
||||||
Port: dnsPort,
|
Port: dnsPort,
|
||||||
CacheLen: cacheLen,
|
CacheLen: cacheLen,
|
||||||
LocalDomain: localDomain,
|
LocalDomain: domain,
|
||||||
Timeout: timeout,
|
Timeout: timeout,
|
||||||
UDPBufLen: udpbuf,
|
UDPBufLen: udpbuf,
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ func main() {
|
|||||||
Debug.Printf("Starting the signals handler")
|
Debug.Printf("Starting the signals handler")
|
||||||
go handleSignals(srv)
|
go handleSignals(srv)
|
||||||
|
|
||||||
go weavedns.ListenHTTP(version, srv, localDomain, zone, httpPort)
|
go weavedns.ListenHTTP(version, srv, domain, zone, httpPort)
|
||||||
err = srv.Start()
|
err = srv.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Error.Fatal("Failed to start the WeaveDNS server", err)
|
Error.Fatal("Failed to start the WeaveDNS server", err)
|
||||||
|
|||||||
Reference in new issue
Block a user