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

  1. Verify that the system has the latest updates.

  2. On the orchestrator, run this command:

    cd /opt/opsview/deploy
    ./bin/opsview-deploy ./lib/playbooks/check-deploy.yml
    
  3. Ensure that all issues reported by check-deploy are 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.

  1. 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 -B
    

    The status of each service should be changed to Not monitored after running the command.

  2. Upgrade the operating system to the latest Debian 11, and then run the following command on each system:

    • Edit /etc/apt/sources.list and change occurrence of buster/updates to bullseye-security on the security line.
    • Edit /etc/apt/sources.list and change all remaining occurrences of buster to bullseye.
    apt update
    apt upgrade --without-new-pkgs
    apt full-upgrade
    reboot
    
  3. 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.

  1. 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 -B
    

    The status of each service should be changed Not monitored after running the command.

  2. Upgrade the operating system to the latest Debian 12, and then run the following command on each system:

    • Edit /etc/apt/sources.list and change all occurrences of bullseye to bookworm.
    apt update
    apt upgrade --without-new-pkgs
    apt full-upgrade
    reboot
    
  3. 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

  1. Update the sources list.

    • Edit /etc/apt/sources.list.d/opsview.list and change all occurrences of buster to bookworm.
  2. 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
    
  3. Remove held Opsview packages.

    apt-mark unhold opsview* infrastructure-agent
    
  4. 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

Run SQL upgrade Copied

  1. On each system with SQL database setup, run this command:

    mysql_upgrade -p 
    
  2. Provide database passwords configured in the opsview_database_password field of /opt/opsview/deploy/etc/user_secrets.yml when 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
["Opsview On-premises"] ["User Guide", "Technical Reference", "Compatibility Matrix"]

Was this topic helpful?