This documentation is available to agents as Markdown at https://docs.synthesized.io/tdk/latest/user_guide/050_deployment_operations/updating_tdk/update_offline.md. For the complete documentation index, see llms.txt.

Update Offline

To update a Docker Compose installation without internet access, you use two machines: the target machine that runs Governor, and a connected machine with internet access and Docker. For a Kubernetes installation, see Update Helm.

Read Before you update first.

Update

Do the steps in this order.

On the target machine: back up

  1. Back up the metadata database. Do this before anything else.

    pg_dump -U apiuser -h localhost -F c -b -v -f /path/to/backup/db-backup.full.dump governor
  2. Save the current configuration and images. Copy docker-compose.yml to a safe place, with the .env file if the folder has one. Then save the images Governor runs now. docker compose images, run in the folder with your docker-compose.yml, shows their names and tags; <previous-version> below is that tag.

    docker save -o /path/to/images/synthesized-api_<previous-version>_linux_amd64.tar synthesizedio/synthesized-api:<previous-version>
    docker save -o /path/to/images/synthesized-front_<previous-version>_linux_amd64.tar synthesizedio/synthesized-front:<previous-version>
    docker save -o /path/to/images/synthesized-worker_<previous-version>_linux_amd64.tar synthesizedio/synthesized-worker:<previous-version>

On the connected machine: download

  1. Get the new release. Download governor-compose-prod.zip and unzip it:

    unzip governor-compose-prod_v1.187.0.zip -d /path/to/extract/
  2. Pull and save the new images. <new-version> is the release you move to, for example v1.187.0.

    docker pull --platform linux/amd64 synthesizedio/synthesized-api:<new-version>
    docker pull --platform linux/amd64 synthesizedio/synthesized-front:<new-version>
    docker pull --platform linux/amd64 synthesizedio/synthesized-worker:<new-version>
    docker save -o /path/to/images/synthesized-api_<new-version>_linux_amd64.tar synthesizedio/synthesized-api:<new-version>
    docker save -o /path/to/images/synthesized-front_<new-version>_linux_amd64.tar synthesizedio/synthesized-front:<new-version>
    docker save -o /path/to/images/synthesized-worker_<new-version>_linux_amd64.tar synthesizedio/synthesized-worker:<new-version>
  3. Move the files to the target machine: the unzipped release and the three .tar files.

On the target machine: update

  1. Load the new images, before you restart. Without internet access, Docker Compose can’t pull missing images.

    docker load -i /path/to/images/synthesized-api_<new-version>_linux_amd64.tar
    docker load -i /path/to/images/synthesized-front_<new-version>_linux_amd64.tar
    docker load -i /path/to/images/synthesized-worker_<new-version>_linux_amd64.tar
  2. Carry your settings over. Replace docker-compose.yml with the new one, and set your values in it again:

    • SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME and SPRING_DATASOURCE_PASSWORD;

    • JWT_SECRET and CREDENTIALS_ENCRYPTION_KEY, unchanged;

    • ADMIN_EMAIL, SYNTHESIZED_KEY, and any other settings and volumes you added.

      Then run docker compose config --images in that folder. It must list the three images with the <new-version> tag, so that Docker Compose uses the images you loaded.

  3. Restart:

    docker compose down
    docker compose up -d
  4. Check the update. docker compose ps should show the services running and healthy. Sign in, and check your workflows and data sources. If something is wrong, read docker compose logs.

Roll back

  1. Stop Governor with docker compose down.

  2. Restore the configuration. Put back the docker-compose.yml, and the .env file, that you saved in step 2. This also restores the previous image tags.

  3. Restore the database from the backup. Always do this: the previous release must run on the database as it was before the update. The PostgreSQL user must be allowed to drop and create databases; if apiuser isn’t, run dropdb and createdb as a superuser.

    dropdb -U apiuser -h localhost governor
    createdb -U apiuser -h localhost -O apiuser governor
    pg_restore --exit-on-error -U apiuser -h localhost -d governor /path/to/backup/db-backup.full.dump
  4. Load the previous images you saved in step 2:

    docker load -i /path/to/images/synthesized-api_<previous-version>_linux_amd64.tar
    docker load -i /path/to/images/synthesized-front_<previous-version>_linux_amd64.tar
    docker load -i /path/to/images/synthesized-worker_<previous-version>_linux_amd64.tar
  5. Start Governor with docker compose up -d.

  6. Check the rollback with docker compose ps and docker compose logs, then sign in.