Skip to content

Worker configuration

Worker is configured using a JSON configuration file that is mounted into the container. Create a config.json file with the worker configuration and mount it when running the container:

docker run -d -v /path/to/config.json:/app/config.json \
--name queue-worker1 \
--network emcee-network avitotech/emcee-worker:latest

Example config.json#

{
    "queue": {
        "url": "http://emcee-queue-service:41000"
    },
    "networkCallsRetryConfiguration": {
        "triesCount": 5,
        "retryDelayMs": 3000
    },
    "workerPort": 41001,
    "androidSdkPath": "/opt/android-sdk",
    "timeoutConfiguration": {
        "artifactsDownloadTimeoutMs": 200000,
        "apkInstallationTimeoutMs": 120000
    },
    "globalAnalyticsConfiguration": {
        "graphiteConfiguration": {
            "socketAddress": "graphite.example.com",
            "socketPort": 2003,
            "metricPrefix": "apps.mobile.emcee.worker",
            "isEnabled": false
        },
        "kibanaConfiguration": {
            "isEnabled": false,
            "endpoints": [
                "https://elasticsearch.example.com:9200"
            ],
            "indexName": "emcee-worker",
            "elasticAuthApiKey": "your-api-key-here"
        }
    }
}

Configuration Parameters#

The following parameters can be configured in the config.json file:

  • queue.url - Queue server URL (required)
  • workerPort - Worker port (default: 41001)
  • timeoutConfiguration.artifactsDownloadTimeoutMs - Timeout for downloading artifacts in ms (default: 200000)
  • timeoutConfiguration.apkInstallationTimeoutMs - Timeout for installing apps in ms (default: 120000)
  • globalAnalyticsConfiguration.graphiteConfiguration - Graphite metrics configuration
  • isEnabled - Enable/disable Graphite metrics
  • socketAddress - Graphite host
  • socketPort - Graphite port
  • metricPrefix - Metric prefix
  • globalAnalyticsConfiguration.kibanaConfiguration - Kibana logs configuration
  • isEnabled - Enable/disable Kibana logs
  • endpoints - List of Elasticsearch endpoints
  • indexName - Index name for logs
  • elasticAuthApiKey - API key for Elasticsearch authentication

Environment Variables#

The following environment variables are supported:

Variable Description
EMCEE_WORKER_LOG_LEVEL Worker logging level. Possible options: verbose, debug, info, warn, critical. info by default
EMCEE_WORKER_ARTIFACTORY_USERNAME Artifactory authorization username. Basic Authentication is supported.
EMCEE_WORKER_ARTIFACTORY_PASSWORD Artifactory authorization password.
EMCEE_WORKER_FILE_DOWNLOADER_PROXY_HOST Proxy host for downloading artifacts. If this variable is unset (or empty), existing proxy configuration remains unchanged (when you already have one), or no proxy is used otherwise. Example: 0.0.0.0
EMCEE_WORKER_FILE_DOWNLOADER_PROXY_PORT Proxy port for downloading artifacts. Example: 8080. If this variable is unset (or empty), existing proxy configuration remains unchanged, or no proxy is used.
EMCEE_WORKER_FILE_DOWNLOADER_IS_PROXY_ENABLED Enables or disables the proxy for downloading artifacts. Must be true or false. If this variable is unset, existing proxy configuration remains unchanged, or no proxy is used.
EMCEE_KASPRESSO_ADB_IS_ENABLED Enables Kaspresso adb-server on worker. true or false. false by default.