Commit Graph

35 Commits

Author SHA1 Message Date
Tim Abbott 83738f7e6d install: Use a period at end of root error message. 2021-06-23 08:42:46 -07:00
Anders Kaseorg 1d05a71b5d install, provision: Treat all nonzero exit codes as failure, not just 1.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-19 11:22:11 -07:00
Anders Kaseorg 392175d6e8 Use #!/usr/bin/env for bash shebangs.
/bin/sh and /usr/bin/env are the only two binaries that NixOS provides
at a fixed path (outside a buildFHSUserEnv sandbox).

This discussion was split from #11004.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-12-17 17:21:08 -08:00
Anders Kaseorg edc5a7bdd0 install: Fix shellcheck warnings.
In scripts/setup/install line 18:
if [ $failed = 1 ]; then
     ^-- SC2086: Double quote to prevent globbing and word splitting.

In scripts/setup/install line 19:
    echo -e "\033[0;31m"
             ^-- SC1117: Backslash is literal in "\0". Prefer explicit escaping: "\\0".

In scripts/setup/install line 25:
    echo -e "\033[0m"
             ^-- SC1117: Backslash is literal in "\0". Prefer explicit escaping: "\\0".

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-08-03 09:15:26 -07:00
Tim Abbott 8c8613c3c7 install: Add comments documenting installer wrapper. 2017-10-01 15:48:36 -07:00
Feorlen 10ccfcdc8e Set umask 022 before starting prod install.
Fixes #2372.
2017-03-25 23:59:44 -07:00
Tim Abbott 3b277c3b1f install: Give nice error message on installation failure. 2016-07-31 19:24:45 -07:00
Raphael 0608e32eeb Cause install to return 1 on failure.
This fixes issue #123. Namely, the script in scripts/setup/install was
returning 0. Adding `set -e` and `set -o pipeline` causes the install
script to exit and return 1 if any part fails, including piping output
(`set -o pipeline` does this).
2015-10-07 08:46:16 -04:00
Ged Lawrenson 21b7048e54 install: Verify that the script has sufficient privileges. 2015-09-30 10:55:49 -07:00
Anders Kaseorg 0d12dfd06f Improve shell quoting hygiene
Most of these problems were found by ShellCheck
(http://www.shellcheck.net).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-09-25 23:25:08 -04:00
Reid Barton 942e97d886 Create directory to write log of initial installation into
(imported from commit fa352a7b4f57379df14249fd5f168249ead64777)
2015-08-28 09:40:30 -07:00
Tim Abbott 037460b24c Fix permissions on install script.
(imported from commit af71b3a4988059c58e741bf94d0c28383c08f704)
2013-11-14 08:56:06 -05:00
Zev Benjamin 87a6838e0e enterprise: Log the output of upgrade-zulip and install scripts
We may eventually want to rotate the log files, but this seems good
enough for now.

(imported from commit 9a54fa6b40bc62f68e52ef552c1a676856b21829)
2013-11-14 08:08:59 -05:00
Zev Benjamin 67ed16a12e enterprise: Make /root/zulip be a symlink to ~zulip/deployments/next
(imported from commit 2a0e7f99fe4517e45ad2794b7fa464df08d40db1)
2013-11-13 16:26:04 -05:00
Tim Abbott b4ace85d3a Make sure everything under /home/zulip is owned by zulip.
(imported from commit f6c8b6c0a6dc8b7ada79cb4951818f06faa873e7)
2013-11-13 12:07:15 -05:00
Tim Abbott 0299964051 Make the Zulip user able to edit settings.py.
(imported from commit c69ff2b2e9f176ae2e78b76a7b022e00d09e7c00)
2013-11-13 12:02:50 -05:00
Tim Abbott 6bcd5a7ffc Update installation instructions to include configuring the app.
(imported from commit 89395815c32416ec0636efcff12eb76f5d890bbd)
2013-11-13 12:02:50 -05:00
Tim Abbott 0ec8a7a2f1 install: Make sure we own everything under /var/log/zulip
supervisord may start up during the install process and do a bunch of
incorrect stuff, with the net effect of creating files in there owned
by root.

(imported from commit 28379af9680bf9d3c72da196f329abdf8c82c6be)
2013-11-13 12:02:50 -05:00
Tim Abbott 45f21cbb14 Setup the database after the Zulip user is fully setup.
Otherwise we may run into permissions issues.

(imported from commit a8013c84796d16146336c2809dcd8cd935b43a7b)
2013-11-13 12:02:50 -05:00
Tim Abbott 270f5730fa Rename local server => enterprise in some scripts.
(imported from commit 98cdb4c2e1be5a6abb59821eb32f749c058b773b)
2013-11-12 15:57:42 -05:00
Tim Abbott 966fde261a puppet: Rename local_server => enterprise.
(imported from commit 5faa269df5937f6db99098e44aaea7d0a4f2c14a)
2013-11-12 15:57:02 -05:00
Tim Abbott 57b5231063 install: Script the install process more fully.
We can probably later merge the create-database code with that of our
internal do-destroy-rebuild-database.

(imported from commit 323932dbf2eb916545d6ebdda70eb1f5e1abb181)
2013-11-12 15:57:01 -05:00
Tim Abbott 2e41515cc3 localserver: Make the zulip user own supervisor.sock.
We really should fix this in supervisor itself, since in particular we
lose this setting every time the system is rebooted.

(imported from commit a700078b158808340f5f30812235449c74508cde)
2013-11-12 15:57:01 -05:00
Tim Abbott 5f7c530285 install: Set puppet deploy type for local server.
(imported from commit c8b7ac3a7741470851f6fa9c27677e1238c1dce7)
2013-11-12 09:34:25 -05:00
Tim Abbott bf0fda7426 Use the enterprise apt key when installing local server.
(imported from commit 24fa7474a77cac7b1d033c6732de6873d4aa9880)
2013-11-12 09:34:25 -05:00
Tim Abbott 30e5543eae install: Use mkdir -p so that running it again on error works.
(imported from commit 361985ce7463c9ccaa7b2eaf1b23ca262e64560d)
2013-11-12 09:34:25 -05:00
Tim Abbott cb72df39b1 install: Configure rabbitmq during setup process.
(imported from commit c610e6bac9a1d6f2c856664ba1e17bbfcc5e551a)
2013-11-12 09:34:11 -05:00
Tim Abbott 8eaef81f6b localserver: Install site settings via a symlink to /etc/zulip/settings.py.
(imported from commit b0bedfe3fc4e9039f30061ae9cbdc34069f1f284)
2013-11-12 09:34:07 -05:00
Tim Abbott 92a230acaa install: Unpack the initial Zulip tarball in deployments/
(imported from commit 2b340aacaa5233fd8708d6392e3c9210e866acbd)
2013-11-12 09:22:50 -05:00
Tim Abbott 5b71ceb03c localserver: Setup apt repo first in install script.
(imported from commit d26e3dffcfa2d7feeb58eb8c01e17460a8dfced0)
2013-11-12 09:12:06 -05:00
Tim Abbott 6b9ebfdad5 localserver: Fix leftover code in install script.
This should have been removed when forking from our internal install
script.

(imported from commit cb0c0790ba8343d62ef5f5171b219c458a16e906)
2013-11-05 17:06:31 -05:00
Tim Abbott 6fea6a7856 Make our install script executable.
(imported from commit 26be3f76b2654701b7361f2b369e9b82eeeda54e)
2013-11-05 17:06:31 -05:00
Zev Benjamin 787215d743 [manual] Switch over to new /etc/zulip/zulip.conf config file
Run the following commands as root before deploying this branch:
 # /root/zulip/tools/migrate-server-config
 # rm /etc/zulip/machinetype /etc/zulip/server /etc/zulip/local /etc/humbug-machinetype /etc/humbug-server /etc/humbug-local

(imported from commit aa7dcc50d2f4792ce33834f14761e76512fca252)
2013-11-05 14:14:19 -05:00
Tim Abbott a53c7c0f45 Update local server install script for puppet move.
(imported from commit 4bd7292dd54e9091747dce44b41b57a42496bc3b)
2013-11-01 10:30:17 -04:00
Tim Abbott 806fab9fe9 localserver: Initial prototype for an install script.
(imported from commit b0afd6493e2d5878e3c31d17f0bdee19b34062a5)
2013-10-30 20:39:39 -04:00