Skip to content

Set Environment Variables

Most deployment-level settings in TestGen — SMTP credentials, single sign-on, custom branding, and MCP options — are applied through environment variables. The steps to set a variable depend on the install mode. After setting any variable, restart the application for the change to take effect.

Docker mode

  1. Navigate to the directory that contains the docker-compose.yml file for TestGen.

    • If the instance was installed using dk-installer.exe, the file can be located under "AppData\Local\DataKitchenApps".
    • If the instance was installed using dk-installer, the file can be located in the folder from which the Python installer was executed.
  2. Add each variable under the x-common-variables section, one variable per line.

    x-common-variables: &common-variables
     TG_EXAMPLE_VARIABLE: <value>
    
  3. Restart the application.

    docker compose up -d --wait
    

Pip mode

  1. Open the ~/.testgen/config.env file in a text editor.

  2. Add each variable on its own line, no quotes.

    TG_EXAMPLE_VARIABLE=<value>
    
  3. Restart the application. Stop the running TestGen process with Ctrl+C in the terminal where it is running, then start it again.

    python3 dk-installer.py tg start
    

Kubernetes mode Enterprise

The instance must have been installed with Helm, as outlined in Install on Kubernetes.

  1. Open the values-tg-app.yaml file used for the installation.

  2. Add each variable under the extraEnv section, in Kubernetes environment format.

    extraEnv:
      - name: TG_EXAMPLE_VARIABLE
        value: "<value>"
    
  3. Apply the change.

    helm upgrade -n datakitchen dk-tg-app datakitchen-testgen/testgen \
        --values values-tg-app.yaml --wait
    

Tip

Some settings have a dedicated value in the chart, such as the SMTP server and the UI base URL. Prefer those over extraEnv where they exist. See the Values reference.