Heaven is a rails app that receives Deployment events from GitHub and deploys your code to heroku.
It works really well with hubot-deploy.
+---------+ +--------+ +----------+ +-------------+
| Hubot | | GitHub | | Heaven | | Your Server |
+---------+ +--------+ +----------+ +-------------+
| | | |
| Create Deployment | | |
|--------------------->| | |
| | | |
| Deployment Created | | |
|<---------------------| | |
| | | |
| | Deployment Event | |
| |---------------------->| |
| | | SSH+Deploys |
| | |-------------------->|
| | | |
| | Deployment Status | |
| |<----------------------| |
| | | |
| | | Deploy Completed |
| | |<--------------------|
| | | |
| | Deployment Status | |
| |<----------------------| |
| | | |
Configure it from a GitHub Webhook and it processes incoming payloads with resque. Heaven stores the shell output to a gist.
Heaven is just an example of what a webhook listener on a repo can do. You can set up as many systems as you need to handle your web, mobile, native, compiled, and docker images while keeping the tooling the same. You can also start evaluating new systems on a per-repo basis without introducing widespread breakage across a deployment systems userbase.
You need redis for resque and as many workers as you think you'll need. I'd keep it at one until you start to notice queuing.
$ heroku addons:add openredis:micro
$ heroku ps:scale worker=1
$ heroku config:add GITHUB_TOKEN=<key>
Setting config vars and restarting heaven... done, v7
GITHUB_TOKEN: <key>
$ heroku config:add GITHUB_CLIENT_ID=<key>
Setting config vars and restarting heaven... done, v8
GITHUB_CLIENT_ID: <key>
$ heroku config:add GITHUB_CLIENT_SECRET=<secret>
Setting config vars and restarting heaven... done, v9
GITHUB_CLIENT_SECRET: <secret>
$ heroku config:add RAILS_SECRET_KEY_BASE=`ruby -rsecurerandom -e "print SecureRandom.hex"`
RAILS_SECRET_KEY_BASE: <secret>
GITHUB_TEAM_ID: The GitHub team id to restrict resque access to.GITHUB_TOKEN: A personal access token from your account settings, for API interaction. The token owner needs administrative rights to the repository.DEPLOYMENT_PRIVATE_KEY: Only for capistrano deployments sshing into remote systems. This is an ssh private key used to login to your remote servers via SSH.DEPLOYMENT_TIMEOUT: A timeout in seconds that the deployment should take. Deployments are aborted if they exceed this value. Defaults to 300 seconds.
- hubot-deploy - Kick off deployments from chat.
- heaven-notifier - Listens for DeploymentStatus events from GitHub and notifies you.