Skip to content

Tools for interacting with DC/OS installer files

License

Notifications You must be signed in to change notification settings

mesosphere/dcos-installer-tools

Repository files navigation

Build Status

codecov

DC/OS Installer Tools

A DC/OS installer provides the following interface:

$ bash dcos_generate_config.sh --version
Extracting image from this script and loading into docker daemon, this step can take a few minutes
x dcos-genconf.75af9b2571de95e074-c74aa914537fa9f81b.tar
Loaded image: mesosphere/dcos-genconf:75af9b2571de95e074-c74aa914537fa9f81b
{
  "variant": "",
  "version": "1.12.0-rc3"
}
$ bash dcos_generate_config.sh --version
{
  "variant": "",
  "version": "1.12.0-rc3"
}

For DC/OS Enterprise installers, the "variant" key is set to "ee".

This is a Python library for collecting the outputted information from the installer.

Installation

pip install git+https://github.com/mesosphere/dcos-installer-tools.git

Usage

from pathlib import Path

from dcos_installer_tools import DCOSVariant, get_dcos_installer_details

installer = Path('/Users/Eleanor/Documents/dcos_generate_config.sh')
details = get_dcos_installer_details(installer=installer)
assert details.version == '1.12'
assert details.variant == DCOSVariant.OSS
assert details.variant != DCOSVariant.ENTERPRISE

Determining details about the artifact requires extracting the artifact. Extracting the artifact requires over a gigabyte of space in a workspace directory. By default, this directory is the result of tempfile.gettempdir(). It is possible to use the workspace_dir parameter of get_dcos_installer_details to set a workspace directory pathlib.Path.

By default, the extracted artifact is removed. Set the keep_extracted parameter to of get_dcos_installer_details to True to keep the extracted artifact. This will be in the same directory as the given installer.

Exceptions

  • ValueError: A space was in the path to the artifact. See DCOS_OSS-4429.
  • CalledProcessError: An error was encountered when extracting the given artifact.

About

Tools for interacting with DC/OS installer files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published