This document describes the steps required for upgrading Central Server host from Ubuntu 18.04 LTS host to Ubuntu 20.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.
PostgreSQL 9.4 with BDR 1.0 is no longer maintained and installation packages for Ubuntu 20.04 are not available. Therefore, upgrading to Ubuntu 20.04 is not supported. |
If upgrading a system that uses a hardware security module: Please verify that the HSM is compatible with Ubuntu 20.04 and check the HSM module documentation for upgrade instructions.
Update all packages to the latest versions:apt update && apt full-upgrade
Ensure that the X-Road software version is at least 6.25.0
Recommended: Make sure that you have an up-to-date backup (or a virtual machine snapshot) of the server.
Use the admin UI to take a backup of the central server configuration and download it to a safe location.
This makes it possible to restore the server configuration if the upgrade fails for some reason.
Stop the central server and prevent it from starting on boot before continuing to the actual upgrade:
systemctl stop xroad-jetty xroad-signer systemctl disable xroad-jetty xroad-signer |
/etc/update-manager/release-upgrades
is set to lts
(long-term support)sudo do-release-upgrade
This step applies only to a stand-alone central server.
List the database instances with pg_lsclusters
, and drop the extra ones.
Do not remove the version 10 (main) running on port 5432sudo pg_dropcluster --stop <version, e.g. 12> main
Upgrade the old database to version 12:
sudo pg_upgradecluster 10 main
Update the X-Road apt repository (remove old and add new):
apt-add-repository -r "deb https://artifactory.niis.org/xroad-release-deb bionic-current main" apt-add-repository "deb https://artifactory.niis.org/xroad-release-deb focal-current main" |
Alternatively, find the repository definition in /etc/apt/sources.list and edit it directly.
sudo apt update && sudo apt full-upgrade
systemctl enable xroad-jetty xroad-signer
systemctl start xroad-jetty xroad-signer
systemctl list-units "xroad-*" "nginx*" "postgresql@*" UNIT LOAD ACTIVE SUB DESCRIPTION nginx.service loaded active running A high performance web server and a reverse proxy server postgresql@12-main.service loaded active running PostgreSQL Cluster 12-main xroad-base.service loaded active exited X-Road initialization xroad-jetty.service loaded active running X-Road Jetty server xroad-signer.service loaded active running X-Road signer |
After verifying that the database upgrade was successful, drop the old database and remove obsolete PostgreSQL packages.
sudo pg_dropcluster 10 main
sudo apt purge postgresql-10
sudo apt autoremove
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|