Concourse CI Machine Charm

Documentation

Set Up Shared Storage

Configure LXC shared storage for faster upgrades and reduced disk usage

📊 Benefits: 62% disk savings, 63% faster upgrades (measured with 3 workers)

Deploy with Shared Storage Config

# Deploy web and workers with shared-storage=lxc
juju deploy concourse-ci-machine --channel edge web \
  --config mode=web \
  --config shared-storage=lxc

juju deploy concourse-ci-machine --channel edge worker \
  --config mode=worker \
  --config shared-storage=lxc \
  -n 2

Expected status: "Waiting for shared storage mount"

Create Shared Directory on Host

# Create shared storage directory
mkdir -p /tmp/concourse-shared

# Ensure proper permissions
chmod 755 /tmp/concourse-shared

Run Setup Script

# Run for web application
./scripts/setup-shared-storage.sh web /tmp/concourse-shared

# Run for worker application  
./scripts/setup-shared-storage.sh worker /tmp/concourse-shared

What the script does:

Verify Setup

# Check unit status (within 10s in test mode, 5min otherwise)
juju status

# Should show: "Web ready" or "Worker ready"
# No longer "Waiting for shared storage mount"

Add Workers After Initial Setup

# 1. Add new worker unit
juju add-unit worker

# 2. Wait for "Waiting for shared storage mount" status
juju status worker/2

# 3. Run setup script again
./scripts/setup-shared-storage.sh worker /tmp/concourse-shared

# 4. Worker automatically completes setup

Verify Shared Storage Working

# Check that binaries are shared
juju ssh web/0 -- ls -lh /var/lib/concourse/bin/

juju ssh worker/0 -- ls -lh /var/lib/concourse/bin/
juju ssh worker/1 -- ls -lh /var/lib/concourse/bin/

# All should show same binaries with same timestamps

Test Upgrade Performance

# Upgrade to new version
time juju config web version=7.14.3

# Monitor workers - they should upgrade much faster
juju status --watch 1s
✅ Success indicators:

Troubleshooting

Permission Denied Errors

Ensure the setup script used shift=true for UID/GID mapping:

# Check LXC device config
lxc config device show juju-abc123-0

# Should include: shift: "true"

Worker Not Completing After Setup

# Check if /var/lib/concourse is mounted
juju ssh worker/0 -- mount | grep concourse

# Trigger update-status hook manually
juju ssh worker/0 -- 'sudo touch /var/lib/concourse/.trigger'

Related Documentation