orangeqs.juice.orchestration.user#

Ensure the OrangeQS Juice system user and group exist.

Module Contents#

Functions#

ensure_setup_name_is_configured

Ensure that a setup name is configured in the orchestration settings.

ensure_juice_user_and_group

Ensure the ‘juice-data’ user and group are correctly configured.

API#

orangeqs.juice.orchestration.user.ensure_setup_name_is_configured(settings: orangeqs.juice.orchestration.settings.OrchestrationSettings) bool#

Ensure that a setup name is configured in the orchestration settings.

If the setup name is not set, this function will prompt the user to enter a setup name, and then update the settings with the provided name by dropping it in the orchestration settings.

Parameters#

  • settings (OrchestrationSettings): The orchestration settings.

Returns#

  • (bool): True if the setup name was updated, False otherwise.

orangeqs.juice.orchestration.user.ensure_juice_user_and_group(settings: orangeqs.juice.orchestration.settings.DataFolderSettings) bool#

Ensure the ‘juice-data’ user and group are correctly configured.

If the uid and gid are not set in the settings, this function will create the ‘juice-data’ user and group if they do not exist, and update the settings with the correct uid and gid.

Parameters#

  • settings (DataFolderSettings): The data folder settings.

Returns#

  • (bool): True if any changes were made, False otherwise. Changes include creating the user/group or writing updated settings to disk.