app.yaml
This section explains how to set up the app.yaml
configuration file, including all related parameters that are crucial for the aqishare startup process.
Parameter Overview
The table highlights all available main level properties in the app.yaml
that can be used to setup aqishare. For details refer to the related property explanation in the next section.
Parameter | Mandatory | Type | Default | Description |
---|---|---|---|---|
aqishareLicense | Yes | string | Containts the license key to run aqishare. | |
collectorPriority | No | number | 1 | Drives the priority of the collectors queue. |
concurrency | No | number | 10 | Maximum number of tasks that can be processed simultaneously. |
logging | No | Object | Specify the log settings. | |
metrics | No | Object | Collect metrics for the open-source monitoring and alerting Prometheus. | |
port | No | number | 3001 | The port of aqishare to trigger a collector task manually. |
privateKeyPath | No | string | The use of encrypted passwords necessitates a private key. This parameter points to the key within the container. | |
redis | Yes | Object | Specifies the Redis database connection required for the queue. |
Parameter in Detail
The parameter from the table above explained in detail.
aqishare License Key
The most crucial setting in the app.yaml
is the license key. This key should be stored under the aqishareLicense
property of the file. If there is no license key, or if the provided license key is invalid or expired, aqishare will run in demo mode. In any case, no Tasks will be executed against the SAP system.
aqishareLicense: 12345-67890-09876-54321
Collector Priority
Change the priority of the collector's queue relative to all other queues.
collectorPriority: 1
Concurrency
Specifies the maximum number of tasks that can be processed simultaneously.
concurrency: 10
Logging
Logging is crucial because it provides visibility into an application's operation, helping to diagnose issues and monitor performance effectively. This section describes how to influence logging and log output in aqishare.
logging:
level: 1
caller: false
structured: true
timeFormat: 2006-01-02T15:04:05Z07:00
fieldName:
timestamp: time
level: level
caller: caller
message: message
error: error
Below, all the parameters used in the example are explained in detail.
Parameter | Mandatory | Type | Default | Description |
---|---|---|---|---|
level | No | string | info | Specify the log level to control the granularity of information captured in the logs. Available log levels:trace debug info (default)warn error fatal panic disabled (used to disable the logging) |
caller | No | boolean | false | This logs the affected source, providing a detailed record that can help in troubleshooting and understanding the context of operations. |
structured | No | boolean | true | Formats the log output using JSON syntax, which enhances readability and facilitates easier integration with log management tools. |
timeFormat | No | string | 2006-01-02T15:04:05Z07:00 | Specifies the format used to display the timestamp in log outputs. Refer to Gomplate Reference. |
fieldname | No | Object | Object to override default names. Refer below to Specify Parameter fieldname. |
Specify Parameter fieldname
For various reasons, there may be a need to adapt the default names in the log output to streamline names within the organization, for example, to facilitate easier integration with log management tools and ensure consistency across reporting systems. The following fields names can be overriden:
Parameter | Mandatory | Type | Default | Description |
---|---|---|---|---|
timestamp | No | string | timestamp | Override the timestamp field name according to your needs to specify the name through which the timestamp value can be accessed. |
level | No | string | level | Override the level field name according to your needs to specify the name through which the value can be accessed. |
caller | No | string | caller | Override the caller field name according to your needs to specify the name through which the value can be accessed. |
message | No | string | message | SOverride the message field name according to your needs to specify the name through which the message value can be accessed. |
error | No | string | error | Override the error field name according to your needs to specify the name through which the error value can be accessed. |
Metrics
It's possible to gain insights into the HTTP traffic that is directed through aqishare. For this, the interface can expose an endpoint for the open-source monitoring and alerting toolkit Prometheus.
To make this endpoint available, specify the following parameter for key metrics in the app.yaml
.
To use the metrics, refer to Content Property in either RFC Mapping or Rest Mapping in the configuration section.
Parameter | Mandatory | Type | Default | Description |
---|---|---|---|---|
enabled | No | Boolean | false | By default, the endpoint for Prometheus is disabled. Enable it by setting this parameter to true . |
path | No | string | /metrics | The name of the endpoint that is accessible by Prometheus. Make sure the path always starts with a slash! |
port | No | number | 9090 | The port number where the endpoint for Prometheus is accessible. |
To visualize the data collected by Prometheus, Grafana can be used, for instance.
Neither Prometheus nor Grafana are part of the aqishare delivery. If you want to use them, you must install and set up them by your own. With the settings above, only the endpoint with the structure required by Prometheus is exposed.
Password Encryption
The use of encrypted passwords in any other configuration file necessitates the specification of the privateKeyPath
parameter. The value should indicate the path within the container to the private key, which will be used to decrypt the passwords. The private key must be either mapped to the container or copied into the image beforehand. If password encryption is not required, this setting can be omitted. The encryption makes use of the RSA mechanism.
For details on generating key pairs and setting up password encryption, refer to Password Encryption.
privateKeyPath: /app/configs/privateKey.pem
Port
Override the default port used to manually trigger a task in the /tasks/
folder.
For details how to trigger a task manually, refer to Manually trigger a Task using an accessToken.
port: 3001
Redis Database
As the queue is based on the open-source database Redis, many additional settings regarding database configuration are available. As a full-featured Redis client, aqishare uses ioredis. For a full list of available parameters, please refer to the ioredis documentation.
redis:
type: client
address: redis:6379
Below are some of the most important properties that influence Redis behavior:
Redis Client
Parameter | Mandatory | Description |
---|---|---|
type | Yes | In this case use client . |
address | Yes | IP-address of the Redis container with port number. |
network | No | Specifies the network type, either tcp or unix .Default: tcp |
username | No | User to login to the database. |
password | No | Password to login to the database. Must match the password specified in the requirepass server configuration option. |
db | No | Database to be selected after connecting to the server. Default: 1 |
dialTimeout | No | Dial timeout for establishing new connections. Time-based format such as 3m or 1h .Default: 5s |
readTimeout | No | Read timeout for socket reads. If reached, commands will fail with a timeout instead of blocking. Time-based format such as 3m or 1h .Default: 3s |
writeTimeout | No | Write timeout for socket writes. If reached, commands will fail with a timeout instead of blocking. Time-based format such as 3m or 1h . |
poolSize | No | Maximum number of socket connections. Default: 10 |
Redis Cluster
Use the following settings to scale Redis horizontally with Redis Cluster.
Parameter | Mandatory | Description |
---|---|---|
type | Yes | To specify setting for Redis cluster, set the value to: cluster . |
addresses | Yes | Array of IP addresses of the Redis cluster with port numbers. |
network | No | Specifies the network type, either tcp or unix .Default: tcp |
username | No | User to login to the database. |
password | No | Password to login to the database. Must match the password specified in the requirepass server configuration option. |
dialTimeout | No | Dial timeout for establishing new connections. Time-based format such as 3m or 1h .Default: 5s |
readTimeout | No | Read timeout for socket reads. If reached, commands will fail with a timeout instead of blocking. Time-based format such as 3m or 1h .Default: 3s |
writeTimeout | No | Write timeout for socket writes. If reached, commands will fail with a timeout instead of blocking. Time-based format such as 3m or 1h . |
Redis Sentinel
Use the following Redis Sentinal settings to run Redis with high availability when not using Redis Cluster above.
Parameter | Mandatory | Description |
---|---|---|
type | Yes | in this case cluster . |
addresses | Yes | Array of IP-addresses of the Redis cluster with port numbers. |
masterName | No | Master name |
sentinelPassword | No | Password to login |
username | No | User to login to the database. |
password | No | Password to login to the database. Must match the password specified in the requirepass server configuration option. |
db | No | Database to be selected after connecting to the server. Default: 1 |
dialTimeout | No | Dial timeout for establishing new connections. Time-based format such as 3m or 1h .Default: 5s |
readTimeout | No | Read timeout for socket reads. If reached, commands will fail with a timeout instead of blocking. Time-based format such as 3m or 1h .Default: 3s |
writeTimeout | No | Write timeout for socket writes. If reached, commands will fail with a timeout instead of blocking. Time-based format such as 3m or 1h . |
poolSize | No | Maximum number of socket connections. Default: 10 |
Example Configuration
This is a sample configuration that includes the most relevant properties as explained above. These properties must be present in the app.yaml
file.
aqishareLicense: 12345-67890-09876-54321
concurrency: 10
collectorPriority: 1
logging:
level: 1
caller: false
structured: true
timeFormat: 2006-01-02T15:04:05Z07:00
fieldName:
timestamp: time
level: level
caller: caller
message: message
error: error
metrics:
enabled: true
path: /metrics
port: 9090
port: 3001
privateKeyPath: /app/configs/privateKey.pem
redis:
type: client
address: redis:6379