Commit Graph

59 Commits

Author SHA1 Message Date
Tim Abbott 9970341ede Fix caching of install-phantomjs library in Travis CI. 2016-05-03 14:48:21 -07:00
Tim Abbott 9f786a5131 provision: Add caching of virtualenvs by sha1sum of requirements.txt.
This should save a couple minutes on the time it takes to provision a
Zulip environment on a machine that has provisioned with the same
requirements.txt file content before.

We can't yet use this in Travis CI because Travis CI doesn't support
using both sudo and caching in the same build.
2016-05-02 23:08:59 -07:00
Tim Abbott ef95917da5 provision: Refactor virtualenv creation into a function. 2016-05-02 22:35:18 -07:00
Eklavya Sharma 1041115b38 Add code to install mypy from provision.py. 2016-04-28 12:28:24 -07:00
Tim Abbott 7d64bd51f5 provision: Don't install recursive pip dependencies.
This should prevent future issues like the wrong cryptography module
being in requirements.txt.
2016-04-10 17:37:52 -07:00
Tim Abbott b29cb1dfb8 provision: Remove now-unnecessary patching of PATH. 2016-04-10 17:37:52 -07:00
Tim Abbott 6de15606f9 provision: Add preliminary support for Ubuntu Xenial.
This won't actually work because we don't have a tsearch_extras
package built for postgres 9.5.
2016-04-10 17:37:52 -07:00
Tim Abbott 3c74bf000f provision: Add installing recent npm to provisioning process.
This fixes a problem where the version of NPM installed in development
environments was too old.
2016-04-10 17:37:43 -07:00
Tim Abbott 5733c32705 Fix install-phantomjs being called before chdir to ZULIP_PATH. 2016-04-10 17:33:37 -07:00
Tim Abbott 52fc1c71bc provision: Rewrite using subprocess module instead of sh.
The `with sh.sudo` pattern that we were using in python-sh was
deprecated, and emperically hangs on Ubuntu xenial.  Since in general
the use of python-sh/python-pbs caused trouble (requiring extra
dependencies, confusing syntax), this just removes it.

We replace it with a new zulip_tools.py library function that echoes
the command line and streams the output.

We do the same to install-phantomjs so we can remove that dependency.
2016-04-10 17:33:19 -07:00
Tim Abbott 877b4af24a Replace platform.codename and friends with lsb_release.
The old code was producing incorrect output of "debian" as the release
on Travis CI's Ubuntu Trusty nodes.
2016-04-08 12:35:08 -07:00
Tim Abbott 6969c26dfa provision: Fix hardcoding of trusty codename. 2016-04-08 12:17:45 -07:00
Tim Abbott 64973fc4e6 provision: Refactor postgres version to be a variable. 2016-04-08 12:17:45 -07:00
Tim Abbott 7fe9a6b74b provision: check arch and codename earlier in setup process. 2016-04-08 12:17:45 -07:00
Tim Abbott 7dd9e93f9b provision: Exit with an error with unsupported platform. 2016-04-08 12:17:45 -07:00
Tim Abbott 5d13d62057 provision: simplify logging configuration. 2016-04-08 12:17:45 -07:00
Tim Abbott fc4e8730f3 provision: Compute ZULIP_PATH dynamically. 2016-04-08 12:17:45 -07:00
Tim Abbott 10777c85d4 Move `npm install` to end of development installation process.
This should make it easier for users to recover from failed `npm
install` commands when setting up their environment.
2016-03-29 21:56:19 -07:00
Tim Abbott c16749d783 Add missing dependency on netcat in both dev and prod.
Fixes #474.
2016-03-29 21:30:48 -07:00
Tim Abbott d8493b071b Fetch tsearch_extras packages from GitHub dist repository. 2016-03-29 21:25:33 -07:00
goelakash 36cf398ec3 Factor out phantomjs download script for use in by-hand instructions.
Also, modify README.dev.md to document need to run this script to
download PhantomJS.

Fixes #499.

[cleaned up a bit by tabbott]
2016-03-29 20:10:17 -07:00
Vladislav Manchev 294030ca04 Fix Travis failures due to redirects when downloading PhantomJS. 2016-03-23 21:54:56 -07:00
Tim Abbott 307f25308c provision: Add support for 32-bit x86 platform.
The only places we use the architecture were for finding the
tsearch_extras and phantomjs binaries; Luke Faraone kindly uploaded
both 32-bit and 64-bit binaries for tsearch_extras 0.1.3, so with a
bit of refactoring, we can now support 32-bit.

Fixes #505.
2016-03-13 10:11:19 -07:00
Luke Faraone c89d675462 Add missing wget dependency to provision.py
We also explicitly include `ca-certificates`, as it is needed for the install
to complete. Usually this is brought in as a `Recommends` of `wget`, but some
systems may not automatically include such dependencies.

Fixes #470.
2016-02-18 03:41:16 +00:00
Tim Abbott ff3555734d provision: Return success from main function. 2016-02-03 19:25:19 -08:00
Tim Abbott bed847e029 travis: Cache the phantomjs package downloads between builds.
This should hopefully fix the issue we've been seeing with
bitbucket.org rejecting connections from Travis CI by not needing to
connect to them.
2016-01-09 15:46:29 -08:00
Javier Ros ab89ef501f Add support for a development environment with Docker. 2015-12-14 18:22:56 -08:00
Allie Jones 4de0325a9d Install node dependencies using npm.
The node packages 'jQuery' and 'jquery' are different--'jQuery' is the
legacy support package that is needed for Zulip so the require statements
in the tests were updated.

