Continuous Delivery
      Applied

          Mike McGarr
          mike.mcgarr@excella.com
          http://earlyandoften.wordpress.com
          http://www.meetup.com/DC-continuous-
          integration/
          @jmichaelmcgarr
About Me
• J. Michael (Mike) McGarr
• Excella Consulting, Arlington VA
• Lead of Excella’s Java Center of Excellence
• Founder of the DC Continuous Integration,
  Delivery, and Deployment Meetup




                                                2
Excella is Hiring!




                     3
Continuous Delivery is…

…a set of practices and principles aimed at,
building, testing, and releasing software
faster and more frequently.




                                           4
5
“Our highest priority is to satisfy the
customer through early and
continuous delivery of valuable
software.”
                            - First of the Twelve
          Principles behind the Agile Manifesto




                                                    6
Goals



Quality      Cycle Time


                          7
Cycle Time

“How long would it take your organization to
deploy a change [to production] that involves
just one single line of code? Do you do this on a
repeatable, reliable basis?”
                          - Mary and Tom Poppendieck,
                 Implementing Lean Software Development




                                                      8
The Last Mile

        Manual Deployments
Insufficient Configuration Management
Infrequent, Error Prone Deployments



                                        9
Stressful
Releases




       10
Frequent Automated
Deployments




                     http://flic.kr/p/29Ree
                                       11
Always Production Ready




                          12
Continuous Deployment

           Deployment Pipelines

         Deployment Automation



Configuration   Continuous
Management
                                  Testing
                Integration


                   Agile

                                            13
Deployment Pipelines




http://www.fotopedia.com/users/chmehl   14
Deployment Pipelines

A Deployment Pipeline is an automated
manifestation of your process for getting
software from version control into the
hands of your users.




                     15
Continuous what?


Continuous     Continuous   Continuous
Integration     Delivery    Deployment




                                     16
Getting Started


         Continuous Delivery Applied
Understand your Process




  http://www.michaelnygard.com/blog/2008/02/outrunning_your_headlights.html
                                                                       18
Understand your Organization




                               19
Developers




         http://flic.kr/p/5cK2
                                 20
Test Driven Development




http://reddevnews.com/articles/2007/11/01/testdriven-development-tdd.aspx   21
Evolutionary Design




                      22
Automate the Build




                     23
Static Code Analysis




       CheckStyle


                       24
Technical Debt




                 25
The Team




           26
Agile




        27
Continuous Integration




                         28
Continuous Integration
  Check-in Daily
  Commit to Trunk
  Automate the Build
  Keep the Build Fast
  Every Commit results in Build
  Test in Clone of Production
  Automate Deployment

                                  29
Testing




          30
Testing is not a Phase




                         http://flic.kr/p/6bcg   31
Specification by Example




                           32
Specification by Example




                           33
Automated Performance Testing




                                34
Configuration Management




                           35
Version Control




                  36
Build Once, Deploy Many




                          37
Artifact Repositories




                        38
Traceability




               39
Versioning Numbers




                     40
Externalize Configuration



 ESCAPE           Database




                             41
Deploying
        42
Deployment Pipelines
  (aka Build Pipelines)




                          43
Code Deployments




                   44
Version your Database




                        45
46
Infrastructure as Code




                         47
Puppet




         48
Vagrant




          49
Monitoring (sucks)




  https://github.com/monitoringsucks

                                       50
Continuous Deployment




                        51
Contact Me


Mike McGarr
mike.mcgarr@excella.com
http://earlyandoften.wordpress.com
@jmichaelmcgarr




                                     52
Further Reading
• Continuous Delivery: Reliable Software Releases through Build, Test
  and Deployment Automation, by Jez Humble and David Farley -
  http://www.amazon.com/Continuous-Delivery-Deployment-Automation-
  Addison-Wesley/dp/0321601912
• Test Driven Development (TDD) – http://en.wikipedia.org/wiki/Test-
  driven_development
• Introducing BDD, by Dan North – http://dannorth.net/introducing-bdd/
• Agile Manifesto – http://agilemanifesto.org/
• Scrum – http://www.scrumalliance.org/learn_about_scrum
• Continuous Integration, by Martin Fowler –
  http://martinfowler.com/articles/continuousIntegration.html
• Specification by Example, by Gojko Adzic -
  http://specificationbyexample.com/
• Build Pipelines - http://www.magpiebrain.com/2009/12/13/a-brief-and-
  incomplete-history-of-build-pipelines/


                                                                         53
Further Reading
• Maven Releases on Steriods, by Axel Fontaine –
  http://www.axelfontaine.com/2011/01/maven-releases-on-steroids-
  adios.html
• What is in a Name? Usually a version number, actually., by James
  Betteley - http://jamesbetteley.wordpress.com/2011/07/07/what-is-in-a-
  name-usually-a-version-number-actually/
