application-dbs.yml

Configuration file containing database connection parameters used by the AUDIT, REGISTRY, RENDITION-REPOSITORY and COMMANDER services.

Characteristics

Profile Nameapplication-dbs.yml
Referenced by Servicesaudit,registry,rendition-repository,commander
Storage LocationGit root directory 

Parameters

ParameterDescriptionDefault Value
spring.datasource.hikari.maximumPoolSize

Integer number of connections to the database per service (AUDIT, REGISTRY, RENDITION-REPOSITORY). The value can be overwritten for each service by configuring the paramenter spring.datasource.hikari.custom.maximum-pool-size, e.g., in its <serviceName>-prod.yml configuration file.

Note: For the COMMANDER service, the service-specific configuration parameter is predefined to 2 database connections as default. Thus, its database connections are not affected by the value of spring.datasource.hikari.maximumPoolSize in the application-dbs.yml configuration parameter.
>> commander-prod.yml

10
storage
Section of individual database configurations.

databases

List of database definitions with the following required parameters:

  • datasource – Reference on a configuration in storage.datasources.
  • predicate – SPEL statement specifying the condition under which the database should be used. As of version 2022 Winter, the condition can only reference the system:tenant property of DMS objects.
  • default – Boolean value that specifies whether the database should be used as default database (true) or not (false).
    Note: Exactly one database has to be the default database.

For each database action requested for a DMS object, the list of databases is read from the top. The first database for which the predicate is evaluated to true is used. If no predicate is true, the default database is used.

Note

If you apply changes to the configuration of a running system, ensure that existing tenants are directed to their previous database.

defaultdb:
   datasource: defaultds
   predicate: 'spel:false'
   default: true


datasources

List of database configurations with the following required parameters:

  • url
  • user
  • password
  • driver-class-name

Note: All database configurations have to use the same driver (driver-class-name).

defaultds:
    url: jdbc:postgresql://postgresql.infrastructure:5432/${DBNAME}
    username: yuuvis_${NAMESPACE}
    password: ${DBPWD}
    driver-class-name: org.postgresql.Driver

The values of the parameters can be modified as described here.
>> Configuring Services using Profiles.

Example Configuration

This example is structured for use in product version 2022 Winter.

Example application-dbs.yml
storage:
    databases:
        defaultdb:
            datasource: defaultds
            predicate: 'spel:false'
            default: true
        database2:
            datasource: db2source
            predicate: "spel:properties['system:tenant']['value']=='tenant2'"
            default: false
    datasources:
        defaultds:
            url: 'jdbc:postgresql://abc/def'
            username: yuuvis-postgresql
            password: changeme123
            driver-class-name: 'org.postgresql.Driver'
        db2source:
            url: 'jdbc:postgresql://ghi/jkl'
            username: yuuvis-postgresql
            password: changeme123
            driver-class-name: 'org.postgresql.Driver'