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

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:

  1. 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
    
  2. Update the lists of available packages and dependencies in your local system:

    sudo apt update
    
  3. 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:

  1. Stop Landscape

    sudo lsctl stop
    
  2. Run the setup command. This performs all necessary schema updates against the currently configured database.

    sudo setup-landscape-server
    
  3. Restart Landscape

    sudo lsctl restart
    

Upgrade Juju deployments

See also: Landscape-server charm on Charmhub

To upgrade a basic Juju deployment:

  1. Upgrade the landscape-server charm

    juju refresh landscape-server
    
  2. 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 the landscape-server units. When the charm is updated, this will no longer be necessary.

  3. Pause Landscape services

    juju run landscape-server/0 pause
    
  4. Upgrade the Landscape server packages from the updated PPA

    juju run landscape-server/0 upgrade
    
  5. Update the database schema

    juju run landscape-server/0 migrate-schema
    
  6. Re-start the Landscape services again

    juju run landscape-server/0 resume
    

This page was last modified 5 months ago. Help improve this document in the forum.