Configuration Management refers to the process by which all artifacts relevant to your project, and the relationships between them, are stored, retrieved, uniquely identified and modified.
As a good configuration management strategy, we can implement the following things.
We need to consider the following things for configuration management.
The aim of a version control system:
Every single artifact related to the creation of your application should be under version control.
It is also important to store all the information required to re-create the testing and production environments that your application runs on.
It is even useful to keep the configuration files for the development team‘s development environments in version control so that everyone on the team can share the same setting.
Many projects may store binary images of their application servers, compilers, virtual machines and other parts of their toolchain in version control, this is fantastically useful.
Some projects may store the output of the application to version control, it is not recommended, as we may run deployment pipeline many times, for each time, it will create the binary files, if we store all the binary files, it does not make sense.
As check in will trigger deployment pipeline, so we need to check in on a reasonable frequent regular basis.
We need to run commit test before we perform check in.
We do not recommend branch and trunk strategy, reason as:
The most important reason to write description commit messages it that when the build breaks, you will know who broke the build and why.
When we try to debug a complex problem under a tight deadline, the scenario as below.
It is a dispirited experience.
For a meaningful commit description, it can includes several paragraph.
External libraries usually come in binary form, and we can download it from network.
Also we can maintain a copy of the libraries locally.
Whether you keep external libraries in version control or not involves some trade-offs, it makes much easier to correlate versions of your software with the versions of the libraries that were used to build them. However it makes version control repositories bigger and check-outs longer.
It is good practice to split all but the smallest applications into components.
Typically you would start off with a monolithic build creating binaries or an installer for your entire application in one step.
It is important to have binary dependencies between your pipelines rather than source dependencies.
Some CI servers do a pretty good job of managing dependencies, but it makes harder to reproduce the entire end-to-end environment.
We should treat application configuration in the same way as you treat the source code.
The desire to achieve flexibility may lead to common antipattern of "ultimate configurability".
Configuration information is somehow less risky to change than source code, and most configuration information is free-form and untested. so we need to store it in version control.
When we develop a new application, it is almost always better to focus on delivering the high-value functionality with little configuration and then add configuration options later when necessary.
Configuration information can be injected into your application at several points in your build, deploy, test and release process.
Generally we consider it bad practice to inject configuration information at build or packaging time.
It is usually important to be able to configure your application at deployment time so that you can tell it where the services it depend upon, i.e. the database, message queue.
It is important that we should try and supply all configuration information for all the applications and environments in your organization through the same mechanism, so that we can treat every environment in the same way.
We need to consider the following questions.
There are some obvious choices for where to store your application configuration.
It is important to keep the actual configuration information specific to each of your application‘s testing and production environments in a repository separate from your source code. usually the separation is particularly relevant for security-related configuration.
Please note do not check any confidence information such as password into source control or hard-code them in the application.
Each configuration setting can be modeled as a tuple, it contains the following three things.
When we consider application configuration, we need to think about the following things.
How to test system configuration?
We need to keep a catalogue of all the configuration options that each of your application has, where they are stored, what their life cycle is, and how they can be changed.
It is especially important to have access to the configuration on a real-time basis when your applications depend on each other and deployments must be orchestrated.
Configuration management of every application should be planned as part of project inception.
Every application depends on hardware, software, infrastructure and external systems in order to work.
The worst approach to managing configuration information is to deal with it on an ad-hoc basis.
The problem of managing environment as below.
The key to managing environments is to make their creation a fully automated process.
An environment that is in a properly deployed state is known as a baseline in configuration management terminology.
You should treat the environment the same way as you treat your source code.
We can use Puppet or CfEngine to manage the environment.
It is essential to be able to manage the process of making changes to your environment, it should not be possible for anybody to make a change to it without going through your organization‘s change management process.
《Continuous Delivery》 Notes 2: Configuration Management,布布扣,bubuko.com
《Continuous Delivery》 Notes 2: Configuration Management
原文:http://www.cnblogs.com/wing011203/p/3840595.html