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 Name: 'mysql' or 'postgres'Yes
DB_PASSWORDKatib DB Passwordtest (MySQL)
katib (Postgres)
Yes
DB_USERKatib DB Userroot (MySQL)
katib (Postgres)
No
KATIB_MYSQL_DB_HOSTKatib MySQL Hostkatib-mysqlNo
KATIB_MYSQL_DB_PORTKatib MySQL Port3306No
KATIB_MYSQL_DB_DATABASEKatib MySQL Database namekatibNo
KATIB_POSTGRESQL_DB_HOSTKatib Postgres Hostkatib-postgresNo
KATIB_POSTGRESQL_DB_PORTKatib Postgres Port5432No
KATIB_POSTGRESQL_DATABASEKatib Postgres Database namekatibNo
KATIB_POSTGRESQL_SSL_MODEKatib Postgres SSL modedisableNo
SKIP_DB_INITIALIZATIONOption to skip DB table initializationfalseNo

Currently, Katib DB Manager supports only MySQL and Postgres database. (DB_NAME env variable must be filled with one of mysql or postgres)
However, you can use your own DB Manager and Database to report metrics by implements the katib db interface.

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

Katib DB Manager creates DB connection to the DB by the type of DB.
If DB_NAME=mysql, it uses 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

If DB_NAME=postgres, it uses pq driver and this data source name:
postgresql://[DB_USER[:DB_PASSWORD]@][KATIB_POSTGRESQL_DB_HOST][:KATIB_POSTGRESQL_DB_PORT][/KATIB_POSTGRESQL_DB_DATABASE]

Katib DB

Katib DB components supports MySQL and Postgres.

Katib MySQL

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

Katib Postgres

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

  • POSTGRES_USER, POSTGRES_PASSWORD and POSTGRES_DB to a value from katib-postgres-secrets, which are equal to “katib”.

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

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

  1. POSTGRES_USER = DB_USER
  2. POSTGRES_PASSWORD = DB_PASSWORD
  3. POSTGRES_DB = KATIB_POSTGRESQL_DB_DATABASE

Feedback

Was this page helpful?