Upgrade the Navin Platform
This page upgrades the Navin Platform to a new release. The SQL migrations are forward only and compatible with the previous release (expand then contract), so the old pods keep working while the new ones start. It is done by the platform administrator, in a change window for production.
Before you begin
- Read the release notes of the target version (What's new in release 1.0, Release notes 1.0.0): migrations range, changed settings, known issues.
- Check that the API contracts stay compatible: no breaking change within
contracts/v1. - Check that the current installation is healthy (Verify) and that no migration is
changedorunknown(navin-platform status,python -m eai.migrate --status).
OS packages
-
Back up the database. The upgrade applies the new migrations at the first start of the API.
sudo -u postgres pg_dump --format=custom --file=/var/backups/navin_platform-<date>.dump navin_platformFor an external server, run the same
pg_dumpwith the administrator login andPGSSLMODE=verify-full.Expected result:
pg_restore --list /var/backups/navin_platform-<date>.dumpprints the table of contents. -
Install the new package. An upgrade keeps the settings, the data and the database; the venv is rebuilt from the wheelhouse of the new package and the running services are restarted.
sudo apt update && sudo apt install --only-upgrade navin-platform # Ubuntusudo dnf upgrade navin-platform # RHEL familysudo pacman -Syu # Arch LinuxWith the offline archive:
sudo ./navin-install standalonefrom the archive of the new version.Expected result:
navin-platform versionprints the new version.If it fails:
journalctl -u navin-platform-api -n 100tells why the API does not start. -
Check the migrations.
sudo navin-platform-db checkExpected result: exit status 0. The worker refuses to start while a migration is pending.
-
Compare the settings.
/etc/navin-platform/platform.env.exampleis refreshed by the upgrade; compare it with yourplatform.env, then runsudo navin-platform check.
Kubernetes
-
Back up. Take an on demand Velero backup before a production upgrade:
velero backup create pre-upgrade-<version> --from-schedule eai-platform-dailyCloudNativePG also keeps a continuous WAL archive in
s3://eai-backups/cnpg(point in time recovery). -
Publish the new image tags. The CI pushes the signed images to Harbor and updates
deploy/gitops/<env>/image-tags.yaml. -
Synchronize.
devandstagingsynchronize automatically. Production is manual, outside the freeze window of the AppProject (from Friday 18:00, for 62 hours):argocd app sync -l eai.io/environment=prod,eai.io/layer=appsargocd app wait -l eai.io/environment=prod,eai.io/layer=apps --health --timeout 1800The
PreSync/pre-upgradehook runspython -m eai.migratebefore the Deployments change. Without Argo CD:helm upgrade enterprise-ai deploy/helm/enterprise-ai -n enterprise-ai -f <values files>. -
Check.
/readyz, the service monitoring tab of the Navin Manager, the Live metrics portal screen,GET /v1/audit/verify, the k6 smoke tests ofdeploy/loadtest. -
Operators. Change
chart_versionsindeploy/terraform/modules/platform-bootstrap/variables.tf, thentofu planandtofu apply, one operator at a time.
Roll back
| Installation | Command | Database |
|---|---|---|
| Kubernetes | argocd app rollback enterprise-ai-prod <revision> | Kept when the migrations are additive; otherwise CloudNativePG point in time recovery |
| OS packages | Install the previous package version (apt install navin-platform=<version>, dnf downgrade navin-platform) | Restore the dump of step 1 when the new release applied migrations: migrate --status reports the newer versions as unknown |
Isolated site
Build, verify and sign the bundle on the connected side, then verify it on site and compare the manifest
release/manifests/<version>.json with the installed one: see Air-gapped installation.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
migrate --check reports changed | A released migration file was edited | Restore the released file; never edit an applied migration |
migrate --status reports unknown | The database is newer than the code (downgrade) | Install the newer release again, or restore the backup |
| Pods of the old and new release both run | Rolling update in progress | Normal: the migrations are compatible with the previous release |