Exemplo n.º 1
0
def setup():
    deb.update_index()
    deb.upgrade()
    require.deb.packages([
        "build-essential", "i3", "unzip", "xclip", "curl", "git", "sudo",
        "xdm", "iw", "network-manager", "firmware-atheros", "xfce4-terminal"
    ])
    run('sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"'
        )  # NOQA
    run("touch private.sh")
    git_seed(dot_dir)
    git_reset(dot_dir)
    with cd(dot_dir):
        with settings(warn_only=True):
            run("cp home/.* ~")
            run("cp -R fonts/ ~/.fonts")
            run("fc-cache -rf")
    run("locales")
    run("brew install gcc ruby curl python3 neovim bash bash-completion@2 git pipenv tmux"
        )  # NOQA
    run("pip3 install pwdman hostscli neovim tmuxp")
    sudo("hostscli block_all")
    run("curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
        )  # NOQA
    run('nvim -c "PlugInstall | q | q"')
Exemplo n.º 2
0
def install_tools():
    '''
    Install build tools
    '''
    packages = ['python',
                'python-dev',
                'python-setuptools',
                'python-pip',
                'openssl',
                'libssl-dev',
                'libxml2-dev',
                'libxslt1-dev',
                'build-essential',
                'git',
                'sudo',
                'lsb-release',
                'imagemagick',
                'curl',
                'sqlite3',
                'wget']

    if system.distrib_id() == 'Ubuntu':
        packages.append('software-properties-common')

    deb.update_index()
    deb.upgrade()
    require.deb.packages(packages)

    # Dirty hack because of fabtools that don't install pip properly
    sudo('curl -o - https://bootstrap.pypa.io/ez_setup.py -O - | python')
    sudo('curl -o - https://bootstrap.pypa.io/get-pip.py | python -')

    print(green('Tools successfully installed'))
Exemplo n.º 3
0
def install_tools():
    '''
    Install build tools
    '''
    packages = ['python',
                'python-dev',
                'python-setuptools',
                'python-pip',
                'openssl',
                'libssl-dev',
                'libxml2-dev',
                'libxslt1-dev',
                'build-essential',
                'git',
                'sudo',
                'lsb-release',
                'imagemagick',
                'curl',
                'sqlite3']

    if system.distrib_id() == 'Ubuntu':
        packages.append('software-properties-common')

    deb.update_index()
    deb.upgrade()
    require.deb.packages(packages)

    # Dirty hack because of fabtools that don't install pip properly
    sudo('curl -o - https://bootstrap.pypa.io/ez_setup.py -O - | python')
    sudo('curl -o - https://bootstrap.pypa.io/get-pip.py | python -')

    print(green('Tools successfully installed'))
Exemplo n.º 4
0
def provision():
    updateIndex()
    require.file(".vimrc", source="vimrc")
    # install java7
    require.oracle_jdk.installed()
    # install tomcat7
    require.tomcat.installed()
    # install other packages
    require.deb.packages(["build-essential", "python"], update=True)
    deb.upgrade()
Exemplo n.º 5
0
def provision():
    updateIndex()
    require.file('.vimrc', source='vimrc')
    # install java7
    require.oracle_jdk.installed()
    # install tomcat7
    require.tomcat.installed()
    # install other packages
    require.deb.packages(['build-essential', 'python'], update=True)
    deb.upgrade()
Exemplo n.º 6
0
def install_tools():
    '''
    Install build tools
    '''
    deb.update_index()
    deb.upgrade()
    require.deb.packages([
        'python', 'python-dev', 'python-setuptools', 'python-pip', 'openssl',
        'libssl-dev', 'libxml2-dev', 'libxslt1-dev', 'build-essential', 'git',
        'sudo', 'lsb-release', 'imagemagick', 'sqlite3'
    ])
    print(green('Tools successfully installed'))
Exemplo n.º 7
0
def provision():
    require.file('.vimrc', source='vimrc')
    require.deb.packages([
        'build-essential',
        'openjdk-7-jdk',
        'maven',
        'ant',
        'rake',
        'git',
        'vim'
        ], update=True)
    deb.upgrade()
