8000 Added some documentation for the local domain argument by inercia · Pull Request #581 · weaveworks/weave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Added some documentation for the local domain argument #581

Merged
merged 3 commits into from
Apr 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions weavedns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.,
`--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

If DNS is started after you've attached a container to the weave
Expand Down
8 changes: 4 additions & 4 deletions weavedns/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
justVersion bool
ifaceName string
apiPath string
localDomain string
domain string
dnsPort int
httpPort int
wait int
Expand All @@ -36,7 +36,7 @@ func main() {
flag.BoolVar(&justVersion, "version", false, "print version and exit")
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(&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(&dnsPort, "dnsport", weavedns.DefaultServerPort, "port to listen to DNS requests")
flag.IntVar(&httpPort, "httpport", 6785, "port to listen to HTTP requests")
Expand Down Expand Up @@ -79,7 +79,7 @@ func main() {
srvConfig := weavedns.DNSServerConfig{
Port: dnsPort,
CacheLen: cacheLen,
LocalDomain: localDomain,
LocalDomain: domain,
Timeout: timeout,
UDPBufLen: udpbuf,
}
Expand All @@ -93,7 +93,7 @@ func main() {
Debug.Printf("Starting the signals handler")
go handleSignals(srv)

go weavedns.ListenHTTP(version, srv, localDomain, zone, httpPort)
go weavedns.ListenHTTP(version, srv, domain, zone, httpPort)
err = srv.Start()
if err != nil {
Error.Fatal("Failed to start the WeaveDNS server", err)
Expand Down
0