Rollbacks & Release Management on Heroku

While working on an existing RoR application deployed on Heroku, I ran across the issue of rolling back previous deployments and release management into production.

The solution is a .rake file I found in a blog post by Casper Fabricious posted here that includes release management and rollbacks in staging and production environments.

Finally, here are my observations after doing my research on this topic:

General:

  • heroku only deploys from master branch of the git repo.
  • as a result, staging remote branches can be added but will not be deployed nor will any other branch for that matter.
  • heroku_san offers some additional rake tasks but do not manage rollbacks.
  • heroku release management add-on only manages single rollback to previous deployment.
  • work-around is using git tags and series of rake tasks: http://goo.gl/4tCSf
  • put the .rake file into the lib/tasks directory and run from command line, e.g. ‘rake deploy_staging’ or when task is nested under the :deploy namespace, then ‘rake deploy:staging_rollback’

Heroku rollbacks & release management:

Rollbacks via rake:

  • rollbacks via rake on github: http://goo.gl/4tCSf
  • usage: ‘rake deploy_staging’ or when task is nested under the :deploy namespace, then ‘rake deploy:staging_rollback’

 

Leave a Comment

CommentLuv badge
Performance Optimization WordPress Plugins by W3 EDGE