> hubot deploy GitHub

> hubot deploy GitHub

Continuous deployment at GitHub using the GitHub Flow, the GitHub API, open source, and copious amounts of metrics.

7e19cd5486b5d6dc1ef90e671ba52ae0?s=128

Wynn Netherland

January 31, 2014
Tweet

Transcript

  1. > hubot deploy GitHub !

  2. ! Hello, my name is Wynn.

  3. ! GitHub

  4. ! Folks call me @pengwynn.

  5. ! !

  6. ! hubot image me razorback car >

  7. ! 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, ".
  8. ! hubot deploy github >

  9. Wait. Wut? !

  10. You deploy your site FROM CHAT? !

  11. Are you from THE FUTURE? !

  12. It sure feels like it. !

  13. How" has !'d over the years. !

  14. 1989 10 PRINT "WYNN" 20 GOTO 10

  15. 1994

  16. 1999 !

  17. 2004 !

  18. 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
  19. Today !

  20. ! Start with a Pull Request.

  21. !

  22. ! Create a branch.

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

  24. ! ↑ ↑ ↓ ↓ ← → ← → B

    A
  25. ! Create a branch.

  26. ! Add commits.

  27. ! Open a pull request.

  28. ! Discuss and review.

  29. ! Merge and deploy.

  30. ! Or deploy and merge. !

  31. ! "

  32. !

  33. ! The following deployments are based on actual events. Branch

    names and SHAs have been changed to protect the innocent.
  34. ! 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
  35. ! hubot deploy github/api-my-feature to production >

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

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

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

  39. ! hubot deploy github/api-my-feature to production > Merge master into

    api-my-feature for pengwynn - hubot github/github@deadbeef
  40. ! Get up to date with master. ⏳

  41. ! Wait on the CI server. $

  42. ! hubot tv me >

  43. !

  44. ! hubot tv me >

  45. ! hubot deploy github/api-my-feature to production > Build #8675309 (deadbeef)

    of github/api-my-feature failed (203s)
  46. ! Start over.

  47. ! hubot deploy github/api-my-feature to production > Build #8675309 (deadbeef)

    of github/api-my-feature was successful (203s)
  48. ! Release the kraken! %

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

  50. ! 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)
  51. ! "The first transport is away!"

  52. ! Test and observe.

  53. !

  54. !

  55. !

  56. !

  57. !

  58. ! Problem? ABORT. '

  59. ! hubot deploy github > pengwynn is deploying github/master to

    production
  60. ! Philosophy

  61. ! Fail forward vs. rollback

  62. ! ✨Everything )? MERGE.✨

  63. !

  64. !

  65. ! > pengwynn: it looks like you merged "api-my-feature" branch

    into master, so I've unlocked production.
  66. ! > 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
  67. ! But wait. There's MORE. *

  68. ! hubot help deploy > /auto-deploy <enable|disable> <app> on <env>

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

  70. ! Deployments API ! Preview

  71. ! Script # 3rd Party Server "

  72. ! Script # 3rd Party Server Create deployment "

  73. ! Script # 3rd Party Server Create deployment Deployment created

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

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

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

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

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

    Deployment event SSH+Deploy Deployment complete Deployment status Deployment status "
  79. ! Hubot http://hubot.github.com

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

  81. !

  82. ! Thanks. ❤️

  83. ! EOF