Tim Abbott
6e1e4aaef6
postgres-init-db: Add POSTGRES_USER argument.
2016-04-26 15:27:35 -07:00
Tim Abbott
dc772518e7
Don't chown supervisor socket if it doesn't exist.
2016-04-26 15:27:35 -07:00
Luke Faraone
9d9bfb27ef
Correct shell quoting around $DEFAULT_USER in terminate-psql-sessions
...
Previously, we used shell quoting that would result in the shell variable not
being substituted. Instead, we use `"`s that will allow for variable
substitution.
2016-02-19 02:09:50 +00:00
Vladislav Manchev
dfbea01c8f
Add support for running OpenBSD in development environment.
2016-01-21 22:33:55 -08:00
Alexander Trost
84f7a1f1ea
Make rabbitmq, redis, and memcached configurable via user settings.py.
...
Previously these were hardcoded in zproject/settings.py to be accessed
on localhost.
[Modified by Tim Abbott to adjust comments and fix configure-rabbitmq]
2016-01-21 22:07:56 -08:00
Reid Barton
b2a92877ff
Don't print echo commands in initialize-database post-success message.
2015-12-25 10:38:44 -08:00
Reid Barton
64a142f0a2
Fix running postgres-init-db via a relative path.
...
If the user runs ./scripts/setup/postgres-init-db, then dirname "$0"
would no longer refer to the correct directory after cd /.
2015-12-25 10:06:45 -08:00
Tim Abbott
827babdf29
terminate-psql-sessions: Remove dependency on bc.
...
Fixes #281 .
2015-11-11 21:35:16 -08:00
Tim Abbott
421560af21
postgres-init-db: Stop all services before recreating database.
2015-11-01 18:11:39 -08:00
Tim Abbott
3c31f9a2e3
Drop database users prior to DROP/CREATE database.
...
This fixes an annoying issue where one tries to rebuild the database,
and it fails due to there being existing connections.
The one thing that is potentially scary about this implementation is
that it means it's now a lot easier to accidentally drop your
production database by running the wrong script; might be worth adding
a "--force" flag controlling this behavior or something.
Thanks to Nemanja Stanarevic and Neeraj Wahi for prototypes of this
implementation! They did most of the work and testing for this.
2015-11-01 18:11:39 -08:00
Tim Abbott
f3783fb4a1
Apply Python 3 futurize transform libfuturize.fixes.fix_print_with_import.
2015-11-01 09:26:16 -08:00
Steven Oud
d5435fad1d
Consistently use /usr/bin/env python2.7 in shebangs and commands.
2015-10-21 22:58:21 +00:00
Tim Abbott
e75ba630fb
initialize-database: Make management command errors fatal again.
...
We accidentally made this non-fatal when we added the nice error
output telling users to run postgres-init-db.
2015-10-15 12:21:46 -04:00
Tim Abbott
bf694fa832
Flush memcached whenever we drop the databases.
...
This fixes some issues that we've had where commands will fail is
confusing ways after the database is rebuilt because data from before
the database was dropped is still in the memcached cache.
2015-10-15 12:18:41 -04: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
Tim Abbott
92aebe595b
Dramatically extend post-install documentation for production Zulip.
2015-09-30 09:04:14 -07:00
Tim Abbott
5bf66e04fc
initialize-database: Print nice instructions for how to redo if fails.
...
Most of our installation process is idempotent, but this step in
particular is not, so it's important to provide a clear error message
about how to proceed.
2015-09-29 18:27:27 -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
Tim Abbott
2348a83678
postgres-init-db: Fix running with cwd=/root.
...
(imported from commit d2ac25fa8c54b89eed80e941b3eacf1a4c2f5546)
2015-09-25 00:22:15 -07:00
Tim Abbott
cf17168c9f
Move prod README to root of repository.
...
(imported from commit db108ffa7f88f22610ecee085abdcd6c5a2bb681)
2015-09-22 21:22:11 -07:00
Reid Barton
5be0c2902e
Connect to the zulip database correctly in postgres-init-db
...
(imported from commit b6ab80567ff5d229a00c7d2cf5866bca0ee9c7c5)
2015-08-29 12:07:33 -07: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
Reid Barton
d8b44606a3
Make configure-rabbitmq fail on error
...
If there's a problem with Django settings then RMQPW would just be
empty, causing more confusing errors downstream.
(imported from commit 5948b1a15eb92fc032ea02e499be58365d8e9ecb)
2015-08-28 09:37:58 -07:00
Reid Barton
4e61c06903
Fix postgres syntax when creating zulip schema in production
...
(imported from commit 51ba85b995e4b5044f914163dab7f2ae14df908f)
2015-08-28 09:37:46 -07:00
Reid Barton
5768fd7f49
Remove reference to Zulip deployment key from Zulip Voyager README
...
(imported from commit 74a4f86839fb76eb175016453d91b916b9ce416d)
2015-08-23 21:44:27 -07:00
Reid Barton
a3d85f501b
Create tsearch_extras in production database setup
...
(imported from commit e6c699b06f022d923b57ccee7ad778f870bf890d)
2015-08-21 16:54:35 -07:00
Tim Abbott
d281fc75fd
Rename generate_voyager_secrets.py => generate_secrets.py.
...
(imported from commit c2f370c3b241601b4f6883d3953ceec1efda71be)
2015-08-21 10:33:36 -07:00
David Roe
e3f38acbce
Enterprise => Voyager.
...
(imported from commit 41b9a67301aeaf5fd40bbbb8f34a326ca98431fd)
2015-08-21 10:33:35 -07:00
David Roe
3f7cb34b00
enterprise => voyager
...
(imported from commit 04be792bb480d5e5db1c91d296d1000cf1682571)
2015-08-21 10:33:35 -07:00
Reid Barton
362f9c6c5f
Django 1.7: syncdb and migrate are now synonyms
...
(imported from commit b8a1b2476892bab2418240b04deea6aa40ff1b03)
2015-08-20 23:01:26 -07:00
Yoyo Zhou
ec5ed87ca0
Make get_secret return None instead of an exception if the secret isn't defined.
...
Remove empty key generation from generate_enterprise_secrets, since get_secret ignores missing keys now.
(imported from commit 32d61e3058f0d41bfb4b17775e581a3c84540fe7)
2015-08-20 21:54:38 -07:00
Tim Abbott
9000d27f12
Update generate_enterprise_secrets to support running in production.
...
(imported from commit 1051f668ebe684cc60ba4444e815ef60398fad61)
2015-08-20 17:33:16 -07:00
Cat Miller
0a20f168a7
Auto-generate dev-secrets file.
...
Source LOCAL_DATABASE_PASSWORD and INITIAL_PASSWORD_SALT from the secrets file.
Fix the creation of pgpass file.
Tim's note: This will definitely break the original purpose of the
tool but it should be pretty easy to add that back as an option.
(imported from commit 8ab31ea2b7cbc80a4ad2e843a2529313fad8f5cf)
2015-08-20 00:20:44 -07:00
Tim Abbott
0dae10eab4
Remove unused secret HASH_SALT.
...
(imported from commit 831c4cb7680b7bf8dadbd930195175e9a4186356)
2015-08-18 20:17:48 -07:00
Luke Faraone
cf7ea9bef9
Allow configure-rabbitmq to be run w/o sudo
...
(imported from commit 98e820d92b42420d6851a967f6675940ee4d8217)
2015-08-16 16:45:07 -07:00
Tim Abbott
9a6f34a807
Make generate_enterprise_secrets.py work regardless of path.
...
(imported from commit c1ab8231fbe907a32b18c02a00cee51011abbb21)
2013-11-14 09:10:10 -05:00
Tim Abbott
037460b24c
Fix permissions on install script.
...
(imported from commit af71b3a4988059c58e741bf94d0c28383c08f704)
2013-11-14 08:56:06 -05:00
Tim Abbott
486fcfa53f
README
...
(imported from commit c02dfbd15ab6bac5a450d04075b15a7c44e8ddfe)
2013-11-14 08:19:20 -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
c54322f76a
install: Move DROP SCHEMA PUBLIC to run in zulip database.
...
(imported from commit 1eef44e7255b8fe1314f7763ebfc6c04083305e5)
2013-11-13 15:35:45 -05:00
Tim Abbott
c842b42b12
postgres-init-db: The zulip user doesn't need CREATE DB on enterprise.
...
Also clean up the series of similar blocks.
(imported from commit fdb468bd6be3077bdbf2d72289064397ea04f27a)
2013-11-13 15:35:45 -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
6aaa2b1a24
Create the zulip database owned by zulip.
...
(imported from commit cc6e895d9e97bdd9d084c7b1a7204bd5b7ae5cd8)
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
b2d4883165
postgres-init-db: Split into internal and external versions for now.
...
(imported from commit 3516b1377e5914dac2b504961922ef8d08148d1f)
2013-11-13 12:02:50 -05:00
Tim Abbott
f4a9e99498
puppet: Move the postgres dictionary symlink creation to puppet.
...
(imported from commit 823f6683e3d8f3604da68e55dd6761ecb38d4b63)
2013-11-13 12:02:50 -05:00