Travis uses node 4.0 by default and we are using 0.10, so the command to
install the correct version had to be added to the .travis.yml file.
2015-11-06 09:08:59 -08:00
Allie Jones 46e267f4dc Add node-legacy package.
Some dependencies aren't configured to find the node binary correctly on
Debian (since it is called nodejs instead of node). The node-legacy package
fixes this.
2015-11-06 09:08:50 -08:00
Shumbashi 123791bfdd Fix 'manage.py makemessages' errors.
Running 'manage.py makemessages' produced two errors previously.

Closes #265.
2015-11-04 07:39:48 -08:00
Tim Abbott f3783fb4a1 Apply Python 3 futurize transform libfuturize.fixes.fix_print_with_import. 2015-11-01 09:26:16 -08:00
Tim Abbott 3e735d36d1 Rename tools/postgres-init-db to tools/postgres-init-dev-db.
The previous name was confusing because we also have
scripts/setup/postgres-init-db.
2015-10-15 09:14:21 -04:00
Tim Abbott 5ee50cdced Install libfreetype6-dev in the development environment.
This fixes a problem where the emoji_dump tool was not generating the
black-and-white emoji.  The issue is that Pillow compiled without
libfreetype cannot extract those emoji (and gives an error of the form
"The _imagingft C module is not installed"), and if libfreetype-dev
isn't installed, pip will happily build and install Pillow without
libfreetype.
2015-10-14 18:58:36 -04:00
Tim Abbott c6761e8604 provision.py: Check whether git repository is present.
Fixes #148.
2015-10-14 10:18:59 -04:00
Tim Abbott 1f2f497cab Unrevert run Zulip tests automatically using Travis CI.
This contains a fix written by nemeth from PR #63 for doing argument
parsing properly.
2015-09-28 09:18:51 -07:00
Luke Faraone 578f769f60 Revert "Run Zulip tests automatically using Travis CI."
Improper list access from `sys.argv` would result in an exception if no
arguments are passed.

This reverts commit d2f5937d89.
2015-09-28 14:33:13 +00:00
Tim Abbott d2f5937d89 Run Zulip tests automatically using Travis CI.
This is a bit hackish in that ideally we'd use proper options parsing
in provision.py, but it works and I even ran the tests 100x for tests
for flakes and didn't get any, so it's definitely an improvement!

With this we'll be both testing the runtime and effectively the Dev VM
setup process, which is awesome; the additional thing I'd want to add
tests for is the production setup process...
2015-09-27 16:29:20 -07:00
Tim Abbott 9c0c5c57a7 Download zxcvbn.js rather than vendoring it.
(imported from commit 8d55b6b903dc2292852636dfb444219b643b5f64)
2015-09-25 02:24:07 -07:00
Tim Abbott cc33b68d73 Remove pre-built emoji images from version control.
Instead, build them automatically when provision the development
environment and in update-prod-static.

(imported from commit aac8dfeaafbe872c113e5f2b6bd8f655a1af36f2)
2015-09-25 00:22:15 -07:00
Anders Kaseorg be844b628d Revert "Install git pre-commit hooks in the vm as part of provisioning."
This reverts commit b3aa3b44de198abea49f5b43e2403f466f30f66c.

The hook was actually being installed through the bind-mount into the
checkout outside the VM.

(imported from commit 7fcb4806743508e530b46593a1022ea00b74259e)
2015-09-24 22:59:27 -04:00
Tim Abbott 485c907721 Return to recommending running run-dev.py manually.
(imported from commit f050f2a8f2242dc23267c341d53517847d7fc560)
2015-09-22 21:31:54 -07:00
Tim Abbott efa7a90ecc Install closure-compiler directly for use on the Dev VM.
(imported from commit 0dae11b46364026acf29e1fc953401162db68746)
2015-09-20 15:21:16 -07:00
Reid Barton bf8cc35edc Add puppet to provision.py
We don't use it to set up the dev VM environment, but we do use it to
verify the Voyager puppet configuration parses in lint-all.

(imported from commit 3f116633ba3f535dfb4ae27915b6356e560ac84f)
2015-08-23 21:35:14 -07:00
Reid Barton f25f935c02 Install PhantomJS 1.9.8 from binary download
Now the tests don't crash for me all the time.

(imported from commit bbecff2840f888ca44115f83eed84709434500b2)
2015-08-21 15:04:50 -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 3f7cb34b00 enterprise => voyager
(imported from commit 04be792bb480d5e5db1c91d296d1000cf1682571)
2015-08-21 10:33:35 -07:00
Anders Kaseorg 36c6f1e731 provision: Do not silence stdout and stderr
(imported from commit 58cd23b0d77a26c9961c0c1f9a37433ac0fb9290)
2015-08-20 18:36:34 -07:00
Luke Faraone d2979ab5d4 Move main body of provision.py into a function
(imported from commit befd4f45bf5876c61456bd2c262bfa9136b514e7)
2015-08-20 18:08:08 -07:00
Tim Abbott 6176dfd039 Install yui-compressor for building enterprise tarballs.
(imported from commit 917d6a5221b5c2c50fc399c9942cb3682e3471ca)
2015-08-20 17:33:16 -07:00
Yoyo Zhou 6a63303736 Add dependencies for test-js-with-node and test-js-with-casper to provision.py.
Create a .bash_profile in the VM that activates the python venv on each login.

Node dependencies include some npm packages that haven't been backported to trusty yet.

(imported from commit 8307740004a05b0c9d6ea26f97c2e80b9d1bbaf4)
2015-08-20 14:29:45 -07:00