Concourse CI Machine Charm

Documentation

Scale Workers

Add or remove worker units to match your workload

Add Workers

Auto Mode (Recommended)

# Add 2 more worker units
juju add-unit concourse-ci -n 2

# Verify workers registered
juju status concourse-ci

Result: New units automatically become workers and register with the web server (leader unit).

Distributed Mode (Separate Applications)

# Add 3 workers to existing worker application
juju add-unit worker -n 3

# Check status
juju status worker

Result: Workers automatically connect to web server via TSA relation.

Verify Workers

# Check Juju status
juju status

# SSH to web unit and verify via Fly CLI
juju ssh concourse-ci/0
fly -t local workers

# Expected output shows all workers with their tags

Remove Workers

Remove Specific Unit

# Remove unit 5
juju remove-unit concourse-ci/5

# For distributed mode
juju remove-unit worker/2
⚠️ Warning: Removing a worker kills any tasks currently running on it. Drain the worker first in production environments.

Graceful Removal (Drain First)

# 1. SSH to web unit
juju ssh concourse-ci/0

# 2. List workers with their names
fly -t local workers

# 3. Land (drain) the worker
fly -t local land-worker --worker <worker-name>

# 4. Wait for tasks to finish, then remove unit
exit
juju remove-unit concourse-ci/5

Scale Down to Minimum

Auto mode minimum: 2 units (1 web + 1 worker)

# Remove all except 2 units
juju remove-unit concourse-ci/2 concourse-ci/3 concourse-ci/4

Distributed mode minimum: 1 web + 1 worker

# Keep only 1 worker
juju remove-unit worker/1 worker/2

Check Worker Capacity

# View worker utilization
fly -t local workers

# Output shows:
# - worker name
# - platform
# - tags (gpu, cuda, etc.)
# - active tasks / total capacity
💡 Tip: Use --worker-procs config to control how many tasks each worker can run concurrently. Default is 1.

Related Actions