Upgrade Insignal

Upgrade Insignal

One command takes a new release. It backs up first and rolls back on its own if the new release fails.

Upgrade to the latest release

sudo insignal upgrade

To take a specific release, name it:

sudo insignal upgrade --to 0.2.0

It asks before it starts. Pass --yes to skip the question. Insignal is down for a few minutes while it migrates and starts.

What the upgrade does

  1. Reads the release’s manifest from get.insignal.ai and checks Insignal’s signature on it.
  2. Checks that every process is healthy now. If one is not, it stops and changes nothing.
  3. Pulls the release’s images.
  4. Stops the server and takes a snapshot of the database. It keeps the snapshot and the current configuration in /opt/insignal/backups/upgrade-<time>/.
  5. Writes the new configuration, migrates the database, starts every container, and waits up to five minutes for every health check.
  6. Keeps the newest 3 upgrade backups and deletes older ones.

If the upgrade fails

If the migration or a health check fails, the upgrade rolls back on its own:

  1. It puts back the old configuration.
  2. If the migration had started, it puts back the database snapshot from step 4.
  3. It starts the old release and waits until it is healthy.
  4. It says why the upgrade failed.

Read the reason, then check sudo insignal status and sudo insignal logs <process>. See Troubleshoot.

Upgrades only go forward

Database migrations cannot be undone. The CLI refuses a release older than the one installed. To go back after a successful upgrade, contact Insignal support. The snapshot from before the upgrade stays in /opt/insignal/backups/ until later upgrades replace it.

When the CLI is too old

A release can need a newer insignal CLI. The upgrade then stops before it changes anything, and says so. Update the CLI, then run the upgrade again:

curl -fsSL https://get.insignal.ai | sh
sudo insignal upgrade

To see the CLI’s version, run insignal --version. To see the running release, run sudo insignal status.

Settings you changed by hand

The upgrade writes compose.yaml, insignal.env, ingest.env, cube.env, Caddyfile and cube.js again from the install’s answers and secrets. A setting you added to one of these files by hand is lost. The secrets stay the same.