system-adminUpdated 2026-04-17

Upgrade

What this covers

How to upgrade a running Tessallite installation to a new version for both local (Docker Compose) and GCP deployments. Includes database backup, image update, health verification, and rollback procedure.

Warning: Always back up the internal PostgreSQL database before upgrading. A new version may apply schema migrations that cannot be reversed automatically.

Local upgrade (Docker Compose)

  1. Back up the internal database.

``bash docker compose exec postgres pg_dump -U tessallite tessallite > backup.sql ` Store backup.sql` outside the Docker volume before continuing.

  1. Pull the new images.

``bash docker compose pull ``

  1. Apply the new containers.

``bash docker compose up -d `` Docker Compose restarts each service with the new image in dependency order.

  1. Verify service health.

``bash docker compose ps ` All services should show status Up. For any service showing Exit or Restarting: `bash docker compose logs -f SERVICE_NAME ``

  1. Verify the database migration version.

``bash curl http://localhost:3000/api/health ` Confirm the db_migration` field matches the expected version in the release notes.

GCP upgrade (Cloud Run)

  1. Back up Cloud SQL.

``bash gcloud sql backups create --instance=INSTANCE_NAME `` Verify the backup appears in the Cloud SQL backups list before continuing.

  1. Update each service image. For each Cloud Run service:

``bash gcloud run services update SERVICE_NAME \ --image IMAGE_REPOSITORY/SERVICE_NAME:NEW_TAG \ --region REGION `` Update in this order: model-service, query-router, optimizer, scheduler, frontend, gateway.

  1. Verify each service after update.

``bash curl https://SERVICE_URL/api/health ` Confirm {"status":"ok"}` before updating the next service.

  1. Verify the migration version on the frontend service:

``bash curl https://FRONTEND_URL/api/health ` Confirm the db_migration` field matches the expected version.

Older join settings

Some upgrades include a one-time repair for older join settings restored from a saved version. The repair waits for model edits to finish, then checks every existing model. It updates the affected join and its matching saved copy together. Version numbers, the chosen live version, other draft edits and current access rules stay the same. The history note and audit explain the repair, and affected acceleration tables rebuild.

If an upgrade reports joins that still need a direction, keep the reported join details and check that the installation includes the repair. Repeating an ordinary upgrade does not repeat a repair already marked as applied. Do not move the upgrade history backwards. Ask a modeller to declare the affected joins and save and deploy the model if further repair is needed.

Rollback

If a service fails after upgrade:

``bash docker compose exec -T postgres psql -U tessallite tessallite < backup.sql ``

Related