Environment Variables for Katib Components

How to set up environment variables for each Katib component

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

In the tables below you can see description, default values and mandatory property for all environment variables in each Katib component. If variable has mandatory property, appropriate Katib component’s manifest must have this environment variable.

Katib Controller

This is the table of 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

This is the table of 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

This is the table of 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 we 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.

Check here about 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 11.08.2020: Remove outdated banner for Katib docs (#2088) (5f29767a)