Tim Abbott
a12909d0d3
deploy-zulip-from-git: Move migrations/puppet skipping options to config.
2016-08-02 14:31:07 -07:00
Tim Abbott
c4d482e722
upgrade-zulip-stage-2: chdir to deploy_path explicitly.
...
This makes rerunning this manually if it fails much more convenient.
2016-08-02 14:31:07 -07:00
Tim Abbott
7e348df198
deploy-zulip-from-git: Cleanup git_repo_url computation.
...
Now we assume the main GitHub zulip.git if a repo isn't specified.
2016-08-02 14:31:07 -07:00
Tim Abbott
dc4b89fb08
deploy-zulip-from-git: Add a cache directory.
2016-08-02 14:31:07 -07:00
Tim Abbott
0ee3178167
Move update-deployment to scripts/deploy-zulip-from-git.
2016-08-02 14:31:07 -07:00
Tim Abbott
fef32af28c
update-deployment: Switch to using update-zulip-part-2.
2016-08-02 14:31:07 -07:00
Tim Abbott
972b42ee7b
upgrade-zulip-stage-2: Only stop services early when needed.
2016-08-02 14:31:07 -07:00
Tim Abbott
5886d3eeec
upgrade-zulip-stage-2: Add --skip-migrations option.
2016-08-02 14:31:07 -07:00
Tim Abbott
759144232f
upgrade-zulip-stage-2: Add --skip-puppet option.
2016-08-02 14:31:07 -07:00
Tim Abbott
8ce55b9789
upgrade-zulip-stage-2: Use argparse for options.
2016-08-02 14:31:07 -07:00
Tim Abbott
3b277c3b1f
install: Give nice error message on installation failure.
2016-07-31 19:24:45 -07:00
Tim Abbott
084d504c39
install: Remove unnecessary cd command at end.
2016-07-31 19:24:38 -07:00
Tim Abbott
8b285ec0ff
puppet: Read camo key from zulip-secrets.conf.
2016-07-31 00:23:24 -07:00
Tim Abbott
3239197fdb
puppet: Silence puppet warnings about missing hiera.yaml.
2016-07-30 21:25:19 -07:00
Tim Abbott
63c757eac3
puppet: add zulipconf function for reading settings from zulip.conf.
...
This makes it convenient for us to have optional user-defined settings
in the main Zulip puppet configuration.
2016-07-30 21:23:12 -07:00
Tim Abbott
af54edcaa7
scripts: Move apt repository setup to its own script.
2016-07-30 21:00:18 -07:00
Tim Abbott
d07bcf060e
install: Cleanup code for PPA setup.
2016-07-30 21:00:01 -07:00
Eklavya Sharma
51ea5c1602
scripts/: Make subprocess calls unicode-aware.
2016-07-26 12:06:41 -07:00
Alexander Trost
6e10236972
Disable auto-service-restart for docker installations.
2016-07-25 16:40:29 -07:00
Eklavya Sharma
11732f9ab0
Make all scripts in scripts/ pass mypy check.
2016-07-24 00:17:21 +05:30
Eklavya Sharma
baa157344c
Patch activate script only in development.
2016-07-21 14:11:41 -07:00
Eklavya Sharma
e7813094d7
Patch activate script to set VIRTUAL_ENV correctly.
...
Patch a virtualenv's activate script to not resolve symlinks when
setting the environment variable VIRTUAL_ENV.
Fixes #1190 .
2016-07-21 14:11:41 -07:00
Tim Abbott
dd6e92a714
setup_venv: Fix missing dependencies on image libraries.
2016-07-20 14:55:45 -07:00
Eklavya Sharma
576a090499
Add libpq-dev to VENV_DEPENDENCIES.
2016-07-20 22:15:06 +05:30
Tim Abbott
35339f5117
Rename local_settings_template to prod_settings_template.
2016-07-19 20:59:59 -07:00
Tim Abbott
19b860ceec
Rename local_settings.py symlink to prod_settings.py.
2016-07-19 20:59:59 -07:00
Tim Abbott
9c9b6176a9
install: Fix feature detection/set -e incompatibility.
...
Previously, the whole script would stop when a feature wasn't
available.
2016-07-19 20:12:27 -07:00
Tim Abbott
8eaa75b90f
setup_venv: Remove unnecessary postgresql-server-dev-all dependency.
...
This package is a dependency for building tsearch_extras, but isn't
needed for building a Zulip virtualenv.
2016-07-19 19:19:42 -07:00
Umair Khan
9f42fda7f4
Use stripped down version of Talon.
2016-07-13 11:24:18 -07:00
Umair Khan
395e053ce3
Revert "Revert "Extract reply from email.""
...
This reverts commit f1ba3ded42
.
2016-07-13 11:24:18 -07:00
Sumana Harihareswara
07afc9d34b
Move production health check doc to separate page.
2016-07-12 15:46:10 -07:00
Tim Abbott
883e991adf
install: Improve support for non-default puppet rules.
...
Previously, the install script would fail if you passed various
non-default puppet rules, since the code to configure and restart
services that runs later on in the install script largely ran
unconditionally, regardless of whether the relevant service was
actually installed on the target system.
This should make the main install script reusable for installing
e.g. a dedicated Postgres server for use with Zulip.
2016-07-12 14:12:09 -07:00
Tim Abbott
80bf7e32a4
Add option to not create a virtualenv.
2016-07-12 14:12:05 -07:00
Eklavya Sharma
f1ba3ded42
Revert "Extract reply from email."
...
This reverts commit f1f48f305e
.
The use of sklearn unfortunately caused a substantial slowdown to the
Zulip provisioning process, which didn't seem worth it for a
relatively minor feature.
2016-07-10 11:30:30 -07:00
Tim Abbott
12028339a3
puppet: Use --detailed-exitcodes to return nonzero exit code on failure.
...
Apparently, puppet has messed up exit codes and doesn't by default
return the usual 0=success, nonzero=failure codes. By default, it
seems to always return 0; and with `--detailed-exitcodes`, it returns
the complicated thing documented in the comments.
We fix this by checking the exit code and translating it to what we
actually care about, namely whether errors occurred.
See https://tickets.puppetlabs.com/browse/PUP-2754 for details.
Fixes #1094 .
2016-07-08 12:11:44 -07:00
Umair Khan
f1f48f305e
Extract reply from email.
2016-07-08 10:58:25 -07:00
Eklavya Sharma
7e020e3dae
scripts/lib/setup_venv.py: Use universal_newlines=True.
...
In python 3, subprocess uses bytes for input and output if
universal_newlines=False (the default). It uses str for input and
output if universal_newlines=True.
Since we're dealing with strings here, add universal_newlines=True
to subprocess.check_output calls.
2016-07-06 13:50:55 -07:00
Eklavya Sharma
f1b72c5f41
Upgrade wheel before installing venv requirements.
...
This is required because an older wheel version causes problems
when building wheels on python 3.
2016-07-02 11:53:26 -07:00
Eklavya Sharma
0b714ea6c6
Use python2-specific requirements files.
2016-07-02 11:53:26 -07:00
Tim Abbott
f094123fd3
install: Add support for installing Xenial systems.
...
This isn't fully supported yet, but merging this makes it more
convenient to test Zulip on Ubuntu Xenial.
2016-06-28 23:05:38 -07:00
Tim Abbott
4aae4de294
Properly cache production virtualenvs in Travis CI.
...
Previously, the --travis argument wasn't available to the `setup_venv`
code when creating the production virtualenv.
2016-06-28 12:04:11 -07:00
Tim Abbott
7ed0ab8c4a
Ensure Zulip virtualenvs are world-readable.
...
This is important for both ensuring the Nagios checks work correctly
in production, as well as making sure the `zulip` user can access the
virtualenv (owned by the `travis` user) in Travis CI.
2016-06-28 12:03:01 -07:00
Tim Abbott
4a7913bc22
setup_venv: Use correct VENV_CACHE_PATH for production suite.
2016-06-27 21:16:22 -07:00
Eklavya Sharma
a9835c0ab2
Activate virtualenv in production Python code.
...
The manage.py change effectively switches the Zulip production server
to use the virtualenv, since all of our supervisord commands for the
various Python services go through manage.py.
Additionally, this migrates the production scripts and Nagios plugins
to use the virtualenv as well.
2016-06-27 19:55:35 -07:00
Eklavya Sharma
64affb83f9
Create a virtualenv when installing/upgrading production instances.
2016-06-27 19:55:11 -07:00
Tim Abbott
101820bc29
Move docker development environment scripts to tools/.
...
scripts/ is for scripts which are used in production.
2016-06-27 13:38:06 -07:00
Tim Abbott
dfd8fede4a
setup_venv: Add missing build essential dependencies.
...
Apparently, c74a74dc74
introduced a bug
where we are no longer correctly depending on build-essential as part
of the Zulip development environment installation process.
Fixes #1111 .
2016-06-24 09:11:10 -07:00
Eklavya Sharma
9482cdccf4
scripts/lib/setup-venv.py: Accept None as target_venv_path.
...
If target_venv_path in setup_virtualenv is None, create a virtualenv
named 'venv' but don't make a symlink to it. Also return
cached_venv_path.
2016-06-23 14:17:17 -07:00
Eklavya Sharma
0365a4a9f2
Factor out apt dependencies for setting up virtualenv.
...
Move apt dependencies for creating a virtualenv from provision.py
to scripts/lib/setup_venv.py.
2016-06-23 14:17:17 -07:00
Tim Abbott
d3f3046629
Add python-six to early installer dependencies.
...
Since we're now using python-six in zulip-puppet-apply, we need to
install python-six before calling into zulip-puppet-apply.
2016-06-22 08:11:34 -07:00