def install_nrpe_plugin_from_source():
    '''
    Downloads NRPE plugin source code and installs NRPE plugin on VM.
    '''
    cuisine.package_ensure_apt('libssl-dev')
    cuisine.dir_ensure('/usr/local/src')
    cuisine.sudo('cd /usr/local/src')
    if not nrpe_plugins_downloaded():
        cuisine.sudo('wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz')
    cuisine.sudo('tar xzf nrpe-2.15.tar.gz')
    cuisine.run('cd ~/nrpe-2.15 && ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu && make all && make install-plugin')
def install_nrpe_plugin_from_source():
    '''
    Downloads NRPE plugin source code and installs NRPE plugin on VM.
    '''
    cuisine.package_ensure_apt('libssl-dev')
    cuisine.dir_ensure('/usr/local/src')
    run('cd /usr/local/src')
    if not nrpe_plugins_downloaded():
        sudo('wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz')
    sudo('tar xzf nrpe-2.15.tar.gz')
    sudo('cd ~/nrpe-2.15 && ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu && make all && make install-plugin')
Exemplo n.º 3
0
 def _install_required_pkgs(self):
     print("Ensuring reuqired packages are installed...")
     time.sleep(1)
     # Install squashfs-tools
     pkgs = ['squashfs-tools',
             'wget',
             'genisoimage']
     if self.distro in ['ubuntu', 'debian']:
         for pkg in pkgs: package_ensure_apt(pkg)
     elif self.distro in ['centos', 'fedora']:
         for pkg in pkgs: package_ensure_yum(pkg)
     else:
         print("ERROR: Teefaa only support ubuntu, debian, centos and fedora.")
         exit(1)
Exemplo n.º 4
0
 def _install_required_packages(self):
     """
     Install required packages
     """
     print("Ensuring required packages are installed...")
     pkgs = ['squashfs-tools', 'rsync']
     if self.distro in ['ubuntu', 'debian']:
         for pkg in pkgs: package_ensure_apt(pkg)
     elif self.distro in ['centos', 'fedora']:
         for pkg in pkgs: package_ensure_yum(pkg)
     else:
         raise TypeError("Teefaa only supports ubuntu, debian, centos and fedora")
     # Create temp directory
     with mode_sudo():
         dir_ensure(self.tmp_dir, owner=self.user, mode=700)
Exemplo n.º 5
0
def ubuntu_setup():
    with cs.mode_sudo():
        if not cs.package_ensure_apt('zsh',update=True) :
            cs.run('chsh -s /bin/zsh')
        if not cs.package_ensure_apt('git',update=True) :
            pass
        cs.package_ensure_apt('vim-enhansed',update=True)
        cs.package_ensure_apt('gcc',update=True)
        cs.package_ensure_apt('make',update=True)
Exemplo n.º 6
0
def provision_postgresql():
    package_ensure_apt("postgresql")
Exemplo n.º 7
0
def install_server():
    cuisine.package_ensure_apt("mysql-server")
Exemplo n.º 8
0
def install_client():
    cuisine.package_ensure_apt("mysql-client")
Exemplo n.º 9
0
def provision_postgresql():
    package_ensure_apt("postgresql")