Queue

This section contains information on the queue component for the Vela server.

This component is responsible for integrating with a queue system based off the configuration provided.

The queue system is used by the Vela server for pushing workloads that will be run by a worker.

Workloads published to the queue are managed with a first in, first out (FIFO) strategy.

Configuration

The following options are used to configure the component:

NameDescriptionRequiredDefaultEnvironment Variables
queue.addrfull connection string to the queuetrueN/AQUEUE_ADDR
VELA_QUEUE_ADDR
queue.clusterconfigures the client for a queue clusterfalsefalseQUEUE_CLUSTER
VELA_QUEUE_CLUSTER
queue.drivertype of client to control and operate queuetrueN/AQUEUE_DRIVER
VELA_QUEUE_DRIVER
queue.pop.timeouttimeout for requests that pop items off the queuetrue60sQUEUE_POP_TIMEOUT
VELA_QUEUE_POP_TIMEOUT
queue.routesunique channels or topics for pushing workloadstrue[ vela ]QUEUE_ROUTES
VELA_QUEUE_ROUTES
queue.private-keyprivate key for signing items prior to pushfalseN/AQUEUE_PRIVATE_KEY
VELA_QUEUE_PRIVATE_KEY
queue.public-keypublic key for opening items after popping them off the queuefalseN/AQUEUE_PUBLIC_KEY
VELA_QUEUE_PUBLIC_KEY

Drivers

The following drivers are available to configure the component:

NameDescriptionDocumentation
redisuses a Redis queue for managing workloadshttps://redis.io/

Redis

From the Redis official website:

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

The below configuration displays an example of starting the Vela server that will connect to a Redis queue:

$ docker run \
  --detach=true \
  --env=VELA_ADDR=https://vela-server.example.com \
  --env=VELA_DATABASE_ENCRYPTION_KEY=<encryption-key> \
+ --env=VELA_QUEUE_DRIVER=redis \
+ --env=VELA_QUEUE_ADDR=redis://<password>@<hostname>:<port>/<database> \
+ --env=VELA_QUEUE_PRIVATE_KEY=<signing-private-key> \
+ --env=VELA_QUEUE_PUBLIC_KEY=<signing-public-key> \
  --env=VELA_PORT=443 \
  --env=VELA_SECRET=<shared-secret> \
  --env=VELA_SERVER_PRIVATE_KEY=<private_key> \
  --env=VELA_SCM_CLIENT=<oauth-client-id> \
  --env=VELA_SCM_SECRET=<oauth-client-secret> \
  --env=VELA_WEBUI_ADDR=https://vela.example.com \
  --name=server \
  --publish=80:80 \
  --publish=443:443 \
  --restart=always \
  target/vela-server:latest
Last modified October 2, 2024: feat: otel tracing (#427) (9623a0f1)