def install_nginx(): """Add nginx repository to known repositories and installs it.""" show(yellow("Installing nginx.")) with settings(sudo_prefix=SUDO_PREFIX, warn_only=True): sudo("nginx=stable && add-apt-repository ppa:nginx/$nginx") sudo("apt-get update") install_without_prompt('nginx', 'nginx')
def provision(): """Add nginx repository to known repositories and installs it.""" show(yellow("Installing nginx.")) with settings(sudo_prefix=SUDO_PREFIX, warn_only=True): sudo("nginx=stable && add-apt-repository ppa:nginx/$nginx") sudo("apt-get update") install_without_prompt('nginx', 'nginx')
def install_system_requirements(): """Installs packages included in system_requirements.txt. This is done before fetch, thus the file is taken from *local* storage. """ reqs = cget('system_requirements', []) for req in reqs: requirements = pjoin(local_files_dir("requirements"), req) show(yellow("Processing system requirements file: %s" % requirements)) with open(requirements) as f: r = ' '.join([f.strip() for f in f.readlines()]) name = 'requirements: {0}'.format(r) with settings(sudo_prefix=SUDO_PREFIX): install_without_prompt(r, name, silent=False)
def install_system_requirements(): """Installs packages included in system_requirements.txt. This is done before fetch, thus the file is taken from *local* storage. """ reqs = cget('system_requirements') if reqs: for req in reqs: requirements = pjoin(local_files_dir("requirements"), req) show( yellow("Processing system requirements file: %s" % requirements)) with open(requirements) as f: r = ' '.join([f.strip() for f in f.readlines()]) name = 'requirements: {0}'.format(r) with settings(sudo_prefix=SUDO_PREFIX): install_without_prompt(r, name, silent=False)
def install_virtualenv(): """Installs virtualenv.""" install_without_prompt('python-virtualenv', 'python virtual environment')