Upgrade to Pro — share decks privately, control downloads, hide ads and more …

> hubot deploy GitHub

> hubot deploy GitHub

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

Wynn Netherland

January 31, 2014
Tweet

More Decks by Wynn Netherland

Other Decks in Programming

Transcript

  1. ! !

  2. ! 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, ".
  3. 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
  4. !

  5. ! "

  6. !

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

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

    api-my-feature for pengwynn - hubot github/github@deadbeef
  10. !

  11. ! 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)
  12. !

  13. !

  14. !

  15. !

  16. !

  17. !

  18. !

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

    into master, so I've unlocked production.
  20. ! > 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
  21. ! 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
  22. ! Script # 3rd Party Server Create deployment Deployment created

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

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

    Deployment event SSH+Deploy Deployment complete Deployment status Deployment status "
  25. !