Unit 18: Configuration Management 3C05: Advanced Objectives ♦ To introduce the concept of configuration Engineering management and the key problems which can arise from configuration management failures Unit 10: Configuration Management and collaborative development. ♦ To present some techniques for configuration management. Stefanos Zachariadis ♦ To consider tools for automated configuration http://www.cs.ucl.ac.uk/staff/s.zachariadis/ management support.

1 2

Scale and Complexity Issues

♦ Projects tackled so far: ♦ Multiple people working on code & ♦ Few (usually one) developer documentation • In the same location ♦ Access to other people’s changes ♦ Hundreds/few thousands lines of code ♦ Small Scale (tackle limited problems) ♦ Conflicting updates ♦ Increase the scale ♦ Simultaneous Updates ♦ Group Projects (2-? developers) ♦ Tracking/Logging of Changes • Distributed around the world ♦ Tens, hundreds of thousands lines of code ♦ Tracking bugs ♦ Operating Systems, Office Suites, Web Browsers, ♦ When did it arise? Middleware systems, etc. ♦ What changes were made to trigger it?

3 4

Configuration Management Basic Concepts

♦ Systematic way to control changes to large ♦ Repository (or small) software systems. Allows for ♦ Where (usually all) files for the project are located ♦ Keeping track of all files in a project (including ♦ Committing a change/file additions and deletions) ♦ Uploading your version of the file to the repository ♦ Groups working on same project ♦ Versions of a file ♦ Different revisions of a file, committed by a developer. ♦ Tracking changes (documents, etc) ♦ Has an identifier (e.g. 1.1, 1.2, 1.3…) ♦ Branching ♦ Can be stored as ♦ Selecting versions • Distinct files (more space required) ♦ Merging changes • Deltas (more processing required)

5 6

1 Versioning Deltas Versioning Deltas (2)

♦ More commonly used ♦ More commonly used ♦ A list of changes/differences from one version to another ♦ A list of changes/differences from one ♦ A “” version to another ♦ Forward Deltas ♦ A “diff” ♦ Reverse Deltas ♦ Easy to fetch the latest version from the diff diff diff repository

V0 V1 V2 V3 V0 V1 V2 V3

♦ Processing required to fetch the latest version diff diff diff 7 8

How to Efficiently Use CM Example Tool: RCS Tools

♦ Use Open (Text) Formats ♦ .TEX, .TXT, .JAVA, .CPP, .XML, .HTML, etc. ♦ Works over individual files ♦ Binary data do not work well with CM tools ♦ Reverse Deltas (all versions in the same file with a ,v suffix) • Difficult to track changes (create diffs) to binary data ♦ Logs of changes are maintained in the file ♦ Open formats can be processed in multiple platforms by ♦ “Check out the Latest Version” to process it. various programs. ♦ “Check in the changes” • Do not assume all people in the group use the same software as you ♦ Developers work on the same directory hierarchy ♦ Modularise Project ♦ When a file is checked out, it is locked. ♦ Makes it easier for more people to develop ♦ Others cannot checkout the file if locked ♦ Use Interfaces and Abstract Classes in coding. ♦ Difficulty in supporting multiple • Allows the programmers to use the API expected without worrying about the implementation (that is being worked on by another ♦ Difficulty in having multiple versions of a file concurrently person). ♦ Good for single-user projects (e.g. documents) ♦ Standardise on coding/naming conventions

9 10

Example Tool: CVS Example Tool: CVS (2)

Concurrent Versions System Problems with CVS: ♦ Widely used on the internet ♦ Based on RCS ♦ Lack of Atomic Commits ♦ Network Oriented ♦ Difficult to change structure once created ♦ Works on Projects (uses RCS for the individual files) ♦ Users work in their own directory hierarchy ♦ E.g. Need shell access to the repository to delete ♦ User “checks out” a snapshot of project directories ♦ Works on it independently ♦ Does not support symbolic links ♦ Can “update” the snapshot with changes other users made ♦ User commits changes ♦ Special treatment needed for binary files ♦ If changes conflict with those made by other users, CVS prompts on how to resolve conflict. ♦ Sometimes necessary, e.g. graphical images. ♦ Can have different branches of the project ♦ E.g. experimental branch, stable branch

11 12

2 Example Tools: Other Summary

♦ BitMover BitKeeper ♦ Configuration management is the most http://www.bitkeeper.com/ important component of information ♦ Rational ClearCase management in . http://www.rational.com/products/clearcase ♦ Automated tools such as RCS/CVS can be /index.jsp used to provide configuration management ♦ Microsoft Visual SourceSafe and solve the issues arising with multiple http://msdn.microsoft.com/ssafe/ developers working on the same project ♦ Some of the tools integrate with development environments (Emacs, Jedit ♦ The key elements of CM software is the Visual Studio, etc) logging of changes and versioning.

13 14

Links for Casual Reading

♦ A collaborative development environment for open source projects which includes a bug tracking system, forums, mailing list, CVS support etc. http://www.sourceforge.net ♦ Karl Fogel, “Open Source Development With CVS” http://cvsbook.red-bean.com/cvsbook.html ♦ The GNU Project, RCS. http://www.gnu.org/software/rcs/rcs.html ♦ Ant, a Java-Based Build Tool. http://jakarta.apache.org/ant/

15

3