Migration Guide: v2.x → v3.0
Step-by-step instructions for migrating your #divisions deployment to the latest major release. Estimated downtime: 15–30 minutes.
Overview
v3.0 introduces a completely redesigned runtime engine, breaking changes to the configuration schema, and deprecated legacy API endpoints. This guide ensures a safe, reversible transition with zero data loss.
Prerequisites
- Current cluster running
#divisions v2.4.0or higher - Root/Sudo access to deployment nodes
- Backup of
/etc/divisions/and database snapshots - External DNS management access (for CNAME cutover)
- Monitoring alerts configured in Datadog/PagerDuty
Pre-Migration Checklist
- Verify all services are healthy (
dvctl health --all) - Run schema compatibility validator (
dvctl validate --schema v3) - Export custom middleware and plugins
- Notify stakeholders of maintenance window
- Disable non-critical background jobs
Phase 1: Environment Setup
Download and extract the v3 binaries to your staging environment.
# Add official repository
curl -fsSL https://pkg.divisions.io/v3/gpg | sudo tee /etc/apt/trusted.gpg.d/divisions.asc
echo "deb [signed-by=/etc/apt/trusted.gpg.d/divisions.asc] https://pkg.divisions.io/v3 stable main" | sudo tee /etc/apt/sources.list.d/divisions.list
# Install packages
sudo apt update && sudo apt install -y divisions-v3-runtime divisions-cli
Use the migration tool to convert your existing dv-config.yaml to the new schema.
# Backup current config
cp /etc/divisions/dv-config.yaml /etc/divisions/dv-config.yaml.bak
# Run schema migration
dvctl migrate config --from v2.4 --to v3.0 --output /etc/divisions/dv-config-v3.yaml
# Validate new config
dvctl validate --file /etc/divisions/dv-config-v3.yaml
Phase 2: Data & Config Migration
Sync your metadata, routing tables, and cached indexes to the new storage engine.
# Halt traffic ingestion
dvctl gateway set-maintenance true
# Migrate state store
dvctl migrate state --batch-size 1000 --workers 4
# Rebuild search indexes
dvctl index rebuild --parallel
Phase 3: Validation & Testing
Verify core functionality before opening traffic. The v3 CLI includes a built-in test suite.
# Execute pre-flight checks
dvctl test suite --env staging --verbose
Expected output:
✔ Authentication flow
✔ Route resolution
✔ Data integrity checks
✔ TLS certificate validation
/var/log/divisions/migrate.log and contact support.Phase 4: Cutover & Rollout
Update DNS or load balancer rules to point to the v3 cluster. Enable traffic gradually if using blue-green deployment.
# Enable gateway
dvctl gateway set-maintenance false
# Monitor live health
dvctl monitor --live --interval 5s
Rollback Procedure
If critical issues arise post-cutover, revert to v2.x within the maintenance window:
- Disable v3 gateway:
dvctl gateway set-maintenance true - Restore DNS/LB to v2 endpoints
- Restore config:
cp /etc/divisions/dv-config.yaml.bak /etc/divisions/dv-config.yaml - Restart v2 services:
systemctl restart divisions-v2 - Verify traffic flow and data consistency
Troubleshooting
Common Issues
- Schema Validation Failures: Ensure no custom plugins override reserved keys. Use
--strict=falsefor legacy overrides. - High CPU during Index Rebuild: Reduce
--workerscount or schedule during off-peak hours. - TLS Handshake Errors: v3 requires TLS 1.2+. Update cert-manager or ACME client.
Log Locations
Runtime: /var/log/divisions/runtime.log
Migration: /var/log/divisions/migrate.log
Gateway: /var/log/divisions/gateway.log
Support & Resources
Need assistance during migration? Our engineering team is available during the maintenance window.
- 📚 Full API Reference: docs.divisions.io/v3
- 💬 Live Chat: support.divisions.io/migration
- 📅 Schedule a Guided Session: booking.divisions.io
dvctl cleanup --remove-v2.