Tim Abbott
fe0c4cad85
check-rabbitmq-consumers: Go back to hardcoding for now.
...
This should fix the production test suite in Travis CI, so that we can
debug what's broken here offline.
2017-02-22 22:58:59 -08:00
Tim Abbott
b81add60fe
check-rabbitmq-consumers: Fix queue_workers call.
2017-02-22 00:48:43 -08:00
Tim Abbott
aa6567ee34
queue_workers: Fix confusing --queue_type argument name.
2017-02-22 00:23:26 -08:00
Tim Abbott
19896460f0
nagios: Fix RabbitMQ Nagios checks running Django as root.
...
This can cause problems by making the /var/log/zulip files owned by
root (not zulip) and thus not writable by the Zulip user.
2017-02-22 00:20:57 -08:00
Tim Abbott
51d3ab1cb7
initialize-database: Clean up final instructions.
...
Fixes #3678 .
2017-02-21 20:19:16 -08:00
Tim Abbott
620f1e444e
travis: Fix various bugs in new queue worker test.
...
* Now queue_workers.py sorts queue names and prints them on their own
line. Previously it's output was nondeterministic.
* Simplified grep strategy for removing the "test" worker.
2017-02-19 21:17:42 -08:00
Tim Abbott
333062f08e
nagios: Automate queue list in check-rabbitmq-consumers.
2017-02-19 16:19:55 -08:00
Tim Abbott
d6bbcd2737
travis: Automate updates to production-helper Nagios test.
...
This list was likely to end up out of date quickly, since it wasn't
documented that you need to update it when adding a queue. The best
solution is to just not require it to be updated.
2017-02-19 16:19:53 -08:00
Tim Abbott
34046c1f55
check-rabbitmq-consumers: Add missing embed_links consumer.
2017-02-19 13:12:00 -08:00
Tim Abbott
213af24e47
check-rabbitmq-consumers: Reformat worker_queues list.
2017-02-19 13:12:00 -08:00
Tim Abbott
473c0ee1fe
mypy: Remove now-unused type: ignores.
2017-02-18 17:01:01 -08:00
Tim Abbott
609082c475
puppet: Remove hardcoding of /root/zulip from puppet path.
...
This is an important prerequisite to being able to remove dependence
on the /root/zulip symlink altogether.
2017-02-08 11:13:19 -08:00
Tim Abbott
31d4f99573
upgrade: Stop trying to copy node_modules out of tarballs.
...
Now that we no longer use node_modules at all in production (it's only
used to generate static assets), we don't include `node_modules` in
the production tarballs, and thus we shouldn't attempt to copy
`node_modules` out of the production tarballs when installing.
Fixes a regression introduced in
d71f2e7b9b
.
2017-02-07 10:39:31 -08:00
Tim Abbott
126b1c4edc
upgrade: Don't require authors updates deploying from Git.
...
Fixes #3392 .
2017-01-23 23:00:09 -08:00
Tim Abbott
4e171ce787
lint: Clean up E126 PEP-8 rule.
2017-01-23 22:06:13 -08:00
Tim Abbott
de99f48ce7
lint: Clean up E401 PEP-8 rule.
2017-01-23 21:36:39 -08:00
Tim Abbott
22d1aa396b
lint: Clean up W503 PEP-8 warning.
2017-01-23 20:50:04 -08:00
Ayush Goyal
a85b539c4a
zulip_tools: Improve color and copy for run() errors.
...
Tweaks to the text are edited by tabbott.
2017-01-17 14:37:15 -08:00
Tim Abbott
747f66bfe1
docs: Add README.md files for scripts/ and tools/.
2017-01-17 11:01:27 -08:00
Tim Abbott
1d5edff927
setup_venv: Give up if virtualenv-clone isn't working.
...
virtualenv-clone can sometimes fail if the old virtualenv is
broken; in that case, we can just make a new one.
2017-01-09 11:21:42 -08:00
Tim Abbott
54acbc41ed
prod: Ensure the Zulip version of node is installed.
2017-01-06 16:18:29 -08:00
Tim Abbott
e4b065e03a
Move tools/setup/install-node to scripts/setup/.
2017-01-06 16:18:29 -08:00
Tim Abbott
374e900432
upgrade-zulip: Fix bug in migrations detection.
2017-01-06 16:18:29 -08:00
Tim Abbott
e5fbea1007
upgrade-zulip: Move static asset compilation before shutdown.
...
This saves about a minute of downtime when using
upgrade-zulip-from-git in the default configuration.
It should also save several seconds of downtime when upgrading to a
production release tarball as well.
2017-01-06 14:04:54 -08:00
Tim Abbott
90ee8d1207
upgrade-zulip: Only pause for migrations if not current.
...
This saves about 1s of downtime when doing a no-op upgrade with the
default settings. Small, but worthwhile.
2017-01-06 14:03:55 -08:00
Saumya Rawat
d3a7d0202f
dev: Auto-create log directory in management command.
...
Check 'zulip/var/log' folder exists and create if not as FileHandler only checks for existence of log file.
2016-12-17 17:18:49 -08:00
Umair Khan
336a041ac0
Django 1.10: Use uWSGI.
...
Fixes : #1121
With some tweaks by tabbott to make the number of processes configurable.
2016-12-13 21:40:43 -08:00
Umair Khan
fda0387695
Create Python version agnostic venv link for prod.
...
This link points to either 'zulip-venv' or 'zulip-py3-venv' and makes
uWSGI configration very easy.
2016-12-13 21:40:43 -08:00
Tim Abbott
95a49f6ea2
node_cache: Fix buggy production deployment code.
...
The previous version of the production deployment code for release
tarballs did not correctly install the node_modules directory.
2016-12-08 10:34:04 -08:00
anirudhjain75
beaa62cafa
mypy: Convert several directories to use typing.Text.
...
Specifically, these directories are converted: [analytics/, scripts/,
tools/, zerver/management/, zilencer/, zproject/]
2016-12-07 20:51:05 -08:00
AZtheAsian
c23f9e0df7
pep8: Fix E111 violations
2016-12-01 14:18:11 -08:00
Tim Abbott
fd7cb10964
install: Check whether the system has at least 2GB RAM.
...
This should eliminate a common class of user error installing Zulip.
Fixes #2290 , fixes #2320 .
2016-11-30 16:07:57 -08:00
Tommy Ip
e4091c6413
pep8: Fix E222 violations.
2016-11-30 21:49:02 +00:00
Tommy Ip
46b7d54b3e
pep8: Fix E701 violations.
2016-11-30 20:45:09 +00:00
Igor Tokarev
e6ae53cbff
install: Add clear error message if upstart is installed on Xenial.
...
Fixes #2199 .
2016-11-29 19:16:26 -08:00
Rafid Aslam
7a2282986a
pep8: Fix E225 pep8 violations.
2016-11-28 15:21:15 -08:00
Anders Kaseorg
78d6c3d7e9
install: Fix RabbitMQ node name if RabbitMQ is not installed.
...
This indirectly causes the RabbitMQ node name for new Zulip
installations to default to zulip@localhost, which would eliminate the
persistent problems we have had
Fixes #194 , #465 , #1375 , #1751 .
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-26 18:54:29 -08:00
Anders Kaseorg
207cf6302b
Always start python via shebang lines.
...
This is preparation for supporting using Python 3 in production.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-26 14:46:37 -08:00
Anders Kaseorg
2d6525df04
install: Install python3, python3-six
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-26 13:26:18 -08:00
Anders Kaseorg
573ec14955
Remove shebang line from non-scripts
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-26 13:20:22 -08:00
Anders Kaseorg
712c98cb48
Use zulip-py3-venv when running on Python 3
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-26 13:20:22 -08:00
Tim Abbott
f5935e81c7
install: Support being run not directly from /root/zulip.
...
This adds a dependency on the realpath package on trusty; we could try
to remove it if needed, but given that realpath is included in
coreutils on Xenial (and presumably anything else modern), I think
it's reasonable to add it.
Fixes #1797 .
2016-11-18 19:56:58 -08:00
Tim Abbott
5b35aada7c
zulip_tools: Fix run to not eat error output.
...
We fix this by just using `subprocess.check_call`.
2016-10-27 12:26:01 -07:00
Tim Abbott
8e82257444
Fix node_cache code to not require root.
...
The previous code caused problems using a system where the zulip user
doesn't have sudo rights.
2016-10-25 17:52:19 -07:00
Tim Abbott
41b0079ab2
node_cache: Fix success_stamp logic.
...
Previously, success_stamp was touched whenever we used a particular
node_modules version; it makes more sense to only touch it when the
node_modules directory has actually changed.
2016-10-25 17:52:17 -07:00
Umair Khan
e428f3feda
Run apt-get update only if sources.list has changed.
...
Fixes : #2025
2016-10-19 16:23:21 +05:00
Tim Abbott
4a4664d268
mypy: Remove a bunch of now-unnecessary type: ignore annotations.
...
Since mypy and typeshed have advanced a lot over the last several
months, we no longer need these `type: ignore` annotations.
2016-10-17 11:48:34 -07:00
Tim Abbott
fc20c86d8d
install: Move apt-get update into setup-apt-repo.
2016-10-16 01:13:50 -07:00
Tim Abbott
fcde846b58
setup_venv: Fix handling of Git requirements.
...
get_package_names did not correctly strip the GitHub URLs from package
names, resulting in the "package names" for our dependencies installed
from Git being tracked with the complete sha1sum included in the name.
This meant that upgrading our virtualenvs incorrectly ended up
resorting to creating an entirely new virtualenv whenever we changed a
dependency that had previously been installed from GitHub URLs.
2016-10-16 01:10:43 -07:00
Tim Abbott
7c16172f9e
node_cache: Fix buggy annotations for stdout/stderr.
2016-10-15 22:53:28 -07:00