continuous delivery applied (rjug)
DESCRIPTION
Latest rendition of my CD talk given a the the Richmond JUG.TRANSCRIPT
![Page 1: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/1.jpg)
Continuous DeliveryApplied
Mike [email protected]@jmichaelmcgarrhttp://earlyandoften.wordpress.com http://www.meetup.com/DC-continuous-integration/
![Page 2: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/2.jpg)
• J. Michael (Mike) McGarr
• 12 years as a software engineer
• Director of DevOps for Learn, Blackboard
• Founder of the DC Continuous Integration, Delivery, and Deployment Meetup
About Me
2
![Page 3: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/3.jpg)
3
Continuous Delivery“Continuous delivery is a set of practices and principles aimed at, building, testing and releasing software faster and more frequently”
cycle time
![Page 4: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/4.jpg)
4
![Page 5: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/5.jpg)
Quality or Speed
5
![Page 6: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/6.jpg)
“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
6
Cycle Time
![Page 7: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/7.jpg)
7
The Last Mile
Manual Deployments
Insufficient Configuration Management
Infrequent, Error Prone Deployments
![Page 8: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/8.jpg)
8
Stressful Releases
![Page 9: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/9.jpg)
9
Frequent Automated Deployments
http://flic.kr/p/29Ree
![Page 10: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/10.jpg)
10
Always Production Ready
![Page 11: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/11.jpg)
11
Principles:
• Improve continuously• Releasing software MUST be
repeatable and reliable• Automate everything!• If it hurts, do it more often• Keep everything in version control• Done means “released”• Build quality in!• Everybody has responsibility for
the release process
Agile
ConfigurationManagement
Continuous Integration Testing
Build Pipelines
Continuous Deployment (DevOps)
Deployment Automation
Practices:
Applying Continuous Delivery
![Page 12: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/12.jpg)
12
Deployment Pipelines
http://www.fotopedia.com/users/chmehl
![Page 13: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/13.jpg)
13
Deployment Pipelines
A Deployment Pipeline is an automated manifestation of your process for getting software from version control into the hands of your users.
![Page 14: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/14.jpg)
14
Deployment Pipelines(aka Build Pipelines)
![Page 15: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/15.jpg)
15
Continuous what?
ContinuousDelivery
ContinuousDeployment
ContinuousIntegration
commit =a build
commit = shippable
product
commit =production
release
![Page 16: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/16.jpg)
Getting Started
http://commons.wikimedia.org/wiki/User:VaGla/The_Human_Race_10k_2008_Warszawa
![Page 17: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/17.jpg)
17
Understand your Organization
![Page 18: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/18.jpg)
18
Understand your Value Stream
![Page 19: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/19.jpg)
19
Visualize Flow
![Page 20: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/20.jpg)
20
Small Batches
![Page 21: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/21.jpg)
21
DevOps
http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
![Page 22: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/22.jpg)
It’s all about culture!
22
http://dev2ops.org/2012/10/devops-transformation-workshop-for-technical-managers/
![Page 23: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/23.jpg)
23
Configuration Management
![Page 24: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/24.jpg)
Version Control
24
• Version Everything
• Tool should stay out of the way
• Good Branching Strategy
• Don’t check-in binary files
![Page 25: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/25.jpg)
25
Automate the Build
• No IDE Builds!• KISS• Fail Fast (but smartly)• No Wiki’s to Build• Pick an appropriate
Technology• Keep it organized• Dependency Management
![Page 26: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/26.jpg)
26
Build Once, Deploy Many
![Page 27: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/27.jpg)
Binary Repositories
27
![Page 28: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/28.jpg)
28
Testing
![Page 29: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/29.jpg)
29
Testing is not a Phase
http://flic.kr/p/6bcg
![Page 30: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/30.jpg)
30
Types of Tests
![Page 31: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/31.jpg)
31
Testing Pyramid
![Page 32: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/32.jpg)
32
Unit Testing
Fast
Independent
Repeatable
Self-Verifying
Timely
![Page 33: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/33.jpg)
33
Test Driven Development
http://reddevnews.com/articles/2007/11/01/testdriven-development-tdd.aspx
![Page 34: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/34.jpg)
34
Specification by Example
![Page 35: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/35.jpg)
35
Specification by Example
![Page 36: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/36.jpg)
36
Automated Performance Testing
![Page 37: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/37.jpg)
37
Static Code Analysis
CheckStyle
![Page 38: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/38.jpg)
Continuous Integration
http://flic.kr/p/6hDAEK
![Page 39: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/39.jpg)
39
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
![Page 40: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/40.jpg)
40
Build Pipeline in Jenkins
![Page 41: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/41.jpg)
41
Deploying
![Page 42: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/42.jpg)
42
Automated Deployments
![Page 43: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/43.jpg)
Code Deployments
43
1. Push New Binary to Server2. Stop Server3. Archive Old Binary4. Deploy New Binary5. Start Server
![Page 44: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/44.jpg)
Version your Database
44
![Page 45: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/45.jpg)
Database Deployments
45
VersionControl
DBChange
DBChange
DB Change
BuildServer
Production
Test
Dev
.sqlHTML
DBA
![Page 46: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/46.jpg)
46
![Page 47: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/47.jpg)
Infrastructure as Code
47
![Page 48: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/48.jpg)
48
Puppet
![Page 49: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/49.jpg)
Vagrant
49
![Page 50: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/50.jpg)
Architecture and Design
http://www.hdwallpapers.in/eiffel_tower_at_night_paris_france-wallpapers.html
![Page 51: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/51.jpg)
Testable Design
51
Coherence
Coupling
![Page 52: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/52.jpg)
Modularization
52http://www.voltron.com/#/history/show/lion-force-voltron
![Page 53: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/53.jpg)
53
Evolutionary Design
![Page 54: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/54.jpg)
54
Continuous Deployment
![Page 55: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/55.jpg)
55
Monitoring (sucks)
https://github.com/monitoringsucks
![Page 56: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/56.jpg)
56
Key Takeaways
• Continuous Delivery is hard
• Fast Feedback is the key
• Small, frequent releases
• Version everything
• Automate everything
• Think culture
![Page 57: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/57.jpg)
57
Contact Me
Mike McGarr
@jmichaelmcgarr
http://earlyandoften.wordpress.com
![Page 58: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/58.jpg)
58
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
• Continuous Integration, By Paul M Duvall - http://www.amazon.com/Continuous-Integration-Improving-Software-Reducing/dp/0321336380
• Refactoring Databases, By Scott Ambler and Pramod Sadalage - http://www.amazon.com/Refactoring-Databases-Evolutionary-paperback-Addison-Wesley/dp/0321774515
• Refactoring, By Martin Fowler - http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672
• Growing Object-Oriented Software, Guided by Tests, by Steven Freeman and Nat Pryce - http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627
![Page 59: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/59.jpg)
59
Further Reading• Extreme Programming Explained, by Kent Beck -
http://www.amazon.com/Extreme-Programming-Explained-Embrace-Change/dp/0201616416
• Release It!, by Michael Nygard - http://pragprog.com/book/mnee/release-it
• xUnit Test Patterns, by Gerard Meszaros - http://www.amazon.com/xUnit-Test-Patterns-Refactoring-Code/dp/0131495054
• Working Effectively with Legacy Code, by Michael Feathers - http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052
• Agile Testing, by Lisa Crispin and Janet Gregory - http://www.amazon.com/Agile-Testing-Practical-Guide-Testers/dp/0321534468
![Page 60: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/60.jpg)
60
Further Reading• 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/
• Implementing Lean Software Development, by Mary and Tom Poppendieck - http://www.amazon.com/Implementing-Lean-Software-Development-Concept/dp/0321437381
![Page 61: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/61.jpg)
61
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
![Page 62: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/62.jpg)
62
Further Reading• Branch by Abstraction, by Paul Hammant
http://paulhammant.com/blog/branch_by_abstraction.html • Making Large Scale Changes Incrementally with Branch by Abstraction,
by Jez Humble - http://continuousdelivery.com/2011/05/make-large-scale-changes-incrementally-with-branch-by-abstraction/
• What is DevOps?, by Damon Edwards - http://dev2ops.org/2010/02/what-is-devops/
• Monitoring Sucks - https://github.com/monitoringsucks
![Page 63: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/63.jpg)
63
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
![Page 64: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/64.jpg)
64
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 – http://fitnesse.org/ • Concordion – http://www.concordion.org/• Cucumber – http://cukes.info/• easyb – http://www.easyb.org/• jBehave - http://jbehave.org/• geb - http://www.gebish.org/
![Page 65: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/65.jpg)
65
Tools• Liquibase – www.liquibase.org/ • Flyway – http://code.google.com/p/flyway/• Escape – http://code.google.com/p/escservesconfig/• Capistrano - https://github.com/capistrano/capistrano • Deployinator - https://github.com/etsy/deployinator • Puppet – http://puppetlabs.com/• Chef – http://www.opscode.com/chef/• Ansible - http://ansible.cc/ • Vagrant – http://vagrantup.com/• JMeter – http://jmeter.apache.org/• Nagios - http://www.nagios.org/• Logstash - http://logstash.net/ • StatsD – https://github.com/etsy/statsd • Metrics – http://metrics.codahale.com/ • Ganglia – http://ganglia.sourceforge.net/ • Graphite - http://graphite.wikidot.com/
![Page 66: Continuous delivery applied (RJUG)](https://reader038.vdocuments.mx/reader038/viewer/2022103113/554bc486b4c90594278b5418/html5/thumbnails/66.jpg)
66
Testing Pyramids• http://fabiopereira.me/blog/2012/03/05/testing-pyramid-a-case-study/• http://www.takadevelop.com/2013/02/09/testing-pyramid-for-agile-devel
opment/
• http://blogs.agilefaqs.com/2011/02/01/inverting-the-testing-pyramid/• http://martinfowler.com/bliki/TestPyramid.html• http://mifos.org/contributors/qa-testing/future-quality-improvements-
mifos• http://www.ibm.com/developerworks/java/library/j-aopwork11/