Installation
External PostgreSQL database

Configure an external PostgreSQL database

The MOSTLY AI Helm charts include a PostgreSQL container that the application uses to store data about jobs, connectors, catalogs, and so on.

If necessary, you can configure an external PostgreSQL database that your company hosts internally.

Prerequisites

  • Make sure that the Kubernetes cluster has access to your external PostgreSQL database.
  • Encode the PostgreSQL credentials in base64 format.

Steps

  1. Edit values.yaml to configure the external PostgreSQL.
  2. Under ### Postgresql settings, set local_deployment to false.
    values.yaml
    ### Postgresql settings
    PSQL:
        local_deployment: false
  3. Paste the base64-encoded user and password in the psqlMostlyPass and psqlMostlyUser lines.
    💡

    The excerpt from values.yaml contains asterisks where you need to paste your encoded PostgreSQL user and password.

    values.yaml
    ## External Postgresql database details encrypted with base64 (psql_local_deployment have to be setup to 'false')
    psql_secrets:
        psqlMostlyPass: **********
        psqlMostlyUser: ******
    ##
  4. Under ## External Postgresql database details, configure your PostgreSQL database connection details.
    values.yaml
    ## External Postgresql database details
    psql_cm:
        host: mostly-db.example.com
        mostly_app_db_name: mostly_app
        mostly_coordinator_db_name: mostly_coordinator
        mostly_keycloak_db_name: mostly_keycloak
        port: '5432'
    ## 
  5. Under ## Local Postgresql deployment, set the database name and port in the name and containerPort lines.
    values.yaml
    ## Local Postgresql deployment
    # name: mostly-psql
    # image:
    #   name: postgresql #<-- required to be updated with provided by Mostly AI repository
    #   tag: 14.5.0-debian-11-r6 #<-- required to be updated with provided by Mostly AI image tag
    #   imagePullPolicy: IfNotPresent
    #   imagePullSecrets: mostly-docker-cfg
     
    ports:
        name: mostly-db
        containerPort: 5432
  6. Save the changes to the values.yaml file.
  7. Go back to deploying with helm upgrade ....