diff options
author | 2016-08-19 17:14:17 -0700 | |
---|---|---|
committer | 2016-08-19 17:14:17 -0700 | |
commit | 9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6 (patch) | |
tree | 437e9755927c33af16276ad2602a6da115f948cb /README.md | |
parent | a1989c35231b0e5ea271b2f68d82c1a63e697cd0 (diff) | |
download | coredns-9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6.tar.gz coredns-9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6.tar.zst coredns-9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6.zip |
Make CoreDNS a server type plugin for Caddy (#220)
* Make CoreDNS a server type plugin for Caddy
Remove code we don't need and port all middleware over. Fix all tests
and rework the documentation.
Also make `go generate` build a caddy binary which we then copy into
our directory. This means `go build`-builds remain working as-is.
And new etc instances in each etcd test for better isolation.
Fix more tests and rework test.Server with the newer support Caddy offers.
Fix Makefile to support new mode of operation.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 36 |
1 files changed, 29 insertions, 7 deletions
@@ -1,7 +1,8 @@ # CoreDNS CoreDNS is DNS server that started as a fork of [Caddy](https://github.com/mholt/caddy/). It has the -same model: it chains middleware. +same model: it chains middleware. In fact to similar that CoreDNS is now a server type plugin for +CAddy, i.e. you'll need Caddy to compile CoreDNS. CoreDNS is the successor of [SkyDNS](https://github.com/skynetservices/skydns). SkyDNS is a thin layer that exposes services in etcd in the DNS. CoreDNS builds on this idea and is a generic DNS @@ -38,7 +39,7 @@ There are still few [issues](https://github.com/miekg/coredns/issues), and work things fast and reduce the memory usage. All in all, CoreDNS should be able to provide you with enough functionality to replace parts of -BIND9, Knot, NSD or PowerDNS. +BIND9, Knot, NSD or PowerDNS and SkyDNS. Most documentation is in the source and some blog articles can be [found here](https://miek.nl/tags/coredns/). If you do want to use CoreDNS in production, please let us know and how we can help. @@ -46,6 +47,25 @@ know and how we can help. <https://caddyserver.com/> is also full of examples on how to structure a Corefile (renamed from Caddyfile when I forked it). +## Compilation + +CoreDNS (as a servertype plugin for Caddy) has a hard dependency on Caddy - this is *almost* like +the normal Go dependencies, but with a small twist, caddy (the source) need to know that CoreDNS +exists and for this we need to add 1 line `_ "github.com/miekg/coredns/core"` to file in caddy. + +You have the source of CoreDNS, this should preferably be downloaded under your `$GOPATH`. Get all +dependencies: + + go get ./... + +Then, execute `go generate`, this will patch Caddy to add CoreDNS, and then `go build` as you would +normally do: + + go generate + go build + +Should yield a `coredns` binary. + ## Examples Start a simple proxy: @@ -95,15 +115,17 @@ All the above examples are possible with the *current* CoreDNS. ## What remains to be done -* Website? -* Logo? * Optimizations. * Load testing. * The [issues](https://github.com/miekg/coredns/issues). -## Blog +## Blog and Contact + +Website: <https://coredns.io> +Twitter: `@coredns.io` +Docs: <https://miek.nl/tags/coredns/> +Github: <https://github.com/miekg/coredns> -<https://miek.nl/tags/coredns/> ## Systemd service file @@ -123,7 +145,7 @@ LimitNOFILE=8192 User=coredns WorkingDirectory=/home/coredns ExecStartPre=/sbin/setcap cap_net_bind_service=+ep /opt/bin/coredns -ExecStart=/opt/bin/coredns -pidfile /home/coredns/coredns.pid -conf=/etc/coredns +ExecStart=/opt/bin/coredns -pidfile /home/coredns/coredns.pid -conf=/etc/coredns/Corefile ExecReload=/bin/kill -SIGUSR1 $MAINPID Restart=on-failure |