Configuring an external database

The ODM for production Helm chart provides Db2®, PostgreSQL, Microsoft SQL Server, and Oracle drivers. The customer is responsible for the backup and recovery process of these databases.

Use the following configuration parameters:

  • Server type: externalDatabase.type(db2, postgresql, sqlserver, or oracle)
  • Server name: externalDatabase.serverName
  • Port: externalDatabase.port
  • Database name: externalDatabase.databaseName
  • Secret credentials: externalDatabase.secretCredentials

    The secretCredentials parameter encapsulates the db-user and the db-password keys to access the database. You create the secret in the following way:

    kubectl create secret generic <credentials-secret-name> \
    --from-literal=db-user=<username> \
    --from-literal=db-password='<password>'

For example,

externalDatabase:
      type: postgresql
      secretCredentials: odm-prod-secret-psql-dc
      databaseName: dcdb
      serverName: postgresqldc.odm-restricted.svc.cluster.local

In this example, you configure a common Postgresql database for both Decision Server and Decision Center.

If SSL is used to secure a Db2 database connection, create a secret by providing the truststore.jks file that contains the Db2 certificate:

kubectl create secret generic db2-ssl-secret --from-file=truststore_file=truststore.jks --from-literal=truststore_password=truststorePwd

Then, set the externalDatabase.sslSecretRef parameter to this db2-ssl-secret.

Note: You can provide your own driver to use your own database by setting the externalDatabase.driversUrl parameter. This parameter accepts a unique URL or a list of URLs. Each URL can link to a single .jar file, or to compressed files in .zip, .tar, .tar.gz, .tar.bz2, or .tar.xz format with the following structure: jdbc/db2|oracle|postgresql|sqlserver/driver_files.
To set a list of values, use the following syntax:
--set externalDatabase.driversUrl="{url1,url2}"

Targeting separate databases

You might want to target two separate databases for your Decision Center and Decision Server instances. To do so, you need to define decisionServer and decisionCenter tags under the externalDatabase parameter.

In the following example, Decision Center is configured with a Mysql database and Decision Server with a Postgresql database.

externalDatabase:
  decisionCenter:
    type: mysql
    secretCredentials: odm-prod-secret-msql-dc
    databaseName: sampledb
    serverName: mysql.odm-restricted.svc.cluster.local
    driversUrl: 
      - https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.49/mysql-connector-java-5.1.49.jar
  decisionServer:
    type: postgresql
    secretCredentials: odm-prod-secret-psql-ds
    databaseName: dsdb
    serverName: postgresqlds.odm-restricted.svc.cluster.local

For more information about supported databases, see Detailed system requirements.