CS 530 - Software Engineering

Configuration Management

Reference: Sommerville, Software Engineering, 10 ed., Chapter 25

The big picture

Software systems are constantly changing during development and use. Configuration management (CM) is concerned with the policies, processes and tools for managing changing software systems. You need CM because it is easy to lose track of what changes and component versions have been incorporated into each system version. CM is essential for team projects to control changes made by different developers.

Configuration management activities

Agile development, where components and systems are changed several times per day, is impossible without using CM tools. The definitive versions of components are held in a shared project repository and developers copy these into their own workspace. They make changes to the code then use system building tools to create a new system on their own computer for testing. Once they are happy with the changes made, they return the modified components to the project repository.

A development phase is where the development team is responsible for managing the software configuration and new functionality is being added to the software. A system testing phase is where a version of the system is released internally for testing. No new system functionality is added. Changes made are bug fixes, performance improvements and security vulnerability repairs. A release phase where the software is released to customers for use. New versions of the released system are developed to repair bugs and vulnerabilities and to include new features.

For large systems, there is never just one 'working' version of a system. There are always several versions of the system at different stages of development. There may be several teams involved in the development of different system versions.

Version management

Version management (VM) is the process of keeping track of different versions of software components or configuration items and the systems in which these components are used. It also involves ensuring that changes made by different developers to these versions do not interfere with each other. Therefore version management can be thought of as the process of managing codelines and baselines.

A codeline is a sequence of versions of source code with later versions in the sequence derived from earlier versions. Codelines normally apply to components of systems so that there are different versions of each component. A baseline is a definition of a specific system. The baseline therefore specifies the component versions that are included in the system plus a specification of the libraries used, configuration files, etc.

Baselines may be specified using a configuration language, which allows you to define what components are included in a version of a particular system. Baselines are important because you often have to recreate a specific version of a complete system. For example, a product line may be instantiated so that there are individual system versions for different customers. You may have to recreate the version delivered to a specific customer if, for example, that customer reports bugs in their system that have to be repaired.

Version control (VC) systems identify, store and control access to the different versions of components. There are two types of modern version control system. Centralized systems, where there is a single master repository that maintains all versions of the software components that are being developed. Subversion is a widely used example of a centralized VC system. Distributed systems, where multiple versions of the component repository exist at the same time. Git is a widely-used example of a distributed VC system.

Key features of version control systems:

To support independent development without interference, version control systems use the concept of a project repository and a private workspace. The project repository maintains the 'master' version of all components. It is used to create baselines for system building. When modifying components, developers copy (check-out) these from the repository into their workspace and work on these copies. When they have finished their changes, the changed components are returned (checked-in) to the repository. Developers check out components or directories of components from the project repository into their private workspace and work on these copies in their private workspace. When their changes are complete, they check-in the components back to the repository. If several people are working on a component at the same time, each check it out from the repository. If a component has been checked out, the VC system warns other users wanting to check out that component that it has been checked out by someone else.

A 'master' repository is created on a server that maintains the code produced by the development team. Instead of checking out the files that they need, a developer creates a clone of the project repository that is downloaded and installed on their computer. Developers work on the files required and maintain the new versions on their private repository on their own computer. When changes are done, they 'commit' these changes and update their private server repository. They may then 'push' these changes to the project repository.

Benefits of distributed version control:

Distributed version control is essential for open source development. Several people may be working simultaneously on the same system without any central coordination. As well as a private repository on their own computer, developers also maintain a public server repository to which they push new versions of components that they have changed. It is then up to the open-source system 'manager' to decide when to pull these changes into the definitive system.

Rather than a linear sequence of versions that reflect changes to the component over time, there may be several independent sequences resulting from branching. This is normal in system development, where different developers work independently on different versions of the source code and so change it in different ways. At some stage, it may be necessary to merge codeline branches to create a new version of a component that includes all changes that have been made. If the changes made involve different parts of the code, the component versions may be merged automatically by combining the deltas that apply to the code.

When version control systems were first developed, storage management was one of their most important functions. Disk space was expensive and it was important to minimize the disk space used by the different copies of components. Instead of keeping a complete copy of each version, the system stores a list of differences (deltas) between one version and another. By applying these to a master version (usually the most recent version), a target version can be recreated.

As disk storage is now relatively cheap, Git uses an alternative, faster approach. Git does not use deltas but applies a standard compression algorithm to stored files and their associated meta-information. It does not store duplicate copies of files. Retrieving a file simply involves decompressing it, with no need to apply a chain of operations. Git also uses the notion of packfiles where several smaller files are combined into an indexed single file.

System building

System building is the process of creating a complete, executable system by compiling and linking the system components, external libraries, configuration files, etc. System building tools and version management tools must communicate as the build process involves checking out component versions from the repository managed by the version management system. The configuration description used to identify a baseline is also used by the system building tool.

Build platforms may include:

Build system functionality includes:

A system platform is the development system, which includes development tools such as compilers, source code editors, etc. The build server, which is used to build definitive, executable versions of the system. This server maintains the definitive versions of a system. The target environment, which is the platform on which the system executes. For real-time and embedded systems, the target environment is often smaller and simpler than the development environment (e.g. a cell phone).

Agile building process (continuous integration):

Advantages of continuous integration:

Disadvantages of continuous integration:

Change management

Organizational needs and requirements change during the lifetime of a system, bugs have to be repaired and systems have to adapt to changes in their environment. Change management is intended to ensure that system evolution is a managed process and that priority is given to the most urgent and cost-effective changes. The change management process is concerned with analyzing the costs and benefits of proposed changes, approving those changes that are worthwhile and tracking which components in the system have been changed.

Factors in change analysis:

In some agile methods, customers are directly involved in change management. The propose a change to the requirements and work with the team to assess its impact and decide whether the change should take priority over the features planned for the next increment of the system. Changes to improve the software improvement are decided by the programmers working on the system. Refactoring, where the software is continually improved, is not seen as an overhead but as a necessary part of the development process.

Release management

A system release is a version of a software system that is distributed to customers. For mass market software, it is usually possible to identify two types of release: major releases which deliver significant new functionality, and minor releases, which repair bugs and fix customer problems that have been reported. For custom software or software product lines, releases of the system may have to be produced for each customer and individual customers may be running several different releases of the system at the same time. As well as the the executable code of the system, a release may also include:

Factors influencing system release planning:

Release creation process:

Release tracking In the event of a problem, it may be necessary to reproduce exactly the software that has been delivered to a particular customer. When a system release is produced, it must be documented to ensure that it can be re-created exactly in the future. This is particularly important for customized, long-lifetime embedded systems, such as those that control complex machines. Customers may use a single release of these systems for many years and may require specific changes to a particular software system long after its original release date.

Release reproduction To document a release, you have to record the specific versions of the source code components that were used to create the executable code. You must keep copies of the source code files, corresponding executables and all data and configuration files. You should also record the versions of the operating system, libraries, compilers and other tools used to build the software.

Release planning As well as the technical work involved in creating a release distribution, advertising and publicity material have to be prepared and marketing strategies put in place to convince customers to buy the new release of the system. If releases are too frequent or require hardware upgrades, customers may not move to the new release, especially if they have to pay for it. If system releases are too infrequent, market share may be lost as customers move to alternative systems.

Delivering software as a service (SaaS) reduces the problems of release management. It simplifies both release management and system installation for customers. The software developer is responsible for replacing the existing release of a system with a new release and this is made available to all customers at the same time.