def provision(): if cuisine.command_check("apt-fast") is False: setup_aptfast() if cuisine.command_check("mongo") is False: setup_mongodb() if cuisine.command_check("python-dev") is False: setup_python() update_src() install_requirements()
def installed(): """ Ensure that the supervisord is installed. If not present, supervisord is sudo() installed via ``easy_install``. Currently RHEL/CentOS flavored. """ cuisine.select_package(option='yum') cuisine.command_ensure('easy_install', package='python-setuptools') if not cuisine.command_check('supervisord'): sudo('easy_install supervisor')
def install_prereqs(self): select_package(self.util.get_package_manager()) vcs_to_pkg = { 'git': 'git', 'hg': 'mercurial', } package_ensure(vcs_to_pkg[self.vcs]) command_ensure('python2.7') if not command_check('virtualenv'): package_ensure('python-virtualenv') for pkg in self.install_packages: package_ensure(pkg)
def installed(version=None): """ Ensure that the supervisord is installed. :param version: str; the exact version string to install (e.g. "3.0a12") If supervisord is not present, the package is sudo() installed via ``easy_install``. Currently RHEL/CentOS flavored. """ cuisine.select_package(option='yum') cuisine.command_ensure('easy_install', package='python-setuptools') if not cuisine.command_check('supervisord'): if version: sudo('easy_install supervisor==%s' % version) else: sudo('easy_install supervisor')
def upgrade_docker(): installed = cuisine.command_check('docker -v') if installed: cuisine.sudo("wget -N https://get.docker.com/ | sh")
def install_docker(): installed = cuisine.command_check('docker -v') if not installed: cuisine.sudo("wget -qO- https://get.docker.com/ | sh")
def setup_web(): with hide('output','running','warnings'): cuisine.run('hostname -f') x = cuisine.command_check('ls -al')