Last Updated: July 2022
This document provides a recommendation for how to upgrade Tethys Platform to new versions.
The following instructions can be used for both upgrading from Tethys Platform 3.X to 4.X and updating to new minor versions of 4.X (e.g. 4.1, 4.2, 4.3) when they are released.
You need to have at least Tethys Platform 3.0 installed to use these instructions to upgrade to Tethys 4.X. Apps that were developed with Tethys 3.X will need to be updated to function properly in Tethys 4.X.
After upgrading to Tethys 4.0, there shouldn't be many major breaking changes between minor versions (e.g. 4.1, 4.2, 4.3). In other words, apps that work in Tethys Platform 4.0 should work in 4.1, 4.2, etc. without any changes. The following steps can be used as a general guide, but additional steps may be required for your specific installation.
Review the What's New documentation before attempting any upgrade, especially on production servers.
conda activate tethys
Update the Tethys Platform conda package and dependencies by installing the new version of Tethys Platform:
conda install -c conda-forge -c tethysplatform tethys-platform=4.*
The order of the channels matters here. In Tethys 3, the
tethysplatformchannel was listed before (higher priority)
conda-forge. For Tethys 4, this is reversed so that
conda-forgehas higher priority.
Migrate the Tethys Platform database tables:
tethys db migrate
Make any changes to your apps if necessary. This should only be the case when upgrading between major versions (e.g. 3.0 to 4.0). See the What's New and Migrating Apps from Tethys 3 to 4 documentation for detailed notes on what changes occur in each release.
The following additional steps may be required for production server upgrades.
Collect static files:
tethys manage collectstatic
Restart Daphne and NGINX servers:
sudo supervisorctl restart all