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:

Variable Description Default Value Mandatory
KATIB_CORE_NAMESPACE Base Namespace for all Katib components and default Experiment metadata.namespace Yes
KATIB_SUGGESTION_COMPOSER Composer for the Katib Suggestions. You can use your own Composer general No
KATIB_DB_MANAGER_SERVICE_NAMESPACE Katib DB Manager Namespace KATIB_CORE_NAMESPACE env variable No
KATIB_DB_MANAGER_SERVICE_IP Katib DB Manager IP katib-db-manager No
KATIB_DB_MANAGER_SERVICE_PORT Katib DB Manager Port 6789 No

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:

Variable Description Default Value Mandatory
KATIB_CORE_NAMESPACE Base Namespace for all Katib components and default Experiment metadata.namespace Yes
KATIB_DB_MANAGER_SERVICE_NAMESPACE Katib DB Manager Namespace KATIB_CORE_NAMESPACE env variable No
KATIB_DB_MANAGER_SERVICE_IP Katib DB Manager IP katib-db-manager No
KATIB_DB_MANAGER_SERVICE_PORT Katib DB Manager Port 6789 No

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:

Variable Description Default Value Mandatory
DB_NAME Katib DB Name mysql Yes
DB_PASSWORD Katib DB Password test Yes
DB_USER Katib DB User root No
KATIB_MYSQL_DB_HOST Katib MySQL Host katib-mysql No
KATIB_MYSQL_DB_PORT Katib MySQL Port 3306 No
KATIB_MYSQL_DB_DATABASE Katib MySQL Database name katib No

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