Your SlideShare is downloading. ×
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Large Scale Development with Git and Gerrit - EclipseCon Europe 2012

1,744

Published on

"Large Scale Development with Git and Gerrit" presentation given at EclipseCon Europe 2012-10-23

"Large Scale Development with Git and Gerrit" presentation given at EclipseCon Europe 2012-10-23

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,744
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
30
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Large Scale Development with Git and Gerrit EclipseCon Europe 2012, LudwigsburgMatthias MatthiasMännich Sohn
  • 2. Git … a distributed revision control system built by the Linux project to facilitate code reviewJGit & EGit… Git in Java and EclipseGerrit … a JGit based code review system built by the Android project Copyright © Matthias Männich, Matthias Sohn
  • 3. How this journey started…2006 first experiments:•  Git wasn’t ready for prime time2009 SAP joining the Git party•  join JGit, EGit, Gerrit•  piloting Git & Gerrit at Eclipse•  start Lean Development Infrastructure•  first internal pilotslarge SAP projects moving to Git&Gerrit•  Feb 2010 “Netweaver Cloud” on-demand platform•  Jul 2011 large C++ Engine ProjectSoon: generally available to all kinds of projects Copyright © Matthias Männich, Matthias Sohn
  • 4. Lean Development InfrastructureAgile project organization•  Teams of 10•  Large projects: Product team + n dev teamsLearn from Open Source•  Tools: Git, EGit, Gerrit, Skalli Maven, Nexus, Tycho, Sonar …•  Communication: mailing lists, forums•  Contributions between projects/products Copyright © Matthias Männich, Matthias Sohn
  • 5. Git / Gerrit for Lean DI All repositories hosted on central Gerrit server •  Used around the globe •  2k repositories, >2k users •  Scales pretty well if repository < 1G Central admins operate server and ensure standards Self Services for Projects (Skalli) •  create Git repository •  self-administer their repositories Copyright © Matthias Männich, Matthias Sohn
  • 6. Introducing Code ReviewLearning from successful open source projects•  transparency through code review and mailing listsCode Review... is new for most SAP developers... is optional... used by many projects today... some teams do reviews across teamsTakes time to learn Copyright © Matthias Männich, Matthias Sohn
  • 7. Gerrit Code Review Gerrit master change 12 git git git git change 10 change 23 Developer PC Developer PC git git git git Copyright © Matthias Männich, Matthias Sohn
  • 8. Code Review push change Gerrit notifies reviewers other teams verify change review code team Jenkins CI comment &improve votechangeabandon merge changechange into master Copyright © Matthias Männich, Matthias Sohn
  • 9. ExamplesLarge C++ Engine Project•  > 250 developers, many locations•  large code base: > 1M lines of code•  1 huge Git repository, many branches“Netweaver Cloud” on-demand platform•  ~150 developers, 3 locations•  modular Java stack•  >100 Git repositories Copyright © Matthias Männich, Matthias Sohn
  • 10. Migrate large projects - Motivationin central VCS branching might get complicatedmostly single development branch modelscontinuous integration does not scale well tested tested error detected (introduced by?) 1 hour 30 commits/hournot every commit gets full test coveragehigh delay between erroneous submit and detection Copyright © Matthias Männich, Matthias Sohn
  • 11. Migrate large projects - Considerationsgood training of the team is essential- convincing 80% rather easy 95% takes some time 100% …infrastructure needs will increaseresponsibilities might shift from quality team todevelopmentstandard compliance (if applicable) Copyright © Matthias Männich, Matthias Sohn
  • 12. Migrate large projects - Branchingappealing to implement workflows inspired by•  Linux Kernel Development•  Gerrit Development•  Git Flow•  …preconditions might not be feasible•  strong hierarchies•  modular code structure•  “it’s done when it’s done” <> commercial interests Copyright © Matthias Männich, Matthias Sohn
  • 13. Migrate large projects - Branchingcurrently implemented and constantly evolving- lots of topic branches (> 100 active) - topic owner concept (responsibility role) - small teams - different branch lifetimes - team defined quality barriers- flat hierarchy- high level branches maintained by quality team Copyright © Matthias Männich, Matthias Sohn
  • 14. Migrate large projects - Branching Delivery Main Topic 1 Main Topic 2 Subtopic 1 Suptopic 2 ... Subtopic 3 Suptopic 4 ...consider•  main topic branches should be distinct development areas (modularization?)•  possible delays caused by topic integration (always acceptable?)•  integration of main topics is done by quality team Copyright © Matthias Männich, Matthias Sohn
  • 15. Migrate large projects - Branching Authority Delivery Quality Team Integration Strong Quality Barriers Subtopic 1 Suptopic 2 ... Developmentintegration is done by developersapproval is given by quality teamquality barriers implemented with Gerrit Code Reviewpretested code states => always stable integration branch
  • 16. Migrate large projects – Quality barriersGerrit usage allows “pretested commits”commits have to pass (before integration!)•  Code review (human)•  Builds and tests on several platformstest coverage dependent on branch hierarchy levelideal: every quality metric on every level Copyright © Matthias Männich, Matthias Sohn
  • 17. Migrate large projects - Recommendationsthere is no golden rule (sorry)get inspired by similar projectsdiscuss and implement a solutionheavily review your design and stay able to adjustshift responsibilities to expertise location•  code integration: development•  quality judgment: quality teamimplement extensive tool support Copyright © Matthias Männich, Matthias Sohn
  • 18. Migrate large projects – Some rough stats250 developers120 topic branches (lowest level)50k Gerrit changes per year100 “big” build and test servers Copyright © Matthias Männich, Matthias Sohn
  • 19. Netweaver Cloud Platform~150 developersCloud infrastructureCloud servicesOSGi (Equinox) based Java serverToolsmany mid-size repositoriesmodular Maven buildversioned APIp2 deploymentdelivery every 2 weeks Copyright © Matthias Männich, Matthias Sohn
  • 20. Code Review & Scrum changes refined in review 2 weekly Sprints Review Planning Release Copyright © Matthias Männich, Matthias Sohn
  • 21. Continuous Delivery 2 weekly sprint Fix Release Release Fix bugs Pull release staging Deploy to Staging factory Deploy to Factory Integration Test 2 weekly delivery Deploy toprod Q Gate Internal Prod Copyright © Matthias Männich, Matthias Sohn
  • 22. Integrating Core Cloud Infrastructure select comp. commit(s) Main Build trigger release Comp. A linked as submodules update versions build Comp. B stage Comp. C integration test Comp. D Comp. E tag release release Copyright © Matthias Männich, Matthias Sohn
  • 23. SummaryBenefits•  (many) developers like it•  review and pre-tested commits improve quality•  always able to shipFuture•  scale•  improve tools based on feedback•  make use of submodule support in Gerrit•  better support correction process•  manage contributions between projects (inner source) Copyright © Matthias Männich, Matthias Sohn
  • 24. Q&A

×