How to upgrade your Landscape server
This document is for upgrading Landscape Server 23.03 or later to a newer version. If you’re upgrading from a version of Landscape earlier than 23.03, see the manual upgrade guides for a quickstart installation and manual installation.
Note that you don’t need to upgrade your client machines when you upgrade your Landscape server.
Contents:
- Prepare to upgrade
- Upgrade your Landscape server
- (If necessary) Upgrade the database schema
- Upgrade Juju deployments
Prepare to upgrade
See also: Backup and restore
We strongly recommend you backup your database and configuration files before performing an upgrade. You should backup:
- Database
- Apache2 configuration file: This is commonly located in
/etc/apache2/sites-available/<hostname>.conf
. - Service configuration file: This is commonly located in
/etc/landscape/service.conf
.
Upgrade your Landscape server
When you upgrade, you should use your existing configuration file. This file is typically located in /etc/landscape/service.conf
.
To upgrade your existing Landscape server:
-
Add the new PPA. If you’re upgrading to Landscape 24.04 LTS, run:
sudo add-apt-repository ppa:landscape/self-hosted-24.04 -y
-
Update the lists of available packages and dependencies in your local system:
sudo apt update
-
Upgrade the Landscape server using the newly configured PPA:
sudo apt full-upgrade
During your upgrade, you may be asked if you want to replace your configuration file with a later version. Do not replace your configuration; you should keep your existing configuration file.
If you accidentally replace your configuration file, you can put your previous configuration back by overwriting your service.conf
file with the one you backed up earlier.
(If needed) Upgrade the database schema
If you’re not using a quickstart deployment of Landscape, you need to manually update your database schema. You only need to run the database schema updates once, even if your deployment has multiple servers.
For Juju deployments, see the upgrade Juju deployments section in this guide. For manual installations of Landscape, follow these steps to manually update your database schema:
-
Stop Landscape
sudo lsctl stop
-
Run the setup command. This performs all necessary schema updates against the currently configured database.
sudo setup-landscape-server
-
Restart Landscape
sudo lsctl restart
Upgrade Juju deployments
See also: Landscape-server charm on Charmhub
To upgrade a basic Juju deployment:
-
Upgrade the
landscape-server
charmjuju refresh landscape-server
-
Update the Landscape self-hosted PPA configured in Juju. For example, if you’re upgrading to Landscape 24.04 LTS, run:
juju config landscape-server landscape_ppa="ppa:landscape/self-hosted-24.04" juju ssh landscape-server/0 "sudo add-apt-repository ppa:landscape/self-hosted-24.04 -y"
If you’re upgrading to a different version of Landscape, use the appropriate PPA.
Note: At the moment, the
landscape-server
charm only adds the PPA source during installation, so you will need to manually update this PPA on each of thelandscape-server
units. When the charm is updated, this will no longer be necessary. -
Pause Landscape services
juju run landscape-server/0 pause
-
Upgrade the Landscape server packages from the updated PPA
juju run landscape-server/0 upgrade
-
Update the database schema
juju run landscape-server/0 migrate-schema
-
Re-start the Landscape services again
juju run landscape-server/0 resume