Skip to content

Instantly share code, notes, and snippets.

@junkafarian
Last active December 16, 2015 19:49
Show Gist options
  • Save junkafarian/5487344 to your computer and use it in GitHub Desktop.
Save junkafarian/5487344 to your computer and use it in GitHub Desktop.
An example Fabric deployment task using gonzo helpers
$ gonzo config --cloud staging
$ gonzo launch staging-app
$ gonzo list
staging-app-001 m1.small ACTIVE junkafarian 0d 00h 05m 3s
from fabric.api import env, task
from gonzo.tasks import gonzo, release, supervisord
__all__ = ['gonzo', 'deploy', ]
env.use_ssh_config = True
@task
def deploy():
release.push_release()
release.rollforward()
supervisord.restart('my_app')
release.show_history()
# deploys the current branch to the all instances in
# the `staging-app` group
$ fab gonzo.group:staging-app deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment