Environment Variables for Katib Components

How to set up environment variables for each Katib component

This guide describes environment variables for each Katib component. If you want to change your Katib installation, you can modify some of these variables.

In the tables below you can find descriptions, default values and mandatory properties for all environment variables in each Katib component. If a variable has a mandatory property, you need to set the relevant environment variable in an appropriate Katib component’s manifest.

Katib Controller

Bellow are the environment variables for the Katib Controller deployment:

VariableDescriptionDefault ValueMandatory
KATIB_CORE_NAMESPACEBase Namespace for all Katib components and default Experimentmetadata.namespaceYes
KATIB_SUGGESTION_COMPOSERComposer for the Katib Suggestions. You can use your own ComposergeneralNo
KATIB_DB_MANAGER_SERVICE_NAMESPACEKatib DB Manager NamespaceKATIB_CORE_NAMESPACE env variableNo
KATIB_DB_MANAGER_SERVICE_IPKatib DB Manager IPkatib-db-managerNo
KATIB_DB_MANAGER_SERVICE_PORTKatib DB Manager Port6789No

Katib Controller calls Katib DB Manager with this address expression:

KATIB_DB_MANAGER_SERVICE_IP.KATIB_DB_MANAGER_SERVICE_NAMESPACE:KATIB_DB_MANAGER_SERVICE_PORT

If you set KATIB_DB_MANAGER_SERVICE_NAMESPACE="", Katib Controller calls Katib DB Manager with this address:

KATIB_DB_MANAGER_SERVICE_IP:KATIB_DB_MANAGER_SERVICE_PORT

If you want to use your own DB Manager to report Katib metrics, you can change KATIB_DB_MANAGER_SERVICE_NAMESPACE, KATIB_DB_MANAGER_SERVICE_IP and KATIB_DB_MANAGER_SERVICE_PORT variables.

Katib UI

Below are the environment variables for the Katib UI deployment:

VariableDescriptionDefault ValueMandatory
KATIB_CORE_NAMESPACEBase Namespace for all Katib components and default Experimentmetadata.namespaceYes
KATIB_DB_MANAGER_SERVICE_NAMESPACEKatib DB Manager NamespaceKATIB_CORE_NAMESPACE env variableNo
KATIB_DB_MANAGER_SERVICE_IPKatib DB Manager IPkatib-db-managerNo
KATIB_DB_MANAGER_SERVICE_PORTKatib DB Manager Port6789No

Katib UI calls Katib DB Manager with the same address expression as Katib Controller.

Katib DB Manager

Bellow are the environment variables for the Katib DB Manager deployment:

VariableDescriptionDefault ValueMandatory
DB_NAMEKatib DB NamemysqlYes
DB_PASSWORDKatib DB PasswordtestYes
DB_USERKatib DB UserrootNo
KATIB_MYSQL_DB_HOSTKatib MySQL Hostkatib-mysqlNo
KATIB_MYSQL_DB_PORTKatib MySQL Port3306No
KATIB_MYSQL_DB_DATABASEKatib MySQL Database namekatibNo

Currently, Katib DB Manager supports only MySQL database. You can use your own DB Manager and Database to report metrics.

For the Katib DB Manager you can change DB_PASSWORD to your own MySQL DB password.

Katib DB Manager creates connection to the DB, using mysql driver and this data source name:

DB_USER:DB_PASSWORD@tcp(KATIB_MYSQL_DB_HOST:KATIB_MYSQL_DB_PORT)/KATIB_MYSQL_DB_DATABASE?timeout=5s

Katib MySQL DB

For the Katib MySQL you need to set these environment variables:

  • MYSQL_ROOT_PASSWORD to a value from katib-mysql-secrets, which is equal to “test”.
  • MYSQL_ALLOW_EMPTY_PASSWORD as true
  • MYSQL_DATABASE as katib.

You can refer to the list of all environment variables for the MySQL Docker image.

Katib MySQL environment variables must be matched with the Katib DB Manager environment variables, it means:

  1. MYSQL_ROOT_PASSWORD = DB_PASSWORD
  2. MYSQL_DATABASE = KATIB_MYSQL_DB_DATABASE

Last modified 13.03.2021: Modify links for the Katib manifests (#2540) (f7c82c16)