Exemplo n.º 8
0
def setup():
    local_clone_repos()
    require.files.directories([apps_dir, logs_dir])
    require.files.directories(["/var/repo/"], use_sudo=True)
    require.deb.package("software-properties-common")
    sudo("add-apt-repository ppa:ondrej/php")
    sudo("add-apt-repository ppa:ondrej/apache2")
    sudo("add-apt-repository ppa:certbot/certbot")
    deb.update_index()
    deb.upgrade()
    require.git.command()
    require.deb.packages([
        "mysql-server", "dpkg-dev", "php7.1", "php7.1-mysql", "php7.1-gd",
        "php7.1-dev", "php7.1-curl", "php7.1-cli", "php7.1-json", "php-apcu",
        "libpcre3-dev", "php-pear", "libapache2-mod-php7.1", "sendmail",
        "php7.1-mbstring", "python-pip", "python-certbot-apache"
    ])
    sudo("yes '' | pecl install apc")
    sudo("pip install pygments")
    require.apache.server()
    for apache_mod in apache_mods:
        require.apache.module_enabled(apache_mod)
    push_repos()
    require.apache.site(
        hostname,
        template_contents=CONFIG_TPL,
        port=80,
        hostname=hostname,
        docroot=docroot,
    )
    require.apache.site_enabled(hostname)
    require.apache.site_disabled('default')
    print("Please make sure %s is pointing to %s before certbot install" %
          (hostname, env.hosts))
    sudo("certbot --apache")
    require.mysql.server(password=db_root_pass)
    with settings(mysql_user='******', mysql_password=db_root_pass):
        require.mysql.user(env.user, db_user_pass)
        grant_all(env.user)
    require.file("/etc/mysql/conf.d/mysql.cnf",
                 "[mysqld]\nsql_mode=STRICT_ALL_TABLES",
                 use_sudo=True)
    sudo("service mysql restart")
    require.nodejs.installed_from_source(version='8.9.1')
    with cd("%s/phabricator" % apps_dir):
        run("./bin/config set mysql.host localhost")
        run("./bin/config set mysql.user %s" % env.user)
        run("./bin/config set mysql.pass %s" % db_user_pass)
        run("./bin/config set phabricator.base-uri 'https://%s'" % hostname)
        run("./bin/storage upgrade --force")
        run("./bin/phd start")
        run("./bin/aphlict start")
Exemplo n.º 9
0
def install_tools():
    """
    Install build tools
    """
    deb.update_index()
    deb.upgrade()
    require.deb.packages([
        'python',
        'python-setuptools',
        'python-pip',
        'openssl',
        'libssl-dev',
        'libxml2-dev',
        'libxslt1-dev',
        'build-essential',
        'git',
        'sudo',
    ])
    print(green("Tools successfully installed"))
Exemplo n.º 10
0
def install_tools():
    """
    Install build tools
    """
    deb.update_index()
    deb.upgrade()
    require.deb.packages([
        'python',
        'python-setuptools',
        'python-pip',
        'openssl',
        'libssl-dev',
        'libxml2-dev',
        'libxslt1-dev',
        'build-essential',
        'git',
        'sudo',
    ])
    print(green("Tools successfully installed"))
Exemplo n.º 11
0
def _require_packages_locales():
    require.system.default_locale('fr_FR.UTF-8')
    ## Update system packages
    deb.update_index()
    deb.upgrade()
    
    ## Uninstall non required packages
    for package in PACKAGES_TO_UNINSTALL:
        require.deb.nopackage(package)
    
    ## Install required packages
    for package in PACKAGES_TO_INSTALL:
        require.deb.package(package)
    
    for pip_package in PIP_PACKAGES_TO_INSTALL:
        utils.run_as_root('pip install %s' %(pip_package))
    ## Update system packages
    utils.run_as_root('apt-get autoremove -y')
    deb.update_index()
    deb.upgrade()
Exemplo n.º 12
0
def install_tools():
    '''
    Install build tools
    '''
    deb.update_index()
    deb.upgrade()
    require.deb.packages([
        'python',
        'python-setuptools',
        'python-pip',
        'openssl',
        'libssl-dev',
        'libxml2-dev',
        'libxslt1-dev',
        'build-essential',
        'git',
        'sudo',
        'lsb-release',
        'imagemagick'
    ])
    print(green('Tools successfully installed'))
Exemplo n.º 13
0
def setup_server():
    set_language()
    files.sed("/etc/ssh/sshd_config",
              "StrictModes yes",
              "StrictModes no",
              use_sudo=True)
    service.restart("ssh")

    deb.upgrade()
    deb.install([
        "nginx", "uwsgi", "uwsgi-plugin-python", "uwsgi-plugin-python3",
        "libpq-dev", "postgresql", "postgresql-contrib", "python-virtualenv",
        "python-dev", "python3-dev"
    ],
                update=True)

    # Increase domain name limit
    files.sed("/etc/nginx/nginx.conf",
              "# server_names_hash_bucket_size 64;",
              "server_names_hash_bucket_size 96;",
              use_sudo=True)
    nginx.disable("default")
Exemplo n.º 14
0
Arquivo: pkgs.py Projeto: hipikat/scow
def upgrade_packages():
    """Upgrade Debian packages (with a fresh index)"""
    if 'update_index' not in env.session.task_stack:
        update_index()
    deb.upgrade()
Exemplo n.º 15
0
Arquivo: pkgs.py Projeto: hipikat/scow
def upgrade_packages():
    """Upgrade Debian packages (with a fresh index)"""
    if 'update_index' not in env.session.task_stack:
        update_index()
    deb.upgrade()
Exemplo n.º 16
0
def update():
    """
    Update vm before installing
    """
    update_index()
    upgrade()
Exemplo n.º 17
0
def upgrade():
    deb.update_index()
    deb.upgrade()
Exemplo n.º 18
0
def dist_upgrade():
    deb.update_index(quiet=True)
    deb.upgrade(safe=False)