Procedures for upgrading and migrating Sentinel deployments.
Version Management
Version Numbering
Sentinel follows semantic versioning: MAJOR.MINOR.PATCH
| Version Change | Meaning | Upgrade Approach |
|---|---|---|
| Patch (x.y.Z) | Bug fixes, no breaking changes | Rolling upgrade, minimal risk |
| Minor (x.Y.z) | New features, backward compatible | Rolling upgrade, test new features |
| Major (X.y.z) | Breaking changes possible | Staged rollout, careful testing |
Compatibility Matrix
| Component | Compatible Versions | Notes |
|---|---|---|
| Config format | Same major version | Config migration may be needed |
| Agent protocol | Same major version | Agents must be upgraded together |
| Metrics format | All versions | Metric names stable |
Version Checking
# Check current version
# Check version in running instance
# Compare with latest release
| \
Pre-Upgrade Checklist
Before Any Upgrade
- Read release notes for all versions between current and target
- Identify breaking changes
- Backup current binary, configuration, and certificates
- Test new version in staging environment
- Verify configuration compatibility
- Test rollback procedure
- Ensure on-call coverage during upgrade
Backup Procedure
#!/bin/bash
BACKUP_DIR="/var/backups/sentinel/"
# Backup binary
# Backup configuration
# Save current version
# Save metrics snapshot
Upgrade Procedures
Patch Upgrade (x.y.Z)
Risk Level: Low Downtime: Zero (with rolling upgrade)
#!/bin/bash
NEW_VERSION=""
# Download new version
# Verify download and validate config
# Create backup
# Replace binary
# Graceful restart
# Verify
&&
Minor Upgrade (x.Y.z)
Risk Level: Medium Downtime: Zero (with rolling upgrade)
#!/bin/bash
NEW_VERSION=""
# Pre-flight checks
AVAILABLE_SPACE=
if [; then
fi
# Download and verify checksum
&&
# Test new binary
# Create backup
# Graceful shutdown and replace
# Verify
|| { ; ; }
Major Upgrade (X.y.z)
Risk Level: High Approach: Blue-Green or Canary
Blue-Green Upgrade
Phase 1: Deploy new version alongside old
┌─────────────────────────────────────────────────┐
│ Load Balancer │
│ ┌────────────┴────────────┐ │
│ ▼ (100%) ▼ (0%) │
│ ┌───────────┐ ┌───────────┐ │
│ │Blue (v1.x)│ │Green(v2.x)│ │
│ │ Active │ │ Standby │ │
│ └───────────┘ └───────────┘ │
└─────────────────────────────────────────────────┘
Phase 2: Shift traffic to new version
┌─────────────────────────────────────────────────┐
│ Load Balancer │
│ ┌────────────┴────────────┐ │
│ ▼ (0%) ▼ (100%) │
│ ┌───────────┐ ┌───────────┐ │
│ │Blue (v1.x)│ │Green(v2.x)│ │
│ │ Standby │ │ Active │ │
│ └───────────┘ └───────────┘ │
└─────────────────────────────────────────────────┘
Steps:
- Deploy new version to green environment
- Test with synthetic traffic
- Shift 10% traffic to green, monitor for 5 minutes
- If error rate acceptable, shift 50%, monitor 10 minutes
- Complete shift to 100%
- Retain blue for rollback
Canary Upgrade
Steps:
- Deploy to single canary instance
- Enable canary routing at 5%
- Monitor for 30 minutes
- Gradual rollout: 10% → 25% → 50% → 75% → 100%
- Validate at each stage before proceeding
Rollback Procedures
Quick Rollback
#!/bin/bash
BACKUP_DIR=
if [; then
fi
# Stop current version
# Restore binary
# Restore configuration
# Start
# Verify
&&
Blue-Green Rollback
# Shift all traffic back to blue
Configuration Migration
Common Migration Patterns
Deprecated Directive Replacement:
// Old (v1.x)
upstream "backend" {
timeout-secs 30 // DEPRECATED
}
// New (v2.x)
upstream "backend" {
timeouts {
connect-secs 5
request-secs 30
}
}
Restructured Configuration:
// Old (v1.x) - flat structure
route "api" {
path-prefix "/api/"
upstream "backend"
timeout-secs 30
}
// New (v2.x) - nested structure
routes {
route "api" {
matches {
path-prefix "/api/"
}
upstream "backend"
policies {
timeouts {
request-secs 30
}
}
}
}
Migration Tool
# Check for configuration issues
# Migrate configuration to new format
# Show migration diff
# Validate migrated configuration
Post-Upgrade Validation
Immediate Validation (First 5 Minutes)
#!/bin/bash
ERRORS=0
# Process running
&& || { ; ; }
# Health endpoint
&& || { ; ; }
# Metrics endpoint
&& || { ; ; }
# Version correct
# Configuration loaded
ROUTES=
[ && || { ; ; }
if [; then
else
fi
Extended Validation (First Hour)
#!/bin/bash
DURATION=3600
INTERVAL=60
START=
while [; do
ERROR_RATE=
P99_LATENCY=
done
Quick Reference
Upgrade Commands
# Validate config before upgrade
# Create backup
# Perform upgrade
# Rollback if needed
Health Check Endpoints
| Endpoint | Purpose | Expected |
|---|---|---|
/health | Liveness | 200 OK |
/ready | Readiness | 200 OK |
/admin/version | Version | JSON |
/metrics | Prometheus | Text |
Upgrade Timing
| Type | Downtime | Window |
|---|---|---|
| Patch | Zero | Anytime |
| Minor | Zero | Business hours |
| Major | Minutes | Maintenance window |
See Also
- Migration Guide - Migrating from other proxies
- Troubleshooting - Diagnosing upgrade issues
- Configuration Reference - Config options
- Changelog - Version history