Configuration

Tweak the behavior of the knots-hub runtime using a configuration system.

Each config key is set using an individual environment variable:

KNOTSHUB_USER_INSTALL_PATH
KNOTSHUB_INSTALLER_LIST
KNOTSHUB_VENDOR_INSTALLERS_CONFIG

Content

key name

local_install_path

type

<class ‘pathlib.Path’>

required

yes

default

None

environment variable

KNOTSHUB_USER_INSTALL_PATH

description

Filesystem path to a directory that may exist, used to store all the filesystem data for the hub.

installer_list_path

type

Optional[pathlib.Path]

required

no

default

None

environment variable

KNOTSHUB_INSTALLER_LIST

description

Filesystem path to an existing json file used to store a mapping of hub version: installer path. The installer path can be a directoryor a zip archive.

vendor_installers_config_path

type

Optional[pathlib.Path]

required

no

default

None

environment variable

KNOTSHUB_VENDOR_INSTALLERS_CONFIG

description

Filesystem path to an existing json file used to specify which external program to install with which version.

Vendor Installers Config

A configuration file in the json syntax that define a list of program installer that must be installed on the user local system and how each of them must be configured.

The abstract configuration is defined as:

Tip

If needed, the reading of the configuration is performed by knots_hub.installer.read_vendor_installers_from_file()

{
   "{installer_name}": {
      ...  # installer configuration arguments
   },
   ...
}

The list of supported installers and their configuration is as follow:

rez

Installer for rez.

Expect the following arguments:

  • version (int): an arbitrary integer that must be incremented on every other argument change to trigger updates on the user system.

  • install_dir (str): filesystem path to a directory that may exists. The parent directory must exist (use the dirs_to_make if the parent may not exist yet). The path can contains environment variable like $ENVAR/foo where the $ can be escaped by doubling it like $$.

  • dirs_to_make (list[str]): optional list of filesystem path to directories that may exists. Each directory will be created on install if it doesn’t exist but each of their parent directory must exist. The path can contains environment variable like $ENVAR/foo where the $ can be escaped by doubling it like $$.

  • python_version (str): a full valid python version to install rez with.

  • rez_version (str): a full valid rez version to install from the official GitHub repo.

Warning

Changing the install_dir for any installer will have the known side-effect of not removing the old install_dir on the local user machine if the user ever uninstall the hub in the future. Same for the dirs_to_make argument.