Upgrading Appliances
In this example, we will update from jansa to kasparov.
-
Ensure that the appliance is up to date on the current branch
# dnf update -
Install the new manageiq-release RPM for the version that you want to upgrade to. Refer to the release directory in our RPM repository to find the latest manageiq-release rpm. Navigate to the non-nightly directory, el, then noarch directory for the version that you want to upgrade to, and get the URL for the manageiq-release rpm.
# dnf install https://rpm.manageiq.org/release/11-kasparov/el8/noarch/manageiq-release-11.0-1.el8.noarch.rpm -
Stop evmserverd if running
# systemctl stop evmserverd # systemctl status evmserverd -
Update the RPMs from the new repo
# dnf update -
Migrate the database
# cd /var/www/miq/vmdb/ # bundle exec rake db:migrate -
Reboot the appliance
# reboot
Update automation engine
In the UI navigate to Automation > Embedded Automate > Import/Export and click the Reset option ( Reset all components in the built-in domains).
Always be sure to export the current datastore before importing or resetting.
Upgrading podified to tal with postgresql 16
In this section we will upgrade an existing podified installation and upgrade the database server from PostgreSQL 13 to 16.
- Switch to the namespace where the application is installed.
# oc project <your_namespace>
- Upgrade the operator changing .spec.template.spec.containers[0].image to the new image
# oc edit deployment -operator
- Update httpd, memcached, base-worker, orchestrator, ui-worker and webserver-worker image references
# oc edit manageiqs
- Stop all of the worker pods by putting the orchestrator to sleep
# oc patch deployment orchestrator -p '{"spec":{"template":{"spec":{"containers":[{"name":"orchestrator","command":["sleep", "1d"]}]}}}}'
- Back up the postgresql 13 database to a file on the PV
# oc rsh deploy/postgresql
# sh-5.2$ pg_dumpall -c --if-exists | gzip > /var/lib/pgsql/data/vmdb.pg.gz
# sh-5.2$ exit
- Copy the database backup locally
# oc get pod -l name=postgresql
# oc cp <name of postgresql-xxx pod>:/var/lib/pgsql/data/vmdb.pg.gz vmdb.pg.gz
- Upgrade the postgresql deployment from 13 to 16 by switching the image tag from “13-el9” to “16-el10”
# oc edit manageiqs
- The new postgresql pod will get deployed, but stuck in CrashLoopBackOff because of incompatible data directory
# oc delete pvc/postgresql deployment/postgresql
- Copy the database backup to the new pvc
# oc get pod -l name=postgresql
# oc cp vmdb.pg.gz <name of new postgresql-xxx pod>:/var/lib/pgsql/data/vmdb.pg.gz
- Restore the database backup to the postgresql 16 formatted userdata directory
# oc rsh deploy/postgresql
# gunzip < /var/lib/pgsql/data/vmdb.pg.gz | psql postgres
# rm -rf /var/lib/pgsql/data/vmdb.pg.gz
# exit
- Restart the orchestrator
# oc delete deployment orchestrator
- Delete the old network policies
# oc delete networkpolicy -l app=ibm-infra-management-application
The new orchestrator and network policies will get created and after a few minutes the worker pods will be deployed. Once the UI pods are up, log into the web-UI and verify that the restore was successful.