Continuous Delivery
Upcoming SlideShare
Loading in...5
×
 

Continuous Delivery

on

  • 1,545 views

Continuous Delivery overview

Continuous Delivery overview

Statistics

Views

Total Views
1,545
Views on SlideShare
1,543
Embed Views
2

Actions

Likes
2
Downloads
78
Comments
0

2 Embeds 2

http://www.slashdocs.com 1
http://www.docshut.com 1

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \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 Continuous Delivery Presentation Transcript

  • Continuous Delivery
  • Rob Spieldennersoftware developer at Next Century Corporation @robspieldenner rob.spieldenner@gmail.com github.com/rspieldenner
  • Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. from “the agile manifesto”
  • 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 Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
  • 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 installers/bundles
  • Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
  • The Commit Stage
  • continuous integration plus
  • Static Analysisfindbugscodenarcsonarcheckstyle
  • build binaries once
  • keep the runtime short
  • Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
  • 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 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/
  • 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 Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
  • Manual Testing
  • exploratory testing
  • UI check
  • sprint/customer demos
  • your technical debt ...
  • your technical debt ...non-automated acceptance tests
  • Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
  • Other Testing
  • performance testing
  • capacity testing
  • security testing
  • Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
  • Optional Signoffs
  • Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
  • On-DemandDeployment
  • deploy to dev, test, production same
  • apply different configurations
  • Version Control Manual Automated Tests Acceptance Automated TestsCommit Acceptance Deploy to Automated Signoffs Stage Tests Production Acceptance Tests Other Tests Artifact Repository
  • 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 = { 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") } }
  • 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) }
  • 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 unique snowflakesDevOps
  • 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
  • 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 the application one database server one server for ldap and nagios
  • 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/author/Jez-Humblehttp://continuous-delivery.thoughtworks.com/http://devopscafe.org/
  • Resourcesvagrantup.comcukes.infowww.gebish.orgwww.opscode.com/chefpuppetlabs.com