A better way to handle settings files

October 23rd, 2009

At work, we tend to have several people working on a project at once. When its time to deploy, we deploy to several servers at once. One pain point that we’ve come across is the ability to manage all of the settings files for these servers. My fix for it is here.

The main piece of this is centered around the HOSTMAP dict. It maps a role to a hostname. Roles as we currently have them defined are based on their locations. Staging servers have a specific “recipe”, local development has a different one. I could also see these being used for features as well. We tend not to go through the hassle of setting up SOLR for the client-side developers. For that, we could set up a ‘haystack_enabled’ role and include the hostnames of the folks w/ SOLR installed.

One decision here was whether to list the roles as keys or the hostnames as keys. I thought it was more important to see who has a particular configuration rather than what configuration a single person has.


Comments are disabled. If that bothers you, please contact me on twitter at @justinlilly and let me know.