zulip/scripts
Alex Vandiver 07bc2f2f5e
Some checks failed
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:trixie, false, false, Debian 13 (Python 3.13, backend), trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie, , Debian 13 production install, trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie-11.0, 11.0 Version Upgrade, trixie) (push) Has been cancelled
setup-certbot: Run hooks, instead of "service nginx reload".
`certbot certonly`, when obtaining a new certificate, does not
run deploy hooks that were installed into
`/etc/letsencrypt/renewal-hooks` (certbot/certbot#9978).  Because of
this, we added an explicit `service nginx reload`.

This turns out to be awkward for a few reasons -- firstly, this does
not handle the restarting of our SMTP server, which also needs to pick
up the new certificates.  It requires that Docker installs explicitly
restart nginx their own way.  And it also means that if certbot
already had a certificate, we reload nginx twice.

We would ideally just have certbot just run all of the deploy hooks,
as usual, no matter if the certificate is new or a renewal; however,
it has no flag to do so.

We move to approximating running the deploy hooks, if the certificate
is new.  This makes it easier to have identical behaviour between
initial install and later renewals.

This requires moving the symlinking step itself to a deploy hook, so
it can run before nginx and the email server are restarted.  Our one
consumer of the `--skip-symlink` flag, Docker, can work around its
removal.  The symlink step is a no-op if `$ZULIP_DOMAIN` is unset,
i.e. during automated renewals.  This ensures that system that
installed certbot, but has since changed to manual certificate
management, does not have those certificates overridden next time
certbot renews itself.

(cherry picked from commit 0c953f9870)
2025-11-26 14:18:48 -05:00
..
lib letsencrypt: Remove danging fixes from Zulip Server 5.0. 2025-11-26 14:18:48 -05:00
nagios queue: Allow sharding user_activity worker. 2025-06-06 10:33:20 -07:00
setup setup-certbot: Run hooks, instead of "service nginx reload". 2025-11-26 14:18:48 -05:00
__init__.py Factor out venv-creating code from provision.py. 2016-06-21 11:25:41 -07:00
get-django-setting python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
log-search log-search: Add --extra filter, for [dm] and similar filters. 2025-08-12 10:25:44 -07:00
purge-old-deployments ruff: Partially reformat Python with Ruff 0.9 (2025 style). 2025-01-14 09:42:16 -08:00
README.md docs: Apply bullet style changes from Prettier. 2021-09-08 12:06:24 -07:00
refresh-sharding-and-restart restart-server: --tornado-reshard implies --skip-client-reloads. 2025-11-20 15:38:06 -08:00
reload-clients reload-clients: Ensure that Smokescreen does not interfere with reloads. 2025-08-28 16:17:08 -07:00
restart-server restart-server: All realm Tornado ports need a restart when they change. 2025-11-20 15:38:06 -08:00
start-server scripts: Add a start-server as well. 2021-04-21 10:24:08 -07:00
stop-server email-mirror: Add a standalone server that processes incoming email. 2025-05-19 16:39:44 -07:00
upgrade-zulip upgrade: Modify upgrade scripts to handle failure. 2021-06-23 08:42:20 -07:00
upgrade-zulip-from-git upgrade: Modify upgrade scripts to handle failure. 2021-06-23 08:42:20 -07:00
zulip-puppet-apply ruff: Fix SIM115 Use a context manager for opening files. 2024-10-20 18:16:27 -07:00

This directory contains scripts that:

  • Generally do not require access to Django or the database (those are "management commands"), and thus are suitable to run operationally.

  • Are useful for managing a production deployment of Zulip (many are also used in a Zulip development environment, though development-only scripts live in tools/).

For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.