Last active
December 16, 2015 19:49
-
-
Save junkafarian/5487344 to your computer and use it in GitHub Desktop.
An example Fabric deployment task using gonzo helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gonzo config --cloud staging | |
$ gonzo launch staging-app | |
$ gonzo list | |
staging-app-001 m1.small ACTIVE junkafarian 0d 00h 05m 3s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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