This repository demonstrates how to use OctoDNS to manage DNS records.
- Clone the repository to your local machine:
git clone https://github.com/ministryofjustice/operations-engineering-octodns-poc.git
- Navigate to the cloned repository:
cd operations-engineering-octodns-poc
- Create a new virtual environment and activate it:
python3 -m venv env
source env/bin/activate
- Install OctoDNS:
pip install octodns
The DNS configuration is defined in the config.yaml file. Here's an example of what it might look like:
providers:
config:
class: octodns.provider.yaml.YamlProvider
directory: ./config # directory where your YAML files are located
default_ttl: 300 # default TTL for records
zones:
example.com.:
sources:
- config
targets:
- config
To sync your DNS configuration, run the following command:
octodns-sync --config-file=./config.yaml
This repository uses GitHub Actions to automatically sync the DNS configuration whenever changes are pushed to the main branch. See the .github/workflows/main.yml file for the workflow configuration.
This project is licensed under the MIT License - see the LICENSE file for details.