• Build Once, Deploy Many -
  http://earlyandoften.wordpress.com/2010/09/09/build-once-deploy-
  many/
• Evolutionary Design - http://martinfowler.com/articles/designDead.html
• Continuous Deployment -
  http://timothyfitz.wordpress.com/2009/02/08/continuous-deployment/
• Sonar’s Technical Debt Calculation -
  http://www.sonarsource.org/evaluate-your-technical-debt-with-sonar/
• Gherkin - https://github.com/cucumber/cucumber/wiki/Gherkin


                                                                           54
Tools
•   Git - http://git-scm.com/
•   Subversion - http://subversion.tigris.org/
•   Mercurial - http://mercurial.selenic.com/
•   Rational ClearCase - http://www-
    01.ibm.com/software/awdtools/clearcase/
•   Serena Dimensions CM - http://www.serena.com/products/dimensions-
    cm/index.html
•   Ant - http://ant.apache.org/
•   Ivy - http://ant.apache.org/ivy/
•   Maven - http://maven.apache.org/
•   Gradle - http://gradle.org/
•   JUnit – http://www.junit.org/
•   Mockito – http://code.google.com/p/mockito/
•   Hamcrest – http://code.google.com/p/hamcrest/
•   Spock – http://code.google.com/p/spock/
•   dbUnit – http://www.dbunit.org/
•   Unitils – http://unitils.org/summary.html
                                                                        55
Tools
•   Findbugs – http://findbugs.sourceforge.net/
•   PMD – http://pmd.sourceforge.net/
•   Checkstyle – http://checkstyle.sourceforge.net/
•   JIRA – http://www.atlassian.com/software/jira/overview
•   GitHub – https://github.com/
•   Jenkins - http://jenkins-ci.org/
•   TeamCity – http://www.jetbrains.com/teamcity/
•   Nexus – http://www.sonatype.org/nexus/
•   Artifactory – http://www.jfrog.com/products.php
•   Sonar – http://www.sonarsource.org/
•   FitNesse –
•   Concordion – http://www.concordion.org/
•   Cucumber – http://cukes.info/
•   easyb – http://www.easyb.org/
•   jBehave - http://jbehave.org/
•   geb - http://www.gebish.org/

                                                             56
Tools
•   Liquibase – www.liquibase.org/
•   Flyway – http://code.google.com/p/flyway/
•   Escape – http://code.google.com/p/escservesconfig/
•   Puppet – http://puppetlabs.com/
•   Chef – http://www.opscode.com/chef/
•   Vagrant – http://vagrantup.com/
•   JMeter – http://jmeter.apache.org/
•   Nagios - http://www.nagios.org/




                                                         57

