mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
NEW PROVIDER: OctoDNS (#309)
* govendor gopkg.in/yaml.v2 * Ignore YAML and BIND test data litter. Create README.txt files to force git to create subdirectories. * Update convertzone to also read OctoDNS files
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
<th class="rotate"><div><span>NAMECHEAP</span></div></th>
|
||||
<th class="rotate"><div><span>NAMEDOTCOM</span></div></th>
|
||||
<th class="rotate"><div><span>NS1</span></div></th>
|
||||
<th class="rotate"><div><span>OCTODNS</span></div></th>
|
||||
<th class="rotate"><div><span>OVH</span></div></th>
|
||||
<th class="rotate"><div><span>ROUTE53</span></div></th>
|
||||
<th class="rotate"><div><span>SOFTLAYER</span></div></th>
|
||||
@@ -66,6 +67,9 @@
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -126,6 +130,9 @@
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="The provider has registrar capabilities to set nameservers for zones">Registrar</th>
|
||||
@@ -165,6 +172,9 @@
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -202,6 +212,7 @@
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -243,6 +254,7 @@
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -284,6 +296,9 @@
|
||||
<a href="https://www.name.com/support/articles/205188508-Reverse-DNS-records"><i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i></a>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -343,6 +358,9 @@
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="Provider can manage TLSA records">TLSA</th>
|
||||
@@ -364,6 +382,7 @@
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -392,6 +411,7 @@
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -413,6 +433,7 @@
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -451,6 +472,9 @@
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="Research is needed.">
|
||||
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -498,6 +522,9 @@
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="Driver just maintains list of OctoDNS config files. You must manually create the master config files that refer these.">
|
||||
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="New domains require registration">
|
||||
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
@@ -561,6 +588,9 @@
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@@ -31,7 +31,8 @@ like [git-crypt](https://www.agwa.name/projects/git-crypt) or
|
||||
|
||||
Create a subdirectory called `zones` in the same directory as the
|
||||
configuration files. (`mkdir zones`). `zones` is where the BIND
|
||||
provider writes the zonefiles it creates.
|
||||
provider writes the zonefiles it creates. Even if you don't
|
||||
use BIND, it is useful for testing.
|
||||
|
||||
|
||||
## 3. Create the initial `dnsconfig.js`
|
||||
@@ -246,7 +247,7 @@ You can manually create the `D()` statements, or you can
|
||||
generate them automatically using the
|
||||
[convertzone](https://github.com/StackExchange/dnscontrol/blob/master/cmd/convertzone/README.md)
|
||||
utility that is included in the DNSControl repo (it converts
|
||||
BIND-style zone files to DNSControl's language).
|
||||
BIND-style zone files and OctoDNS-style YAML files to DNSControl's language).
|
||||
|
||||
Now you can make change to the domain(s) and run `dnscontrol preview`
|
||||
|
||||
@@ -258,4 +259,4 @@ If you are going to use this in production, we highly recommend the following:
|
||||
* Store the configuration files in Git.
|
||||
* Encrypt the `creds.json` file before storing it in Git.
|
||||
* Use a CI/CD tool like Jenkins to automatically push DNS changes.
|
||||
* Join the DNSControl community. File [issues and PRs](https://github.com/StackExchange/dnscontrol).
|
||||
* Join the DNSControl community. File [issues and PRs](https://github.com/StackExchange/dnscontrol).
|
@@ -29,9 +29,9 @@ with no changes. It is tempting to clean up the data as you do the migration...
|
||||
removing that old CNAME that nobody uses any more, or adding an
|
||||
A record you discovered was missing. Resist that temptation. If you make any
|
||||
changes it will be difficult to tell which changes were intentional
|
||||
and which are typos. During the migration you will know you are done
|
||||
when `dnscontrol preview` says there are no changes needed. If there
|
||||
are items that should be cleaned up, do those cleanups now.
|
||||
and which are mistakes. During the migration you will know you are done
|
||||
when `dnscontrol preview` says there are no changes needed. At that
|
||||
point it is safe to do any cleanups.
|
||||
|
||||
## Create the first draft
|
||||
|
||||
@@ -43,7 +43,7 @@ hand, possibly with your text editor's search and replace functions.
|
||||
However, where's the fun in that?
|
||||
|
||||
The `convertzone` tool can automate 90% of the conversion for you. It
|
||||
reads a BIND-style zone file and outputs a `D()` statement
|
||||
reads a BIND-style zone file or an OctoDNS-style YAML file and outputs a `D()` statement
|
||||
that is usually fairly complete. You may need to touch it up a bit.
|
||||
|
||||
The convertzone command is in the `cmd/convertzone` subdirectory.
|
||||
@@ -56,16 +56,21 @@ existing zone data to a file called the BIND zone file format.
|
||||
For example, suppose you owned the `foo.com` domain and the zone file
|
||||
was in a file called `old/zone.foo.com`. This command will convert the file:
|
||||
|
||||
convertzone -mode=dsl foo.com <old/zone.foo.com >first-draft.js
|
||||
convertzone -out=dsl foo.com <old/zone.foo.com >first-draft.js
|
||||
|
||||
If you are converting an OctoDNS file, add the flag `-in=octodns`:
|
||||
|
||||
convertzone -in=octodns -out=dsl foo.com <config/foo.com.yaml >first-draft.js
|
||||
|
||||
Add the contents of `first-draft.js` to `dnsconfig.js`
|
||||
|
||||
Run `dnscontrol preview` and see if it finds any differences.
|
||||
Edit dnsconfig.js until `dnscontrol preview` shows no errors and
|
||||
no changes to be made. This means the conversion of your old DNS
|
||||
data is correct.
|
||||
|
||||
convertzone makes a guess at what to do with NS records. If
|
||||
they An NS record at the AP is turned into a NAMESERVER() call, the
|
||||
convertzone makes a guess at what to do with NS records.
|
||||
An NS record at the apex is turned into a NAMESERVER() call, the
|
||||
rest are left as NS(). You probably want to check each of them for
|
||||
correctness.
|
||||
|
||||
@@ -86,7 +91,7 @@ to convert a zone. Lines that start with `#` are comments.
|
||||
|
||||
# Note this command uses ">>" to append to dnsconfig.js. Do
|
||||
# not use ">" as that will erase the existing file.
|
||||
convertzone -mode=dsl foo.com <old/zone.foo.com >>dnsconfig.js
|
||||
convertzone -out=dsl foo.com <old/zone.foo.com >>dnsconfig.js
|
||||
#
|
||||
dnscontrol preview
|
||||
vim dnsconfig.js
|
||||
@@ -100,4 +105,4 @@ to convert a zone. Lines that start with `#` are comments.
|
||||
vim dnsconfig.js
|
||||
dnscontrol preview
|
||||
# (repeat until all warnings/errors are resolved)
|
||||
dnscontrol push
|
||||
dnscontrol push
|
Reference in New Issue
Block a user