Skip to main content

Site specific

Site specific is an area of the run directory, on a deployed application instance, where you can override the standard definitions found elsewhere in your application.

Any platform provided files placed in your application's cfg or script will supersede those provided by the platform. Where we say |platform provided files, we mean any files which are genesis, auth, or any business component or module which is not your application.

Overriding platform provided files

Once you have built a project for the first time locally, you can find all the platform provided module artifacts, including those in cfg and scripts, to copy into your application's respective cfg and scripts directory as required.

As shown in the image below they'll be found in your project's server/<app_name>/build/genesis-home/ directory.

A common requirement may be to turn on/off processes which are disabled/enabled by default. If it is not already available in our project's cfg directory we would find genesis-processes.xml (per screenshot below) and copy it there.

We can then edit the file, and after our next build the changes will take effect, whether the project is being built and run locally or pushed to CICD for build and deployment.

tip

These files may change from over time with new platform releases. Any Genesis platform provided files placed in this location may need to be updated with any new platform features your application needs to take advantage of.

Changing system definitions

The genesis-system-definition.kts file is always found in the cfg directory of your application.

You can change the settings in the genesis-system-definition.kts file to make fundamental changes to your application. For example, if you want to change to a different database technology, you can change the DbLayer and DbHost settings.

Here is an example where we have changed the underlying technology to Postgres.

systemDefinition {
global {
item(name = "DEPLOYED_PRODUCT", value = "alpha")
item(name = "MqLayer", value = "ZeroMQ")
item(name = "DbLayer", value = "SQL")
item(name = "DictionarySource", value = "DB")
item(name = "AliasSource", value = "DB")
item(name = "MetricsEnabled", value = "false")
item(name = "ZeroMQProxyInboundPort", value = "5001")
item(name = "ZeroMQProxyOutboundPort", value = "5000")
item(name = "DbHost", value = "jdbc:postgresql://localhost:5432/postgres?user=postgres&password=postgres")
item(name = "DbMode", value = "VANILLA")
item(name = "GenesisNetProtocol", value = "V2")
item(name = "ResourcePollerTimeout", value = "5")
item(name = "ReqRepTimeout", value = "60")
item(name = "MetadataChronicleMapAverageKeySizeBytes", value = "128")
item(name = "MetadataChronicleMapAverageValueSizeBytes", value = "1024")
item(name = "MetadataChronicleMapEntriesCount", value = "512")
item(name = "DaemonServerPort", value = "4568")
item(
name = "JVM_OPTIONS",
value = "-XX:MaxHeapFreeRatio=70 -XX:MinHeapFreeRatio=30 -XX:+UseG1GC -XX:+UseStringDeduplication -XX:OnOutOfMemoryError=\"handleOutOfMemoryError.sh %p\""
)
}
}