This guide covers production deployment of Waldur Site Agent using systemd services.
Deploying on Kubernetes? Use the published Helm chart instead:
helm repo add waldur https://waldur.github.io/waldur-site-agent helm repo update helm install waldur-site-agent waldur/waldur-site-agentThe chart runs the same agent modes described below as separate deployments. See the chart README for available versions and configurable values.
The agent can run in 4 different modes, deployed as separate systemd services:
Option 1: Polling-based (traditional)
Option 2: Event-based (requires STOMP)
Note: Only one combination can be active at a time.
# Order processing service
sudo curl -L \
https://raw.githubusercontent.com/waldur/waldur-site-agent/main/systemd-conf/agent-order-process/agent.service \
-o /etc/systemd/system/waldur-agent-order-process.service
# Reporting service
sudo curl -L \
https://raw.githubusercontent.com/waldur/waldur-site-agent/main/systemd-conf/agent-report/agent.service \
-o /etc/systemd/system/waldur-agent-report.service
# Membership sync service
sudo curl -L \
https://raw.githubusercontent.com/waldur/waldur-site-agent/main/systemd-conf/agent-membership-sync/agent.service \
-o /etc/systemd/system/waldur-agent-membership-sync.service
# Event processing service
sudo curl -L \
https://raw.githubusercontent.com/waldur/waldur-site-agent/main/systemd-conf/agent-event-process/agent.service \
-o /etc/systemd/system/waldur-agent-event-process.service
For systemd versions older than 240:
# Use legacy service files instead
sudo curl -L \
https://raw.githubusercontent.com/waldur/waldur-site-agent/main/systemd-conf/agent-order-process/agent-legacy.service \
-o /etc/systemd/system/waldur-agent-order-process.service
# Repeat for other services with -legacy.service files
systemctl daemon-reload
# Start and enable services
systemctl start waldur-agent-order-process.service
systemctl enable waldur-agent-order-process.service
systemctl start waldur-agent-report.service
systemctl enable waldur-agent-report.service
systemctl start waldur-agent-membership-sync.service
systemctl enable waldur-agent-membership-sync.service
systemctl daemon-reload
# Start and enable services
systemctl start waldur-agent-event-process.service
systemctl enable waldur-agent-event-process.service
systemctl start waldur-agent-report.service
systemctl enable waldur-agent-report.service
# Check individual service
systemctl status waldur-agent-order-process.service
# Check all waldur services
systemctl status waldur-agent-*
# Follow logs for a service
journalctl -u waldur-agent-order-process.service -f
# View recent logs
journalctl -u waldur-agent-order-process.service --since "1 hour ago"
# View logs for all agents
journalctl -u waldur-agent-* -f
# Restart individual service
systemctl restart waldur-agent-order-process.service
# Restart all agent services
systemctl restart waldur-agent-*
The default configuration file location is /etc/waldur/waldur-site-agent-config.yaml.
Edit configuration file:
sudo nano /etc/waldur/waldur-site-agent-config.yaml
Validate configuration:
waldur_site_diagnostics -c /etc/waldur/waldur-site-agent-config.yaml
Restart services:
systemctl restart waldur-agent-*
For STOMP-based event processing:
offerings:
- name: "Your Offering"
# ... other settings ...
stomp_enabled: true
websocket_use_tls: true
Important: Configure the event bus settings in Waldur to match your agent configuration.
Create a monitoring script:
#!/bin/bash
# /usr/local/bin/check-waldur-agent.sh
SERVICES=("waldur-agent-order-process" "waldur-agent-report" "waldur-agent-membership-sync")
for service in "${SERVICES[@]}"; do
if ! systemctl is-active --quiet "$service"; then
echo "CRITICAL: $service is not running"
exit 2
fi
done
echo "OK: All Waldur agent services are running"
exit 0
Systemd handles log rotation automatically via journald. Configure retention:
# Edit journald configuration
sudo nano /etc/systemd/journald.conf
# Add or modify:
SystemMaxUse=1G
MaxRetentionSec=1month
Add Sentry DSN to configuration for error tracking:
sentry_dsn: "https://your-dsn@sentry.io/project"
Set environment in systemd service files:
[Service]
Environment=SENTRY_ENVIRONMENT=production
# Secure configuration file
sudo chmod 600 /etc/waldur/waldur-site-agent-config.yaml
sudo chown root:root /etc/waldur/waldur-site-agent-config.yaml
waldur backend): the target token user needs customer owner
(can be a non-SP customer) and ISD identity manager (managed_isds set)Before digging into a specific symptom below, run:
waldur_site_diagnostics -c /etc/waldur/waldur-site-agent-config.yaml
This checks the Waldur side of the setup — API reachability, token auth, offering state, loaded
components — regardless of which backend you’re running. It does not check backend
connectivity (SLURM/MOAB/etc.). If you’re on the SLURM backend, follow up with
waldur_site_diagnose_slurm_account -c /etc/waldur/waldur-site-agent-config.yaml for a deeper
check that compares actual SLURM account state against what Waldur expects. Other backends don’t
have an equivalent tool yet — for those, the sections below and the service logs are your best
signal.
Check configuration syntax:
waldur_site_diagnostics -c /etc/waldur/waldur-site-agent-config.yaml
Check service logs:
journalctl -u waldur-agent-order-process.service -n 50
Test backend connectivity:
# For SLURM
sacct --help
sacctmgr --help
# For MOAB (as root)
mam-list-accounts
Check permissions and PATH
Symptom — every cycle, for the same offering:
Registering a new identity for offering my-offering with name agent-<uuid>
Unable to register the identity agent-<uuid> for the offering my-offering:
Unexpected status code: 400 ... {"offering":["Object with uuid=<uuid> does not exist."]}
Continuing without agent telemetry.
The offering does exist. Waldur registers an agent identity only for the offering types listed
under waldur_offering_uuid, and reports any other type
as a missing object rather than as an unsupported one.
The agent keeps processing the offering: the identity, its service and its processors are telemetry, and the agent’s actual work — orders, membership sync, usage reporting — goes through the marketplace API and does not touch them. What you lose until the offering type is accepted:
journalctl -u waldur-agent-*.service).What to do:
Confirm the offering’s type, using the agent’s own token:
curl -s -H "Authorization: Token your-token" \
https://waldur.example.com/api/marketplace-provider-offerings/<offering-uuid>/ \
| jq '{name, type, state}'
404, the UUID in waldur_offering_uuid is wrong or belongs to another
Waldur instance — the offering name in the log line comes from your configuration file, not
from the API, so a stale UUID looks identical to this symptom.Test API connectivity:
curl -H "Authorization: Token your-token" https://waldur.example.com/api/
Verify SSL certificates if using HTTPS
Enable debug logging by setting log_level in the agent configuration file:
log_level: DEBUG
Modify environment variables in systemd service files:
[Service]
# Reduce order processing frequency for high-load systems
Environment=WALDUR_SITE_AGENT_ORDER_PROCESS_PERIOD_MINUTES=10
# Increase reporting frequency for better accuracy
Environment=WALDUR_SITE_AGENT_REPORT_PERIOD_MINUTES=15
Add resource limits to service files:
[Service]
MemoryLimit=512M
CPUQuota=50%
# Backup configuration
sudo cp /etc/waldur/waldur-site-agent-config.yaml /etc/waldur/waldur-site-agent-config.yaml.backup
# Version control (optional)
sudo git init /etc/waldur
sudo git add waldur-site-agent-config.yaml
sudo git commit -m "Initial configuration"
The agent is stateless, but consider backing up:
The agent supports multiple offerings in a single configuration file. Each offering can use different backends:
offerings:
- name: "SLURM Cluster A"
order_processing_backend: "slurm"
# ... SLURM-specific settings ...
- name: "MOAB Cluster B"
order_processing_backend: "moab"
# ... MOAB-specific settings ...
For HA deployment: