zulip/scripts/setup
Alex Vandiver 0d7dbd1b07 puppet: Apply basic PostgreSQL configuration before pg_upgradecluster.
Running `pg-upgradecluster` runs the `CREATE TEXT SEARCH DICTIONARY`
and `CREATE TEXT SEARCH CONFIGURATION` from
`zerver/migrations/0001_initial.py` on the new PostgreSQL cluster;
this requires that the stopwords file and dictionary exist _prior_
to `pg_upgradecluster` being run.

This causes a minor dependency conflict -- we do not wish to duplicate
the functionality from `zulip::postgres_appdb_base` which configures
those files, but installing all of `zulip::postgres_appdb_tuned` will
attempt to restart PostgreSQL -- which has not configured the cluster
for the new version yet.

In order to split out configuration of the prerequisites for the
application database, and the steps required to run it, we need to be
able to apply only part of the puppet configuration.  Use the
newly-added `--config` argument to provide a more limited `zulip.conf`
which only applies `zulip::postgres_appdb_base` to the new version of
Postgres, creating the required tsearch data files.

This also preserves the property that a failure at any point prior to
the `pg_upgradecluster` is easily recoverable, by re-running
`zulip-puppet-apply`.
2020-07-06 18:30:16 -07:00
..
configure-rabbitmq configure-rabbitmq: Allow running as root. 2019-04-04 16:52:20 -07:00
create-db.sql create-db.sql: Start by dropping the zulip database if needed. 2020-01-15 18:04:34 -08:00
create-pgroonga.sql postgres-create-db: Split into non-pgroonga and pgroonga scripts. 2019-07-17 16:18:22 -07:00
debathena-archive.asc scripts: Initialize setup-apt-repo-debathena. 2018-12-11 13:01:26 -08:00
flush-memcached flush-memcached: Replace a type: ignore with an assert. 2020-06-23 11:29:54 -07:00
generate-self-signed-cert generate-self-signed-cert: Correct subjectAltName for an IP address. 2020-06-29 22:19:47 -07:00
generate_secrets.py python: Manually convert more percent-formatting to f-strings. 2020-06-14 23:27:22 -07:00
initialize-database install: Don't create internal realm in the installation process. 2020-02-12 12:00:10 -08:00
inline_email_css.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
install install, provision: Treat all nonzero exit codes as failure, not just 1. 2019-07-19 11:22:11 -07:00
install-wal-g.sh puppet: Install wal-g, not wal-e. 2020-06-11 15:52:43 -07:00
pgdg.asc install: Use the apt postgres server packages from postgres. 2020-06-16 17:05:46 -07:00
pgroonga-debian.asc setup: Update groonga APT repository signing key. 2019-09-23 16:01:39 -07:00
pgroonga-ppa.asc scripts: Stop using apt-add-repository. 2016-10-11 22:10:36 -07:00
postgres-init-db postgres-init-db: Read terminate-psql-sessions script as root. 2020-07-02 14:54:36 -07:00
restore-backup backup: Make restore-backup work in docker. 2020-06-15 21:37:14 -07:00
setup-certbot certbot: Switch to use certbot from apt. 2020-06-08 21:59:29 -07:00
terminate-psql-sessions terminate-psql-sessions: Rely on the caller to set PGHOST, PGUSER. 2020-06-15 21:37:14 -07:00
upgrade-postgres puppet: Apply basic PostgreSQL configuration before pg_upgradecluster. 2020-07-06 18:30:16 -07:00