Пример #1
0
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')
Пример #2
0
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')
Пример #3
0
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)
Пример #4
0
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)
Пример #5
0
def install_virtualenv():
    """Installs virtualenv."""
    install_without_prompt('python-virtualenv', 'python virtual environment')