Skip to content

Instantly share code, notes, and snippets.

@danlamanna
Created July 23, 2015 21:07
Show Gist options
  • Select an option

  • Save danlamanna/a9881d39310144d25c88 to your computer and use it in GitHub Desktop.

Select an option

Save danlamanna/a9881d39310144d25c88 to your computer and use it in GitHub Desktop.
from fabric.api import sudo, run
from fabric.contrib.files import exists
from fabric.decorators import task
crane_file = 'https://raw.githubusercontent.com/Kitware/SMQTK/tempus/python/smqtk/web/geospace/deploy/crane.yaml'
def install_crane():
if not exists('crane'):
run('bash -c "`curl -sL https://raw.githubusercontent.com/michaelsauter/crane/master/download.sh`"')
@task
def deploy():
install_crane()
run('wget -O crane.yaml {}'.format(crane_file))
sudo('./crane lift')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment