Frank Zinner bio photo

Frank Zinner

I'm a passionated senior software developer ...

Twitter Facebook LinkedIn Github Xing

Principles of Managing Application Configuration1:

  • Consider where in your applications lifecycle it makes sense to inject a particular piece of configuration (assembly/packaging/deployment/installation).

  • Keep the available configuration options for your application in the same repository as its source code, but keep the values somewhere else, Configuration settings have a lifecycle completely different from that of code, while passwords and other sensitive information should not be checked in to version control at all.

  • Configuration should always be performed by automated processes using values taken from your configuration repository, so that you can always identify the configuration of every application in every environment.

  • Your configuration system should be able to provide different values to your application (including its packaging, installation, and deployment scripts) based on the application, its version, and the environment it is being deployed into. It should be easy for anyone to see what configuration options are available for a particular version of an application across all environments it will be deployed into.

  • Use clear naming conventions for your configuration options.

  • Ensure that your configuration information is modular and encapsulated so that changes in one place dont have knock-on effects for others.

  • Use the DRY principle. Define the elements of your configuration so that each concept has only one representation in the set of configuration information.

  • Be minimalist (keep information as simple and as focused as possible).

  • Avoid overengineering the configuration system. Keep it simple as you can.

  • Ensure that you have tests for your configuration that are run at deployment or installation time. Check that services your application depends upon are available, and use smoke tests to assert that any functionality depending on your configuration settings works as it should.

  1. Excerpt from chapter 2, page 47ff. of Continuous delivery, [Humble, Jez], Addison-Wesley 2011