def _perform_install(target=None, flavor=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 target is None or target == "packages": # can only install native packages if we have sudo access. if env.use_sudo: _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 == "libraries": _do_library_installs(lib_install) if target is None or target == "post_install": env.edition.post_install(pkg_install=pkg_install) env.flavor.post_install() if target is None or target == "cleanup": _cleanup_space(env) if "is_ec2_image" in env and env.is_ec2_image.upper() in ["TRUE", "YES"]: _cleanup_ec2(env)
def configure_MI(env): # Clean this next line up. _configure_and_install_native_packages(env, ["minimal", "cloudman", "galaxy"]) # _update_system() _setup_users(env) _setup_xvfb(env) _required_programs(env)
def _perform_install(target=None, flavor=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 target is None or target == "packages": # can only install native packages if we have sudo access. if env.use_sudo: _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 == "libraries": _do_library_installs(lib_install) if target is None or target == "post_install": env.edition.post_install(pkg_install=pkg_install) env.flavor.post_install() if target is None or target == "cleanup": _cleanup_space(env) if "is_ec2_image" in env and env.is_ec2_image.upper() in [ "TRUE", "YES" ]: _cleanup_ec2(env)
def _perform_install(target=None, flavor=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 = _read_main_config() if target is None or target == "packages": _configure_and_install_native_packages(env, pkg_install) if env.nixpkgs: # ./doc/nixpkgs.md _setup_nix_sources() _nix_packages(pkg_install) _update_biolinux_log(env, target, flavor) if target is None or target == "custom": _custom_installs(pkg_install, custom_ignore) if target is None or target == "libraries": _do_library_installs(lib_install) if target is None or target == "post_install": env.edition.post_install(pkg_install=pkg_install) env.flavor.post_install() if target is None or target == "cleanup": _cleanup_space(env) if env.has_key("is_ec2_image") and env.is_ec2_image.upper() in ["TRUE", "YES"]: if env.distribution in ["ubuntu"]: # For the time being (Dec 2012), must install development version # of cloud-init because of a boto & cloud-init bug: # https://bugs.launchpad.net/cloud-init/+bug/1068801 sudo('wget --output-document=cloud-init_0.7.1-0ubuntu4_all.deb ' + 'https://launchpad.net/ubuntu/+archive/primary/+files/cloud-init_0.7.1-0ubuntu4_all.deb') sudo("dpkg -i cloud-init_0.7.1-0ubuntu4_all.deb") sudo("rm -f cloud-init_0.7.1-0ubuntu4_all.deb") _cleanup_ec2(env)
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)
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)
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"] # can only install native packages if we have sudo access. if env.use_sudo: _configure_and_install_native_packages(env, pkg_install) elif not env.keep_isolated: _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) if target is None or target == "libraries": _do_library_installs(lib_install) if target is None or target == "post_install": env.edition.post_install(pkg_install=pkg_install) env.flavor.post_install() if target is None or target == "cleanup": _cleanup_space(env) if "is_ec2_image" in env and env.is_ec2_image.upper() in [ "TRUE", "YES" ]: _cleanup_ec2(env)
def _perform_install(target=None, flavor=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 = _read_main_config() if target is None or target == "packages": # can only install native packages if we have sudo access. if env.use_sudo: _configure_and_install_native_packages(env, pkg_install) else: _connect_native_packages(env, pkg_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) 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 == "libraries": _do_library_installs(lib_install) if target is None or target == "post_install": env.edition.post_install(pkg_install=pkg_install) env.flavor.post_install() if target is None or target == "cleanup": _cleanup_space(env) if "is_ec2_image" in env and env.is_ec2_image.upper() in [ "TRUE", "YES" ]: if env.distribution in ["ubuntu"]: # For the time being (Dec 2012), must install development version # of cloud-init because of a boto & cloud-init bug: # https://bugs.launchpad.net/cloud-init/+bug/1068801 sudo( 'wget --output-document=cloud-init_0.7.1-0ubuntu4_all.deb ' + 'https://launchpad.net/ubuntu/+archive/primary/+files/cloud-init_0.7.1-0ubuntu4_all.deb' ) sudo("dpkg -i cloud-init_0.7.1-0ubuntu4_all.deb") sudo("rm -f cloud-init_0.7.1-0ubuntu4_all.deb") _cleanup_ec2(env)
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"] # can only install native packages if we have sudo access. if env.use_sudo: _configure_and_install_native_packages(env, pkg_install) elif not env.keep_isolated: _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) if target is None or target == "libraries": _do_library_installs(lib_install) if target is None or target == "post_install": env.edition.post_install(pkg_install=pkg_install) env.flavor.post_install() if target is None or target == "cleanup": _cleanup_space(env) if "is_ec2_image" in env and env.is_ec2_image.upper() in ["TRUE", "YES"]: _cleanup_ec2(env)
def install_biolinux(target=None, flavor=None): """Main entry point for installing BioLinux on a remote server. `flavor` allows customization of CloudBioLinux behavior. It can either be a flavor name that maps to a corresponding directory in contrib/flavor or the path to a custom directory. This can contain: - alternative package lists (main.yaml, packages.yaml, custom.yaml) - custom python code (nameflavor.py) that hooks into the build machinery `target` allows running only particular parts of the build process. Valid choices are: - packages Install distro packages - custom Install custom packages - libraries Install programming language libraries - post_install Setup CloudMan, FreeNX and other system services - cleanup Remove downloaded files and prepare images for AMI builds """ _setup_logging(env) time_start = _print_time_stats("Config", "start") _check_fabric_version() _configure_fabric_environment(env, flavor) env.logger.debug("Target is '%s'" % target) pkg_install, lib_install, custom_ignore = _read_main_config() if target is None or target == "packages": _configure_and_install_native_packages(env, pkg_install) if env.nixpkgs: # ./doc/nixpkgs.md _setup_nix_sources() _nix_packages(pkg_install) _update_biolinux_log(env, target, flavor) if target is None or target == "custom": _custom_installs(pkg_install, custom_ignore) if target is None or target == "libraries": _do_library_installs(lib_install) if target is None or target == "post_install": env.edition.post_install(pkg_install=pkg_install) env.flavor.post_install() if target is None or target == "cleanup": _cleanup_space(env) if env.has_key("is_ec2_image") and env.is_ec2_image.upper() in ["TRUE", "YES"]: _cleanup_ec2(env) _print_time_stats("Config", "end", time_start)