Slide 1

Slide 1 text

! Continuous Delivery at GitHub @rsanheim

Slide 2

Slide 2 text

! @rsanheim

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

! What is Continuous Delivery?

Slide 5

Slide 5 text

! Software ready to be deployed at any time

Slide 6

Slide 6 text

! Why should we care?

Slide 7

Slide 7 text

!

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

! Besides… Shipping is fun

Slide 10

Slide 10 text

! Releases and cycle time

Slide 11

Slide 11 text

Releases over one year Release 1 Build Test Deploy Bugs Change Requests Release 2 Build Test, Perf, Scaling Deploy Support Requests Complaints QA Revenue $$

Slide 12

Slide 12 text

Releases over half a year Build Deploy Bugs Issues Team Feedback Build & Scale Deploy Bugs Perf Staff Feedback Build Deploy Bugs Genpop Feedback Polish Deploy Bugs Genpop Feedback Polish Deploy Profit - Done!

Slide 13

Slide 13 text

! How?

Slide 14

Slide 14 text

‣ Automation ‣ Tests ‣ Pull Requests ‣ Feature Flags ‣ Chat Ops ‣ Post Deploy

Slide 15

Slide 15 text

! Automation

Slide 16

Slide 16 text

https://www.flickr.com/photos/nasamarshall/5390879521

Slide 17

Slide 17 text

! Tests

Slide 18

Slide 18 text

! SLOC! ! ! ! Directory! ! 60995 test/models! 34526 test/integration! 31106 test/controllers! 25339 test/lib! 12440 test/view_models! 1423 test/jobs! 1029 test/mailers! ! ! ! ruby test loc: 167k! ruby app loc: 158k! ! test / app ratio: 1.06! ! ! generated using David A. Wheeler's 'SLOCCount'

Slide 19

Slide 19 text

! Pull Requests

Slide 20

Slide 20 text

!

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

! Feature Flags

Slide 24

Slide 24 text

def live_updates_enabled? logged_in? && current_user.staff? end

Slide 25

Slide 25 text

<% if live_updates_enabled? %>
<% end %>

Slide 26

Slide 26 text

def live_updates_enabled?! true! end!

Slide 27

Slide 27 text

! git co master

Slide 28

Slide 28 text

! Long lived branches are a smell

Slide 29

Slide 29 text

! Rails 3

Slide 30

Slide 30 text

! rails3-redux

Slide 31

Slide 31 text

! rails3-redux master

Slide 32

Slide 32 text

! ! ! $ RAILS3=true script/bootstrap Bootstrapping the Rails 3 gem environment… ! $ script/bootstrap Bootstrapping the Rails 2 gem environment…

Slide 33

Slide 33 text

! source "https://rubygems.org" ! def rails3? ENV["RAILS3"] end ! if rails3? gem "rails", "3.0.20.github11" else gem "rails", "2.3.14.github50" gem "actionmailer", "2.3.14.github50" gem "actionpack", "2.3.14.github50" gem "activerecord", "2.3.14.github50" gem "activesupport", "2.3.14.github50" end ! gem "will_paginate", rails3? ? "3.0.3" : "2.3.9.github"

Slide 34

Slide 34 text

! ! # Disable plugins on Rails 3 GitHub.only_on_rails_3 do config.plugins = [] end ! # Rails 2 needs the session to be configured before initializing GitHub.only_on_rails_2 do require_relative "initializers/session_store" end

Slide 35

Slide 35 text

! science

Slide 36

Slide 36 text

! https://github.com/github/dat-science

Slide 37

Slide 37 text

! require "dat/science" ! class User include Dat::Science ! def can_read?(model) science "user-can-read" do |e| e.context :caller => caller, :login => login e.enabled { self.id % 3 == 0 } e.control { model.readable_by?(user) } # old way e.candidate { self.can?(:read, model) } # new way end end end

Slide 38

Slide 38 text

! Chat Ops

Slide 39

Slide 39 text

!

Slide 40

Slide 40 text

! /deploy github/my-feature to production /deploy github/my-feature to branch-lab /deploy github/my-feature to production/fe1,fe2,fe3 /deploy github to production /ci build github/master /queue me for github

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

! Post deploy

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

! Done yet?

Slide 47

Slide 47 text

!

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

! Collect Feedback …and act on it

Slide 50

Slide 50 text

! Getting started today

Slide 51

Slide 51 text

! Fin

Slide 52

Slide 52 text

! More adaptable

Slide 53

Slide 53 text

! More flexible

Slide 54

Slide 54 text

! More money

Slide 55

Slide 55 text

! More fun

Slide 56

Slide 56 text

! Thank You