Example #1
0
def install_cloudman(env):
    """ A meta method for installing all of CloudMan components.
        Allows CloudMan and all of its dependencies to be installed via:
        fab -f fabfile.py -i <key> -H ubuntu@<IP> install_custom:cloudman
    """
    _configure_cloudman(env, use_repo_autorun=False)
    install_nginx(env)
    install_proftpd(env)
    install_sge(env)
Example #2
0
def install_biolinux(target=None, packagelist=None, flavor=None):
    """Main entry point for installing Biolinux on a remote server.

    This allows a different main package list (the main YAML file is passed in),
    and/or use of Flavor. So you can say:

      install_biolinux:packagelist=contrib/mylist/main.yaml,flavor=specialflavor

    Both packagelist and flavor, as well as the Edition, can also be passed in
    through the fabricrc file.

    target can also be supplied on the fab CLI. Special targets are:

      - packages     Install distro packages
      - custom       Install custom packages
      - libraries    Install programming language libraries
      - finalize     Setup freenx and clean-up environment
    """
    _setup_logging(env)
    _check_fabric_version()
    _parse_fabricrc()
    _setup_edition(env)
    _setup_flavor(flavor)
    _setup_distribution_environment() # get parameters for distro, packages etc.
    _create_local_paths()
    env.logger.info("packagelist=%s" % packagelist)
    pkg_install, lib_install = _read_main_config(packagelist)  # read yaml
    env.logger.info("Target=%s" % target)
    if target is None or target == "packages":
        if env.distribution in ["debian", "ubuntu"]:
            _setup_apt_sources()
            _setup_apt_automation()
            _add_apt_gpg_keys()
            _apt_packages(pkg_install)
        elif env.distibution in ["centos"]:
            _setup_yum_sources()
            _yum_packages(pkg_install)
            _setup_yum_bashrc()
        else:
            raise NotImplementedError("Unknown target distribution")
        _update_biolinux_log(env, target, flavor)
    if target is None or target == "custom":
        _custom_installs(pkg_install)
    if target is None or target == "libraries":
        _do_library_installs(lib_install)
    if target is None or target == "finalize":
        env.edition.post_install()
        env.flavor.post_install()
        _cleanup_space()
        if env.has_key("is_ec2_image") and env.is_ec2_image.upper() in ["TRUE", "YES"]:
            _freenx_scripts()
            _configure_cloudman(env)
            _cleanup_ec2(env)
Example #3
0
def _perform_install(target=None, flavor=None, more_custom_add=None):
    """
    Once CBL/fabric environment is setup, this method actually
    runs the required installation procedures.

    See `install_biolinux` for full details on arguments
    `target` and `flavor`.
    """
    pkg_install, lib_install, custom_ignore, custom_add = _read_main_config()
    if more_custom_add:
        if custom_add is None:
            custom_add = {}
        for k, vs in more_custom_add.iteritems():
            if k in custom_add:
                custom_add[k].extend(vs)
            else:
                custom_add[k] = vs
    if target is None or target == "packages":
        env.keep_isolated = getattr(env, "keep_isolated", "false").lower() in ["true", "yes"]
        # Only touch system information if we're not an isolated installation
        if not env.keep_isolated:
            # can only install native packages if we have sudo access or are root
            if env.use_sudo or env.safe_run_output("whoami").strip() == "root":
                _configure_and_install_native_packages(env, pkg_install)
            else:
                _connect_native_packages(env, pkg_install, lib_install)
        if env.nixpkgs:  # ./doc/nixpkgs.md
            _setup_nix_sources()
            _nix_packages(pkg_install)
    if target is None or target == "custom":
        _custom_installs(pkg_install, custom_ignore, custom_add)
    if target is None or target == "chef_recipes":
        _provision_chef_recipes(pkg_install, custom_ignore)
    if target is None or target == "puppet_classes":
        _provision_puppet_classes(pkg_install, custom_ignore)
    if target is None or target == "brew":
        install_brew(flavor=flavor, automated=True)
    if target is None or target == "conda":
        install_conda(flavor=flavor, automated=True)
    if target is None or target == "libraries":
        _do_library_installs(lib_install)
    if target is None or target == "post_install":
        env.flavor.post_install()
        if "is_ec2_image" in env and env.is_ec2_image.upper() in ["TRUE", "YES"]:
            _freenx_scripts(env)
            if pkg_install is not None and 'cloudman' in pkg_install:
                _configure_cloudman(env)
    if target is None or target == "cleanup":
        if env.use_sudo:
            _cleanup_space(env)
        if "is_ec2_image" in env and env.is_ec2_image.upper() in ["TRUE", "YES"]:
            _cleanup_ec2(env)
Example #4
0
 def post_install(self, pkg_install=None):
     """Add scripts for starting FreeNX and CloudMan.
     """
     _freenx_scripts(self.env)
     if pkg_install is not None and 'cloudman' in pkg_install:
         _configure_cloudman(self.env)
Example #5
0
 def post_install(self):
     """Add scripts for starting FreeNX and CloudMan.
     """
     _freenx_scripts(self.env)
     _configure_cloudman(self.env)
Example #6
0
 def post_install(self, pkg_install=[]):
     """Add scripts for starting FreeNX and CloudMan.
     """
     _freenx_scripts(self.env)
     if 'cloudman' in pkg_install:
         _configure_cloudman(self.env)