-
Notifications
You must be signed in to change notification settings - Fork 12
Overview: Step by step DNS migration
Here is the full recipe for migrating and checking DNS builds.
-
Run
bin/recreate_database.sh
to create the Cyder database (the old database will be overwritten, if it exists). -
Run
manage.py maintain_migrate -qt
. Save the output tostdout
andstderr
in a log file for future reference. This can take several hours.
NOTE: You only need to do the above steps once for both DNS and DHCP. Don't do it for DNS and then do it again for DHCP.
-
Run
manage.py tiny_migrate dns-header
andmanage.py tiny_migrate dns-footer
. These two files can be retrieved from the nameserver. -
Create the
dns_stage
anddns_prod
directories specified in thesettings.py
file. Create a Git repository indns_prod
.dns_prod
is where the config files are saved for the local BIND server. This repo needs to track the remote branch where the actual config files for the production BIND server are to be stored. This way, when you instructbindbuild
topush
, the changes will get pushed upstream. -
Run
manage.py bindbuild -pfC
.-p
pushes the changes,-f
and-C
areforce-build
andno-sanity-check
, respectively, and should only be necessary on the first build. -
Reload your BIND nameserver. It should load the files created in
dns_prod
. -
Run
bin/diffaxfr.sh
to compare the zone transfers of the local nameserver and the currently authoritative nameserver. The addresses of the nameservers and the zones compared can be set by changing the appropriate variables indiffaxfr.sh
:ns1
,ns1_target
,ns2
,ns2_target
, andzones
. The AXFR results are stored inbuild_dir/ns*_all_outfile.axfr.sorted
. -
There is a tool that can be used to automate the verification of builds based on migration logs to determine why certain differences exist. You will need a diff of the AXFR results (call it
axfr.diff
) and your migration logs from step 2 (call itmigration.log
). Runbin/dnsdiffchecker.py axfr.diff migration.log
.