Continuous Delivery
Rob Spieldennersoftware developer at Next Century Corporation                   @robspieldenner              rob.spieldenn...
Our highest priority is to  satisfy the customer   through early and continuous delivery of   valuable software.          ...
How long would it take yourorganization to get a singleline change into production?
Invent the Future
Create awesomesoftware that doeswhat the customer      wants
Eliminate Test-Fix-Test
Make Releases Non-Events
Avoid Firedrills
Continuous Integration Continuous DeliveryContinuous Deployment
OutlineBuild PipelineLess Fragile Automated Acceptance TestsInfrastructure as Code
The Build Pipeline
Version Control                             Manual          Automated                              Tests          Acceptan...
Version Control         &Artifact Repository
What goes in version control?
Everything
Everythingthat can’t be rebuilt
What goes in the artifact      repository?
binary output from the buildslibraries pulled through gradle/ivy/mavenbase vm imagesapt/yum repositoriesapplication instal...
Version Control                             Manual          Automated                              Tests          Acceptan...
The Commit Stage
continuous integration plus
Static Analysisfindbugscodenarcsonarcheckstyle
build binaries once
keep the runtime short
Version Control                             Manual          Automated                              Tests          Acceptan...
Automated Acceptance       Tests
executable specifications
write in domain language
Cucumber ExampleFeature: Search courses  In order to ensure better utilization of courses  Potential students should be ab...
parallelize
why automated?
having humans perform repetitive,scripted manual tests is wasteful
need quick feedback to always be         ready to deliver
avoid test-fix-test “last mile”
Version Control                             Manual          Automated                              Tests          Acceptan...
Manual Testing
exploratory testing
UI check
sprint/customer demos
your technical debt ...
your technical debt ...non-automated acceptance tests
Version Control                             Manual          Automated                              Tests          Acceptan...
Other Testing
performance testing
capacity testing
security testing
Version Control                             Manual          Automated                              Tests          Acceptan...
Optional Signoffs
Version Control                             Manual          Automated                              Tests          Acceptan...
On-DemandDeployment
deploy to dev, test, production            same
apply different configurations
Version Control                             Manual          Automated                              Tests          Acceptan...
Path to Continuous     Delivery
version control      andautomated build
automated deployment scripts
cleanup builds to extract      configuration
automated acceptance tests
automate infrastructure
OutlineBuild PipelineLess Fragile Automated Acceptance TestsInfrastructure as Code
Less Fragile Automated   Acceptance Tests
Write Tests at the Domain Level
Page Object Model
Geb Page Objectsimport geb.Pageclass LoginPage extends Page {    static url = "http://myapp.com/login"    static at = { he...
Test Code Using Geb Page Objects  import geb.Browser  Browser.drive {      to LoginPage      assert at(LoginPage)      log...
Cucumber/EasyB Acceptance testsabstraction layer (Page Objects,        Window Driver)          application
OutlineBuild PipelineLess Fragile Automated Acceptance TestsInfrastructure as Code
Infrastructure as Code
BenefitsConfiguration Management via version controlcan rebuild exact infrastructure for anypoint in project historyno uniqu...
chef examplepackage "ntp" do  action [:install]endntp_server = data_bag_item(ntp, default_server)template "/etc/ntp.conf" ...
virtualization
virtualbox and vagrant
veewee to create OS base image
chef or puppetto describe each system
vagrantto manage vms on dev machines
Notional EnvironmentMultiple clusters networked together in adistributed workflowA cluster is  one server with jboss for th...
Setup base vm - Ubuntu 12.04Create Chef recipes for server components  rpm packages(w/versions)  jdk 7, jboss  oracle
Create overarching Chef recipe  one per server  applies lower level/reusable recipesSetup cluster in vagrant
Other Techniques
Branch by Abstraction
Feature Toggles
Zero Downtime Deploys
Blue Green Deploys
Project Immune System
Database Versioning
Resourceshttp://refcardz.dzone.com/refcardz/continuous-delivery-patternshttp://continuousdelivery.com/http://www.infoq.com...
Resourcesvagrantup.comcukes.infowww.gebish.orgwww.opscode.com/chefpuppetlabs.com
Continuous Delivery
Continuous Delivery
Continuous Delivery
Continuous Delivery
Upcoming SlideShare
Loading in...5
×

Continuous Delivery

1,327

Published on

Continuous Delivery overview

Published in: Technology, Education
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,327
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
83
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Integration - all team member commit at least once a day, automatic build, automated unit tests\nDelivery - Integration plus, deployment scripts, hopefully infrastructure as code, anything passing auto levels is able to be deployed on demand\nDeployment - Delivery with auto deployment (Flickr was last deployed 4 hours ago, including 1 change by 1 person. In the last week there were 84 deploys of 537 changes by 24 people.)\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • - source code\n- infrastructure (Chef/Puppet) (preseed/kickstart)\n- test scripts\n- deployment scripts\n- build scripts\n
  • - source code\n- infrastructure (Chef/Puppet) (preseed/kickstart)\n- test scripts\n- deployment scripts\n- build scripts\n
  • \n
  • \n
  • \n
  • Trigger: commit to version control\nOutputs: binaries, static analysis output\n
  • compile\nunit test\nstatic analysis\nbinary\n
  • \n
  • all runtime configuration separated\ndeployment script job, jmx, jndi\n
  • < 10 minutes\n
  • \n
  • Trigger: updated binary from compile stage\nOutputs: test reports\n
  • Cucumber, easyb, spock, FitNesse\n
  • \n
  • \n
  • \n
  • \n
  • Waste of money\nError prone\nTest-fix-test\nhumans should be treated better, computers can perform the exact sequence of steps very quickly, humans should be doing exporatory testing\n
  • \n
  • (time to implement + time to maintain) < (time to manual test) * manual test cycles during project\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • The public methods represent the services that the page offers\nTry not to expose the internals of the page\nGenerally don't make assertions\nMethods return other PageObjects\nNeed not represent an entire page\nDifferent results for the same action are modelled as different methods\n\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • OS base install, with ruby, RubyGems, and chef installed\n
  • chef\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Continuous Delivery

    1. 1. Continuous Delivery
    2. 2. Rob Spieldennersoftware developer at Next Century Corporation @robspieldenner rob.spieldenner@gmail.com github.com/rspieldenner
    3. 3. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. from “the agile manifesto”
    4. 4. How long would it take yourorganization to get a singleline change into production?
    5. 5. Invent the Future
    6. 6. Create awesomesoftware that doeswhat the customer wants
    7. 7. Eliminate Test-Fix-Test
    8. 8. Make Releases Non-Events
    9. 9. Avoid Firedrills
    10. 10. Continuous Integration Continuous DeliveryContinuous Deployment
    11. 11. OutlineBuild PipelineLess Fragile Automated Acceptance TestsInfrastructure as Code
    12. 12. The Build Pipeline
    13. 13. Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
    14. 14. Version Control &Artifact Repository
    15. 15. What goes in version control?
    16. 16. Everything
    17. 17. Everythingthat can’t be rebuilt
    18. 18. What goes in the artifact repository?
    19. 19. binary output from the buildslibraries pulled through gradle/ivy/mavenbase vm imagesapt/yum repositoriesapplication installers/bundles
    20. 20. Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
    21. 21. The Commit Stage
    22. 22. continuous integration plus
    23. 23. Static Analysisfindbugscodenarcsonarcheckstyle
    24. 24. build binaries once
    25. 25. keep the runtime short
    26. 26. Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
    27. 27. Automated Acceptance Tests
    28. 28. executable specifications
    29. 29. write in domain language
    30. 30. Cucumber ExampleFeature: Search courses In order to ensure better utilization of courses Potential students should be able to search for courses Scenario: Search by topic Given there are 240 courses which do not have the topic "biology" And there are 2 courses A001, B205 that each have "biology" as one of thetopics When I search for "biology" Then I should see the following courses: | Course code | | A001 | | B205 | https://github.com/cucumber/cucumber/wiki/
    31. 31. parallelize
    32. 32. why automated?
    33. 33. having humans perform repetitive,scripted manual tests is wasteful
    34. 34. need quick feedback to always be ready to deliver
    35. 35. avoid test-fix-test “last mile”
    36. 36. Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
    37. 37. Manual Testing
    38. 38. exploratory testing
    39. 39. UI check
    40. 40. sprint/customer demos
    41. 41. your technical debt ...
    42. 42. your technical debt ...non-automated acceptance tests
    43. 43. Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
    44. 44. Other Testing
    45. 45. performance testing
    46. 46. capacity testing
    47. 47. security testing
    48. 48. Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
    49. 49. Optional Signoffs
    50. 50. Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
    51. 51. On-DemandDeployment
    52. 52. deploy to dev, test, production same
    53. 53. apply different configurations
    54. 54. Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
    55. 55. Path to Continuous Delivery
    56. 56. version control andautomated build
    57. 57. automated deployment scripts
    58. 58. cleanup builds to extract configuration
    59. 59. automated acceptance tests
    60. 60. automate infrastructure
    61. 61. OutlineBuild PipelineLess Fragile Automated Acceptance TestsInfrastructure as Code
    62. 62. Less Fragile Automated Acceptance Tests
    63. 63. Write Tests at the Domain Level
    64. 64. Page Object Model
    65. 65. Geb Page Objectsimport geb.Pageclass LoginPage extends Page { static url = "http://myapp.com/login" static at = { heading.text() == "Please Login" } static content = { heading { $("h1") } loginForm { $("form.login") } loginButton(to: AdminPage) { loginForm.login() } }}class AdminPage extends Page { static at = { heading.text() == "Admin Section" } static content = { heading { $("h1") } }
    66. 66. Test Code Using Geb Page Objects import geb.Browser Browser.drive { to LoginPage assert at(LoginPage) loginForm.with { username = "admin" password = "password" } loginButton.click() assert at(AdminPage) }
    67. 67. Cucumber/EasyB Acceptance testsabstraction layer (Page Objects, Window Driver) application
    68. 68. OutlineBuild PipelineLess Fragile Automated Acceptance TestsInfrastructure as Code
    69. 69. Infrastructure as Code
    70. 70. BenefitsConfiguration Management via version controlcan rebuild exact infrastructure for anypoint in project historyno unique snowflakesDevOps
    71. 71. chef examplepackage "ntp" do action [:install]endntp_server = data_bag_item(ntp, default_server)template "/etc/ntp.conf" do source "ntp.conf.erb" variables( :ntp_server => ntp_server[value] ) notifies :restart, "service[ntpd]"endservice "ntpd" do action[:enable,:start]end
    72. 72. virtualization
    73. 73. virtualbox and vagrant
    74. 74. veewee to create OS base image
    75. 75. chef or puppetto describe each system
    76. 76. vagrantto manage vms on dev machines
    77. 77. Notional EnvironmentMultiple clusters networked together in adistributed workflowA cluster is one server with jboss for the application one database server one server for ldap and nagios
    78. 78. Setup base vm - Ubuntu 12.04Create Chef recipes for server components rpm packages(w/versions) jdk 7, jboss oracle
    79. 79. Create overarching Chef recipe one per server applies lower level/reusable recipesSetup cluster in vagrant
    80. 80. Other Techniques
    81. 81. Branch by Abstraction
    82. 82. Feature Toggles
    83. 83. Zero Downtime Deploys
    84. 84. Blue Green Deploys
    85. 85. Project Immune System
    86. 86. Database Versioning
    87. 87. Resourceshttp://refcardz.dzone.com/refcardz/continuous-delivery-patternshttp://continuousdelivery.com/http://www.infoq.com/author/Jez-Humblehttp://continuous-delivery.thoughtworks.com/http://devopscafe.org/
    88. 88. Resourcesvagrantup.comcukes.infowww.gebish.orgwww.opscode.com/chefpuppetlabs.com
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×