Slide 1

Slide 1 text

> hubot deploy GitHub !

Slide 2

Slide 2 text

! Hello, my name is Wynn.

Slide 3

Slide 3 text

! GitHub

Slide 4

Slide 4 text

! Folks call me @pengwynn.

Slide 5

Slide 5 text

! !

Slide 6

Slide 6 text

! hubot image me razorback car >

Slide 7

Slide 7 text

! hubot who is pengwynn > pengwynn is going to fix the API, might've broken the site, CAN'T HANDLE THE HEAT, Lex Luther, Lex Luthor, dabesssss, gives zero ☐'s, trusted, wynning - DUH, rolls in his api rapper mobile, definitely not in Los Angeles, plays dependency dominoes, ".

Slide 8

Slide 8 text

! hubot deploy github >

Slide 9

Slide 9 text

Wait. Wut? !

Slide 10

Slide 10 text

You deploy your site FROM CHAT? !

Slide 11

Slide 11 text

Are you from THE FUTURE? !

Slide 12

Slide 12 text

It sure feels like it. !

Slide 13

Slide 13 text

How" has !'d over the years. !

Slide 14

Slide 14 text

1989 10 PRINT "WYNN" 20 GOTO 10

Slide 15

Slide 15 text

1994

Slide 16

Slide 16 text

1999 !

Slide 17

Slide 17 text

2004 !

Slide 18

Slide 18 text

2009 ! # General configuration settings, required for all recipes! set :application, "project-name" set :domain, "project-domain" set :extra_domains, %w() # Add something like www.project-domain.com role :app, domain role :web, domain role :db, domain, :primary => true ! # set :user, "user" ! # Deployment Settings set :repository, "repository url" set :deploy_to, "/absolute/path/to/location/your/server" set :deploy_via, :checkout set :config_files, %w() ! # SSH Keys for caching (you must generate these first.) ssh_options[:keys] = %w(~/.ssh/mykey1 ~/.ssh/mykey2) ! # Change this to :thin if you want to use Thin instead. set :app_server, :mongrel ! # Change this to :merb if you want to use Merb instead. (experimental) set :app_framework, :rails ! # ============================================================= # Application Server Settings (Thin or Mongrel) # ============================================================= set :app_servers, 1 set :app_server_port, 7007 set :app_environment, 'production' set :app_server_address, '127.0.0.1' set :app_server_conf, "#{shared_path}/config/thin.yml" ! # ============================================================= # Nginx Settings

Slide 19

Slide 19 text

Today !

Slide 20

Slide 20 text

! Start with a Pull Request.

Slide 21

Slide 21 text

!

Slide 22

Slide 22 text

! Create a branch.

Slide 23

Slide 23 text

! "Git branches are like unlimited lives." ! - @tlberglund

Slide 24

Slide 24 text

! ↑ ↑ ↓ ↓ ← → ← → B A

Slide 25

Slide 25 text

! Create a branch.

Slide 26

Slide 26 text

! Add commits.

Slide 27

Slide 27 text

! Open a pull request.

Slide 28

Slide 28 text

! Discuss and review.

Slide 29

Slide 29 text

! Merge and deploy.

Slide 30

Slide 30 text

! Or deploy and merge. !

Slide 31

Slide 31 text

! "

Slide 32

Slide 32 text

!

Slide 33

Slide 33 text

! The following deployments are based on actual events. Branch names and SHAs have been changed to protect the innocent.

Slide 34

Slide 34 text

! hubot where can I deploy? > Environments for github ----------------------------------------------------- production: unlocked lab-one: locked 6 hours ago by jasonrudolph lab-two: unlocked sekret-lab: unlocked playground: unlocked

Slide 35

Slide 35 text

! hubot deploy github/api-my-feature to production >

Slide 36

Slide 36 text

! hubot deploy github/api-my-feature to production > project

Slide 37

Slide 37 text

! hubot deploy github/api-my-feature to production > branch

Slide 38

Slide 38 text

! hubot deploy github/api-my-feature to production > environment

Slide 39

Slide 39 text

! hubot deploy github/api-my-feature to production > Merge master into api-my-feature for pengwynn - hubot github/github@deadbeef

Slide 40

Slide 40 text

