Executor configuration
The following is a list of all of the configuration options for the executor service. The process for configuring your executor instance will vary depending on the executor deployment method selected, but are generally defined as environment variables either in the executor Docker container or directly on the host machine, depending on whether the service is running in Docker or as a native Linux binary.
Configuration Key | Description | Example value |
---|---|---|
EXECUTOR_FRONTEND_URL | The external URL of the Sourcegraph instance. required | http://sourcegraph.example.com |
EXECUTOR_FRONTEND_PASSWORD | The shared secret configured in the Sourcegraph instance site config under executors.accessToken . required | our-shared-secret |
EXECUTOR_QUEUE_NAME | The name of a single queue to pull jobs from. Possible values: batches and codeintel . required: either this or EXECUTOR_QUEUE_NAMES | batches |
EXECUTOR_QUEUE_NAMES | The names of multiple queues to pull jobs from, comma-separated. Possible values: batches and codeintel . required: either this or EXECUTOR_QUEUE_NAME | batches,codeintel |
EXECUTOR_USE_FIRECRACKER | Whether to isolate jobs in virtual machines. Requires ignite and firecracker. Linux hosts only. Kubernetes is not supported. (default value: "true" when OS is Linux and not on Kubernetes) | true |
EXECUTOR_MAXIMUM_NUM_JOBS | Number of virtual machines or containers that can be running at once. (default value: "1") | 1 |
EXECUTOR_MAXIMUM_RUNTIME_PER_JOB | The maximum wall time that can be spent on a single job. (default value: "30m") | 30m |
EXECUTOR_JOB_MEMORY | How much memory to allocate to each virtual machine or container. A value of zero sets no resource bound (in Docker, but not VMs). (default value: "12G") | 12G |
EXECUTOR_JOB_NUM_CPUS | How many CPUs to allocate to each virtual machine or container. A value of zero sets no resource bound (in Docker, but not VMs). (default value: "4") | 4 |
EXECUTOR_DOCKER_REGISTRY_MIRROR_URL | The address of a docker registry mirror to use in firecracker VMs. | http://10.0.0.2:5000 |
EXECUTOR_FIRECRACKER_DISK_SPACE | How much disk space to allocate to each virtual machine. (default value: "20G") | 20G |
EXECUTOR_FIRECRACKER_BANDWIDTH_EGRESS | How much bandwidth to allow for egress packets to the VM in bytes/s. (default value: "524288000") | 524288000 |
EXECUTOR_FIRECRACKER_BANDWIDTH_INGRESS | How much bandwidth to allow for ingress packets to the VM in bytes/s. (default value: "524288000") | 524288000 |
EXECUTOR_KEEP_WORKSPACES | Whether to skip deletion of workspaces after a job completes (or fails). Note that when Firecracker is enabled that the workspace is initially copied into the VM, so modifications will not be observed. (default value: "false") | true |
EXECUTOR_MAX_ACTIVE_TIME | The maximum time that can be spent by the worker dequeueing records to be handled. (default value: "0") | 100m |
EXECUTOR_NUM_TOTAL_JOBS | The maximum number of jobs that will be dequeued by the worker. (default value: "0") | 100 |
EXECUTOR_DOCKER_HOST_MOUNT_PATH | The target workspace as it resides on the Docker host (used to enable Docker-in-Docker). | /workspaces |
EXECUTOR_QUEUE_POLL_INTERVAL | Interval between dequeue requests. (default value: "1s") | 1s |
EXECUTOR_CLEANUP_TASK_INTERVAL | The frequency with which to run periodic cleanup tasks. (default value: "1m") | 1m |
EXECUTOR_VM_PREFIX | A name prefix for virtual machines controlled by this instance. (default value: "executor") | executor |
EXECUTOR_VM_STARTUP_SCRIPT_PATH | A path to a file on the host that is loaded into a fresh virtual machine and executed on startup. | /vm-startup.sh |
NODE_EXPORTER_URL | The URL of the node_exporter instance, without the /metrics path. | http://127.0.0.1:9000 |
EXECUTOR_FIRECRACKER_IMAGE | The base image to use for virtual machines. | sourcegraph/executor-vm:insiders |
EXECUTOR_FIRECRACKER_KERNEL_IMAGE | The base image containing the kernel binary to use for virtual machines. | sourcegraph/ignite-kernel:5.10.135-amd64 |
EXECUTOR_FIRECRACKER_SANDBOX_IMAGE | The OCI image for the ignite VM sandbox. | sourcegraph/ignite:v0.10.5 |
DOCKER_REGISTRY_NODE_EXPORTER_URL | The URL of the Docker Registry instance's node_exporter, without the /metrics path. | http://localhost:9000 |
SRC_LOG_LEVEL | upper log level to restrict log output to (dbug, info, warn, error, crit) (default value: "warn") | warn |