diff --git a/docs/deployment.md b/docs/deployment.md index 52d7f93..8fdbe0f 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -177,7 +177,45 @@ connected. Follow their logs with `journalctl`. sudo journalctl -u coulobre-panel -u coulobre-worker -u coulobre-beat ``` -### Verify a new installation +## Upgrade an existing panel + +Download and unpack the new source release. Back up the panel database and +the configuration in `/etc/coulobre/` and in the service files you manage. +Stop the web process and scheduler. Let running jobs finish, then stop the +worker and any enabled provisioning, backup, or health collector units. + +```sh +sudo systemctl stop coulobre-panel.service coulobre-beat.service +``` + +After the running jobs finish, stop the general worker. If service health is +enabled, stop both its timer and service before changing the package. + +```sh +sudo systemctl stop coulobre-worker.service +# If service health is enabled: +# sudo systemctl stop coulobre-health.timer coulobre-health.service +``` + +From the unpacked source release, upgrade the existing virtual environment +and use the [management command helper](#prepare-the-panel). + +```sh +sudo /opt/coulobre/bin/pip install --upgrade '.[server,mariadb]' +panel_manage migrate --noinput +panel_manage collectstatic --noinput +``` + +Review the release notes and apply any configuration or unit changes they +describe. Reload systemd, start the main services and any optional units you +stopped, and verify the deployment with a test account. + +```sh +sudo systemctl daemon-reload +sudo systemctl start coulobre-panel.service coulobre-worker.service coulobre-beat.service +``` + +## Verify a new installation Use a test hosting plan, account, and domain for these checks. Enable the local services that the installation will offer before checking them.