Skip to content

Instantly share code, notes, and snippets.

@matthewmccullough
Created February 27, 2014 22:42
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save matthewmccullough/9261215 to your computer and use it in GitHub Desktop.
layout title description path
bare
Continuous Delivery
The next step in the evolution of software development is making ever smaller changes and continually deploying to production.
technology/_posts/2001-01-01-lesson-continuous-delivery.md

Continuous delivery is the current buzz, but let's take a few minutes to demystify it. 1. Does it work? 2. How would you go about getting towards that mode of operation? 3. Why would you want to have continuous delivery? 4. What tools facilitate this? You'll leave a transformed developer. The idea of releases being non-stressful and able to be merged in on Friday at 4pm is attractive to the majority of us who have suffered at the hands of the "awful rollback" and the "long weekend." These travails are partially the result of being on the opposite end of the spectrum from continuous delivery. Come with an open mind to branching strategies, feature toggles, and Readme-driven development.

Resources

Talk Slides

<script async class="speakerdeck-embed" data-id="506c973a7e8497000200fbe5" data-ratio="1.7777777777777777" src="//speakerdeck.com/assets/embed.js"></script>

Concepts

Leaders

Continuous Delivery

Build Automation

Testing

Small Changes

Continuous Integration

Deploying

Feature Toggles

Graceful Failures

Monitoring

PaaS

Companies Leading the Way

Outline, Notes

  • Two people chatting
    • Person 1: Build it!
    • Person 2: How?
    • Person 1: Here, I'll tell you how.
  • This is a failure. Bus number of 1. Until vacation. Then bus number .75
  • Write the instructions down.
  • Then turn the instructions into a script.
  • Uptime
  • GitHub deployment frequency, stats
  • Fail forward (don't roll back; try to fix)
  • Easy rollbacks actually == fail forward
  • git revert is a surgical rollback of a single or list of commits
  • All processes must be scripted
    • Bash
    • Batch file
    • Powershell
    • Ruby
  • Continuous integration
  • Constant status visibility
    • Dashboards
    • Commit status API
    • Plugins for Jenkins
    • Status wall plugin for Jenkins
    • Janky at GitHub
  • Programming is translating human requirements into machine instructions
    • There is no need to repeat this over and over for the same task
    • Computer's job is to repeat
  • Continuous delivery is a way of life, not a certification
    • Suggestions, not rules
    • Examples, not dogma
    • Scale and time intervals will be determined by your product type (desktop, web app)
  • This is not Scrum Certified™
    • More like religion, but not dogma
    • Like the judge and porn, CD is "You know it when you see it"
  • Hubot
    • OSS
    • Chat room
    • Starts builds
    • Reports on status
    • Gets build status, what's undeployed
  • Enforce practices through social means, not rules in tools
  • Teams must buy into this idea. You can't force it.
  • Partial deploys
    • Flipper (OSS from GitHub)
    • Percentage deployments at Etsy
  • Testing
    • Kent beck quotes
    • How much?
    • Integration or unit tests?
    • Must have this in place or nothing else about CD makes sense
  • Everything is code
    • Machines
    • Environment
    • Build tools (.travisci configuration file)
    • No unique snowflake named machines
    • Show "The Setup" at GitHub
  • Why CD?
    • No more late nights
    • Developer happiness
    • More correct actions
    • Fewer mistakes
    • Better audit trail
    • Scalability of humans and machines
    • Tasks performed by anyone, not just "the expert"
  • Agility
    • A strong component of CD
    • Must have small sprints
    • No 6-month-baking of a feature
    • Feature toggles let you deploy early
  • Releases
    • Can have auto-deploy
    • Can also human-elect if a candidate should deploy
  • Decomposition into small pieces
    • Quote from Kent Beck about how it is hard
    • Simple steps (hard to get to simple)
    • Complexity is the natural tendency in software
    • Readme driven design (Tweet quote from Brandon Keepers)
    • Build branches (pull requests) as early as possible
  • Science
    • Metrics driven decisions
    • Sometimes AB tests (Etsy)
    • Others applying intuition and interpretation to data
    • Big screen of stats at GitHub
    • Cigarettes are bad for you. Why do we still smoke them? Big releases are bad for you.
  • Audit
    • You can't find the real cause if you can't audit what happened.
    • People remember inaccurately. They develop, like a tragedy, a shared understanding of what happened (not accurate)
    • Can't audit if purely human performed
    • Must have it scripted and done by a robot
    • Variance in human run-through of a process, but no variance by the machine
  • Dangers
    • Saturated a satellite connection
    • Saturated a Git host (GitHub Enterprise, Etsy)
    • Saturated a network connection (Etsy) (Link to blog post about 1000 steps)
    • Lighter-weight Git xfers make saturation less of a risk
  • Risks
    • Build fewer features (but more of the right ones)
    • Kill more features (early, so you haven't wasted time)
    • Debate more (on technical merits) on what to keep and what to toss
  • Type of apps
    • Works for web apps (typical story)
    • Also works for desktop apps
    • Link to GitHub for Windows blog post, percentage of folks upgraded in 24h
  • DVCS usage patterns
    • Book link to Zachary's repo
  • Continuous Delivery Book
  • Tools
    • Etsy deployinator
    • Hubot
    • Janky
    • Jenkins
    • Jenkins Git, GitHub plugins
layout title description path
bare
Continuous Integration
Continuously building and testing your code.
technology/_posts/2001-01-01-lesson-continuous-integration.md

Bamboo

Git support previously was available as an optional open source plugin for Bamboo, but now is available out of the box.

The Git plugin was authored by Kristian Rosenvold of Zenior AS in Norway and Don Brown of Atlassian.

For post-build pushes of repos up-stream, the Pre/Post Build Command Plugin will assist in calling git (must be on the Bamboo server's path):

git push FULLREPOURL BRANCHNAMETOPUSH:BRANCHNAMEONREMOTESIDE

With an actual URL

git push git://git.apache.org/commons-logging.git master-trial:master

Jenkins

Jenkins is an open source CI server. It has excellent Git integration via the Git plugin.

Commit Status API

GitHub has a Commit Status API and associated UI decorations that facilitates integration with any Continuous Integration server. It currently is supported by Travis CI, Jenkins, and others.

Other Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment