Containerized AI Application Platform Upgrade Guide: A Practical Walk-Through for Major Version Upgrades

    This guide breaks down major version upgrades of a containerized AI application platform into five stages: backup, code alignment, image alignment, startup verification, and data and plugin migration. It explains why cross-version upgrades commonly break login, workflows, model providers, and plugins, and provides concrete commands and checkpoints for backing up the installation directory, aligning environment variables and orchestration files, pulling matched image tags, restoring persistent volumes, and extracting and reinstalling plugins. A post-upgrade checklist is included to help teams verify a stable, repeatable upgrade process.

    1. Why Major Version Upgrades Often Go Wrong

    In open-source AI application platforms, especially community editions deployed through container orchestration, a major version upgrade is never as simple as replacing files and restarting services. A new release often introduces new architecture components, new database schemas, and new configuration entries, and may even change the mount semantics of data volumes. Take an upgrade from 0.15.x to 1.0.0 as an example: release notes usually describe what capabilities have been added, but rarely explain in detail which directories must be preserved, which must be replaced, and in what order migration commands should run. This is the root cause of the common post-upgrade issues where users can log in but their workflows are gone, model providers are missing, and plugins fail to load.

    The core approach of this guide is to break the upgrade into five stages: backup, code alignment, image alignment, startup verification, and data and plugin migration. Each stage has clear checkpoints. If you execute them in order and verify each step, the upgrade success rate improves significantly.

    2. Pre-Upgrade Preparation and Backup Strategy

    Backup is the one step you cannot skip. For a container-orchestrated deployment, the most reliable and straightforward approach is to make a full copy of the installation directory.

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

    The reason for emphasizing a full copy rather than backing up only the database is that the state of a containerized deployment is spread across multiple locations: orchestration files, environment variable files, persistent data volumes, and any custom configuration. If you back up only the database, you may discover during rollback that the image tags and volume directory structure no longer match.

    Additional recommendations:

    • If you use an external database or object storage, perform an additional logical export and verify the file inventory.
    • Record the version tags of all current images so you can restore them precisely during rollback.
    • Confirm that enough disk space remains to hold a complete copy.

    3. Aligning Application Code and Configuration Files

    The program code of the new version needs to overwrite the original installation directory. The key is a complete overwrite with nothing missed, especially orchestration files and dependency manifests that are easy to overlook.

    1. # Copy the contents of the new release directory into the original installation directory
    2. cp -a /tmp/new-release/. /opt/app-platform/

    Note that you should not start the services immediately after the overwrite. At this point, focus on checking two types of files:

    1. Environment variable file: The new version may add variables such as plugin service addresses, keys, and timeout values. If these variables are missing, the services can start but functionality will be incomplete.
    2. Service list in the orchestration file: A new architecture usually adds a standalone plugin daemon container. If the orchestration file is not updated, plugin-related features will be unavailable.

    4. Pulling Images and Starting Services

    Before pulling images, stop the running services to avoid mixing old containers with new images and causing inconsistent state.

    1. cd /opt/app-platform/docker
    2. docker compose down # Stop services first, but keep data volumes

    Then pull the images that match the new version. The key here is that version tags must be aligned as a set: the frontend image, the backend API image, and the plugin daemon image are all required, and the plugin daemon often has its own version number, so do not assume it follows the main version number.

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

    After pulling, start the services:

    1. docker compose -f docker-compose.yaml up -d
    2. docker compose ps # Confirm all containers are running and health checks pass

    Verification entry point: open the platform’s application management page in a browser (typically http://localhost/apps). If you can log in normally and see the application list, the main upgrade is complete, but the data has not been migrated yet. Seeing an empty workflow list at this point is normal, so do not rush to roll back.

    5. Data Migration: Restoring Workflows and Persistent Data

    The most common symptom after an upgrade is “I can log in, but all historical applications and workflows are gone.” The usual cause is that the new version uses a new data volume directory while the old data remains in the original volume.

    The solution is to migrate the old data volume as a whole into the corresponding directory of the new version:

    1. # Retrieve the old data volume from the backup directory
    2. cp -a /opt/app-platform.bak-YYYYMMDD/docker/volumes/. \
    3. /opt/app-platform/docker/volumes/
    4. docker compose restart

    After restarting, open the application page again and the historical workflows should reappear. If they are still missing, first check whether the data volume directory has an extra layer due to a common path error during copying, and whether the file owner and permissions match the user under which the original container runs.

    6. Migrating Plugins and Model Providers

    The new version changes tools and model providers to plugin-based hosting, so you need to extract the providers and tools configured in the old environment and then install them into the new plugin runtime. This is the most complex step in the entire upgrade.

    Step 1: Locate the backend API container.

    1. docker ps # Find the ID of the api container

    Step 2: Enter the container terminal (replace <container_id> with the actual ID).

    1. docker exec -it <container_id> bash

    Step 3: Run the extraction command inside the container to export the models and tools used by the current workspace into a manifest file.

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

    The workers parameter controls the number of parallel processes and can be adjusted based on the number of CPU cores. When the command finishes, it generates a manifest file in JSONL format that records plugin information for each workspace line by line.

    Step 4: Run the installation command in the same container to install the plugins from the manifest into the new plugin environment.

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

    This step has high network requirements: the container must be able to access the public internet and the plugin marketplace address, otherwise the installation will be interrupted by a pull failure. If your enterprise environment restricts outbound access, configure a proxy in advance or allowlist the relevant domains.

    7. Post-Upgrade Checklist

    • All containers are in a normal state, and the plugin daemon logs show no continuous errors.
    • Historical applications, workflows, and knowledge bases are visible and editable.
    • Model providers and tools show as “installed/enabled” in the plugin list.
    • Key variables (keys, callback addresses, storage configuration) are filled in according to the new version’s requirements.
    • Do not delete the backup directory until stability is confirmed; keep it for an observation period of at least several days.

    8. Conclusion

    The essence of a major version upgrade is synchronizing and aligning four elements: program, configuration, images, and data. As long as you follow the order of backing up first, aligning code and images next, and performing data and plugin migration last, and confirm the result with a minimal verification at each step, the upgrade changes from a matter of luck into a reproducible engineering operation. For production environments, it is recommended to rehearse the entire process in a replica environment before applying it to the live environment to further reduce risk.