Other continuous delivery related articles: "Continuous delivery" series of articles Directory
Chapter II Configuration Management 1. Introduction
Definition: Configuration management refers to a process through which all artifacts related to the project, and the relationships between them, are uniquely defined, stored, retrieved, and modified
2. Use version Control 2.1. Version control of all content
At a minimum, all the information necessary to recreate the installation files and installation environment for the application is saved in the version control Library, including
- Code
- Document
- Tools
- Information about building your environment
Continuous integration, automated testing, one-click Deployment is premised on all project-related content in the version control repository
2.2. Frequently submit code to trunk
Two Best practices
- Run automated tests before committing
- Incremental introduction of changes, a little bit to commit
2.3. Commit comments with significant meaning
Includes the following three sections
- Summary of the description
- Description of Details
- Links to related issues or bugs
3. Dependency Management 3.1. External library file Management 3.2. Component Management
More on dependency management will be discussed in Chapter 13th, component and dependency management
4. Software Configuration Management 4.1. Configuration and flexibility
As with performance tuning, don't prematurely optimize without encountering performance problems, and the same goes for configuration, unless you really need to add complexity
4.2. Classification of configurations
We can introduce configurations at any stage of the build, deploy, test and release process
It is not recommended to introduce a configuration when building a package, and you should ensure that all packages are the same before deployment
4.3. Application Configuration Management
- Get configuration information
Let all applications get the configuration information they need through a central service system (relational database, Ldap,web service, etc.)
Escape tool
- Modeling a configuration item
One configuration item depends on three aspects
- Application
- Version of the application
Operating environment (development, testing, production)
- Test of System Configuration
Ensure that external services are turned on
- Automated smoke testing of features related to configuration items
4.4. Cross-application configuration management
Configuration management for each application should include an issue when the project starts
4.5. Principles for managing configuration information
- Determine the timing of the injection configuration
- Configuration items and configuration values are stored separately
- Always automate get configuration
- Everyone should be able to easily get the current application current version of the configuration information in the current environment
- Naming is easy to understand
- Make sure that the configuration information is modified in a modular way without affecting the other side
- Do not define configuration items repeatedly
- Minimized configuration
- Avoid excessive design
- Ensure that the configuration operation is also tested
5. Environmental management
The key is to fully automate the creation of a set of environments, making it much easier to create an environment than to repair a damaged environment
Why the ability to reproduce the environment
- Avoid loss of knowledge resulting from staff turnover
- Repair time is often greater than the time to rebuild the environment
- can maintain the unity of each environment
The environment configuration information to consider is as follows
- Operating system (version, patch level, and configuration settings)
- Third-party Packages (version, configuration)
- Network topology
- Dependent external Services (version, configuration)
- Existing data and other relevant information
In order to comply with our management strategy, the following questions should be considered when evaluating third-party products or services
- Is it possible to automatically deploy
- Whether the configuration can be versioned
- Adapt to our automated deployment strategy
5.1. Environmental management Tools
Puppet,cfengine, virtualization technology, etc.
More discussion in the 11th chapter on infrastructure and environmental management
5.2. Change Process Management
Strict control of the production environment, without the formal change management process within the organization, no one shall modify it
6. Summary
Configuration management is the foundation of all automation
Continuous Delivery II--Configuration management