Ejemplo n.º 1
0
def muni_setup():
    """ Installs utilities on the target VPS with a muni flavor"""

    print(blue('Add your own public key to authorized hosts'))
    ssh.add_authorized_key()

    print(blue('Generate the ssh config file to connect to all magnet hosts'))
    ssh.generate_config_file()

    print(blue('upgrade installed packages'))
    admin.full_upgrade(ask_confirmation=False)

    print(blue('NTP installation and configuration'))
    admin.install_ntp()

    install_utils(run('whoami'))

    print(blue('install vim-gtk'))
    utils.deb.install('vim-gtk')

    print(blue('install zsh theme: powerline'))
    zsh.install_theme('powerline')

    print(blue('install ruby'))
    ruby.install()

    print(blue('install rails'))
    ruby.install_rails()

    print(blue('install git-smart'))
    run('gem install git-smart')

    print(blue('install zsh muni flavor'))
    zsh.install_flavor('muni')
Ejemplo n.º 2
0
def muni_setup():
    """ Installs utilities on the target VPS with a muni flavor"""

    print(blue('Add your own public key to authorized hosts'))
    ssh.add_authorized_key()

    print(blue('Generate the ssh config file to connect to all magnet hosts'))
    ssh.generate_config_file()

    print(blue('upgrade installed packages'))
    admin.full_upgrade(ask_confirmation=False)

    install_utils(run('whoami'))

    if platform.system().lower() != 'darwin':
        print(blue('NTP installation and configuration'))
        admin.install_ntp()

        print(blue('install vim-gtk'))
        utils.os_commands.install('vim-gtk')

    print(blue('install zsh theme: powerline'))
    zsh.install_theme('powerline')

    print(blue('install git-smart'))
    run('gem install git-smart')

    print(blue('install zsh muni flavor'))
    zsh.install_flavor('muni')
Ejemplo n.º 3
0
def init(admin_user='******', initial_user='******'):
    """ Initial tasks for the setup of the VPS """

    print(blue('set user to {}'.format(initial_user)))
    env.user = initial_user

    print(blue('add public ssh key to {}'.format(initial_user)))
    ssh.add_authorized_key()

    print(blue('add user {} with sudo permissions'.format(admin_user)))
    admin.add_user(admin_user, 'sudo')

    print(
        blue('append authorized keys of {} to {}'.format(
            initial_user, admin_user)))
    ssh.copy_authorized_keys(admin_user)

    print(blue('allow sudoers without password'))
    admin.sudo_without_password()

    print(blue('disable password authentication over ssh'))
    ssh.disable_password_authentication()

    print(blue('disable root login over ssh'))
    ssh.disable_root_login()

    print(blue('set log level to verbose'))
    ssh.set_log_level()

    print(blue('change environment user to {}'.format(admin_user)))
    env.user = admin_user

    print(blue("add public ssh key to magnet's authorized keys"))
    ssh.add_authorized_key()

    print(blue('reload ssh configuration'))
    ssh.reload_configuration()

    print(blue('upgrade installed packages'))
    admin.full_upgrade(ask_confirmation=False)

    print(blue('timezone configuration'))
    admin.configure_timezone()

    print(blue('NTP installation and configuration'))
    admin.install_ntp()

    print(blue('add swap partition'))
    admin.add_swap()

    print(blue('generate SSH key'))
    ssh.generate_key()

    print(blue('set default locale'))
    admin.set_default_locale()
Ejemplo n.º 4
0
def init(admin_user='******', initial_user='******'):
    """ Initial tasks for the setup of the VPS """

    print(blue('set user to {}'.format(initial_user)))
    env.user = initial_user

    print(blue('add public ssh key to {}'.format(initial_user)))
    ssh.add_authorized_key()

    print(blue('add user {} with sudo permissions'.format(admin_user)))
    admin.add_user(admin_user, 'sudo')

    print(blue('append authorized keys of {} to {}'.format(
        initial_user, admin_user)))
    ssh.copy_authorized_keys(admin_user)

    print(blue('allow sudoers without password'))
    admin.sudo_without_password()

    print(blue('disable password authentication over ssh'))
    ssh.disable_password_authentication()

    print(blue('disable root login over ssh'))
    ssh.disable_root_login()

    print(blue('set log level to verbose'))
    ssh.set_log_level()

    print(blue('change environment user to {}'.format(admin_user)))
    env.user = admin_user

    print(blue("add public ssh key to magnet's authorized keys"))
    ssh.add_authorized_key()

    print(blue('reload ssh configuration'))
    ssh.reload_configuration()

    print(blue('upgrade installed packages'))
    admin.full_upgrade(ask_confirmation=False)

    print(blue('timezone configuration'))
    admin.configure_timezone()

    print(blue('NTP installation and configuration'))
    admin.install_ntp()

    print(blue('add swap partition'))
    admin.add_swap()

    print(blue('generate SSH key'))
    ssh.generate_key()

    print(blue('set default locale'))
    admin.set_default_locale()