[Proposal] Make application configuration easier

David Humphrey david.humphrey at senecacollege.ca
Mon Jun 2 15:41:06 PDT 2014

I think this is a good move.  I left one comment in the PR.


On 14-06-02 5:38 PM, Jon Buckley wrote:
> Here's something that really gets my goat: app configuration
> 1) When you install an application initially, you need to copy the config file from the defaults to one that you can use with `cp env.dist .env`.
> 2) When you pull down updates from git, and something doesn't work, you need to copy the config file from defaults again which blows away your changes, or you need to pick through the change log and apply the changes manually.
> 3) Configuration only via process env (e.g. heroku) is tedious because there are so many env variables.
> 4) When you make a change to the staging or production configs, there is absolutely no visibility into who changed what, when, or why. This has broken services for us more than once.
> 5) If you're doing a deploy that requires a config change at the same time as a code change, you'll need JP or I to co-ordinate that.
> Therefore a better application configuration solution should:
> 1) Work out of the box
> 2) Work when pulling down updates
> 3) Work with process.env
> 4) Be version controlled, preferably using git
> 5) Doesn't require devops to co-ordinate a simultaneous code + config deploy
> My preferred solution is the following:
> - Modify habitat to support loading multiple environment files in a specific order: https://github.com/brianloveswords/habitat/pull/11
> - Add multiple configuration files to each applications repository - staging.env, production.env, defaults.env
> - Code application to support loading from these new locations in order:
>    - process environment
>    - .env
>    - NODE_ENV.env (so staging.env or production.env)
>    - defaults.env
> - Document this workflow in each app as "MAINTENANCE.md" or something similar.
> The new workflow when landing a ticket that changes the application configuration somehow would be to also make changes to staging.env and production.env in the same patch. For secrets that cannot be made public we will continue our current process of putting secrets into a config file on S3.
> Thoughts?
> _______________________________________________
> Webmaker-dev mailing list
> Webmaker-dev at mozilla.org
> https://mail.mozilla.org/listinfo/webmaker-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/webmaker-dev/attachments/20140602/8a7333ad/attachment-0001.html>

More information about the Webmaker-dev mailing list