Managing my DNS through DNSControl
Setting it up
Setting up DNSControl is pretty straightforward. Once you've installed DNSControl, you need to create a dnsconfig.js file and create a new variable for each provider. Then, modify the D() function with the records for each domain. After that you need to go your provider, which for me was Cloudflare and NS1, and generate a new API key to manage your DNS records. Next, create a new folder or git repo for your DNSControl files, and create a creds.json file and paste in your credentials that you generated earlier. After that, enter Terminal and go to the folder where your DNSControl files are located and run dnscontrol preview. This will query the records on each provider and compare it to the setup in your configuration file. You can use this to double check that you aren't missing any domains. Finally, you can run dnscontrol push and DNSControl will do it's magic and push the records to each of the providers.
My first open source contribution
While I was setting up DNSControl, one issue I ran into was that ALIAS records were not supported on DNSControl for one of my providers, NS1. I knew that NS1 officially supported ALIAS records, so I opened an issue in the DNSControl repository about adding support for ALIAS for NS1 in DNSControl. The maintainers for DNSControl were super friendly and helpful, and walked me through running integration tests with NS1 and how to test each different record type. When I tested PTR, NAPTR, ALIAS, and TXTMulti records, PTR and TXTMulti worked out of the box, but NAPTR and ALIAS needed work. I wasn't too interested in NAPTR, so I skipped that and went to trying to fix the ALIAS record.
After I got some more info on how the program was set up, I went into the NS1 provider file and found where the code for records and special cases was handled. Normally, for most record types in DNSControl, there's a central class that handles formatting the records, but some records for some providers require special cases. ALIAS for NS1 was one of these, so using the SRV record as a template, I added support for ALIAS records. Once I submitted the pull requests, it got approved and I had my first PR!
A few days later, I realized that for the TXTMulti records, NS1 technically supported them but they merged them into 1 string, so every time DNSControl ran it would try updating the record again. There was also another preexisting issue with MX records, so I had to add another edge cases in the provider config to update that. After that, I was good to go!
Overall, DNSControl is a super neat tool that makes managing DNS records a lot easier and more intuitive, and it was a great first project for me to contribute to!