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 |
---|---|---|---|---|
license | Yes | string | Containts the license key to run aqishare. | |
redis | Yes | Object | Specifies the Redis database connection required for the queue. | |
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. | |
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. |
Parameter in Detail
License Key
The most crucial setting in the app.yaml
is the license key. This key should be stored under the license
property of the file. If there is no license key, or if the provided license key is invalid, aqishare will run in demo mode.
license: 12345-67890-09876-54321
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 client . |
address | Yes | IP-address of the Redis container with port number. |
network | No | Specifies the network . Redis doku lesen... |
username | No | User to login to the database. |
password | No | Password to login to the database. |
db | No | Specifies the number of the database. Default: 1 |
dialTimeout | No | Dial timeout, time based format such as 3m, 1h. |
readTimeout | No | Read timeout, time based format such as 3m, 1h. |
writeTimeout | No | Write timeout, time based format such as 3m, 1h. |
poolSize | No | Connection pooling size. |
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 . Redis doku lesen... |
username | No | User to login to the database. |
password | No | Password to login to the database. |
dialTimeout | No | Dial timeout, time based format such as 3m, 1h. |
readTimeout | No | Read timeout, time based format such as 3m, 1h. |
writeTimeout | No | Write timeout, time based format such as 3m, 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 |
db | No | Specifies the number of the database. Default: 1 |
username | No | User to login to the database. |
password | No | Password to login to the database. |
dialTimeout | No | Dial timeout, time based format such as 3m, 1h. |
readTimeout | No | Read timeout, time based format such as 3m, 1h. |
writeTimeout | No | Write timeout, time based format such as 3m, 1h. |
poolSize | No | Connection pooling size. |
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
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 | number | -1 | Specify the log level to control the granularity of information captured in the logs. Available log levels:-1 - trace0 - debug1 - info2 - warn3 - error4 - fatal5 - panic |
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. |
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. |
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
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.
license: 12345-67890-09876-54321
port: 3001
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
redis:
host: redis
port: 6379
privateKeyPath: /app/configs/privateKey.pem