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. Platform-provided files can be any files provided by Genesis, auth, or any business component or module that 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 directories, as required.

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

A common requirement is to turn on processes that are disabled by default or to turn off those that are enabled by default. If it is not already available in your project's cfg directory you can find genesis-processes.xml (per screenshot below) and copy it there.

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

tip

These files can change over time with new platform releases. Any Genesis platform-provided files placed in this location might need to be updated with any new platform features that 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\""
)
}
}