Upgrade your Chef Habitat On-Prem Builder deployment
Chef Habitat On-Prem Builder services don’t upgrade automatically. To upgrade the services, use the uninstall script to stop, unload, and remove them.
Note
Before you begin
If you’re upgrading to a Habitat Builder version dated 20260728 or later from an earlier version and you’re using MinIO and PostgreSQL to store data, back up your /hab/svc directory prior to upgrading.
This release includes major version upgrades of MinIO and PostgreSQL and upgrading to this release triggers an automatic data migration, which can take several minutes to complete.
If the upgrade fails, you can restore your backed-up data and roll back to an earlier Habitat Builder version.
If you store data on your own external PostgreSQL or S3-compliant storage, then you don’t need to worry about upgrading the MinIO or PostgreSQL packages installed with Habitat Builder.
Upgrade Chef Habitat On-Prem Builder
To upgrade Chef Habitat On-Prem Builder, follow these steps:
Clone a fresh copy of the
habitat-sh/on-prem-builderrepository on the computer running Habitat On-Prem Builder.Confirm your
bldr.envfile has a validHAB_AUTH_TOKENand setBLDR_CHANNELtoon-prem-base.See the
bldr.env.samplefile for an example.Uninstall all Habitat Builder services by running the uninstall script:
sudo ./uninstall.shAfter the services are uninstalled, reinstall them by running the
install.shscript:./install.shOptional: Follow the supervisor logs to monitor the migration progress. Services may be unavailable for a few minutes after
install.shcompletes, particularly when a data migration is triggered when updatingbuilder-minioorbuilder-datastore.To follow the logs, run the following command:
journalctl -fu hab-supWhile the migration runs, it is common to see a large number of entries similar to:
Aug 14 15:11:58 ip-172-31-38-141 hab[121787]: [3.4K blob data]The migration is typically finished once you see a final entry like:
Aug 14 15:12:14 ip-172-31-38-141 hab[121787]: builder-minio.default hook[post-run]:(HK): Minio bucket is up to date.
Roll back an upgrade
If an upgrade to a version dated 20260728 or later fails, and you backed up your /hab/svc directory beforehand, you can roll back to the latest on-prem version prior to 20260728:
Uninstall all Habitat Builder services by running the uninstall script:
sudo ./uninstall.shRestore your backed up
/hab/svcdirectory.In your
bldr.envfile, setBLDR_CHANNELtoon-prem-stable.Reinstall the services by running the
install.shscript:./install.shBinlink Chef Habitat version 1.6:
sudo hab pkg install core/hab --channel stable -bfRestart the
hab-supsystemd service:sudo systemctl restart hab-sup