Environment Variables for Katib Components
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' or 'postgres' | Yes | |
DB_PASSWORD | Katib DB Password | test (MySQL) katib (Postgres) | Yes |
DB_USER | Katib DB User | root (MySQL) katib (Postgres) | 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 |
KATIB_POSTGRESQL_DB_HOST | Katib Postgres Host | katib-postgres | No |
KATIB_POSTGRESQL_DB_PORT | Katib Postgres Port | 5432 | No |
KATIB_POSTGRESQL_DATABASE | Katib Postgres Database name | katib | No |
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
astrue
MYSQL_DATABASE
askatib
.
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:
MYSQL_ROOT_PASSWORD
=DB_PASSWORD
MYSQL_DATABASE
=KATIB_MYSQL_DB_DATABASE
Katib Postgres
For the Katib Postgres you need to set these environment variables:
POSTGRES_USER
,POSTGRES_PASSWORD
andPOSTGRES_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:
POSTGRES_USER
=DB_USER
POSTGRES_PASSWORD
=DB_PASSWORD
POSTGRES_DB
=KATIB_POSTGRESQL_DB_DATABASE
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.