Containerized AI Application Platform Major Version Upgrade: A Practical Guide

    A practical walkthrough for upgrading a containerized open-source AI application platform across major versions. It explains why large jumps such as 0.15.x to 1.x often fail, then covers rollback-ready backups, configuration diffing, image version alignment, first-boot verification, restoring data volumes to recover historical workflows, and migrating model providers and tools into the new plugin runtime. A post-launch checklist is included to confirm the upgrade is stable.

    1. Why Major Version Upgrades Go Wrong

    When you deploy an open-source AI application platform in containers, jumping across major versions (for example, from 0.15.x to 1.x) has a high failure rate. The root cause is that these releases are usually not just feature iterations but architectural rewrites.

    In this upgrade, the new version introduces a plugin mechanism, enhanced visual orchestration, and open ecosystem capabilities. Model provider adapters and tool-calling logic that used to be built into the application process are now split into independently running plugin processes.

    This architectural shift has three direct consequences:

    • Configuration changes: The orchestration file adds containers such as a plugin daemon, and the environment variable template has been adjusted. Reusing the old configuration file directly will prevent services from becoming ready.
    • Data compatibility changes: The database schema evolves automatically through migration scripts that run at startup, but volume data such as object storage and vector database caches requires manual confirmation that mount paths match.
    • Changes in how capabilities are delivered: Model integration, previously hard-coded, must now be explicitly installed as plugins. Otherwise, the provider list appears empty in the UI.

    Understanding these three points explains why “swap the code but skip the data migration” is bound to break, and it lets you plan verification points for each step in advance.

    2. Before the Upgrade: Backup and Diffing

    2.1 Take a Rollback-Ready Backup

    The safest backup method is not exporting the database. It is copying the entire deployment directory directly on the host. That directory usually contains the orchestration files, the environment variable file, and the data volume directories mounted into the containers, so a single copy produces a full snapshot.

    1. # Assume the original deployment directory is /opt/app-platform
    2. cp -a /opt/app-platform /opt/app-platform.bak-$(date +%Y%m%d)

    The -a flag preserves symlinks, permissions, and timestamps, avoiding permission mismatches after a restore. If the data set is large and the deployment runs on a cloud VM, also take a disk snapshot at the infrastructure level for a “file-level + disk-level” double safeguard.

    2.2 Record the Current State

    Capture the live state before upgrading so problems are easier to diagnose:

    1. docker compose ps # record which containers exist
    2. docker volume ls # record the volume inventory
    3. docker images | head -50 # record current image versions

    2.3 Get the New Deployment Files and Diff Them

    When copying files from the new version’s deployment directory over the original one, do not blindly overwrite everything. Run a diff first:

    1. diff -ru /opt/app-platform.bak-YYYYMMDD/docker /path/to/new/docker | head -100

    Focus on three areas: new service definitions in the orchestration file, newly required entries in the environment variable template, and whether data volume mount paths have changed. Once you confirm there are no conflicts, perform the copy. This prevents custom ports and custom secrets from being overwritten by default values.

    3. Image Preparation and Version Alignment

    A new version typically involves multiple images: the frontend UI image, the backend API image, and the plugin daemon image. Their versions must match exactly; mixing them causes API incompatibility.

    1. docker pull <registry>/app-web:1.0.0
    2. docker pull <registry>/app-api:1.0.0
    3. docker pull <registry>/plugin-daemon:0.0.3-local

    Stop the services before pulling to reduce write conflicts between running containers and image layers:

    1. cd /opt/app-platform/docker
    2. docker compose down # stops and removes containers; volumes are kept by default

    Note: do not add the -v flag, or the volumes will be deleted along with the containers. This is the most common one-shot mistake for beginners.

    4. Startup and First Verification Round

    1. docker compose -f docker-compose.yaml up -d
    2. docker compose logs -f api # watch the database migration logs

    After startup, do not rush to the UI. First check the backend logs for a record that schema migration has completed. Then open http://<host-address>/apps to verify: if you can log in normally and the application list is accessible, the main upgrade succeeded.

    If you find that all historical orchestration applications have disappeared, do not recreate them. This is usually just volumes that were not mounted correctly, and it is fully recoverable.

    5. Data Volume Recovery: Getting Historical Workflows Back

    Copy everything under docker/volumes from the backup directory back to the corresponding location in the new version:

    1. cp -a /opt/app-platform.bak-YYYYMMDD/docker/volumes/. \
    2. /opt/app-platform/docker/volumes/
    3. docker compose restart

    After copying, restart the services so the backend reloads the canvas definitions and conversation history from storage. The verification standard: the application list is restored, canvas nodes and connections are intact, and knowledge base documents can be retrieved normally.

    6. Plugin Migration: A Smooth Transition for Model Providers and Tools

    This is the most critical step in the whole upgrade. Model providers and tools configured in the old version must be extracted into a manifest file and then installed into the new plugin runtime.

    6.1 Enter the Backend Container

    1. docker ps # find the backend API container ID
    2. docker exec -it <container-id> bash

    6.2 Export the Plugin Manifest

    1. poetry run flask extract-plugins --workers=20

    This command scans all workspaces in the current instance and outputs the models and tools in use to plugins.jsonl. workers controls the number of parallel processes; you can raise it for large data sets, but keep it within the container’s memory quota to avoid processes being killed by excessive concurrency.

    Before running it, confirm the container’s network can reach the public internet and the plugin marketplace address, otherwise the later installation step will time out and fail.

    6.3 Install the Plugins

    1. poetry run flask install-plugins --workers=2

    Keep parallelism conservative during installation, because each plugin must be downloaded and verified, and low concurrency is more likely to succeed on retries when the network is unstable. After installation, refresh the UI and confirm on the plugin management page that all providers and tools are in place, then validate each key one by one.

    7. Post-Launch Checklist

    • The application list, canvas orchestration, and knowledge base content are all complete;
    • Model provider keys pass validation and a real conversation can be initiated;
    • Tool plugins can be invoked normally, with no authentication failures in the logs;
    • The plugin daemon passes its health check with no repeated restarts;
    • Keep the backup directory for at least one week, and clean it up only after confirming stability.

    8. Conclusion

    The essence of a major version upgrade is separating “code update” from “data evolution”: code and images define the shape of capabilities, while data volumes and the plugin manifest preserve business continuity. Proceed in the order of backup, diff, alignment, startup, recovery, and migration, with a clear verification point at each step, and the upgrade turns from a gamble into a repeatable engineering process. To further reduce operational overhead, you can move the container orchestration to a managed container platform and build a complete observability stack with object storage, log services, and monitoring alerts.