Skip to content

Queue Server Configuration

Vladislav Alekseev edited this page Dec 30, 2019 · 23 revisions

This configuration is described by QueueServerRunConfiguration.swift source file. It defines how workers and queue operate.

Keys

analyticsConfiguration

This is a JSON object. It configures analytics services that Emcee can use to report various events.

To enable reporting to graphite, add graphiteConfiguration as below:

{
    "analyticsConfiguration": {
        "graphiteConfiguration": {
            "socketAddress": "graphite.example.com:2111",
            "metricPrefix": "your.own.emcee.graphite.prefix"
        }
    }
}

Replace graphite.example.com:2111 with your graphite address and port, and set your own graphite metric prefix instead of your.own.emcee.graphite.prefix.

To enable reporting to Sentry, add sentryConfiguration as below:

{
    "analyticsConfiguration": {
        "sentryConfiguration": {
            "dsn": "your_sentry_dsn"
        }
    }
}

You will need to specify Sentry DSN instead of your_sentry_dsn.

If you don't want any analytics, provide an empty JSON object:

{
    "analyticsConfiguration": {}
}

checkAgainTimeInterval and reportAliveInterval

This is currently an implementation detail of Emcee. It is recommended to set these values to 30 seconds.

checkAgainTimeInterval defines how often workers poll the queue for buckets to execute.

reportAliveInterval defines how often workers report their aliveness. If worker won't report aliveness for this amount of time, queue will consider the worker as silent (dead) and re-schedule its buckets back to queue to avoid losing them.

workerDeploymentDestinations

This is an array of computers that will be used as Emcee workers. The computer that is running shared queue can also be Emcee worker.

Each element of this array describes how Emcee can reach the computer.

This is an array of Deployment Destination objects.

deploymentDestinationConfigurations

This is an array of Destination Configuration objects. These objects describe the capabilities of each worker. Each worker must have its own destination configuration.

queueServerTerminationPolicy

Detailed explanation is given on Queue Termination Policy page.

plugins

URLs to ZIP archive containing emceeplugin bundles. You can pass empty array ([]) if you don't want any plugins.

Read more about developing Emcee plugins.

Sample JSON Contents

{
    "analyticsConfiguration": {},
    "plugins": [],
    "checkAgainTimeInterval": 30,
    "reportAliveInterval": 30,
    "deploymentDestinationConfigurations": [
        {
            "destinationIdentifier": "test-runner01.example.com",
            "numberOfSimulators": 3
        },
        {
            "destinationIdentifier": "test-runner02.example.com",
            "numberOfSimulators": 6
        }
    ],
    "queueServerTerminationPolicy": {
        "caseId": "afterBeingIdle",
        "period": 3600
    },
    "workerDeploymentDestinations": [
        {
            "host": "test-runner01.example.com",
            "password": "password",
            "port": 22,
            "remote_deployment_path": "/Users/USER/remote_ui_tests.noindex/",
            "username": "USER"
        },
        {
            "host": "test-runner02.example.com",
            "password": "password",
            "port": 22,
            "remote_deployment_path": "/Users/USER/remote_ui_tests.noindex/",
            "username": "USER"
        }
    ]
}

Clone this wiki locally