! Get up to date with master. ⏳

Slide 41

Slide 41 text

! Wait on the CI server. $

Slide 42

Slide 42 text

! hubot tv me >

Slide 43

Slide 43 text

!

Slide 44

Slide 44 text

! hubot tv me >

Slide 45

Slide 45 text

! hubot deploy github/api-my-feature to production > Build #8675309 (deadbeef) of github/api-my-feature failed (203s)

Slide 46

Slide 46 text

! Start over.

Slide 47

Slide 47 text

! hubot deploy github/api-my-feature to production > Build #8675309 (deadbeef) of github/api-my-feature was successful (203s)

Slide 48

Slide 48 text

! Release the kraken! %

Slide 49

Slide 49 text

! hubot deploy github/api-my-feature to production >

Slide 50

Slide 50 text

! hubot deploy github/api-my-feature to production > pengwynn is deploying github/api-my-feature (beefdead..deadbeef) to production pengwynn's production deployment of github is NOW &&&! (22s)

Slide 51

Slide 51 text

! "The first transport is away!"

Slide 52

Slide 52 text

! Test and observe.

Slide 53

Slide 53 text

!

Slide 54

Slide 54 text

!

Slide 55

Slide 55 text

!

Slide 56

Slide 56 text

!

Slide 57

Slide 57 text

!

Slide 58

Slide 58 text

! Problem? ABORT. '

Slide 59

Slide 59 text

! hubot deploy github > pengwynn is deploying github/master to production

Slide 60

Slide 60 text

! Philosophy

Slide 61

Slide 61 text

! Fail forward vs. rollback

Slide 62

Slide 62 text

! ✨Everything )? MERGE.✨

Slide 63

Slide 63 text

!

Slide 64

Slide 64 text

!

Slide 65

Slide 65 text

! > pengwynn: it looks like you merged "api-my-feature" branch into master, so I've unlocked production.

Slide 66

Slide 66 text

! > pengwynn is deploying github/master to production pengwynn is deploying github/master to lab-one pengwynn is deploying github/master to lab-two pengwynn is deploying github/master to sekret-lab

Slide 67

Slide 67 text

! But wait. There's MORE. *

Slide 68

Slide 68 text

! hubot help deploy > /auto-deploy on - enable or disable autodeploys to 's on successul builds /deploy - show detailed deploy usage, including apps and environments /deploy / to / - deploy 's to the environment's servers /deployed [app/env] - List all recent deploys or deploys to an app/env /haystack-notify - notify Haystack that an app was deployed. /lock on - prevent deployments to 's /migrate / to - deploy branch to aux1 and run migrations /sha show the currently deployed SHA1 /undeployed > - see what's undeployed on .com /unlock on - re-enable deployments to 's /where can I deploy - see what environments you can deploy app /where can I release - see what environments you can deploy app

Slide 69

Slide 69 text

! How do I get this flow for my team?

Slide 70

Slide 70 text

! Deployments API ! Preview

Slide 71

Slide 71 text

! Script # 3rd Party Server "

Slide 72

Slide 72 text

! Script # 3rd Party Server Create deployment "

Slide 73

Slide 73 text

! Script # 3rd Party Server Create deployment Deployment created "

Slide 74

Slide 74 text

! Script # 3rd Party Server Create deployment Deployment created Deployment event "

Slide 75

Slide 75 text

! Script # 3rd Party Server Create deployment Deployment created Deployment event SSH+Deploy "

Slide 76

Slide 76 text

! Script # 3rd Party Server Create deployment Deployment created Deployment event SSH+Deploy Deployment status "

Slide 77

Slide 77 text

! Script # 3rd Party Server Create deployment Deployment created Deployment event SSH+Deploy Deployment complete Deployment status "

Slide 78

Slide 78 text

! Script # 3rd Party Server Create deployment Deployment created Deployment event SSH+Deploy Deployment complete Deployment status Deployment status "

Slide 79

Slide 79 text

! Hubot http://hubot.github.com

Slide 80

Slide 80 text

! Janky https://github.com/github/janky

Slide 81

Slide 81 text

!

Slide 82

Slide 82 text

! Thanks. ❤️

Slide 83

Slide 83 text

! EOF