Migrate zone from Dyn DNS
Migrate a zone from DynDNS
We would also make changes and deploy these zones in the future using govuk-dns.
Export the zonefile from DynDNS
- Log into DynDNS
- Find the zone you wish to export and click “manage”
- Go to the “Zone Reports” tab
- Click the download link on “Zone File” and it should start the download
Convert the zonefile to YAML
- Get the
git clone https://github.com/alphagov/govuk-dns
- Get the
git clone https://github.com/alphagov/govuk-dns-config
- Move into the
govuk-dnsrepository and run the following to convert to YAML:
cd govuk-dns bundle install export ZONE=zone.example.com OUTPUTFILE=../govuk-dns-config/$ZONE.yaml ZONEFILE=/path/to/zonefile bundle exec rake import_bind
This should create a the zonefile in YAML configuration.
Validate the YAML by running:
ZONEFILE=../govuk-dns-config/$ZONE.yaml bundle exec rake validate_yaml
Move into the
govuk-dns-configrepository and commit to git.
Create zone in Amazon Route 53 and/or Google Cloud DNS
Amazon Route 53
- Login in to the AWS Management Console.
- Click “Services” and select “Route 53”.
- On the left, click “Hosted Zones”.
- Click “Create Hosted Zone” and fill in the zone name.
- When created, make a note of the “Hosted Zone ID”.
Google Cloud DNS
- Login to the Google Cloud Platform Management Console.
- In the search bar at the top, search for “Cloud DNS” and select it.
- Select “Create Zone”, fill in a zone name and DNS name, and click “Create”.
- Make a note of the “zone name”.
Update deployment configuration
Add the following to the top of the YAML zonefile:
deployment: aws: zone_id: <zone id> gcp: zone_name: <zone name>
Enter the values that were noted during the zone creation step.
If the zone is new, you may need to add it to the list of zones that we manage.
Edit encrypted hieradata in govuk-secrets, and add the zone
to the list under the parameter
Ensure that Puppet is deployed to update the Jenkins job.
Deploy the zone
Go to the Deploy DNS job in Jenkins.
Select the zone you wish to deploy, enter your AWS access details, and choose “plan” as the action, using the provider you wish to deploy to.
When you are happy with the output, rebuild the job, but this time selecting “apply”.
Updating nameserver records
We do not manage root nameserver records.
These are provided automatically by the DNS provider. If you are serving a zone from dual providers, you must manually add the nameserver records for the other provider.
For example, in Amazon Route 53, you need to add the Google Cloud DNS nameservers, and vice versa.
Updating the registrar