From 12310189edc33682fc423206263146d5a5fad7c4 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 10 May 2023 14:20:46 -0700 Subject: [PATCH] install: Support Debian 12. Signed-off-by: Anders Kaseorg --- .github/workflows/production-suite.yml | 5 +++ .github/workflows/zulip-ci.yml | 6 +++ docs/development/setup-advanced.md | 2 +- docs/development/setup-recommended.md | 2 +- docs/production/requirements.md | 3 +- docs/production/upgrade.md | 46 +++++++++++++++++++++ scripts/lib/install | 3 +- scripts/lib/upgrade-zulip-stage-2 | 1 + scripts/setup/apt-repos/zulip/bookworm.list | 2 + scripts/setup/apt-repos/zulip/custom.sh | 4 ++ tools/ci/build-docker-images | 1 + tools/lib/provision.py | 6 ++- 12 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 scripts/setup/apt-repos/zulip/bookworm.list diff --git a/.github/workflows/production-suite.yml b/.github/workflows/production-suite.yml index 1c6b03242e..7295047a42 100644 --- a/.github/workflows/production-suite.yml +++ b/.github/workflows/production-suite.yml @@ -144,6 +144,11 @@ jobs: os: bullseye extra-args: --test-custom-db + - docker_image: zulip/ci:bookworm + name: Debian 12 production install + os: bookworm + extra-args: "" + name: ${{ matrix.name }} container: image: ${{ matrix.docker_image }} diff --git a/.github/workflows/zulip-ci.yml b/.github/workflows/zulip-ci.yml index cb0cdd118a..4d47ed74f2 100644 --- a/.github/workflows/zulip-ci.yml +++ b/.github/workflows/zulip-ci.yml @@ -48,6 +48,12 @@ jobs: os: jammy include_documentation_tests: false include_frontend_tests: false + # Debian 12 ships with Python 3.11.2. + - docker_image: zulip/ci:bookworm + name: Debian 12 (Python 3.11, backend) + os: bookworm + include_documentation_tests: false + include_frontend_tests: false runs-on: ubuntu-latest name: ${{ matrix.name }} diff --git a/docs/development/setup-advanced.md b/docs/development/setup-advanced.md index 2a9c4fd4de..387a4a1609 100644 --- a/docs/development/setup-advanced.md +++ b/docs/development/setup-advanced.md @@ -20,7 +20,7 @@ host by following these instructions. Currently supported platforms are: - Ubuntu 20.04, 22.04 -- Debian 11 +- Debian 11, 12 - CentOS 7 (beta) - Fedora 33 and 34 (beta) - RHEL 7 (beta) diff --git a/docs/development/setup-recommended.md b/docs/development/setup-recommended.md index 47ecc48be7..995f789942 100644 --- a/docs/development/setup-recommended.md +++ b/docs/development/setup-recommended.md @@ -51,7 +51,7 @@ a proxy to access the internet.) [GitHub account](#step-0-set-up-git--github). - **macOS**: macOS (10.11 El Capitan or newer recommended) - **Ubuntu LTS**: 20.04 or 22.04 -- **Debian**: 11 +- **Debian**: 11 or 12 - **Fedora**: tested for 36 - **Windows**: Windows 64-bit (Win 10 recommended), hardware virtualization enabled (VT-x or AMD-V), administrator access. diff --git a/docs/production/requirements.md b/docs/production/requirements.md index da1d6ba159..a83ac13630 100644 --- a/docs/production/requirements.md +++ b/docs/production/requirements.md @@ -7,6 +7,7 @@ To run a Zulip server, you will need: - Ubuntu 20.04 - Ubuntu 22.04 - Debian 11 + - Debian 12 - A supported CPU architecture: - x86-64 - aarch64 @@ -36,7 +37,7 @@ on issues you'll encounter](install-existing-server.md). #### Operating system -Ubuntu 20.04, Ubuntu 22.04, and Debian 11 +Ubuntu 20.04, Ubuntu 22.04, Debian 11, and Debian 12 are supported for running Zulip in production. You can also run Zulip on other platforms that support Docker using [docker-zulip][docker-zulip-homepage]. diff --git a/docs/production/upgrade.md b/docs/production/upgrade.md index b4f22ad543..36c1ee8c65 100644 --- a/docs/production/upgrade.md +++ b/docs/production/upgrade.md @@ -484,6 +484,52 @@ instructions for other supported platforms. 18.04](#upgrading-from-ubuntu-1604-xenial-to-1804-bionic), so that you are running a supported operating system. +### Upgrading from Debian 11 to 12 + +1. Upgrade your server to the latest `7.x` release. + +2. As the Zulip user, stop the Zulip server and run the following + to back up the system: + + ```bash + /home/zulip/deployments/current/scripts/stop-server + /home/zulip/deployments/current/manage.py backup --output=/home/zulip/release-upgrade.backup.tar.gz + ``` + +3. Follow [Debian's instructions to upgrade the OS][bookworm-upgrade]. + + [bookworm-upgrade]: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-upgrading.html + + When prompted for you how to upgrade configuration + files for services that Zulip manages like Redis, PostgreSQL, + nginx, and memcached, the best choice is `N` to keep the + currently installed version. But it's not important; the next + step will re-install Zulip's configuration in any case. + +4. As root, run the following steps to regenerate configurations + for services used by Zulip: + + ```bash + apt remove upstart -y + /home/zulip/deployments/current/scripts/zulip-puppet-apply -f + ``` + +5. Reinstall the current version of Zulip, which among other things + will recompile Zulip's Python module dependencies for your new + version of Python: + + ```bash + rm -rf /srv/zulip-venv-cache/* + /home/zulip/deployments/current/scripts/lib/upgrade-zulip-stage-2 \ + /home/zulip/deployments/current/ --ignore-static-assets --audit-fts-indexes + ``` + + This will finish by restarting your Zulip server; you should now + be able to navigate to its URL and confirm everything is working + correctly. + +6. As an additional step, you can also [upgrade the PostgreSQL version](#upgrading-postgresql). + ### Upgrading from Debian 10 to 11 1. Upgrade your server to the latest `5.x` release. You can only diff --git a/scripts/lib/install b/scripts/lib/install index 2aa4715aeb..835aee9a2a 100755 --- a/scripts/lib/install +++ b/scripts/lib/install @@ -219,7 +219,7 @@ if [ -f /etc/os-release ]; then fi case "$os_id $os_version_id" in - 'debian 11' | 'ubuntu 20.04' | 'ubuntu 22.04') ;; + 'debian 11' | 'debian 12' | 'ubuntu 20.04' | 'ubuntu 22.04') ;; *) set +x cat <