63
DC Continuous Integration, Delivery and Deployment User Group

Continuous delivery applied (DC CI User Group)

Embed Size (px)

DESCRIPTION

These are slides I used to present to the DC Continuous Integration, Delivery and Deployment User Group on Writing code is fun, but deploying to production is not. Production releases are scary events that last all weekend, and you find yourself worrying about how it will go. Did we miss a configuration file? Is the database schema the same as the one in the test environment? Does the last minute hot fix we just applied break any other features? Did I forget to include an installation instruction for the system administrators? Continuous Delivery is a collection of principles and practices aimed at addressing the problems teams typically face when releasing changes to production. By applying rigorous automation, testing and configuration management, teams are able to confidently and consistently deploy changes from version control to production without fear. In this talk, Mike McGarr will provide listeners with an introduction into the world of Continuous Delivery. After an introduction into the concepts and principles of Continuous Delivery, he will discuss many of the techniques for implementing Continuous Delivery and recommend some tools that can be used on your development project.

Citation preview

Page 1: Continuous delivery applied (DC CI User Group)

DC Continuous Integration, Delivery and Deployment User Group

Page 2: Continuous delivery applied (DC CI User Group)

Thank you Excella Consulting

2

Page 3: Continuous delivery applied (DC CI User Group)

Excella is Hiring!

3

Page 4: Continuous delivery applied (DC CI User Group)

• October 15th – Continuous Delivery in the Cloud Case Study (Paul Duvall)

• November 7th – Anatomy of a Build Pipeline (Sam Brown)

• December 13th – Finalizing Speaker

Upcoming Events

4

Page 5: Continuous delivery applied (DC CI User Group)

Continuous DeliveryApplied

Mike [email protected]://earlyandoften.wordpress.com http://www.meetup.com/DC-continuous-integration/ @jmichaelmcgarr

Page 6: Continuous delivery applied (DC CI User Group)

• 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

About Me

6

Page 7: Continuous delivery applied (DC CI User Group)

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

7

Continuous Delivery is…

Page 8: Continuous delivery applied (DC CI User Group)

8

Page 9: Continuous delivery applied (DC CI User Group)

“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

9

Page 10: Continuous delivery applied (DC CI User Group)

Cycle TimeQuality

10

Goals

Page 11: Continuous delivery applied (DC CI User Group)

“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

11

Cycle Time

Page 12: Continuous delivery applied (DC CI User Group)

12

The Last Mile

Manual Deployments

Insufficient Configuration Management

Infrequent, Error Prone Deployments

Page 13: Continuous delivery applied (DC CI User Group)

13

Stressful Releases

Page 14: Continuous delivery applied (DC CI User Group)

14

Frequent Automated Deployments

http://flic.kr/p/29Ree

Page 15: Continuous delivery applied (DC CI User Group)

15

Always Production Ready

Page 16: Continuous delivery applied (DC CI User Group)

16

Agile

ConfigurationManagement

Continuous Integration Testing

Deployment Pipelines

Continuous Deployment

Deployment Automation

Page 17: Continuous delivery applied (DC CI User Group)

17

Deployment Pipelines

http://www.fotopedia.com/users/chmehl

Page 18: Continuous delivery applied (DC CI User Group)

18

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 19: Continuous delivery applied (DC CI User Group)

19

Deployment Pipelines(aka Build Pipelines)

Page 20: Continuous delivery applied (DC CI User Group)

20

Continuous what?

ContinuousDelivery

ContinuousDeployment

ContinuousIntegration

Page 21: Continuous delivery applied (DC CI User Group)

Getting Started

Continuous Delivery Applied

Page 22: Continuous delivery applied (DC CI User Group)

22

Understand your Process

http://www.michaelnygard.com/blog/2008/02/outrunning_your_headlights.html

Page 23: Continuous delivery applied (DC CI User Group)

23

Understand your Organization

Page 24: Continuous delivery applied (DC CI User Group)

24

Developers

http://flic.kr/p/5cK2

Page 25: Continuous delivery applied (DC CI User Group)

25

Deployment Pipelines(aka Build Pipelines)

Page 26: Continuous delivery applied (DC CI User Group)

26

Test Driven Development

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

Page 27: Continuous delivery applied (DC CI User Group)

27

Evolutionary Design

Page 28: Continuous delivery applied (DC CI User Group)

28

Automate the Build

Page 29: Continuous delivery applied (DC CI User Group)

29

Static Code Analysis

CheckStyle

Page 30: Continuous delivery applied (DC CI User Group)

30

Technical Debt

Page 31: Continuous delivery applied (DC CI User Group)

31

The Team

Page 32: Continuous delivery applied (DC CI User Group)

32

Agile

Page 33: Continuous delivery applied (DC CI User Group)

33

Continuous Integration

Page 34: Continuous delivery applied (DC CI User Group)

34

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 35: Continuous delivery applied (DC CI User Group)

35

Testing

Page 36: Continuous delivery applied (DC CI User Group)

36

Testing Phases

Page 37: Continuous delivery applied (DC CI User Group)

37

Testing is not a Phase

http://flic.kr/p/6bcg

Page 38: Continuous delivery applied (DC CI User Group)

38

Specification by Example

Page 39: Continuous delivery applied (DC CI User Group)

39

Specification by Example

Page 40: Continuous delivery applied (DC CI User Group)

40

Automated Performance Testing

Page 41: Continuous delivery applied (DC CI User Group)

41

Configuration Management

Page 42: Continuous delivery applied (DC CI User Group)

Version Control

42

Page 43: Continuous delivery applied (DC CI User Group)

43

Build Once, Deploy Many

Page 44: Continuous delivery applied (DC CI User Group)

Artifact Repositories

44

Page 45: Continuous delivery applied (DC CI User Group)

45

Traceability

Page 46: Continuous delivery applied (DC CI User Group)

46

Versioning Numbers

Page 47: Continuous delivery applied (DC CI User Group)

Externalize Configuration

47

ESCAPE Database

Page 48: Continuous delivery applied (DC CI User Group)

48

Deploying

Page 49: Continuous delivery applied (DC CI User Group)

49

Deployment Pipelines(aka Build Pipelines)

Page 50: Continuous delivery applied (DC CI User Group)

Code Deployments

50

Page 51: Continuous delivery applied (DC CI User Group)

Version your Database

51

Page 52: Continuous delivery applied (DC CI User Group)

52

Page 53: Continuous delivery applied (DC CI User Group)

Infrastructure as Code

53

Page 54: Continuous delivery applied (DC CI User Group)

54

Puppet

Page 55: Continuous delivery applied (DC CI User Group)

Vagrant

55

Page 56: Continuous delivery applied (DC CI User Group)

56

Monitoring (sucks)

https://github.com/monitoringsucks

Page 57: Continuous delivery applied (DC CI User Group)

57

Continuous Deployment

Page 58: Continuous delivery applied (DC CI User Group)

58

Contact Me

Mike McGarr

[email protected]

http://earlyandoften.wordpress.com

@jmichaelmcgarr

Page 59: Continuous delivery applied (DC CI User Group)

59

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/

Page 60: Continuous delivery applied (DC CI User Group)

60

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 61: Continuous delivery applied (DC CI User Group)

61

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 62: Continuous delivery applied (DC CI User Group)

62

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/

Page 63: Continuous delivery applied (DC CI User Group)

63

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/