mirror of https://github.com/zulip/zulip.git
install: Move PUPPET_CLASSES env var to --puppet-classes argument.
`--no-init-db` is used to silence the need for `--hostname` and `--email` arguments; it is a proxy for "this is not a frontend host." We would ideally like to use `has_class` to know if the user's provided puppet classes are include an `app_frontend`, and thus `--hostname` and `--email` are required -- but doing that requires several other steps, and we would like this feedback to be immediate. We make the presence of `--puppet-classes` equivalent to `--no-init-db`, since nearly every configuration with `--puppet-classes` does not install both a database and a frontend, which is what is required to initialize a database.
This commit is contained in:
parent
89484fbbe6
commit
7187146422
|
@ -199,7 +199,7 @@ For example, to install a Zulip Redis server on a machine, you can run
|
||||||
the following after unpacking a Zulip production release tarball:
|
the following after unpacking a Zulip production release tarball:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
env PUPPET_CLASSES=zulip::profile::redis ./scripts/setup/install
|
./scripts/setup/install --puppet-classes zulip::profile::redis
|
||||||
```
|
```
|
||||||
|
|
||||||
All puppet modules under `zulip::profile` are allowed to be configured
|
All puppet modules under `zulip::profile` are allowed to be configured
|
||||||
|
@ -234,10 +234,10 @@ Follow the [standard instructions](install.md), with modified `install`
|
||||||
arguments:
|
arguments:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export PUPPET_CLASSES=zulip::profile::standalone_nodb
|
|
||||||
./zulip-server-*/scripts/setup/install --certbot \
|
./zulip-server-*/scripts/setup/install --certbot \
|
||||||
--email=YOUR_EMAIL --hostname=YOUR_HOSTNAME \
|
--email=YOUR_EMAIL --hostname=YOUR_HOSTNAME \
|
||||||
--no-init-db --postgresql-missing-dictionaries
|
--puppet-classes=zulip::profile::standalone_nodb \
|
||||||
|
--postgresql-missing-dictionaries
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Step 2: Create the PostgreSQL database
|
#### Step 2: Create the PostgreSQL database
|
||||||
|
|
|
@ -10,12 +10,14 @@ Usage:
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--hostname=zulip.example.com
|
--hostname=zulip.example.com
|
||||||
The user-accessible domain name for this Zulip server, i.e., what users will type
|
The user-accessible domain name for this Zulip server, i.e.,
|
||||||
in their web browser. Required, unless --no-init-db is set and --certbot is not.
|
what users will type in their web browser. Required, unless
|
||||||
|
--no-init-db or --puppet-classes is set, and --certbot is not.
|
||||||
|
|
||||||
--email=zulip-admin@example.com
|
--email=zulip-admin@example.com
|
||||||
The email address of the person or team who should get support and error emails
|
The email address of the person or team who should get support
|
||||||
from this Zulip server. Required, unless --no-init-db is set and --certbot is
|
and error emails from this Zulip server. Required, unless
|
||||||
not.
|
--no-init-db or --puppet-classes is set and --certbot is not.
|
||||||
|
|
||||||
--certbot
|
--certbot
|
||||||
Obtains a free SSL certificate for the server using Certbot,
|
Obtains a free SSL certificate for the server using Certbot,
|
||||||
|
@ -37,9 +39,13 @@ Options:
|
||||||
--postgresql-missing-dictionaries
|
--postgresql-missing-dictionaries
|
||||||
Set postgresql.missing_dictionaries, which alters the initial database. Use with
|
Set postgresql.missing_dictionaries, which alters the initial database. Use with
|
||||||
cloud managed databases like RDS. Conflicts with --no-overwrite-settings.
|
cloud managed databases like RDS. Conflicts with --no-overwrite-settings.
|
||||||
|
|
||||||
--no-init-db
|
--no-init-db
|
||||||
Does not do any database initialization; use when you already have a Zulip
|
Does not do any database initialization; use when you already have a Zulip
|
||||||
database.
|
database.
|
||||||
|
--puppet-classes
|
||||||
|
Comma-separated list of Puppet classes to install; defaults to
|
||||||
|
'zulip:::profile::standalone'. Implies --no-init-db.
|
||||||
|
|
||||||
--no-overwrite-settings
|
--no-overwrite-settings
|
||||||
Preserve existing `/etc/zulip` configuration files.
|
Preserve existing `/etc/zulip` configuration files.
|
||||||
|
@ -119,6 +125,12 @@ while true; do
|
||||||
NO_INIT_DB=1
|
NO_INIT_DB=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--puppet-classes)
|
||||||
|
PUPPET_CLASSES="$2"
|
||||||
|
NO_INIT_DB=1
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
--no-overwrite-settings)
|
--no-overwrite-settings)
|
||||||
NO_OVERWRITE_SETTINGS=1
|
NO_OVERWRITE_SETTINGS=1
|
||||||
|
|
|
@ -71,11 +71,8 @@ git clone "$REPO_URL" zulip -b "$BRANCH"
|
||||||
git -C zulip checkout "$BRANCH"
|
git -C zulip checkout "$BRANCH"
|
||||||
|
|
||||||
(
|
(
|
||||||
export PUPPET_CLASSES="$FULL_ROLES"
|
|
||||||
export APT_OPTIONS="-o Dpkg::Options::=--force-confnew"
|
export APT_OPTIONS="-o Dpkg::Options::=--force-confnew"
|
||||||
/root/zulip/scripts/setup/install \
|
/root/zulip/scripts/setup/install --puppet-classes "$FULL_ROLES"
|
||||||
--self-signed-cert \
|
|
||||||
--no-init-db
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Delete the ubuntu user
|
# Delete the ubuntu user
|
||||||
|
|
Loading…
Reference in New Issue