Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Software Configuration Management patterns

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Software Configuration Management patterns

Describe Software Configuration Management discipline and it patterns

Avatar for Petro Sasnyk

Petro Sasnyk

April 24, 2014
Tweet

More Decks by Petro Sasnyk

Other Decks in Technology

Transcript

  1. Agenda  Software Configuration Management discipline  Artifacts of software

    configuration management  The Patterns and their implementation  Real-word use cases  Conclusions
  2. My familiarity with Software Configuration Management systems  I’ve started

    with Visual Source Safe 6.0 and CVS at 2001  Subsequently I’ve switched to Subversion  Then on first real job I was introduced to Perforce  After that I was terrified with IBM Rational ClearCase  And then when I was thinking I’ve seen everything I opened for itself Mercurial and later Git  I did a large a project on Mecrurial (~30-40 developers) and moderate project on Git (GitHub)  On previous project I’m used AccuRev and found that was not the worst experience  Now I’m using mercurial(bitbucket) and we are going to switch into Hosted TFS (visualstudio.com) with git (political reasons)  Just for fun I’m played with monotone, SourceGear Vault, Borland StarTeam and other garbage isn’t worth to mention
  3. What is the Software Configuration Management 1. The purpose of

    Software Configuration Management is to establish and maintain the integrity of the products of the software project throughout the project's software life cycle. Software Configuration Management involves identifying configuration items for the software project, controlling these configuration items and changes to them, and recording and reporting status and change activity for these configuration items [SEI 2000a].
  4. Functional areas covered by SCM discipline 1. Source code management

    2. Build engineering 3. Environment configuration 4. Change control 5. Release engineering 6. Deployment
  5. What is SCM for dummies? Software Configuration Management is the

    ability to control and manage changes in a software project.
  6. Artifacts of Software Configuration Management Change •Changes in source code

    Version •Certain amount of changes form a product version •Source code change •Binary packages •Debug symbols •Non-binary output, like documentation Product release •After deliberate testing we decide what we can make a release
  7. Artifacts of Software Configuration Management  Usually our aim is

    to define workflow when our changes lead to producing versions and when release  How reliably determine what changes included in the release(reverse process)  How to organize changes and how to track their quality
  8. Mainline  The main branch where all accepted changes finally

    reach  Mainline (ClearCase), trunk (SVN), master (git), default (hg) Active Development Line  An Active Development Line will have frequent changes, some well-tested checkpoints that are guaranteed to be "good," and other points in the codeline that are likely to be good enough for someone to do development on the tip of the line. Third Party Codeline  Manage vendor code by using a Third Party Codeline.
  9. Private Workspace  In Active development Line you and other

    developer will made a changes. You would like to work with latest changes, but you also want to control when you start working with other developers’ changes.  Workspaces on: Perforce/Accurev/ClearCase/TFS vs SVN/Git/Hg Repository  Set up a new workspace by populating it from a Repository that contains everything that you need.
  10. Private System Build  A Private Workspace allows you, as

    a developer, to insulate yourself from external changes to your environment. But your changes need to work with the rest of the system too. To verify this, you need to build the system consistently, including building with your changes.  TFS (Gated Check-Ins), TeamCity (Delayed commit) Integration Build All developers work in their own Private Workspace so that they can control when they see other changes. This helps individual developers make progress, but in many workspaces people are making independent changes that must integrate together, and the whole system must build reliably. This pattern addresses mechanisms for helping ensure that the code for a system always builds.
  11. Codeline Policy  This pattern describes how to establish the

    rules for each codeline to suit its purpose.  Create a Codeline Policy to help developers decide when to check in code to a codeline and what procedures to follow before a checkin on each codeline. Task Level Commit  Organize source code changes by task-oriented units of work.  This pattern discusses how to balance the needs for stability, speed, and atomicity.
  12. Smoke Test Ensure that the system still works after you

    make a change by running a Smoke Test. Unit Test Verify that a module still works after you make a change by running a Unit Test. Regression Test Ensure that existing code doesn't get worse as you make other improvements by running a Regression Test.
  13. Private Versioning Use Private Versioning to allow you to experiment

    with complex changes locally, yet still be able to take advantage of the features of a version control system. Release Line Maintain released versions without interfering with your current development by establishing a Release Line. Release-Prep Codeline Stabilize a codeline for an upcoming release while also allowing new work to continue on active codelines by doing the stabilization work on a Release-Prep codeline. Task Branch Have part of your team perform a disruptive task without forcing the rest of the team to work around them, using a Task Branch.
  14. Feature Toggle  Application uses setting(toggles) for features which should

    be activated. Pull request  A method for submitting changes to project. Branch by abstraction  A method for developing large-scale change and applying it in gradual way. We extract interface for changing module and while developing new module continue to use old module and write test for interface. When the time comes we switch interface to point into new module.
  15. Package Management systems (optional)  You could build your product

    from bunch of components which combined into one by using one package management system  Java: Maven, Gradle  .NET: Nuget  Python: PyPI, PIP, setuptools  Ruby: Rubygems  Nodejs: npm
  16. Large project: patterns  Mainline  Active Development Line 

    Integration Build  Task Level Commit  Codeline Policy  Smoke Test / Unit Test / Regression Test  Private Versions  Release Line / Release-Prep Code Line  Task Branch
  17. Moderate project: patterns  Mainline  Active Development Line 

    Integration Build  Task Level Commit  Codeline Policy  Smoke Test / Unit Test / Regression Test  Private Versions  Release Line / Release-Prep Code Line  Task Branch  Pull reqests  Feature toggle  Branch by Abstraction
  18. Legacy project  Config spec:  element * CHECKEDOUT element

    * .../branch_1/LATEST element * /main/LATEST -mkbranch branch_1
  19. Legacy project: Patterns  Mainline  Active Development Line 

    Private Workspace  Repository  Integration Build  Third Party Codeline  Codeline Policy  Smoke Test / Unit Test / Regression Test  Release Line / Release-Prep Code Line
  20. Conclusions  Using SCM techniques is the sign of company

    maturity  Selecting right SCM patterns could simplify your life and improve the quality of delivered artifacts  Software Builds are Standardized, Repeatable and Managed  Changes and their impact are controlled  Use the right tool for your problems  Do not invent a wheel
  21. Q&A

  22. Additional Materials 1. Software Configuration Management Patterns: Effective Teamwork, Practical

    Integration 2. A successful Git branching model 3. Mercurial Workflows 4. http://www.cmcrossroads.com/ 5. Configuration Management Best Practices: Practical Methods that Work in the Real World