Central Server Ubuntu 22.04 to 24.04 In-place Upgrade.

This document describes the steps required for upgrading Central Server host from Ubuntu 22.04 LTS host to Ubuntu 24.04 LTS.  Please read carefully through the whole document before starting the upgrade process. It is assumed that the reader is familiar with the Ubuntu Linux distribution and has experience of Ubuntu release upgrades and the central server is installed using the installation guide and has a local PostgreSQL database.

Preparations

If upgrading a system that uses a hardware security module: Please verify that the HSM is compatible with Ubuntu 24.04 and check the HSM module documentation for upgrade instructions.

Upgrading Ubuntu 22.04 to 24.04

Stop the central server and prevent it from starting on boot before continuing to the actual upgrade:

systemctl stop xroad-center xroad-center-registration-service xroad-center-management-service xroad-signer systemctl disable xroad-center xroad-center-registration-service xroad-center-management-service xroad-signer
  • Install update-manager-core and software-properties-common if not already installed.

  • Make sure the Prompt line in /etc/update-manager/release-upgrades is set to lts (long-term support)

  • Launch the upgrade tool with the command
    sudo do-release-upgrade

  • Follow the on-screen instructions.

  • When the upgrade is finished, reboot when prompted.

Upgrading the X-Road software

Stand-alone Central Server: Upgrade the database

This step applies only to a stand-alone central server.

  • By default, the Ubuntu upgrade process creates empty database instances that should be removed before the old database is upgraded.

  • List the database instances with pg_lsclusters, and drop the extra ones.
    Do not remove the version 14 (main) running on port 5432
    sudo pg_dropcluster --stop <version, e.g. 16> main

  • Upgrade the old database to version 16:
    sudo pg_upgradecluster 14 main

Update the X-Road package repository to point to the Ubuntu 24.04 packages

  • Update the X-Road apt repository (remove old and add new):

    apt-add-repository -r "deb https://artifactory.niis.org/xroad-release-deb jammy-current main" apt-add-repository "deb https://artifactory.niis.org/xroad-release-deb noble-current main"

    Alternatively, find the repository definition in /etc/apt/sources.list.d/xroad.list and edit it directly. More about Debian source lists.

Upgrade the packages

sudo apt update && sudo apt full-upgrade

Enable automatic startup and start central server

systemctl enable xroad-center xroad-center-registration-service xroad-center-management-service xroad-signer systemctl start xroad-center xroad-center-registration-service xroad-center-management-service xroad-signer

Verify that the central server services are running and the system is responding

Stand-alone central server only: Drop old database and obsolete packages

After verifying that the database upgrade was successful, drop the old database and remove obsolete PostgreSQL packages.

sudo pg_dropcluster 14 main
sudo apt purge postgresql-14
sudo apt autoremove

Troubleshooting