© 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

12
© 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012

Transcript of © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

Page 1: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

SCM introduction

Chu ShuJune 2012

Page 2: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

2 06/29/12

SCM overview

• Software Configuration Management Vs Source Control Management

• Target of SCM

– 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

Page 3: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

3 06/29/12

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

Page 4: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

4 06/29/12

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

Page 5: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

5 06/29/12

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

Page 6: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

6 06/29/12

SCM methodology – mainline development

• SCM methodology introduction – mainline, by release, by feature, by component, by organization…

• We use mainline development to support CI

– 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

Page 7: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

7 06/29/12

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

mainline

Release A

Release B

Release A

Release B

Release C

Page 8: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

8 06/29/12

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

Page 9: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

9 06/29/12

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 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

Page 10: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

10 06/29/12

Insight SCM strategy

Milestone 1

M1 DCUT M2 DCUT M3 DCUT

Milestone 2

Milestone 3

Release A( mainline)

Restricted fix delivery

Continue feature development

Continue feature development

Continue feature development

Restricted fix delivery

Restricted fix delivery

M1 released M2 released M3 released

Page 11: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

11 06/29/12

www.ibm/software/rational

Page 12: © 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.

© 2012 IBM Corporation

Rational Insight | Back to Basis Series

12 06/29/12

Revision History

Author Date Version Comment

Initial Draft