support adding basic records #11

Closed
adriancole opened this Issue Feb 19, 2013 · 8 comments

Comments

Projects
None yet
3 participants
Contributor

adriancole commented Feb 19, 2013

Routine DNS work in netflix relates to adding records with the same ttl and simple rdata. For example, most of the time, we are adding A, CNAME, or AAAA, or NS values with TTL 3600, and then checking with dig to see if the updates occurred.

Let's make it very easy to add simple records as this can get early feedback on denominator.

Tasks:

  • implement ResourceRecordSetApi.add(ResourceRecordSetApi<?> in) (issue #36)
  • implement ResourceRecordSetApi.remove(ResourceRecordSetApi<?> in)(issue #36)
  • implement add/remove record for mock (issue #36)
  • implement add/remove record for ultradns (issue #34)
  • implement add/remove record for route53 (issue #33)
  • implement add/remove record for dynect (issue #35)
  • add record using kwargs. ex. denominator record -z foo.com add --name hostname.foo.com --type A --rdata 1.2.3.4

adriancole was assigned Feb 19, 2013

Contributor

adriancole commented Feb 27, 2013

I've confirmation that supporting list and adds of these records represents minimum needed functionality

Contributor

adriancole commented Mar 1, 2013

Here's suggested form in the CLI based on Andrew Braham's advice:

./denominator [zone name] [function] [resource record parameters] [type] [resource record parameters]

zone name - name
function - add, delete, update record
type - A records, CNAME
resource record parameters - foo.com 
resource record parameters - 1.2.3.4

One suggestion would be keeping it in similar bind format (below) and then perhaps adding [file option] for bulk adds. That way you could just ingest a normally formated bind file. You may also want to add a TTL field. Although accepting the default TTL would seem reasonable. Here's one possible command format:

./denominator [zone name] [function] [resource record parameters|file]

single record add
./denominator --zone foo.com --record add hostname.foo.com 3600 IN A 1.2.3.4

bulk record add
./denominator --zone foo.com --record add --file cnames.txt

For the less savvy, you may want to re-order the syntax to align with a typical work flow in Ultra//Dyn. 
1. what zone => what action => what record type => records details

./denominator [zone name] [function] ([record type] [record parameters] | [file])
./denominator --zone foo.com --record add --type A --name hostname.foo.com 1.2.3.4 --ttl 3600
./denominator --zone foo.com --record add --type CNAME --name cname.foo.com hostname.foo.com --ttl 3600

Or maybe offer both formats. The former being a classic mode for those folks that are used to mangling DNS.

The above comment makes lot of sense. I would add the update option also.

jdamick was assigned Mar 2, 2013

Contributor

adriancole commented Mar 2, 2013

@jdamick you mind handling one of the tasks?

Contributor

jdamick commented Mar 3, 2013

sure

Contributor

adriancole commented Mar 4, 2013

elaborated subtasks

Contributor

adriancole commented Mar 5, 2013

route53 is in per issue #33

adriancole was assigned Mar 8, 2013

adriancole closed this Mar 9, 2013

Contributor

adriancole commented Aug 13, 2013

oops. the zone file syntax work bumped to here: #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment