Containerized AI Platform Major Version Upgrade: A Practical Guide
This guide walks through a major version upgrade of a containerized open-source AI application platform, from a 0.x release to 1.x. It explains why these upgrades commonly fail, then lays out a repeatable workflow: cold-backup the entire deployment directory, merge new orchestration files, pull images, start services in order, verify health, migrate persistent data and plugins, and finish with stability hardening. Includes commands, troubleshooting for missing data and plugin-based model/tool configuration, and rollback guidance.
1. Why Major Version Upgrades Go Wrong
In containerized deployments of open-source AI application platforms, cross-major upgrades (for example, jumping from the 0.x series to the 1.x series) tend to fail for one reason: three changes happen at the same time — the orchestration file structure changes, image components are split apart, and the persistent data format evolves. If any one of these is handled incorrectly, you end up with either “the services start but the data is gone” or “containers keep restarting.”
So the right approach is not to follow the release notes line by line. Treat the upgrade as a planned change with a rollback path: back up first, replace second, migrate third, and verify last.
2. Before the Upgrade: Keep the Backup Simple
For container-orchestrated deployments, the most reliable backup is a cold backup of the entire deployment directory, not just one configuration file.
# Stop the current services so data stays consistent during the backupcd /path/to/deploy/dockerdocker compose down# Go up one level and copy everything (orchestration files and data volume directories)cd ..cp -a deploy deploy.bak.$(date +%Y%m%d%H%M)
Key points:
cp -apreserves symlinks, permissions, and timestamps, which avoids permission problems during a later restore.- Data volume directories usually live in a persistent subdirectory under the deployment directory, so a full copy also covers the database, the vector store, and uploaded files.
- If the dataset is large, package and compress it before storing it offsite; when possible, sync the backup to object storage as a second safeguard.
- Do not delete the old directory after backing up — it is your only basis for rollback.
3. Get the New Deployment Files and Merge Them
A major upgrade usually requires new orchestration files and matching configuration. Copy every file from the new release over the existing deployment directory so that new config files, environment variable templates, and initialization scripts are all in place.
# Assume the new release is extracted to /tmp/newreleasecp -a /tmp/newrelease/. /path/to/deploy/
After merging, manually check two differences:
- The environment variable file: the new version introduces new required entries (commonly addresses for plugin-related services, key length requirements, and timeouts). Missing values cause containers to exit immediately on startup.
- The service list in the orchestration file: the new architecture may add standalone components (such as a plugin daemon), so confirm their dependencies and make sure ports do not conflict.
4. Pull Images and Control Startup Order
Stop the container services before pulling images to reduce local resource contention and failures caused by network jitter.
docker compose down# Pull the images required by the new version (example: web, API, plugin daemon)docker pull <registry>/web:1.0.0docker pull <registry>/api:1.0.0docker pull <registry>/plugin-daemon:0.0.3cd dockerdocker compose -f docker-compose.yaml up -d
After startup, watch the container states and pay special attention to whether database migration containers finish completely and exit (exit code 0). These are one-off tasks, so repeated restarts mean the migration did not complete.
docker compose psdocker compose logs -f --tail=200
5. Verify the Upgrade
Open the application list page in a browser, confirm you can log in, and check that historical applications are visible. At this stage data has not been migrated yet, so an empty page is expected and does not indicate failure.
Further verification from the command line:
# Confirm all services are healthydocker compose ps --format "table {{.Service}}\t{{.Status}}"# Check the API health endpointcurl -s http://localhost/v1/health
6. Common Problems and How to Fix Them
Problem 1: You Can Log In, but Workflows and Knowledge Bases Are Gone
The cause is that the new version uses new data volume mount paths, while the old data is still in the backup directory.
Fix: copy the persistent data subdirectory from the old deployment directory to the corresponding location in the new one, then restart the services.
cp -a /path/to/deploy.bak.*/docker/volumes/. /path/to/deploy/docker/volumes/docker compose restart
Refresh the page after the restart to confirm the applications and knowledge bases are back. If something is still wrong, check whether the directory owner matches the user the container runs as.
Problem 2: Existing Model Providers and Tools Do Not Work in the New Architecture
The new architecture loads models and tools as plugins, so the old configuration must be migrated explicitly. The process has these steps:
- Locate the container: run
docker psto find the API service container ID. - Enter the container:
docker exec -it <container-id> bash. - Export the plugin list: inside the container, run the platform’s plugin export command and use the parallelism parameter to control the number of concurrent processes. This generates a local manifest file (JSON Lines format, one plugin entry per line, containing the workspace and plugin identifier).
# Run inside the container; workers controls parallelismpoetry run flask extract-plugins --workers=20
The export needs access to the external plugin marketplace address, so make sure the container network and proxy configuration allow outbound traffic; otherwise timeouts will produce an incomplete manifest.
- Install the plugins: still inside the same container, run the install command, which reads the manifest from the previous step and installs everything in bulk.
poetry run flask install-plugins --workers=2
Keep parallelism conservative during installation (for example, 2), because plugin packages must be downloaded and unpacked, and high concurrency easily triggers rate limiting or memory pressure. After installation, restart the API and plugin daemon containers, then confirm in the UI that the model providers and tools are available.
7. Post-Upgrade Stability Checklist
- Establish a configuration baseline: put the environment variable file under version control, commit only the template, and store secrets in a secret manager or a locally encrypted file.
- Back up data in layers: databases, vector data, and uploaded files have different recovery strategies, so run periodic restore drills instead of only confirming that backup files exist.
- Roll out gradually: in production, run the full procedure in a staging environment first, record the time taken and the failure points, then touch the live environment.
- Fill in observability: connect log services and monitoring alerts, and set thresholds for container restart counts, API error rates, and disk usage so anomalies surface immediately.
- Keep a rollback window: do not clean up the backup directory for one week after the upgrade; archive it only once you are sure there are no hidden data compatibility issues.
Follow the order backup → replace → pull → start → verify → migrate → harden, and a cross-major upgrade turns from an uncontrollable gamble into a repeatable, rollback-safe standard procedure. If an organization wants to reduce the cost of self-managed maintenance, it can also evaluate hosting the deployment on Baidu AI Cloud’s container platform and cloud databases, leaving backup, monitoring, and scaling to the platform.
