SCM - Jazz.net

advertisement
Rational Insight | Back to Basis Series
SCM introduction
Chu Shu
June 2012
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
SCM overview
•
Software Configuration Management Vs Source Control Management
•
Target of SCM
2
–
Everything is traceable – easy to find issue
–
Everything is reproducible – easy to patch the released binaries
–
Not only for source code, but also for everything related to the release including document,
configuration files… -- easy to develop, easy to deploy…
–
Proper strategy reduce the management work and increate the availability of development
environment
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
Continuous Integration & Continuous Delivery
•
Continuous Integration is a software development practice where members of a team
integrate their work frequently, usually each person integrates at least daily - leading to
multiple integrations per day.
 SCM need to support frequent delivery
 SCM need to support automate test
 CI reduce the complexity of merge between different branches
•
Continuous delivery is a set of principles and practices in growing use in software
development to improve the process of software delivery. Techniques such as automated
testing, continuous integration and automated deployments allow software to be developed
to a high standard and easily packaged and deployed to test environments.
 SCM need to support automated delivery which means deployment configurations may be stored in
SCM
3
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
SCM – basics
•
Working on your private branch( workspace )
•
Test before delivery
•
Deliver to main branch( stream ) frequently
•
Different branch( stream) for different purpose, CI against the main branch
•
Change Set( activity) is traceable and linked to Work Item ( or CQ artifact…)
•
Multiple Phase delivery might be used, especially for multi-site environment
4
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
SCM – merge & branch
•
Branch – isolate work from others, reduce the impact of the work
•
Merge – propagate work to others
•
Merge tool – can auto merge code by syntax analysis, can Not handle binary files, can Not
handle merge need semantic analysis
•
The complexity in merge is technical debt
•
Balance merge frequency
 High frequent merge reduce the complexity of merge
 High frequent merge can find issue earlier
 High frequent merge reduce the isolation of high risk work
5
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
SCM methodology – mainline development
•
SCM methodology introduction – mainline, by release, by feature, by component, by
organization…
•
We use mainline development to support CI
6
–
Always CI on mainline
–
Always deliver new feature to mainline
–
No other branch which has long lifecycle
–
Lease “frozen” time on mainline
–
Reduce merge work between branches
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
SCM methodology – earlier branching Vs late branching
•
•
Earlier Branching
–
Create branch at the beginning of a release
–
Focus on one release
–
Development on release stream, CI against release stream
Late Branching
–
Create branch at the end of a release
–
Concurrent development on multiple release
–
Most development on main stream, maintenance on release stream, CI against main stream
Release B
Release A
mainline
Release B
Release C
Release A
7
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
Non-source code management
•
3rd Party software dependency
–
Stored in SCM – big but easy for rebuild
–
Not stored in SCM – flexible but may not confuse for rebuild
–
Store a reference configuration in SCM
–
In Insight – not store in SCM, reference remote repository during build, store configuration files
(supplier file) in SCM, make sure to preserve referenced repository
•
Document – stored in SCM
•
Deployment configuration – store in SCM or separate DB
8
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
SCM Tools – Centralized Vs Distributed
•
Centralized tools: ClearCase, Jazz SCM, SVN
 Usually for commercial development, high manageability
 Complexity in administration
 Slow, high requirement for network bandwidth
 Complex solution for multi-site development
•
Distributed tools: GitHub, Mecurial




9
Usually for open source development
Easy to use
Less manageability, need define strategy for CI
Fast, native for distributed development, less requirement for network bandwidth
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
Insight SCM strategy
Restricted fix delivery
Restricted fix delivery
Milestone 1
Milestone 3
Continue feature development
Release A( mainline)
Continue feature development
Continue feature development
Milestone 2
Restricted fix delivery
M1 DCUT M1 released
10
06/29/12
M2 DCUT
M3 DCUT
M2 released
M3 released
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
www.ibm/software/rational
11
06/29/12
© 2012 IBM Corporation
Rational Insight | Back to Basis Series
Revision History
Author
Date
Version
Comment
Initial Draft
12
06/29/12
© 2012 IBM Corporation
Download