Closing the Agile Loop Continuous Integration, Continuous Information Darryl Bowler Senior Systems Architect CollabNet
Agenda How we got here Continuous Integration, Defined Poor Practices (Common Anti-Patterns) Best Practices Tools & Technologies Customer Case Study agenda 2 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Better Manage Project Through Automation, Integration Scope (features) Quality Quality Resources (budget) Schedule (time) Projects are constrained by the Time-Cost-Quality Continuum Fixed boundaries that are interdependent Increased scope with fixed resources impacts scheduled or quality Need to find new methods to maximize the productivity of our limited resources (people) 3 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Software Delivery = Top Inhibitor to Application Success Through 2015, 80% of IT organizations will be unable to implement releases of services that provide critical business functionality in a predictable and sustainable manner to meet the needs of the business, thus negatively impacting the overall entity. Source: Gartner, 1/2011 Are You Ready to Improve Release Velocity? George Spafford, Ronni J. Colville 4 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Software Delivery Learning from Manufacturing Pressure for lower cost & faster time to market, leading to Mass production (Ford, 1926) Lean Production (Toyota, 1990 s) Just-In-Time Smart Automation Software development / production learned from manufacturing Commodity Production (Packaged Apps, 1990 s) Lean and Agile Methods (Agile Manifesto, 2001) 5 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Eliminating Waste is #1 Principle for Lean Management Waste defined: Anything that does not add value to the customer. (Read: Anything the customer is unwilling to pay for.) Eliminating Waste is #1 principle for lean management Lean Value Stream Mapping (a common lead diagnostic tool) helps to identify, eliminate waste 1. Map software development, from concept to cash 2. Measure elapse time versus value added time 3. Optimize by creating a future state 6 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Value Stream Example: Concept to Release (Typical Scenario) Business owner has a new idea 5 minutes elapsed time 5 minutes valued added Business owner and product owner agree on new feature 30 minutes elapsed time 30 minutes valued added SCRUM team agree it can go into the next sprint 1 day elapsed time 30 minutes valued added Integration (merging) of new software 1 day elapsed time QA Test Team 2 days elapsed time 1 hour valued added Team creates new feature 2 days elapsed time 2 days valued added Staging at UAT 0.5 days elapsed time Retrospective and Review 2 hours elapsed time 2 hours valued added From conception to release candidate 6.5 days elapsed time 2.5 days valued added 4 days of potential waste 7 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Continuous Integration (CI) Cuts Waste from SW Delivery Continuous Integration Minimizes (or even eliminates) risk Real time notification of defects and poor quality, upon code change Drives automation and production of deployable of software Aligns with end of sprint review / retrospective Helps promote a cohesive team ( team performance) Is the summation of good software development practices Above all fosters TRANSPARENCY and CONFIDENCE 8 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
The Continuous Integration Workflow Release Monitor The Circle of Continuous Integration Testing Checkout Build 9 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Common Anti-Pattern #1 (Anti-Pattern: Ineffective and/or Counterproductive Practices) Parallel Active Infrequent Build Deferred Integration Equates to PAIN Dev Dev Dev Dev Integrate Dev Solution: Practice frequent integration Use a CI server to build main line 10 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Common Anti-Pattern #2 (Anti-Pattern: Ineffective and/or Counterproductive Practices) Does Your Value Stream Reveal Long Test Cycles? Lack automated testing Long phases of QA and manual testing Impacts delivery? Becomes an after thought? Use a testing framework at the outset and automate Unit Testing Functional Testing Code Quality CI is not silver bullet, must incorporate with other practices Test Driven Development Extreme Programming 11 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Common Anti-Pattern #3 (Anti-Pattern: Ineffective and/or Counterproductive Practices) The Dependency Maze Code built on a developers workstation Breaks when rolled out to production! Tracing Code and the Binary Running in Production Tracing Who and What Broke? A commit that cause previous functionality to fail (regression) Use Continuous Integration! 12 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
10 Best Practices for CI 1. Manage Source Code, Using a Version Control Product 2. Also version: test scripts, config files, 3. Enable Triggering of Builds From the Command Line Standardize on a build script / tool Maven, ANT, NANT 4. Commit Frequently (at least once a day), as Developer 5. Integrate Frequently; Build the mainline on the integration server 6. Enable Fast Builds (Typically <10 minute) Large builds be broken into multiple jobs and executed in parallel 7. Test Using a Replica of Production 8. Use a Central Binary Repository 9. Make it easy to obtain build and test results Especially Failures 10 10. Automate Deployment 13 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Diagram: Continuous Integration Requirements Mgmnt Architectural Analysis Eclipse Desktop Visual Studio Desktop Change Mgmnt Dynamic Test Unit Test Scrum Project Agile Management Code Analysis Security Analysis Build Engines Load Test Functional Test Service Mgmnt PLAN CODE BUILD TEST RELEASE (SCM) Tracker Hudson Analytics Cost Server Metrics Application Stack Test Harness Server Size Cloud Build Cloud Continuous Integration Test Cloud CollabNet Lab Management Test Cloud Stage Cloud Production Cloud Profile Manager Development Operations 14 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Diagram: Continuous Integration Database Feedback Mechanism Notification Event Developer Developer Committed Changes Poll Build Script Compile source code Integrate database Run tests Run inspections Deploy software Subversion Version Control Repository CI Server Integration Build Machine Developer Database Scripts Drop/create database or table Insert test data Apply procedures/ triggers
Value Stream Example: Concept to Release (Good Scenario) Business owner has a new idea 5 minutes elapsed time 5 minutes valued added Business owner and product owner agree on new feature 30 minutes elapsed time 30 minutes valued added SCRUM team agree it can go into the next sprint 1 day elapsed time 30 minutes valued added Integration (merging) of new software 2 hours elapsed time QA Test Team 0.5 days elapsed time 1 hour valued added Continuous Integration Server Team creates new feature 2 days elapsed time 2 days valued added Staging at UAT 1 hour elapsed time Retrospective and Review 2 hours elapsed time 2 hours valued added From conception to release candidate 4 days elapsed time 2.5 days valued added 2 days of potential waste SAVED 2 days per feature! 16 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Financial Justification Scenario: Small to Medium Enterprise 5 development teams 20 Sprints per team each year, i.e. 100 sprints total Average 5 features per sprint, i.e. 500 new feature per year Savings through CI 2 days per feature Total savings: 1000 days, $320,000 per year (avg. developer @ $40 per hour, i.e. $320 per day) Or a productivity increase of 3 persons a year. 17 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Common Pitfalls Lesson Learned CI can be a difficult journey Testing and Quality must spearhead the practice Migrating legacy code Migrating legacy SCM Practices Reliant on automation Personal Accountability Awareness and Education However, the rewards outweigh the disadvantages. 18 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Hudson / Jenkins Extensible continuous integration server Open Source and Free Incredibly Easy to Install and Use 70+% Market Share CI Build Server Sonatype Survey 400 Freely Available Plug-in and Integrations DISTRIBUTED and SCALABLE! Master / Slave
CollabNet and Build and Test Integration CollabNet TeamForge is the hub of development activities from code to build 20 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Why Re-Invent the Wheel? Integrated Build and Testing Plug-ins Dashboard and Visualization of Build and Test Results Integration and Plug-in Available for Majority Test Frameworks and Build Tools xunit, Maven, Maven Reports 21 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
CollabNet TeamForge Simplifies CI Discover Federate Replicate Central Repository Lifecycle Traceability Automation for End-to-End Processes Central Administration Plan Code Track User/Project Admin Task Hierarchy Team Collaboration Real-time Reports & Status Social Architecture Browse SCM Tracker/SCM Integration Bugs Artifacts Requirements Discussion Forums Build and Test Integrated Hudson Project-based Wiki Release Collect Archive Release Indexed Objects 300+ File Types Build Test Run Lab Management Community & Projects My Workspace Tasks Tracking Project List Monitor Settings User Tool Integrations Business Users Developers User Point Tools CollabNet Desktop, Microsoft Windows, Project CollabNet Desktop, Eclipse Edition, Visual Studio Edition Lifecycle Tools, e.g., Code Analysis, Unit Test, Load Test, Report Management, Planning ScrumWorks Pro
Case Study Fortune 500 Bank Centralized Build Service Community of 20,000 Developers Providing Build Services to 80 Groups Driven by Open Source Tools Develop Software Build Provisioning Lab Management Deploy and Release Nexus Build Life-Cycle Code Quality Sonar Build Management Jenkins/Hudson 23 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Summary, and Take Away Eliminating waste is #1 principle for lean management CI cuts waste from software delivery process Implementation requires changes in patterns, collaboration Version control, and automation is key Technology and tools greatly help ensuring success summary 24 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Introducing CI Workshop http://blogs.collab.net/oncollabnet/ 4 day on-site workshop Contact us at dbowler@collab.net 25 Copyright 2011 CollabNet, Inc. All Rights Reserved. CollabNet Confidential.
Thank You Darryl Bowler dbowler@collab.net www.collab.net +1 (650) 228-2598