Browse Source

add markdown formatter to scripts/format so there is a clear markdown style in the whole project. also needed for further documentation as its written in markdown.

Signed-off-by: Ivan Schaller <ivan@schaller.sh>
pull/1261/head
Ivan Schaller 6 months ago
parent
commit
d1ac757770
16 changed files with 538 additions and 528 deletions
  1. +338
    -338
      CHANGELOG.md
  2. +11
    -11
      CODE_OF_CONDUCT.md
  3. +12
    -12
      CONTRIBUTING.md
  4. +80
    -77
      README.md
  5. +6
    -4
      docs/index.md
  6. +5
    -4
      docs/pages/auto_arpa.md
  7. +17
    -18
      docs/pages/dynamic_records.md
  8. +16
    -18
      docs/pages/geo_records.md
  9. +4
    -2
      docs/pages/quick-start.md
  10. +23
    -22
      docs/pages/records.md
  11. +6
    -6
      examples/README.md
  12. +5
    -5
      examples/basic/README.md
  13. +6
    -6
      examples/migrating-to-octodns/README.md
  14. +6
    -3
      script/format
  15. +2
    -2
      script/lint
  16. +1
    -0
      setup.py

+ 338
- 338
CHANGELOG.md
File diff suppressed because it is too large
View File


+ 11
- 11
CODE_OF_CONDUCT.md View File

@ -14,21 +14,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities


+ 12
- 12
CONTRIBUTING.md View File

