Configure additional Dashboard schemas for JAR file deployments

Introduction

When deploying a JAR file (available in ≥ 2.5) an installer is provided. This installer will only allow the configuration of one single PostgreSQL instance and one single Dashboard/Central schema as shown in the image below:

If you therefore need to define additional C PostgreSQL instance(e.g. you need to define multiple Dashboard/Central schemas located on multiple PostgreSQL instances) or you need to define additional Dashboard/Central schemas (located on the same PostgreSQL instance), you will need to make a manual change to the Dashboard configuration files as described below.

Configure additional PostgreSQL instances using application.properties

If the Dashboard/Central schemas you want to use with the Engineering Dashboard/RestAPI are located on different PostgreSQL instances, you will need to add these instances to the application.properties file - open this file with a text editor:

Microsoft Windows: %PROGRAMDATA%\CAST\Dashboards\<dashboard>\application.properties
Linux: /root/ProgramData/CAST/Dashboards<dashboard>/application.properties

First ensure that the Dashboard/RestAPI is not running. Then find the following section in the file - this contains the PostgreSQL instance defined during the installation process (see Standalone Engineering Dashboard deployment using JAR file):

## DATASOURCE
# Resource1 is the datasource name used in domains.properties
# Adapt server name (localhost) and port (2282) if required
# You can add multiple datasources if you want to connect to multiple CSS Servers. Datasource name must be unique
# You have to configure your domains names and relative schema names in domains.properties
# You can encrypt username and password using the aip encryption tool
restapi.datasource[0].url=jdbc:postgresql://localhost:2282/postgres
restapi.datasource[0].username=operator
restapi.datasource[0].password=CRYPTED2:90B1A6EC1618661401B724DB5AC34595
restapi.datasource[0].poolname=Resource1
restapi.datasource[0].minimumIdle=10
restapi.datasource[0].maximumPoolSize=20

Add your additional PostgreSQL instances as shown below:

  • Ensure that you modify the urlusername,``password and resource entries to match your target PostgreSQL. In particular, the resource entry must be unique within the application.properties file.
  • The [0] must also be incremented for additional PostgreSQL instances, for example, use restapi.datasource[1]restapi.datasource[2] etc.
  • the password entry is the equivalent of the password CastAIP. If you are using a different username/password, please see Encrypt login and password for database and LDAP.
## DATASOURCE
# Resource1 is the datasource name used in domains.properties
# Adapt server name (localhost) and port (2282) if required
# You can add multiple datasources if you want to connect to multiple CSS Servers. Datasource name must be unique
# You have to configure your domains names and relative schema names in domains.properties
# You can encrypt username and password using the aip encryption tool
restapi.datasource[0].url=jdbc:postgresql://localhost:2282/postgres
restapi.datasource[0].username=operator
restapi.datasource[0].password=CRYPTED2:90B1A6EC1618661401B724DB5AC34595
restapi.datasource[0].poolname=Resource1
restapi.datasource[0].minimumIdle=10
restapi.datasource[0].maximumPoolSize=20

restapi.datasource[1].url=jdbc:postgresql://my_server:2282/postgres
restapi.datasource[1].username=operator
restapi.datasource[1].password=CRYPTED2:90B1A6EC1618661401B724DB5AC34595
restapi.datasource[1].poolname=Resource2
restapi.datasource[1].minimumIdle=10
restapi.datasource[1].maximumPoolSize=20

Save the file and then restarted the Dashboard/RestAPI.

Configure additional Dashboard schemas using domains.properties

To configure additional Dashboard schemas, you need to use the domains.properties file - open this files with a text editor:

Microsoft Windows: %PROGRAMDATA%\CAST\Dashboards\<dashboard>\domain.properties
Linux: /root/ProgramData/CAST/Dashboards<dashboard>/domain.properties

First ensure that the Dashboard/RestAPI is not running. Find the following section in the file - this will contain the single Dashboard/Central schema defined during the installation process (see Standalone Engineering Dashboard deployment using JAR file):

# Domains for ED
# empty lines in this file lead to connection error, remove all empty lines
# - You have to align [Resource1] with the resource name configured in application.properties
# - You have to replace [Central Schema1] by the central schema name
# - Domains names must be unique
AED=Resource1,meudon_v1_central
# AED1=Resource1,[Central Schema1]
# AED2=Resource1,[Central Schema2]

For each Dashboard schema that you need to display in the CAST Engineering Dashboard, add one line to the file ensuring that there are no empty lines, as follows:

AEDxThis is known as the “domain” and this must be unique in the domains.properties file. Therefore for each Dashboard schema you need to display in the CAST Engineering Dashboard, you need to assign one unique domain. You can use any domain name notation you want, however, CAST highly recommends incrementing the number, i.e. AED1, AED2, AED3 etc.
ResourcexThis entry refers to the PostgreSQL instance as defined in the application.properties file.
[Central Schema1]This entry refers to the Dashboard/Central schema containing the relevant Application data.

For example, to add an additional single Dashboard schema called “MY_CENTRAL” stored in the PostgreSQL instance defined in Resource1 in the application.properties file (i.e. the same instance as defined during the installation process), add the following:

# Domains for ED
# empty lines in this file lead to connection error, remove all empty lines
# - You have to align [Resource1] with the resource name configured in application.properties
# - You have to replace [Central Schema1] by the central schema name
# - Domains names must be unique
AED=Resource1,meudon_v1_central
AED1=Resource1,my_central
# AED1=Resource1,[Central Schema1]
# AED2=Resource1,[Central Schema2]

To add multiple Dashboard schemas where all schemas are located in the same PostgreSQL instance defined in Resource1 in the application.properties file (i.e. the same instance as defined during the installation process) add the following:

# Domains for ED
# empty lines in this file lead to connection error, remove all empty lines
# - You have to align [Resource1] with the resource name configured in application.properties
# - You have to replace [Central Schema1] by the central schema name
# - Domains names must be unique
AED=Resource1,meudon_v1_central
AED1=Resource1,my_central
AED2=Resource1,my_central_2
AED3=Resource1,my_central_3
# AED1=Resource1,[Central Schema1]
# AED2=Resource1,[Central Schema2]

To add multiple Dashboard schemas where the schemas are located on different PostgreSQL instances (Resource1 and Resource2) as defined in the application.properties file, add the following:

# Domains for ED
# empty lines in this file lead to connection error, remove all empty lines
# - You have to align [Resource1] with the resource name configured in application.properties
# - You have to replace [Central Schema1] by the central schema name
# - Domains names must be unique
AED=Resource1,meudon_v1_central
AED1=Resource1,my_central
AED2=Resource2,my_central_2
AED3=Resource2,my_central_3
# AED1=Resource1,[Central Schema1]
# AED2=Resource1,[Central Schema2]

Save the file and then restarted the Dashboard/RestAPI.