As a developer
I want a tool to perform DNS record swap
So that rapidly and safely switch DNS record between Current Production and Hot Stand-by infrastructures
Acceptance criteria
Given Upstream project's staging is available at staging.gigadb.org
and the UpstreamAlt project's staging is available at alt-staging.gigadb.host
When I run the DNS swap tool as domainswap --apply
Then UpstreamAlt project's staging is available at staging.gigadb.org
And Upstream project's staging is available at alt-staging.gigadb.host
Given Upstream project's staging is available at alt-staging.gigadb.host
and the UpstreamAlt project's staging is available at staging.gigadb.org
When I run the DNS swap tool as domainswap --apply
Then Upstream project's staging is available at staging.gigadb.org
And UpstreamAlt project 's staging is available at alt-staging.gigadb.host
Given Upstream project 's live is available at gigadb.org
and the UpstreamAlt project's live is available at alt-live.gigadb.host
When I run the DNS swap tool as domainswap --apply
Then Upstream project's live is available at alt-live.gigadb.host
And UpstreamAlt project's live is available at gigadb.org
Given Upstream project's live is available at alt-live.gigadb.host
and the UpstreamAlt project's live is available at gigadb.org
When I run the DNS swap tool as domainswap --apply
Then Upstream project's live is available at gigadb.org
And UpstreamAlt project's live is available at alt-live.gigadb.host
Given Upstream project 's live is available at files.gigadb.org
and the UpstreamAlt project's live is available at files.alt-live.gigadb.host
When I run the DNS swap tool as domainswap --apply
Then Upstream project's live is available at files.alt-live.gigadb.host
And UpstreamAlt project's live is available at files.gigadb.org
Given Upstream project's live is available at files.alt-live.gigadb.host
and the UpstreamAlt project's live is available at files.gigadb.org
When I run the DNS swap tool as domainswap --apply
Then Upstream project's live is available at files.gigadb.org
And UpstreamAlt project's live is available at files.alt-live.gigadb.host
Given Upstream project 's live is available at gigadb.org
and the UpstreamAlt project's live is available at alt-live.gigadb.host
When I run the DNS swap tool as domainswap --plan
Then I should see the list of records currently assocated with each infrastructure
and how will that change if we are to apply the changes
A possible approach is to use Bind Zone files, and then use Cloudflare import/export API:
https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/
The problem with using exclusively that approach is that a zone file contains all domains for both staging and live and need to do the switch for specific environment.
The export of zone file is still useful for ensuring we have a full list and a backup of all the records.
Tasks:
[ ] Write a domainswap script that will display usage when called without parameters
[ ] Add support for a --plan parameter that show list of DNS records for each infrastructure and how it will changes if applied
[ ] Add --apply parameter to actually change the DNS records to target infrastructure (CurrentProduction or HotStandBy)
[ ] Automatically Export DNS records used by Upstream and Upstream alternative as Zone files as backup before applying changes
Product Backlog Item Ready Checklist
[ ] Business value is clearly articulated
[ ] Item is understood enough by the IT team so it can make an informed decision as to whether it can complete this item
[ ] Dependencies are identified and no external dependencies would block this item from being completed
[ ] At the time of the scheduled sprint, the IT team has the appropriate composition to complete this item
[ ] This item is estimated and small enough to comfortably be completed in one sprint
[ ] Acceptance criteria are clear and testable
[ ] Performance criteria, if any, are defined and testable
[ ] The Scrum team understands how to demonstrate this item at the sprint review
Product Backlog Item Done Checklist
[ ] Item(s) in increment pass all Acceptance Criteria
[ ] Code is refactored to best practices and coding standards
[ ] Documentation is updated as needed
[ ] Data security has not been compromised (with particular reference to the personal information we hold in GigaDB)
[ ] No deviation from the team technology stack and software architecture has been introduced
[ ] The product is in a releasable state (i.e. the increment has not broken anything)
User story
Acceptance criteria
Additional Info
Cloudflare API docs will be useful: https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/#create-dns-records
A possible approach is to use Bind Zone files, and then use Cloudflare import/export API: https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ The problem with using exclusively that approach is that a zone file contains all domains for both staging and live and need to do the switch for specific environment. The export of zone file is still useful for ensuring we have a full list and a backup of all the records.
Tasks:
domainswap
script that will display usage when called without parameters--plan
parameter that show list of DNS records for each infrastructure and how it will changes if applied--apply
parameter to actually change the DNS records to target infrastructure (CurrentProduction or HotStandBy)Product Backlog Item Ready Checklist
Product Backlog Item Done Checklist