Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
install: Rename postgres options to postgresql.
Alex Vandiver5eb8064a1aae
diff --git a/docs/production/deployment.md b/docs/production/deployment.mdindex c2db2131402..5191685947c 100644--- a/docs/production/deployment.md+++ b/docs/production/deployment.md@@ -100,7 +100,7 @@ flag, e.g.:sudo -s # If not already root./zulip-server-*/scripts/setup/install --certbot \--email=YOUR_EMAIL --hostname=YOUR_HOSTNAME \- --no-init-db --postgres-missing-dictionaries+ --no-init-db --postgresql-missing-dictionaries```The script also installs and starts PostgreSQL on the server bydiff --git a/docs/production/install-existing-server.md b/docs/production/install-existing-server.mdindex 0e7fc15fe05..60ff45c58de 100644--- a/docs/production/install-existing-server.md+++ b/docs/production/install-existing-server.md@@ -67,9 +67,10 @@ $ sudo service puppet stopZulip expects to install PostgreSQL 12, and find that listening onport 5432; any other version of PostgreSQL that is detected at installtime will cause the install to abort. If you already have PostgreSQL-installed, you can pass `--postgres-version=` to the installer to have-it use that version. It will replace the package with the latest from-the PostgreSQL apt repository, but existing data will be retained.+installed, you can pass `--postgresql-version=` to the installer to+have it use that version. It will replace the package with the latest+from the PostgreSQL apt repository, but existing data will be+retained.If you have an existing PostgreSQL database, note that Zulip will usethe default `main` as its database name; make sure you're not usingdiff --git a/scripts/lib/install b/scripts/lib/installindex 824b3f0753c..f3bf15e6e9a 100755--- a/scripts/lib/install+++ b/scripts/lib/install@@ -28,9 +28,9 @@ Options:install process; used when this command is run once in a highly-controlledenvironment to produce an image which is used elsewhere. Uncommon.- --postgres-version=12+ --postgresql-version=12Sets the version of PostgreSQL that will be installed.- --postgres-missing-dictionaries+ --postgresql-missing-dictionariesSet postgresql.missing_dictionaries, which alters the initial database. Use withcloud managed databases like RDS. Conflicts with --no-overwrite-settings.--no-init-db@@ -47,7 +47,7 @@ EOF# Shell option parsing. Over time, we'll want to move some of the# environment variables below into this self-documenting system.-args="$(getopt -o '' --long help,hostname:,email:,certbot,self-signed-cert,cacert:,postgres-version:,postgres-missing-dictionaries,no-init-db,no-overwrite-settings,no-dist-upgrade -n "$0" -- "$@")"+args="$(getopt -o '' --long help,hostname:,email:,certbot,self-signed-cert,cacert:,postgresql-version:,postgresql-missing-dictionaries,no-init-db,no-overwrite-settings,no-dist-upgrade -n "$0" -- "$@")"eval "set -- $args"while true; docase "$1" in@@ -81,13 +81,13 @@ while true; doshift;;- --postgres-version)- POSTGRES_VERSION="$2"+ --postgresql-version)+ POSTGRESQL_VERSION="$2"shiftshift;;- --postgres-missing-dictionaries)- POSTGRES_MISSING_DICTIONARIES=1+ --postgresql-missing-dictionaries)+ POSTGRESQL_MISSING_DICTIONARIES=1shift;;--no-init-db)@@ -127,7 +127,7 @@ read -r -a ADDITIONAL_PACKAGES <<<"${ADDITIONAL_PACKAGES:-}"# e.g. zulip::profile::app_frontend for a Zulip frontend server.PUPPET_CLASSES="${PUPPET_CLASSES:-zulip::profile::standalone}"VIRTUALENV_NEEDED="${VIRTUALENV_NEEDED:-yes}"-POSTGRES_VERSION="${POSTGRES_VERSION:-12}"+POSTGRESQL_VERSION="${POSTGRESQL_VERSION:-12}"if [ -n "$SELF_SIGNED_CERT" ] && [ -n "$USE_CERTBOT" ]; thenset +x@@ -137,9 +137,9 @@ if [ -n "$SELF_SIGNED_CERT" ] && [ -n "$USE_CERTBOT" ]; thenexit 1fi-if [ -n "$POSTGRES_MISSING_DICTIONARIES" ] && [ -n "$NO_OVERWRITE_SETTINGS" ]; then+if [ -n "$POSTGRESQL_MISSING_DICTIONARIES" ] && [ -n "$NO_OVERWRITE_SETTINGS" ]; thenset +x- echo "error: --postgres-missing-dictionaries and --no-overwrite-settings are incompatible" >&2+ echo "error: --postgresql-missing-dictionaries and --no-overwrite-settings are incompatible" >&2echo >&2usage >&2exit 1@@ -239,7 +239,7 @@ case ",$PUPPET_CLASSES," in# repository; this may conflict with the existing PostgreSQL.OTHER_PG="$(dpkg --get-selections \| grep -E '^postgresql-[0-9]+\s+install$' \- | grep -v "^postgresql-$POSTGRES_VERSION\b" \+ | grep -v "^postgresql-$POSTGRESQL_VERSION\b" \| cut -f 1)" || trueif [ -n "$OTHER_PG" ]; thenINDENTED="${OTHER_PG//$'\n'/$'\n' }"@@ -250,7 +250,7 @@ The following PostgreSQL servers were found to already be installed:$INDENTED-Zulip needs to install PostgreSQL $POSTGRES_VERSION, but does not wish+Zulip needs to install PostgreSQL $POSTGRESQL_VERSION, but does not wishto uninstall existing databases in order to do so. Remove all otherPostgreSQL servers manually before running the installer:@@ -390,14 +390,14 @@ puppet_classes = $PUPPET_CLASSESdeploy_type = production[postgresql]-version = $POSTGRES_VERSION+version = $POSTGRESQL_VERSIONEOFif [ -n "$USE_CERTBOT" ]; thencrudini --set /etc/zulip/zulip.conf certbot auto_renew yesfi- if [ -n "$POSTGRES_MISSING_DICTIONARIES" ]; then+ if [ -n "$POSTGRESQL_MISSING_DICTIONARIES" ]; thencrudini --set /etc/zulip/zulip.conf postgresql missing_dictionaries truefidiff --git a/tools/ci/production-install b/tools/ci/production-installindex 72013e6cb3c..fc56358b220 100755--- a/tools/ci/production-install+++ b/tools/ci/production-install@@ -28,7 +28,7 @@ fi# Pin to PostgreSQL 10 on Bionic, so we can test upgrading itif [ "$os_version_codename" = "bionic" ]; then- export POSTGRES_VERSION=10+ export POSTGRESQL_VERSION=10fi# Install Zulipdiff --git a/zerver/migrations/0001_initial.py b/zerver/migrations/0001_initial.pyindex 1c0456009db..2bd608be4d9 100644--- a/zerver/migrations/0001_initial.py+++ b/zerver/migrations/0001_initial.py@@ -39,7 +39,7 @@ class Migration(migrations.Migration):('auth', '0001_initial'),]- if settings.POSTGRES_MISSING_DICTIONARIES:+ if settings.POSTGRESQL_MISSING_DICTIONARIES:fts_sql = """CREATE TEXT SEARCH CONFIGURATION zulip.english_us_search (COPY=pg_catalog.english);"""diff --git a/zproject/computed_settings.py b/zproject/computed_settings.pyindex 7c287917518..aede21e4374 100644--- a/zproject/computed_settings.py+++ b/zproject/computed_settings.py@@ -317,7 +317,7 @@ elif REMOTE_POSTGRES_HOST != '':else:DATABASES['default']['OPTIONS']['sslmode'] = 'verify-full'-POSTGRES_MISSING_DICTIONARIES = bool(get_config('postgresql', 'missing_dictionaries', None))+POSTGRESQL_MISSING_DICTIONARIES = bool(get_config('postgresql', 'missing_dictionaries', None))######################################################################### RABBITMQ CONFIGURATION