Weeknotes: 21st October 2019
This week I sorted out our environment variables.
Just a short one this week, since I’m again doing it late. My notable piece of work was completely rewriting how we handled environment variables. We now use far less variables, they’re clearer and they’re only set where they’re needed.
This started off as a small task, where I just wanted to remove a few variables I knew we weren’t using. But with a little pushing it turned into a pretty major rewrite, addressing several of the issues we’ve identified over the past few months.
Amongst the changes are:
- removing several variables which simply aren’t being used
- collapsing some variables together. For example, rather than having an individual variable for each internal email address, we just have one which is a flag of whether to send internal emails or not.
- implementing sensible defaults. For example, Xdebug only needs to be enabled locally so it defaults to off. This means our servers don’t need to explicit confirm they don’t want it enabled.
- removing unnecessary prefixes. Lots of our variables were prefixed “API_” of “FRONT_” to indicate which container they apply to, but this is obvious from context, particularly now that we use Terraform.
This effective restart on environment variables will make our configuration and our debugging much clearer.
I hope it will also allow developers to be bolder when making future changes, because we won’t be prompted to worry about services that aren’t being used. For example, we were previously setting “OAUTH” environment variables which could make developers incorrectly assume the service used OAuth (perhaps sadly, it does not).
- Released the organisations code to production (this ticket has taken about six weeks to get released, so this is a big milestone!)
- Tidied up the remaining organisations tickets
- Rewrote our environment variables, removing about a dozen of them in the process
- Redesigned the lodging checklist
- Started implementing the new full-review checklist