def setup(): require('hosts', provided_by=[dev, staging, production]) require('webapp_user') require('basedir') require('virtualenv') try: webapp.stop() except: pass prepare() setup_postgis() setup_db() if not exists('/etc/init.d/nginx'): nginx.install()
def setup(dbuser=None, dbpassword=None): require('hosts', provided_by=[vm, staging, production]) require('webapp_user') require('basedir') server.install_packages() server.create_webapp_user() postgres.install() try: pg.setup_postgis() except: pass setup_db() nginx.install() # supervisord install # webapp.prepare()