zulip/scripts
Alex Vandiver c0e240277b tornado: Remove fingerprinting, write out .tmp files always.
Fingerprinting the config is somewhat brittle -- it requires either
custom bootstrapping for old (fingerprint-less) configs, and may have
false-positives.

Since generating the config is lightweight, do so into the .tmp files,
and compare the output to the originals to determine if there are
changes to apply.

In order to both surface errors, as well as notify the user in case a
restart is necessary, we must run it twice.  The `onlyif`
functionality cannot show configuration errors to the user, only
determine if the command runs or not.  We thus run the command once,
judging errors as "interesting" enough to run the actual command,
whose failure will be verbose in Puppet and halt any steps that depend
on it.

Removing the `onlyif` would result in `stage_updated_sharding` showing
up in the output of every Puppet run, which obscures the important
messages it displays when an update to sharding is necessary.
Removing the `command` (e.g. making it an `echo`) would result in
removing the ability to report configuration errors.  We thus have no
choice but to run it twice; this is thankfully low-overhead.
2020-09-25 10:52:40 -07:00
..
lib tornado: Remove fingerprinting, write out .tmp files always. 2020-09-25 10:52:40 -07:00
nagios tornado: Remove explicit tornado_processes setting; compute it. 2020-09-18 15:13:40 -07:00
setup certbot: Explicitly apt-get update before installing certbot. 2020-09-21 15:26:28 -07:00
README.md cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
__init__.py
get-django-setting setup_path_on_import: Replace with setup_path function. 2020-02-25 15:40:21 -08:00
purge-old-deployments python: Elide nargs for argparse flag arguments. 2020-09-03 16:17:14 -07:00
refresh-sharding-and-restart puppet: Generate sharding in puppet, then refresh-sharding-and-restart. 2020-09-14 16:27:15 -07:00
restart-server tornado: Remove explicit tornado_processes setting; compute it. 2020-09-18 15:13:40 -07:00
upgrade-zulip Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
upgrade-zulip-from-git Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
zulip-puppet-apply python: Prefer --flag=option over --flag option. 2020-09-03 17:51:09 -07:00

README.md

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.