Introduction
When deploying a JAR file (available in ≥ 2.5) an installer is provided. This installer will only allow the configuration of one single CAST Storage Service/PostgreSQL instance and one single Dashboard/Central schema as shown in the image below:
If you therefore need to define additional C CAST Storage Service/PostgreSQL instance (e.g. you need to define multiple Dashboard/Central schemas located on multiple CAST Storage Service/PostgreSQL instances) or you need to define additional Dashboard/Central schemas (located on the same CAST Storage Service/PostgreSQL instance), you will need to make a manual change to the Dashboard configuration files as described below.
Configure additional CAST Storage Service/PostgreSQL instances using application.properties
If the Dashboard/Central schemas you want to use with the Engineering Dashboard/RestAPI are located on different CAST Storage Service/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 CAST Storage Service/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 CAST Storage Service/PostgreSQL instances as shown below:
- Ensure that you modify the
url
,username,
password
andresource
entries to match your target CAST Storage Service/PostgreSQL. In particular, theresource
entry must be unique within the application.properties file. - The
[0]
must also be incremented for additional CAST Storage Service/PostgreSQL instances, for example, userestapi.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.
Using a custom CAST Storage Service or PostgreSQL database other than the default postgres
If you are using AIP Core≥ 8.3.40 it is possible to connect to a custom CAST Storage Service/PostgreSQL database other than the default "postgres" (previously custom databases were not permitted for use with CAST). To be able to exploit this change, see Using a custom CAST Storage Service or PostgreSQL database other than the default postgres.
minimumIdle and maximumPoolSize
The following options are used to govern the connections from the web application to the target CAST Storage Service/PostgreSQL instance:
restapi.datasource[0].minimumIdle=10 restapi.datasource[0].maximumPoolSize=20
CAST recommends using the default options unless you are experiencing performance issues. The options are used as follows:
minimumIdle | The minimum number of connections that should be kept in the pool at all times (even if there is no traffic). Default value is 10. Idle connections are checked periodically. |
maximumPoolSize | The maximum number of active connections that can be allocated from this pool at the same time. The default value is 20. |
See also Configure the Health Dashboard for large numbers of Applications.
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:
AEDx | This 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. |
---|---|
Resourcex | This entry refers to the CAST Storage Service/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 CAST Storage Service/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 CAST Storage Service/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 CAST Storage Services/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.