Continuous delivery applied

  • 1.
    Continuous Delivery Applied Mike McGarr mike.mcgarr@excella.com http://earlyandoften.wordpress.com http://www.meetup.com/DC-continuous- integration/ @jmichaelmcgarr
  • 2.
    About Me • J.Michael (Mike) McGarr • Excella Consulting, Arlington VA • Lead of Excella’s Java Center of Excellence • Founder of the DC Continuous Integration, Delivery, and Deployment Meetup 2
  • 3.
  • 4.
    Continuous Delivery is… …aset of practices and principles aimed at, building, testing, and releasing software faster and more frequently. 4
  • 5.
  • 6.
    “Our highest priorityis to satisfy the customer through early and continuous delivery of valuable software.” - First of the Twelve Principles behind the Agile Manifesto 6
  • 7.
    Goals Quality Cycle Time 7
  • 8.
    Cycle Time “How longwould it take your organization to deploy a change [to production] that involves just one single line of code? Do you do this on a repeatable, reliable basis?” - Mary and Tom Poppendieck, Implementing Lean Software Development 8
  • 9.
    The Last Mile Manual Deployments Insufficient Configuration Management Infrequent, Error Prone Deployments 9
  • 10.
  • 11.
    Frequent Automated Deployments http://flic.kr/p/29Ree 11
  • 12.
  • 13.
    Continuous Deployment Deployment Pipelines Deployment Automation Configuration Continuous Management Testing Integration Agile 13
  • 14.
  • 15.
    Deployment Pipelines A DeploymentPipeline is an automated manifestation of your process for getting software from version control into the hands of your users. 15
  • 16.
    Continuous what? Continuous Continuous Continuous Integration Delivery Deployment 16
  • 17.
    Getting Started Continuous Delivery Applied
  • 18.
    Understand your Process http://www.michaelnygard.com/blog/2008/02/outrunning_your_headlights.html 18
  • 19.
  • 20.
    Developers http://flic.kr/p/5cK2 20
  • 21.
  • 22.
  • 23.
  • 24.
    Static Code Analysis CheckStyle 24
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
    Continuous Integration Check-in Daily Commit to Trunk Automate the Build Keep the Build Fast Every Commit results in Build Test in Clone of Production Automate Deployment 29
  • 30.
  • 31.
    Testing is nota Phase http://flic.kr/p/6bcg 31
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
    Deployment Pipelines (aka Build Pipelines) 43
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
    Monitoring (sucks) https://github.com/monitoringsucks 50
  • 51.
  • 52.
  • 53.
    Further Reading • ContinuousDelivery: Reliable Software Releases through Build, Test and Deployment Automation, by Jez Humble and David Farley - http://www.amazon.com/Continuous-Delivery-Deployment-Automation- Addison-Wesley/dp/0321601912 • Test Driven Development (TDD) – http://en.wikipedia.org/wiki/Test- driven_development • Introducing BDD, by Dan North – http://dannorth.net/introducing-bdd/ • Agile Manifesto – http://agilemanifesto.org/ • Scrum – http://www.scrumalliance.org/learn_about_scrum • Continuous Integration, by Martin Fowler – http://martinfowler.com/articles/continuousIntegration.html • Specification by Example, by Gojko Adzic - http://specificationbyexample.com/ • Build Pipelines - http://www.magpiebrain.com/2009/12/13/a-brief-and- incomplete-history-of-build-pipelines/ 53
  • 54.
    Further Reading • MavenReleases on Steriods, by Axel Fontaine – http://www.axelfontaine.com/2011/01/maven-releases-on-steroids- adios.html • What is in a Name? Usually a version number, actually., by James Betteley - http://jamesbetteley.wordpress.com/2011/07/07/what-is-in-a- name-usually-a-version-number-actually/ • Build Once, Deploy Many - http://earlyandoften.wordpress.com/2010/09/09/build-once-deploy- many/ • Evolutionary Design - http://martinfowler.com/articles/designDead.html • Continuous Deployment - http://timothyfitz.wordpress.com/2009/02/08/continuous-deployment/ • Sonar’s Technical Debt Calculation - http://www.sonarsource.org/evaluate-your-technical-debt-with-sonar/ • Gherkin - https://github.com/cucumber/cucumber/wiki/Gherkin 54
  • 55.
    Tools • Git - http://git-scm.com/ • Subversion - http://subversion.tigris.org/ • Mercurial - http://mercurial.selenic.com/ • Rational ClearCase - http://www- 01.ibm.com/software/awdtools/clearcase/ • Serena Dimensions CM - http://www.serena.com/products/dimensions- cm/index.html • Ant - http://ant.apache.org/ • Ivy - http://ant.apache.org/ivy/ • Maven - http://maven.apache.org/ • Gradle - http://gradle.org/ • JUnit – http://www.junit.org/ • Mockito – http://code.google.com/p/mockito/ • Hamcrest – http://code.google.com/p/hamcrest/ • Spock – http://code.google.com/p/spock/ • dbUnit – http://www.dbunit.org/ • Unitils – http://unitils.org/summary.html 55
  • 56.
    Tools • Findbugs – http://findbugs.sourceforge.net/ • PMD – http://pmd.sourceforge.net/ • Checkstyle – http://checkstyle.sourceforge.net/ • JIRA – http://www.atlassian.com/software/jira/overview • GitHub – https://github.com/ • Jenkins - http://jenkins-ci.org/ • TeamCity – http://www.jetbrains.com/teamcity/ • Nexus – http://www.sonatype.org/nexus/ • Artifactory – http://www.jfrog.com/products.php • Sonar – http://www.sonarsource.org/ • FitNesse – • Concordion – http://www.concordion.org/ • Cucumber – http://cukes.info/ • easyb – http://www.easyb.org/ • jBehave - http://jbehave.org/ • geb - http://www.gebish.org/ 56
  • 57.
    Tools • Liquibase – www.liquibase.org/ • Flyway – http://code.google.com/p/flyway/ • Escape – http://code.google.com/p/escservesconfig/ • Puppet – http://puppetlabs.com/ • Chef – http://www.opscode.com/chef/ • Vagrant – http://vagrantup.com/ • JMeter – http://jmeter.apache.org/ • Nagios - http://www.nagios.org/ 57

Editor's Notes

  • #9 The Last Mile tends to be an obstacle to achieving thisTransition – why are automated deployment so important? Because a feature doesn’t add value until it is in production.
  • #10 Collaboration (DEV + Customer, DEV + Operations)Talking early and often…break down walls. [DevOps]Automation. Automate Everything! Build, Test, Deploy!Frequency. Frequent means small. Easier to troubleshoot, rollback. Reduces Risk.Feedback. Change triggers feedback. Feedback is fast. Team acts on it.
  • #11 Manual DeploymentsInsufficient Configuration ManagementInfrequent, Error Prone Deployments