Settings files
The Agent application reads settings from a number of files:
appsettings.json
appsettings.production.json
secrets/appsettings.secrets.json
The configuration in these files cascade in priority, with latter files overriding settings from earlier ones.
The files appsettings.json
and secrets/appsettings.secrets.json
are overwritten during installation, so lasting changes shouldn't be written there and you should make your changes to the appsettings.production.json
Available settings
Most of these settings should be pre-configured correctly when downloading the configuration from the Frends UI. However, you can manually edit them in appsettings.json file. Here is an explanation of what the different settings are used for and where they come from.
SA = Single Agent in Agent group.
HA = High availability, multiple Agents in Agent Group.
Agent database settings
If the Agent Group has multiple Frends Agents either AgentDatabaseConnectionString or SharedStateStore has to be set to be able to run Schedule and FileWatch Triggers. If neither is set the agent state will be stored in SQLite and not shared between agents.
AgentDatabaseConnectionString (optional, SQL Server, HA)
This value is configured in the Agent Group view under UI and all agents in the Agent Group have to use the same connection string.
DataDirectory (optional, containers, SQLite, SA)
This determines where the SQLite databases are stored for the agent.
For a single Agent running in a container this needs to be set to a location outside the container itself to store Schedule and FileWatch Trigger states.
SharedStateStore
Settings for Shared State configuration.
Properties:
ConnectionString: A database connection string (string)
Generic settings
These settings are required for the Agent to run. These settings are provided by the CORE when downloading the installation configuration
AgentGroupName
Name of the Agent Group where the Agent runs.
AgentName
Name of the Agent.
AzureServiceBusSasTokenConfiguration
Configuration for Azure Service Bus connection.
Contains properties:
Endpoint: Azure Service Bus namespace, e.g. foobar.windows.net (string)
UseAmqpWebSockets (bool)
SasTokensPerQueueIdentifier: SAS tokens for each queue, if required (key-value pairs of string: string)
Not required, if RabbitMqConnectionString is configured.
EnvironmentName
Name of the Environment where the Agent runs.
LogStepStoreUri
The location where the Frends Agent will log Process instance steps.
Can either be an URL for an Azure blob container (with the SAS token) or a Windows file URI (file://).
LargeMessageStoreUri
Messages that do not fit in the Message bus get transferred via this location.
Can either be an URL for an Azure blob container (with the SAS token) or a Windows file URI (file://).
ProcessHostPackageStoreUri
The location where from the Frends Agent will download the Processes built by the UI.
Can either be an URL for an Azure blob container (with the SAS token) or a Windows file URI (file://).
RabbitMqConnectionString
Connection string for RabbitMQ connection.
Not required, if an Azure Service Bus connection has been configured.
Optional settings
CertificateThumbprintOrPath
Option 1 - Thumbprint
The Agent machine should already have the certificate installed.
By default the Frends Agent will search for the certificate from store-location 'CurrentUser'.
This can be changed to 'LocalMachine' if needed via the setting 'CertificateStore'.
The store-name that is used is always 'My'
On Linux machines this certificate needs to be installed via the .NET Standard Certificate APIs. With the Frends Agent a bundled tool is be used to install these certificates.
dotnet /CertTool/ShareGate.CertificateTool.dll add -f /secrets/<PFX FileName> --password <PFX Password> --thumbprint <thumbrint> --store-name My
Option2 - Path
This setting should be the full path where the certificate file (.pfx) exists. The Agent must have access to read the file contents. If the certificate is password protected, the setting 'CertificatePassword' needs to be set.
Option3 - Not configured
If this value is left empty or not passed at all the Frends Agent will attempt to create a self-signed certificate for the Agent to use. This will need to be manually trusted and the certificate will possibly change very often when used in containers as each new instance will recreate it.
CertificateStore
The name of the certificate store, where the specified certificate is located.
Default: CurrentUser
CertificatePassword
This setting is used if a certificate for HTTPS is provided with a file path.
HealthCheckApiKey
If left empty, HTTP(S) health check endpoints (/FrendsStatusInfo and /FrendsStatusInfoLiveness) will be accessible without any authentication. Leave this empty if you have Gateway Agents in the same Agent Group.
If set, the health check endpoints will require the API key set here to be set in 'health-check-api-key' header.
HttpPorts(json) or HttpPortsString(environment variable)
If this is set the Frends Agent will attempt to start listening for HTTP traffic on the configured ports.
HttpPorts expects a json array of integers e.g [ 9996, 9997 ]
HttpPortsString expects a string where the ports are comma separated. "9996, 9997"
HttpStatusinfoPort
If you wish to host the status info page on a separate HTTP port you can configure this option. This value should be a integer e.g. "HttpStatusinfoPort": 9901
HttpsPorts (json) or HttpsPortsString (environment variable)
If this is set the Frends Agent will attempt to start listening for HTTP traffic on the configured ports.
HttpsPorts expects a JSON array of integers e.g [ 443, 9999 ]
HttpsPortsString expects a string where the ports are comma separated. "443, 9999"
InstallationIdentifier (SQLite)
This value needs to unique for all Agents running on the same machine. Can be ignored if only one agent is running on the machine.
Gateway Agent Settings
These settings are relevant if the Frends Agent is a Gateway Agent.
GatewayTargetAddresses
If this setting is set the Frends Agent will considered to be a Gateway Agent.
This should be a JSON string array with the all the addresses for the targets ["https://agent1.local:443","https://agent2.local:443"]
AllowUnsafeServerCertificateForGateway
If this setting is set the target Frends Agents do not need to have valid SSL certificates for the Gateway to proxy traffic to the Agents.
Default is false.
TimeoutMinutesForGateway
Maximum timeout the Gateway will wait for a response from the target Frends Agents.
Default is 10 minutes
Miscellaneous settings
Miscellaneous settings
The following options are optional and should only be set if one knows what they are doing.
AppDomainSetupTimeout
The timeout timespan for the initial package directory and app domain setup.
Type: Timespan
Default: 10 minutes
CheckInstancesForZombiesRunningLongerThanMinutes
Amount of minutes for a Process to run before it will be checked if it is a zombie, and terminated if it is.
Default: 900
EnableOTPLMetrics
Enables Open Telemetry metrics.
EnableOTPLTracing
Enables Open Telemetry tracing.
FileSystemInstanceLoggingPath
If set, the Agent will log Instances to a file in the specified path.
HeartBeatStatusInfoDebounceDelay
Amount of time spent per received heartbeat status message to ignore other following messages in the observable sequence.
Type: Timespan
Default: 2 seconds
MaxConcurrentRemoteSubprocessesPerCpu
Maximum amount of concurrent Remote Subprocesses per CPU.
Default: 64
MaxConcurrentBlobTransfersPerCpu
Maximum amount of concurrent blob transfers per CPU core.
Default: 4
MaxLogFlushWaitDurationSeconds
Maximum amount of time in seconds to wait before time-outing a log flush.
Default: 300
MaxSubprocessDepth
Maximum amount of Subprocesses a Process can start.
Default: 30
Passing configuration to Docker
There are multiple different ways to give the application settings to a container.
Directly bundle the appsettings.json inside the container image.
Set the configuration into the container environment variables
(Kubernetes) You can pass the configuration either as environment variables as documented here or as as secrets directly from a appsettings.secrets.json how to do this can be found under the README.md that can be downloaded from the FRENDS UI from the environment page under Environment => Agent Group => Download Kubernetes configuration