Upgrade from 2.16 to 2.17.0¶
Because of the broad scope of the 2.17.0 version, this page describes the upgrade procedure in detail. Notable changes in this version include:
- New concepts of computational resources and profiles.
- Updates of the application settings.
- Users cannot self-register through OAuth any more.
- A user must meet more conditions in order to access the API (namely being marked as both active and verified, and being associated to a computational profile).
Note: Automatic data migration for version 2.17.0 is only supported for Fractal instances attached on a SLURM cluster, and not for
localinstances.
Preliminary checks (with fractal-server 2.16)¶
These checks should be performed on a working 2.16 Fractal instance, before starting the upgrade procedure.
- In the user list, identify all users who are actually meant to use this Fractal instance, and mark them as both "active" and "verified".
- The automated data-migration script described below will only look for users who are both active and verified.
- Settings for other users won't be modified, and they won't be able to use Fractal without a manual admin intervention.
- For all active&verified users, make sure that their
project_diris set. The data-migration script will fail if it is not set for some active&verified user - becauseproject_dirbecomes a required user property.
Upgrade procedure¶
- Make a copy of the current
.fractal-server.envfile and name it.fractal-server.env.old. - Make sure that
.fractal_server.env.oldincludes theFRACTAL_SLURM_WORKER_PYTHONvariable. If this variable is not set, add it and set it to the absolute path of the Python interpreter which runsfractal-server. - Make a backup of the current database with
pg_dump(see example). - Stop the fractal-server running process (e.g. via
systemctl stop fractal-server). - Edit
.fractal_server.envto align with the new version. List of changes:- Edit the
FRACTAL_RUNNER_BACKENDvalue so that it is one ofslurm_sudoorslurm_ssh. - Rename
FRACTAL_VIEWER_AUTHORIZATION_SCHEMEintoFRACTAL_DATA_AUTH_SCHEME- if present. - Rename
FRACTAL_VIEWER_BASE_FOLDERintoFRACTAL_DATA_BASE_FOLDER- if present. - Add
FRACTAL_DEFAULT_GROUP_NAME=All(note: the same variable must be set also in thefractal-webenvironment file). - Update OAuth-related variables to comply with the new expected ones.
- Add the
OAUTH_CLIENT_NAMEvariable. - Remove the client name from the names of all other variables, e.g. as in
OAUTH_XXX_CLIENT_ID --> OAUTH_CLIENT_ID(ifOAUTH_CLIENT_NAME="XXX").
- Add the
- Drop all following variables (if set):
FRACTAL_DEFAULT_ADMIN_EMAILFRACTAL_DEFAULT_ADMIN_PASSWORDFRACTAL_DEFAULT_ADMIN_USERNAMEFRACTAL_TASKS_DIRFRACTAL_RUNNER_WORKING_BASE_DIRFRACTAL_LOCAL_CONFIG_FILEFRACTAL_SLURM_CONFIG_FILEFRACTAL_SLURM_WORKER_PYTHON.FRACTAL_TASKS_PYTHON_DEFAULT_VERSION- All
FRACTAL_TASKS_PYTHON_3_*variables FRACTAL_PIXI_CONFIG_FILE.FRACTAL_SLURM_POLL_INTERVAL.FRACTAL_PIP_CACHE_DIR
- Edit the
- Verify that the following files are available in the current directory:
.fractal_server.env.old.fractal_server.env- The JSON file with the SLURM configuration (as defined in the
FRACTAL_SLURM_CONFIG_FILEvariable of.fractal_server.env.old). - The JSON file with the pixi configuration, if defined in the
FRACTAL_PIXI_CONFIG_FILEvariable of.fractal_server.env.old. - Replace the current
fractal-serverversion with 2.17.0 (e.g. viapip install fractal-server==2.17.0- within the appropriate Python environment). - Run the database-schema-migration command
fractalctl set-db. - Run the database-data-migration command
fractalctl update-db-data. - Restart the fractal-server process (e.g. via
systemctl start fractal-server).
Post-upgrade cleanup¶
- Upgrade
fractal-webto version 1.21, addFRACTAL_DEFAULT_GROUP_NAME=Allto the environment file, and restart the process. - Verify that log-in still works (including via OAuth).
- Review the names of resources/profiles.
- Review the association between users and profiles.
- Verify that job execution works as expected.
- Verify that task collection works as expected.
- Verify that the OME-Zarr viewer works as expected (if configured).