Upgrade from Debian 10 to 12
Prerequisites Copied
Before upgrading the operating system, carefully review the prerequisites and necessary steps to ensure a successful upgrade.
Warning
Upgrading from Debian 10 to 12 requires a two-step process. First, upgrade to Debian 11, and then upgrade to Debian 12. Skipping this intermediate step may lead to compatibility problems.
Check for system updates Copied
-
Verify that the system has the latest updates.
-
On the orchestrator, run this command:
cd /opt/opsview/deploy ./bin/opsview-deploy ./lib/playbooks/check-deploy.yml -
Ensure that all issues reported by
check-deployare resolved prior to proceeding.
Mark Opsview packages on hold Copied
On each system, run this command:
apt-mark hold opsview* infrastructure-agent
Upgrade to Debian 11 Copied
Before proceeding, please ensure that all Opsview services are stopped.
-
Stop the Opsview Monitor services, and then run the following command on each system:
/opt/opsview/watchdog/bin/opsview-monit stop all /opt/opsview/watchdog/bin/opsview-monit summary -BThe status of each service should be changed to
Not monitoredafter running the command. -
Upgrade the operating system to the latest Debian 11, and then run the following command on each system:
- Edit
/etc/apt/sources.listand change occurrence ofbuster/updatestobullseye-securityon the security line. - Edit
/etc/apt/sources.listand change all remaining occurrences ofbustertobullseye.
apt update apt upgrade --without-new-pkgs apt full-upgrade reboot - Edit
-
Select default options when prompted during the upgrade.
Note
This does not yet upgrade Opsview packages, as it is a third-party repository under/etc/apt/sources.list.d/opsview.list. Upgrading the Opsview packages comes after the OS upgrade, see Post-upgrade to Debian 12.
Upgrade to Debian 12 Copied
Before proceeding, please ensure that all Opsview services are stopped.
-
Stop the Opsview Monitor services, and then run the following command on each system:
/opt/opsview/watchdog/bin/opsview-monit stop all /opt/opsview/watchdog/bin/opsview-monit summary -BThe status of each service should be changed
Not monitoredafter running the command. -
Upgrade the operating system to the latest Debian 12, and then run the following command on each system:
- Edit
/etc/apt/sources.listand change all occurrences ofbullseyetobookworm.
apt update apt upgrade --without-new-pkgs apt full-upgrade reboot - Edit
-
Select default options when prompted during the upgrade.
Note
This does not yet upgrade Opsview packages, as it is a third-party repository under/etc/apt/sources.list.d/opsview.list. Upgrading the Opsview packages comes after the OS upgrade, see Post-upgrade to Debian 12.
Post-upgrade to Debian 12 Copied
Perform these tasks after upgrading the OS to Debian 12 on the necessary systems.
Confirm the OS is running the latest version.
cat /etc/os-release
Upgrade the Opsview packages Copied
-
Update the sources list.
- Edit
/etc/apt/sources.list.d/opsview.listand change all occurrences ofbustertobookworm.
- Edit
-
Prioritize Debian 12 packages.
sudo tee /etc/apt/preferences.d/00-opsview > /dev/null <<EOF Package: /opsview/ Pin: release n=bookworm Pin-Priority: 1001 Package: infrastructure-agent Pin: release n=bookworm Pin-Priority: 1001 EOF -
Remove held Opsview packages.
apt-mark unhold opsview* infrastructure-agent -
Upgrade the Opsview packages.
apt update apt upgrade
Check system updates Copied
On each system, run this command:
apt update
The apt update will report that the system and packages are up to date.
Remove prioritization of Debian 12 Opsview packages Copied
On each system, run this command:
rm /etc/apt/preferences.d/00-opsview
Update Python alternatives Copied
If the upgrade is for an orchestrator instance, run the following command on the orchestrator:
sudo update-alternatives --config python
In the command line, select the option for /usr/bin/python3 when prompted.
Run SQL upgrade Copied
-
On each system with SQL database setup, run this command:
mysql_upgrade -p -
Provide database passwords configured in the
opsview_database_passwordfield of/opt/opsview/deploy/etc/user_secrets.ymlwhen prompted.
Run setup everything Copied
# on the orchestrator
cd /opt/opsview/deploy
./bin/opsview-deploy ./lib/playbooks/check-deploy.yml
./bin/opsview-deploy ./lib/playbooks/setup-everything.yml
If you have upgraded remotely managed collectors, re-deploy on each remotely managed collector:
curl -k -sLo- https://<ORCHESTRATOR NAME>/downloads/deploy-collector > wrapper.sh && chmod +x wrapper.sh && sudo HOME=/root ./wrapper.sh --username <USERNAME> --password <PASSWORD> --orchestrator <ORCHESTRATOR NAME> --cluster '<NAME OF CLUSTER>' --insecure --ssh-tunnel