@ -10,18 +10,18 @@ If you have questions, or you'd like to check with us before embarking on a majo
This project uses the [GitHub Flow](https://guides.github.com/introduction/flow/). That means that the `main` branch is stable and new development is done in feature branches. Feature branches are merged into the `main` branch via a Pull Request.
0. Fork and clone the repository
1. Configure and install the dependencies: `./script/bootstrap`
2. Activate virtual environment: `source env/bin/activate`
3. Make sure the tests pass on your machine: `./script/test`
4. Create a new branch: `git checkout -b my-branch-name`
5. Make your change, add tests, and make sure the tests still pass
6. Make sure that `./script/lint` passes without any warnings
7. Run `./script/format` to make sure your changes follow Python's preferred
coding style
8. Run `./script/changelog create ...` to add a changelog entry to your PR
9. Make sure that coverage is at :100:% `./script/coverage` and open `htmlcov/index.html`
- You can open a draft PR for :eyes: & discussion prior to this
00. Fork and clone the repository
01. Configure and install the dependencies: `./script/bootstrap`
02. Activate virtual environment: `source env/bin/activate`
03. Make sure the tests pass on your machine: `./script/test`
04. Create a new branch: `git checkout -b my-branch-name`
05. Make your change, add tests, and make sure the tests still pass
06. Make sure that `./script/lint` passes without any warnings
07. Run `./script/format` to make sure your changes follow Python's preferred
coding style
08. Run `./script/changelog create ...` to add a changelog entry to your PR
09. Make sure that coverage is at :100:% `./script/coverage` and open `htmlcov/index.html`
- You can open a draft PR for :eyes: & discussion prior to this
10. Push to your fork and submit a pull request
We will handle updating the version, tagging the release, and releasing the gem. Please don't bump the version or otherwise attempt to take on these administrative internal tasks as part of your pull request.


+ 80
- 77
README.md View File

@ -9,37 +9,37 @@ The architecture is pluggable and the tooling is flexible to make it applicable
## Table of Contents
* [Getting started](#getting-started)
* [Workspace](#workspace)
* [Installing a specific commit SHA](#installing-a-specific-commit-sha)
* [Config](#config)
* [Dynamic Zone Config](#dynamic-zone-config)
* [Static Zone Config](#static-zone-config)
* [General Configuration Concepts](#general-configuration-concepts)
* [Quick Example Record](#quick-example-record)
* [Noop](#noop)
* [Making changes](#making-changes)
* [Workflow](#workflow)
* [Bootstrapping config files](#bootstrapping-config-files)
* [Providers](#providers)
* [Updating to use extracted providers](#updating-to-use-extracted-providers)
* [Sources](#sources)
* [Notes](#notes)
* [Processors](#processors)
* [Automatic PTR generation](#automatic-ptr-generation)
* [Compatibility and Compliance](#compatibility-and-compliance)
* [`lenient`](#lenient)
* [`strict_supports`](#strict_supports)
* [Configuring `strict_supports`](#configuring-strict_supports)
* [Custom Sources and Providers](#custom-sources-and-providers)
* [Other Uses](#other-uses)
* [Syncing between providers](#syncing-between-providers)
* [Dynamic sources](#dynamic-sources)
* [Contributing](#contributing)
* [Getting help](#getting-help)
* [Related Projects and Resources](#related-projects-and-resources)
* [License](#license)
* [Authors](#authors)
- [Getting started](#getting-started)
- [Workspace](#workspace)
- [Installing a specific commit SHA](#installing-a-specific-commit-sha)
- [Config](#config)
- [Dynamic Zone Config](#dynamic-zone-config)
- [Static Zone Config](#static-zone-config)
- [General Configuration Concepts](#general-configuration-concepts)
- [Quick Example Record](#quick-example-record)
- [Noop](#noop)
- [Making changes](#making-changes)
- [Workflow](#workflow)
- [Bootstrapping config files](#bootstrapping-config-files)
- [Providers](#providers)
- [Updating to use extracted providers](#updating-to-use-extracted-providers)
- [Sources](#sources)
- [Notes](#notes)
- [Processors](#processors)
- [Automatic PTR generation](#automatic-ptr-generation)
- [Compatibility and Compliance](#compatibility-and-compliance)
- [`lenient`](#lenient)
- [`strict_supports`](#strict_supports)
- [Configuring `strict_supports`](#configuring-strict_supports)
- [Custom Sources and Providers](#custom-sources-and-providers)
- [Other Uses](#other-uses)
- [Syncing between providers](#syncing-between-providers)
- [Dynamic sources](#dynamic-sources)
- [Contributing](#contributing)
- [Getting help](#getting-help)
- [Related Projects and Resources](#related-projects-and-resources)
- [License](#license)
- [Authors](#authors)
## Getting started
@ -268,50 +268,50 @@ It is important to review any `WARNING` log lines printed out during an `octodns
The table below lists the providers octoDNS supports. They are maintained in their own repositories and released as independent modules.
| Provider | Module | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| /etc/hosts | [octodns_etchosts](https://github.com/octodns/octodns-etchosts/) | |
| [Akamai Edge DNS](https://www.akamai.com/products/edge-dns) | [octodns_edgedns](https://github.com/octodns/octodns-edgedns/) | |
| [Amazon Route 53](https://aws.amazon.com/route53/) | [octodns_route53](https://github.com/octodns/octodns-route53) | |
| [AutoDNS](https://www.internetx.com/autodns/) | [octodns_autodns](https://github.com/octodns/octodns-autodns) | |
| [Azure DNS](https://azure.microsoft.com/en-us/services/dns/) | [octodns_azure](https://github.com/octodns/octodns-azure/) | |
| [BIND, AXFR, RFC-2136](https://www.isc.org/bind/) | [octodns_bind](https://github.com/octodns/octodns-bind/) | |
| [Cloudflare DNS](https://www.cloudflare.com/dns/) | [octodns_cloudflare](https://github.com/octodns/octodns-cloudflare/) | |
| [ClouDNS](https://www.cloudns.net/) | [octodns_cloudns](https://github.com/ClouDNS/octodns_cloudns) | |
| [Constellix](https://constellix.com/) | [octodns_constellix](https://github.com/octodns/octodns-constellix/) | |
| [deSEC](https://desec.io/) | [octodns_desec](https://github.com/rootshell-labs/octodns-desec) | |
| [DigitalOcean](https://docs.digitalocean.com/products/networking/dns/) | [octodns_digitalocean](https://github.com/octodns/octodns-digitalocean/) | |
| [DNS Made Easy](https://dnsmadeeasy.com/) | [octodns_dnsmadeeasy](https://github.com/octodns/octodns-dnsmadeeasy/) | |
| [DNSimple](https://dnsimple.com/) | [octodns_dnsimple](https://github.com/octodns/octodns-dnsimple/) | |
| [Dyn](https://www.oracle.com/cloud/networking/dns/) ([deprecated](https://www.oracle.com/corporate/acquisitions/dyn/technologies/migrate-your-services/)) | [octodns_dyn](https://github.com/octodns/octodns-dyn/) | |
| [easyDNS](https://easydns.com/) | [octodns_easydns](https://github.com/octodns/octodns-easydns/) | |
| [EdgeCenter DNS](https://edgecenter.ru/dns/) | [octodns_edgecenter](https://github.com/octodns/octodns-edgecenter/) | |
| [Fastly](https://www.fastly.com/de/) | [Financial-Times/octodns-fastly](https://github.com/Financial-Times/octodns-fastly) | |
| [G-Core Labs DNS](https://gcorelabs.com/dns/) | [octodns_gcore](https://github.com/octodns/octodns-gcore/) | |
| [Gandi](https://www.gandi.net/en-US/domain/dns) | [octodns_gandi](https://github.com/octodns/octodns-gandi/) | |
| [Google Cloud DNS](https://cloud.google.com/dns) | [octodns_googlecloud](https://github.com/octodns/octodns-googlecloud/) | |
| [Hetzner DNS](https://www.hetzner.com/dns-console) | [octodns_hetzner](https://github.com/octodns/octodns-hetzner/) | |
| [Infoblox](https://www.infoblox.com/) | [asyncon/octoblox](https://github.com/asyncon/octoblox) | |
| [Infomaniak](https://www.infomaniak.com/) | [octodns_infomaniak](https://github.com/M0NsTeRRR/octodns-infomaniak) | |
| [Lexicon](https://dns-lexicon.github.io/dns-lexicon/#) | [dns-lexicon/dns-lexicon](https://github.com/dns-lexicon/dns-lexicon) | |
| [Mythic Beasts DNS](https://www.mythic-beasts.com/support/hosting/dns) | [octodns_mythicbeasts](https://github.com/octodns/octodns-mythicbeasts/) | |
| [NetBox-DNS Plugin](https://github.com/peteeckel/netbox-plugin-dns) | [olofvndrhr/octodns-netbox-dns](https://github.com/olofvndrhr/octodns-netbox-dns) | |
| [NS1](https://ns1.com/products/managed-dns) | [octodns_ns1](https://github.com/octodns/octodns-ns1/) | |
| [OVHcloud DNS](https://www.ovhcloud.com/en/domains/dns-subdomain/) | [octodns_ovh](https://github.com/octodns/octodns-ovh/) | |
| [Pi-hole](https://pi-hole.net/) | [jvoss/octodns-pihole](https://github.com/jvoss/octodns-pihole) | |
| [PowerDNS](https://www.powerdns.com/) | [octodns_powerdns](https://github.com/octodns/octodns-powerdns/) | |
| [Rackspace](https://www.rackspace.com/library/what-is-dns) | [octodns_rackspace](https://github.com/octodns/octodns-rackspace/) | |
| [Scaleway](https://www.scaleway.com/en/dns/) | [octodns_scaleway](https://github.com/scaleway/octodns-scaleway) | |
| [Selectel](https://selectel.ru/en/services/additional/dns/) | [octodns_selectel](https://github.com/octodns/octodns-selectel/) | |
| [SPF Value Management](https://github.com/octodns/octodns-spf) | [octodns_spf](https://github.com/octodns/octodns-spf/) | |
| [TransIP](https://www.transip.eu/knowledgebase/entry/155-dns-and-nameservers/) | [octodns_transip](https://github.com/octodns/octodns-transip/) | |
| [UltraDNS](https://vercara.com/authoritative-dns) | [octodns_ultra](https://github.com/octodns/octodns-ultra/) | |
| -- | -- | -- |
| /etc/hosts | [octodns_etchosts](https://github.com/octodns/octodns-etchosts/) | |
| [Akamai Edge DNS](https://www.akamai.com/products/edge-dns) | [octodns_edgedns](https://github.com/octodns/octodns-edgedns/) | |
| [Amazon Route 53](https://aws.amazon.com/route53/) | [octodns_route53](https://github.com/octodns/octodns-route53) | |
| [AutoDNS](https://www.internetx.com/autodns/) | [octodns_autodns](https://github.com/octodns/octodns-autodns) | |
| [Azure DNS](https://azure.microsoft.com/en-us/services/dns/) | [octodns_azure](https://github.com/octodns/octodns-azure/) | |
| [BIND, AXFR, RFC-2136](https://www.isc.org/bind/) | [octodns_bind](https://github.com/octodns/octodns-bind/) | |
| [Cloudflare DNS](https://www.cloudflare.com/dns/) | [octodns_cloudflare](https://github.com/octodns/octodns-cloudflare/) | |
| [ClouDNS](https://www.cloudns.net/) | [octodns_cloudns](https://github.com/ClouDNS/octodns_cloudns) | |
| [Constellix](https://constellix.com/) | [octodns_constellix](https://github.com/octodns/octodns-constellix/) | |
| [deSEC](https://desec.io/) | [octodns_desec](https://github.com/rootshell-labs/octodns-desec) | |
| [DigitalOcean](https://docs.digitalocean.com/products/networking/dns/) | [octodns_digitalocean](https://github.com/octodns/octodns-digitalocean/) | |
| [DNS Made Easy](https://dnsmadeeasy.com/) | [octodns_dnsmadeeasy](https://github.com/octodns/octodns-dnsmadeeasy/) | |
| [DNSimple](https://dnsimple.com/) | [octodns_dnsimple](https://github.com/octodns/octodns-dnsimple/) | |
| [Dyn](https://www.oracle.com/cloud/networking/dns/) ([deprecated](https://www.oracle.com/corporate/acquisitions/dyn/technologies/migrate-your-services/)) | [octodns_dyn](https://github.com/octodns/octodns-dyn/) | |
| [easyDNS](https://easydns.com/) | [octodns_easydns](https://github.com/octodns/octodns-easydns/) | |
| [EdgeCenter DNS](https://edgecenter.ru/dns/) | [octodns_edgecenter](https://github.com/octodns/octodns-edgecenter/) | |
| [Fastly](https://www.fastly.com/de/) | [Financial-Times/octodns-fastly](https://github.com/Financial-Times/octodns-fastly) | |
| [G-Core Labs DNS](https://gcorelabs.com/dns/) | [octodns_gcore](https://github.com/octodns/octodns-gcore/) | |
| [Gandi](https://www.gandi.net/en-US/domain/dns) | [octodns_gandi](https://github.com/octodns/octodns-gandi/) | |
| [Google Cloud DNS](https://cloud.google.com/dns) | [octodns_googlecloud](https://github.com/octodns/octodns-googlecloud/) | |
| [Hetzner DNS](https://www.hetzner.com/dns-console) | [octodns_hetzner](https://github.com/octodns/octodns-hetzner/) | |
| [Infoblox](https://www.infoblox.com/) | [asyncon/octoblox](https://github.com/asyncon/octoblox) | |
| [Infomaniak](https://www.infomaniak.com/) | [octodns_infomaniak](https://github.com/M0NsTeRRR/octodns-infomaniak) | |
| [Lexicon](https://dns-lexicon.github.io/dns-lexicon/#) | [dns-lexicon/dns-lexicon](https://github.com/dns-lexicon/dns-lexicon) | |
| [Mythic Beasts DNS](https://www.mythic-beasts.com/support/hosting/dns) | [octodns_mythicbeasts](https://github.com/octodns/octodns-mythicbeasts/) | |
| [NetBox-DNS Plugin](https://github.com/peteeckel/netbox-plugin-dns) | [olofvndrhr/octodns-netbox-dns](https://github.com/olofvndrhr/octodns-netbox-dns) | |
| [NS1](https://ns1.com/products/managed-dns) | [octodns_ns1](https://github.com/octodns/octodns-ns1/) | |
| [OVHcloud DNS](https://www.ovhcloud.com/en/domains/dns-subdomain/) | [octodns_ovh](https://github.com/octodns/octodns-ovh/) | |
| [Pi-hole](https://pi-hole.net/) | [jvoss/octodns-pihole](https://github.com/jvoss/octodns-pihole) | |
| [PowerDNS](https://www.powerdns.com/) | [octodns_powerdns](https://github.com/octodns/octodns-powerdns/) | |
| [Rackspace](https://www.rackspace.com/library/what-is-dns) | [octodns_rackspace](https://github.com/octodns/octodns-rackspace/) | |
| [Scaleway](https://www.scaleway.com/en/dns/) | [octodns_scaleway](https://github.com/scaleway/octodns-scaleway) | |
| [Selectel](https://selectel.ru/en/services/additional/dns/) | [octodns_selectel](https://github.com/octodns/octodns-selectel/) | |
| [SPF Value Management](https://github.com/octodns/octodns-spf) | [octodns_spf](https://github.com/octodns/octodns-spf/) | |
| [TransIP](https://www.transip.eu/knowledgebase/entry/155-dns-and-nameservers/) | [octodns_transip](https://github.com/octodns/octodns-transip/) | |
| [UltraDNS](https://vercara.com/authoritative-dns) | [octodns_ultra](https://github.com/octodns/octodns-ultra/) | |
| [YamlProvider](/octodns/provider/yaml.py) | built-in | Supports all record types and core functionality |
| Zonefile | [kompetenzbolzen/octodns-custom-provider](https://github.com/kompetenzbolzen/octodns-custom-provider) | |
| Zonefile | [kompetenzbolzen/octodns-custom-provider](https://github.com/kompetenzbolzen/octodns-custom-provider) | |
### Updating to use extracted providers
1. Include the extracted module in your python environment, e.g. if using Route53 that would require adding the `octodns_route53` module to your requirements.txt, setup.py, or similar.
1. Update the `class` value for your provider to the new path, e.g. again for Route53 that would be replacing `octodns.provider.route53.Route53Provider` with `octodns_route53.Route53Provider`
2. Update the `class` value for your provider to the new path, e.g. again for Route53 that would be replacing `octodns.provider.route53.Route53Provider` with `octodns_route53.Route53Provider`
The module required and provider class path for extracted providers can be found in the table above.
@ -320,7 +320,7 @@ The module required and provider class path for extracted providers can be found
Similar to providers, but can only serve to populate records into a zone, cannot be synced to.
| Source | Record Support | Dynamic | Notes |
| ---------------------------------------------------------------------------- | ---------------------------------------------------- | ------- | ---------------------------------------- |
| -- | -- | -- | -- |
| [AxfrSource (BIND)](https://github.com/octodns/octodns-bind/) | A, AAAA, CAA, CNAME, LOC, MX, NS, PTR, SPF, SRV, TXT | No | read-only |
| [DDNS Source](https://github.com/octodns/octodns-ddns) | A, AAAA | No | read-only |
| [EnvVarSource](/octodns/source/envvar.py) | TXT | No | read-only environment variable injection |
@ -332,15 +332,15 @@ Similar to providers, but can only serve to populate records into a zone, cannot
### Notes
* ALIAS support varies a lot from provider to provider care should be taken to verify that your needs are met in detail.
* Dyn's UI doesn't allow editing or view of TTL, but the API accepts and stores the value provided, this value does not appear to be used when served
* Dnsimple's uses the configured TTL when serving things through the ALIAS, there's also a secondary TXT record created alongside the ALIAS that octoDNS ignores
* octoDNS itself supports non-ASCII character sets, but in testing Cloudflare is the only provider where that is currently functional end-to-end. Others have failures either in the client libraries or API calls
- ALIAS support varies a lot from provider to provider care should be taken to verify that your needs are met in detail.
- Dyn's UI doesn't allow editing or view of TTL, but the API accepts and stores the value provided, this value does not appear to be used when served
- Dnsimple's uses the configured TTL when serving things through the ALIAS, there's also a secondary TXT record created alongside the ALIAS that octoDNS ignores
- octoDNS itself supports non-ASCII character sets, but in testing Cloudflare is the only provider where that is currently functional end-to-end. Others have failures either in the client libraries or API calls
## Processors
| Processor | Description |
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| -- | -- |
| [AcmeManagingProcessor](/octodns/processor/acme.py) | Useful when processes external to octoDNS are managing acme challenge DNS records, e.g. LetsEncrypt |
| [AutoArpa](/octodns/processor/arpa.py) | See [Automatic PTR generation](#automatic-ptr-generation) below |
| [EnsureTrailingDots](/octodns/processor/trailing_dots.py) | Processor that ensures ALIAS, CNAME, DNAME, MX, NS, PTR, and SRVs have trailing dots |
@ -390,7 +390,7 @@ providers:
## Custom Sources and Providers
You can check out the [source](/octodns/source/) and [provider](/octodns/provider/) directory to see what's currently supported. Sources act as a source of record information. AxfrSource and TinyDnsFileSource are currently the only OSS sources, though we have several others internally that are specific to our environment. These include something to pull host data from [gPanel](https://githubengineering.com/githubs-metal-cloud/) and a similar provider that sources information about our network gear to create both `A` & `PTR` records for their interfaces. Things that might make good OSS sources might include an `ElbSource` that pulls information about [AWS Elastic Load Balancers](https://aws.amazon.com/elasticloadbalancing/) and dynamically creates `CNAME`s for them, or `Ec2Source` that pulls instance information so that records can be created for hosts similar to how our `GPanelProvider` works.
You can check out the [source](/octodns/source/) and [provider](/octodns/provider/) directory to see what's currently supported. Sources act as a source of record information. AxfrSource and TinyDnsFileSource are currently the only OSS sources, though we have several others internally that are specific to our environment. These include something to pull host data from [gPanel](https://githubengineering.com/githubs-metal-cloud/) and a similar provider that sources information about our network gear to create both `A` & `PTR` records for their interfaces. Things that might make good OSS sources might include an `ElbSource` that pulls information about [AWS Elastic Load Balancers](https://aws.amazon.com/elasticloadbalancing/) and dynamically creates `CNAME`s for them, or `Ec2Source` that pulls instance information so that records can be created for hosts similar to how our `GPanelProvider` works.
Most of the things included in octoDNS are providers, the obvious difference being that they can serve as both sources and targets of data. We'd really like to see this list grow over time so if you use an unsupported provider then PRs are welcome. The existing providers should serve as reasonable examples. Those that have no GeoDNS support are relatively straightforward. Unfortunately most of the APIs involved to do GeoDNS style traffic management are complex and somewhat inconsistent so adding support for that function would be nice, but is optional and best done in a separate pass.
@ -460,7 +460,9 @@ If you have a problem or suggestion, please [open an issue](https://github.com/o
## Related Projects and Resources
- **GitHub Action:** [octoDNS-Sync](https://github.com/marketplace/actions/octodns-sync)
- **NixOS Integration:** [NixOS-DNS](https://github.com/Janik-Haag/nixos-dns/)
- **Sample Implementations.** See how others are using it
- [`hackclub/dns`](https://github.com/hackclub/dns)
@ -469,6 +471,7 @@ If you have a problem or suggestion, please [open an issue](https://github.com/o
- [`jekyll/dns`](https://github.com/jekyll/dns)
- **Resources.**
- Article: [Visualising DNS records with Neo4j](https://medium.com/@costask/querying-and-visualising-octodns-records-with-neo4j-f4f72ab2d474) + code
- Video: [FOSDEM 2019 - DNS as code with octodns](https://archive.fosdem.org/2019/schedule/event/dns_octodns/)
- GitHub Blog: [Enabling DNS split authority with octoDNS](https://github.blog/2017-04-27-enabling-split-authority-dns-with-octodns/)


+ 6
- 4
docs/index.md View File

@ -1,10 +1,12 @@
# octodns documentation
```{include} ../README.md
:end-before: "## Table of Contents"
---
end-before: '## Table of Contents'
---
```
---
______________________________________________________________________
## Indices and tables
@ -16,7 +18,7 @@
- [License](infos/license.md)
- [Changelog](infos/changelog.md)
---
______________________________________________________________________
## User documentation
@ -28,7 +30,7 @@
pages/*
```
---
______________________________________________________________________
## Module documentation


+ 5
- 4
docs/pages/auto_arpa.md View File

@ -46,7 +46,7 @@ In order to add `PTR` records for a zone the `auto-arpa` source should be added
- ...
```
The above will add `PTR` records for any `A` records previously seen with IP addresses 10.0.0.*.
The above will add `PTR` records for any `A` records previously seen with IP addresses 10.0.0.\*.
### A Complete Example
@ -98,9 +98,9 @@ fileserver:
#### Auto-generated PTRs
* 101.0.0.10: exxampled.com.
* 102.0.0.10: exxampled.com.
* 103.0.0.10: email.exxampled.com., fileserver.exxampled.com.
- 101.0.0.10: exxampled.com.
- 102.0.0.10: exxampled.com.
- 103.0.0.10: email.exxampled.com., fileserver.exxampled.com.
### Notes
@ -123,4 +123,5 @@ example.com.:
targets:
- ...
```
That would take all the relevant records from example.com and add them as PTR records for the arpa zones in the same place as the 'config' source specifies.

+ 17
- 18
docs/pages/dynamic_records.md View File

@ -106,25 +106,23 @@ flowchart LR
class values valueColor
```
#### Geo Codes
Geo codes consist of one to three parts depending on the scope of the area being targeted. Examples of these look like:
* 'NA-US-KY' - North America, United States, Kentucky
* 'NA-US' - North America, United States
* 'NA' - North America
- 'NA-US-KY' - North America, United States, Kentucky
- 'NA-US' - North America, United States
- 'NA' - North America
The first portion is the continent:
* 'AF': 14, # Continental Africa
* 'AN': 17, # Continental Antarctica
* 'AS': 15, # Continental Asia
* 'EU': 13, # Continental Europe
* 'NA': 11, # Continental North America
* 'OC': 16, # Continental Australia/Oceania
* 'SA': 12, # Continental South America
- 'AF': 14, # Continental Africa
- 'AN': 17, # Continental Antarctica
- 'AS': 15, # Continental Asia
- 'EU': 13, # Continental Europe
- 'NA': 11, # Continental North America
- 'OC': 16, # Continental Australia/Oceania
- 'SA': 12, # Continental South America
The second is the two-letter ISO Country Code https://en.wikipedia.org/wiki/ISO_3166-2 and the third is the ISO Country Code Subdivision as per https://en.wikipedia.org/wiki/ISO_3166-2:US. Change the code at the end for the country you are subdividing. Note that these may not always be supported depending on the providers in use.
@ -160,7 +158,7 @@ Subnet targeting is considered more specific than geo targeting. This means that
### Health Checks
octoDNS will automatically configure the provider to monitor each IP and check for a 200 response for **https://<ip_address>/_dns**.
octoDNS will automatically configure the provider to monitor each IP and check for a 200 response for **https://\<ip_address>/\_dns**.
These checks can be customized via the `healthcheck` configuration options.
@ -178,10 +176,10 @@ test:
...
```
| Key | Description | Default |
|--|--|--|
| Key | Description | Default |
| -- | -- | -- |
| host | FQDN for host header and SNI | - |
| path | path to check | _dns |
| path | path to check | \_dns |
| port | port to check | 443 |
| protocol | HTTP/HTTPS/TCP | HTTPS |
@ -206,7 +204,8 @@ test:
```
Support matrix:
* NS1 and Azure DNS support all 3 flag values
* All other dynamic-capable providers only support the default `obey`
- NS1 and Azure DNS support all 3 flag values
- All other dynamic-capable providers only support the default `obey`
See "Health Check Options" in individual provider documentation for customization support.

+ 16
- 18
docs/pages/geo_records.md View File

@ -28,33 +28,31 @@ test:
value: 111.111.111.5
```
The geo labels breakdown based on:
1.
- 'AF': 14, # Continental Africa
- 'AN': 17, # Continental Antarctica
- 'AS': 15, # Continental Asia
- 'EU': 13, # Continental Europe
- 'NA': 11, # Continental North America
- 'OC': 16, # Continental Australia/Oceania
- 'SA': 12, # Continental South America
1. - 'AF': 14, # Continental Africa
- 'AN': 17, # Continental Antarctica
- 'AS': 15, # Continental Asia
- 'EU': 13, # Continental Europe
- 'NA': 11, # Continental North America
- 'OC': 16, # Continental Australia/Oceania
- 'SA': 12, # Continental South America
2. ISO Country Code https://en.wikipedia.org/wiki/ISO_3166-2
3. ISO Country Code Subdivision as per https://en.wikipedia.org/wiki/ISO_3166-2:US (change the code at the end for the country you are subdividing) * these may not always be supported depending on the provider.
3. ISO Country Code Subdivision as per https://en.wikipedia.org/wiki/ISO_3166-2:US (change the code at the end for the country you are subdividing) * these may not always be supported depending on the provider.
So the example is saying:
- North America - United States - New York: gets served an "A" record of 111.111.111.1
- North America - United States - California: gets served an "A" record of 111.111.111.2
- North America - United States - New York: gets served an "A" record of 111.111.111.1
- North America - United States - California: gets served an "A" record of 111.111.111.2
- Oceania - Australia: Gets served an "A" record of 111.111.111.3
- Europe: gets an "A" record of 111.111.111.4
- Everyone else gets an "A" record of 111.111.111.5
### Health Checks
octoDNS will automatically set up monitors check for a 200 response for **https://<ip_address>/_dns**.
octoDNS will automatically set up monitors check for a 200 response for **https://\<ip_address>/\_dns**.
These checks can be configured by adding a `healthcheck` configuration to the record:
@ -74,17 +72,17 @@ test:
protocol: HTTPS
```
| Key | Description | Default |
|--|--|--|
| Key | Description | Default |
| -- | -- | -- |
| host | FQDN for host header and SNI | - |
| path | path to check | _dns |
| path | path to check | \_dns |
| port | port to check | 443 |
| protocol | HTTP/HTTPS | HTTPS |
#### Route53 Healtch Check Options
| Key | Description | Default |
|--|--|--|
| Key | Description | Default |
| -- | -- | -- |
| measure_latency | Show latency in AWS console | true |
| request_interval | Healthcheck interval [10\|30] seconds | 10 |


+ 4
- 2
docs/pages/quick-start.md View File

@ -1,6 +1,8 @@
# Quick-Start
```{include} ../../README.md
:start-after: "## Getting started"
:end-before: "## Providers"
---
start-after: '## Getting started'
end-before: '## Providers'
---
```

+ 23
- 22
docs/pages/records.md View File

@ -4,24 +4,24 @@
octoDNS supports the following record types:
* `A`
* `AAAA`
* `ALIAS`
* `CAA`
* `CNAME`
* `DNAME`
* `DS`
* `LOC`
* `MX`
* `NAPTR`
* `NS`
* `PTR`
* `SPF`
* `SRV`
* `SSHFP`
* `TLSA`
* `TXT`
* `URLFWD`
- `A`
- `AAAA`
- `ALIAS`
- `CAA`
- `CNAME`
- `DNAME`
- `DS`
- `LOC`
- `MX`
- `NAPTR`
- `NS`
- `PTR`
- `SPF`
- `SRV`
- `SSHFP`
- `TLSA`
- `TXT`
- `URLFWD`
Underlying provider support for each of these varies and some providers have extra requirements or limitations. In cases where a record type is not supported by a provider octoDNS will ignore it there and continue to manage the record elsewhere. For example `SSHFP` is supported by Dyn, but not Route53. If your source data includes an SSHFP record octoDNS will keep it in sync on Dyn, but not consider it when evaluating the state of Route53. The best way to find out what types are supported by a provider is to look for its `supports` method. If that method exists the logic will drive which records are supported and which are ignored. If the provider does not implement the method it will fall back to `BaseProvider.supports` which indicates full support.
@ -29,8 +29,8 @@ Adding new record types to octoDNS is relatively straightforward, but will requi
## Advanced Record Support (GeoDNS, Weighting)
* [Dynamic Records](/docs/dynamic_records.md) - the preferred method for configuring geo-location, weights, and healthcheck based fallback between pools of services.
* [Geo Records](/docs/geo_records.md) - the original implementation of geo-location based records, now superseded by Dynamic Records (above)
- [Dynamic Records](/docs/dynamic_records.md) - the preferred method for configuring geo-location, weights, and healthcheck based fallback between pools of services.
- [Geo Records](/docs/geo_records.md) - the original implementation of geo-location based records, now superseded by Dynamic Records (above)
## Config (`YamlProvider`)
@ -96,6 +96,7 @@ octoDNS is fairly strict in terms of standards compliance and is opinionated in
It's best to think of the `lenient` flag as "I know what I'm doing and accept any problems I run across." The main reason being is that some providers may allow the non-compliant setup and others may not. The behavior of the non-compliant records may even vary from one provider to another. Caveat emptor.
#### Record priority for AutoArpa
When multiple A or AAAA records point to the same IP, it is possible to set an optional priority on each record. The records with the lowest priority will have the highest preference when being processed by AutoArpa. The AutoArpa provider will create PTR records in order of preference, up to a set limit defined by the `max_auto_arpa` option in the provider configuration.
```yaml
@ -143,12 +144,12 @@ If left unconfigured, suitable defaults take over instead. In the below example,
the Dyn provider is configured with limits of 40% on both update and
delete operations over all the records present.
````yaml
```yaml
dyn:
class: octodns.provider.dyn.DynProvider
update_pcent_threshold: 0.4
delete_pcent_threshold: 0.4
````
```
Additionally, thresholds can be configured at the zone level. Zone thresholds
take precedence over any provider default or explicit configuration. Zone


+ 6
- 6
examples/README.md View File

@ -7,10 +7,10 @@ ideas for other subjects to cover.
### Examples
* Getting started with a [basic octoDNS configuration](basic/) - new to octoDNS
- Getting started with a [basic octoDNS configuration](basic/) - new to octoDNS
this is the place to start. It'll walk you through the main pieces of DNS IaC
with octoDNS including the process of planning and applying changes.
* [Migrating to octoDNS](migrating-to-octodns/) - have an existing DNS setup
- [Migrating to octoDNS](migrating-to-octodns/) - have an existing DNS setup
you'd like to bring into octoDNS check this example out right after
[basic](basic/). It'll walk you through the steps of using `octodns-dump` to
pull the existing data out of your provider into matching YAML config files on
@ -29,7 +29,7 @@ local PowerDNS instance the following instructions below should get it up and
running.
1. If you haven't already [install docker compose](https://docs.docker.com/compose/install/)
1. If you don't already have a copy of octoDNS checked out run `git clone https://github.com/octodns/octodns.git`
1. In a seperate terminal window or tab
1. cd into the examples directory `cd octodns/examples`
1. Run docker-compose up `docker-compose up`, this will start up MySQL and PowerDNS running them in the foreground with their logs printing to the terminal
2. If you don't already have a copy of octoDNS checked out run `git clone https://github.com/octodns/octodns.git`
3. In a seperate terminal window or tab
4. cd into the examples directory `cd octodns/examples`
5. Run docker-compose up `docker-compose up`, this will start up MySQL and PowerDNS running them in the foreground with their logs printing to the terminal

+ 5
- 5
examples/basic/README.md View File

@ -6,9 +6,9 @@ might see for managing a set of personal domains or a small business.
Most of the actual documentation for this example is found in the comments in
the YAML configuration files.
* [config/octodns.yaml](config/octodns.yaml)
* [config/my-domain.com.yaml](config/my-domain.com.yaml)
* [config/unused-domain.io.yaml](config/unused-domain.io.yaml)
- [config/octodns.yaml](config/octodns.yaml)
- [config/my-domain.com.yaml](config/my-domain.com.yaml)
- [config/unused-domain.io.yaml](config/unused-domain.io.yaml)
From here on this README focuses on the general process of running octoDNS.
@ -250,5 +250,5 @@ No changes were planned
## What's Next
* Check out [migrating to octoDNS](../migrating-to-octodns) for an example of how to create zone configuration YAML files from your existing provider's configuration
* For a complete list check out the [Examples Directory](../)
- Check out [migrating to octoDNS](../migrating-to-octodns) for an example of how to create zone configuration YAML files from your existing provider's configuration
- For a complete list check out the [Examples Directory](../)

+ 6
- 6
examples/migrating-to-octodns/README.md View File

@ -6,10 +6,10 @@ straightforward process and can generally be completed in minutes.
Some relevant documentation for this example is in comments in the YAML
configuration files.
* [config/octodns.yaml](config/octodns.yaml)
* [populate/octodns.yaml](populate/octodns.yaml)
* [populate/my-dumpable.com.yaml](populate/my-dumpable.com.yaml)
* [populate/unused-dumpable.com.yaml](populate/unused-dumpable.com.yaml)
- [config/octodns.yaml](config/octodns.yaml)
- [populate/octodns.yaml](populate/octodns.yaml)
- [populate/my-dumpable.com.yaml](populate/my-dumpable.com.yaml)
- [populate/unused-dumpable.com.yaml](populate/unused-dumpable.com.yaml)
From here on this README focuses on the process of using `octodns-dump` to
import your existing DNS data into octoDNS.
@ -267,5 +267,5 @@ which is beyond the scope of this example.
So now you can commit your config and start managing you DNS with octoDNS rather
than clicking buttons in UIs or using whatever you previous had used.
* Check out [octoDNS basic example](../basic) for an example of how to create zone configuration YAML files from your existing provider's configuration
* For a complete list check out the [Examples Directory](../)
- Check out [octoDNS basic example](../basic) for an example of how to create zone configuration YAML files from your existing provider's configuration
- For a complete list check out the [Examples Directory](../)

+ 6
- 3
script/format View File

@ -2,9 +2,12 @@
set -e
SOURCES="$(find *.py octodns tests -name '*.py') $(grep --files-with-matches '^#!.*python' script/*)"
SOURCES_PYTHON="$(find *.py octodns tests -name '*.py') $(grep --files-with-matches '^#!.*python' script/*)"
SOURCE_MARKDOWN="$(find *.md docs examples -name '*.md')"
. env/bin/activate
isort "$@" $SOURCES
black "$@" $SOURCES
isort "$@" $SOURCES_PYTHON
black "$@" $SOURCES_PYTHON
mdformat --compact-tables --number $SOURCE_MARKDOWN

+ 2
- 2
script/lint View File

@ -15,6 +15,6 @@ if [ ! -f "$ACTIVATE" ]; then
fi
. "$ACTIVATE"
SOURCES="$(find *.py octodns tests -name '*.py') $(grep --files-with-matches '^#!.*python' script/*)"
SOURCES_PYTHON="$(find *.py octodns tests -name '*.py') $(grep --files-with-matches '^#!.*python' script/*)"
pyflakes $SOURCES
pyflakes $SOURCES_PYTHON

+ 1
- 0
setup.py View File

@ -74,6 +74,7 @@ setup(
'furo>=2024.8.6',
'myst-parser>=4.0.1',
'sphinx-copybutton>=0.5.2',
'mdformat-myst>=0.2.1',
)
},
install_requires=(


Loading…
Cancel
Save