Commit Graph

31 Commits

Author SHA1 Message Date
Tim Abbott b831df8f7f Vagrantfile: Do "set +x" a bit before the end.
This helps avoid the confusing situation we'd had where the very last
line of the Vagrant output would be something in red.
2017-10-27 11:59:33 -07:00
Tim Abbott a9d1042718 Vagrantfile: Fix some incorrect indentation in shell script. 2017-10-27 11:58:25 -07:00
Tim Abbott 8d00111a27 vagrant: Skip the shell virtualenv warning on provision. 2017-10-27 11:44:47 -07:00
Vishnu Ks fc59647a4a Vagrantfile: Provide a way to remove proxy from vagrant.
Fixes #5292
2017-09-15 03:55:32 -07:00
inytar b4e98a695d Set the default locale to en_US.UTF-8 in vagrant.
Prevents errors on vagrant ssh if the host system has an locale unknown
to the vagrant system.
2017-03-17 13:40:41 -07:00
hackerkid 8b2d4f150a Vagrantfile: Add support for a custom post-provision script.
Documentation tweaked by tabbott.

Fixes #3108.
2017-02-07 18:38:07 -08:00
Robert Hönig 789ae8648a Add wrapper and log file output for provisioning.
Before this commit, provisioning was done by executing provision.py,
which printed the log directly to stdout, making debugging harder.
This commit creates a wrapper bash script 'provision' in tools, which
calls 'zulip/scripts/tools/provision_vm.py' (the new location of
provision.py) and prints all the output to
'zulip/var/log/zulip/zulip_provision.log' via 'tee'.
Travis tests and docs have been modified accordingly.
2017-01-17 14:23:28 -08:00
Rohan Tibrewal 8e1724e81e Vagrant: Make host_ip a variable set in ~/.zulip-vagrant-config. 2016-12-30 14:50:08 -08:00
Umair Khan 287eb2cd49 provisioning: Add version warning for Vagrant 1.8.7.
Vagrant 1.8.7 is not supported due to broken curl, see
https://github.com/mitchellh/vagrant/issues/7997 for reference.
2016-11-26 23:08:43 -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
inytar 5ad831fdf0 Make sure Vagrant works with SELinux enabled
Remount SELinux filesystem if host is running SELinux.
2016-11-26 10:59:00 -08:00
Tim Abbott c9f9fb265e Update provision.py and Vagrantfile to support VMWare.
This adds support for using VMWare Fusion as the Vagrant provider,
which has better performance than Virtualbox at the price of being
nonfree (in all senses of the term).

We haven't done solid benchmarking as to how much faster it is than
the Virtualbox provider.
2016-09-07 19:30:48 -07:00
Tim Abbott c81b93249b Vagrantfile: Use 2 virtual CPUs with virtualbox.
This should improve performance of linting and other parallelizable
operations in the development environment on most laptops.
2016-09-07 19:25:18 -07:00
Christie Koehler 27c7319b50 vagrant: Suppress error output for which command. 2016-08-18 13:09:28 -07:00
Tim Abbott 21c30b9fed Vagrantfile: Update default RAM in development. 2016-07-20 18:40:10 -07:00
Tim Abbott 367f6e5bf7 Vagrantfile: Add option for setting the port used on the host.
This makes it easier to (for example) run a Zulip development
environment on a host machine and sometimes run a Vagrant guest
inside.
2016-07-07 15:17:44 -07:00
Tomasz Kolek 581f076d57 Automatically gather logs from provisioning.
Fixes: #1156.
2016-07-07 14:58:16 -07:00
Tim Abbott beb8b50623 Move provision.py under tools/. 2016-06-27 19:04:32 -07:00
Taranjeet 3fae7a69b3 VagrantFile: Create symlink in home folder for project.
Fixes: #922.
2016-06-17 11:48:55 -07:00
Tim Abbott aa7ff158b6 Reduce development environment RAM requirements by 750MB.
Since we merged cd2348e9ae more than a
month ago and haven't seen any noticable regresions as a result, it's
reasonable at this point to do a corresponding decrease in our
documented RAM requirements for the Zulip development environment.
2016-05-12 16:12:43 -07:00
Tim Abbott e9a76f98c3 Vagrantfile: Fix using Vagrant with LXC >= 2.
Apparently LXC 2 removed support for the `-B best` option in
lxc-create, and Vagrant hasn't been updated appropriately yet, so we
need to add a workaround to explicitly specify a backing store.

Fixes #718.

This manifested as errors of the form:

"""
There was an error executing ["sudo",
"/usr/local/bin/vagrant-lxc-wrapper", "lxc-create", "-B", "best",
"--template",
"/home/tabbott/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template",
"--name", "zulip_default_1461801696512_85064", "--", "--tarball",
"/home/tabbott/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/rootfs.tar.gz",
"--config",
"/home/tabbott/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/lxc-config"]
"""
2016-04-27 17:07:03 -07:00
Vishnu Ks 859a4eeaf4 Add support for using and configuring vagrant-proxyconf.
Users can now specify proxy settings for vagrant in a new
~/.zulip-vagrant-config configuration file.
2016-04-13 09:06:03 -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 3a6889e19f Vagrantfile: Don't error on platforms where `lxc-ls` doesn't exist.
Apparently vagrant executes the configuration code for all providers,
not just the one that's actually selected.

Fixes #461.
2016-02-07 21:11:05 -08:00
Tim Abbott fdc7f5b86a Vagrantfile: Default to using LXC when Virtualbox is also available.
This solves the problem reported in #331 with needing to specify
--provider=lxc to use the LXC provider in an Ubuntu Linux environment;
additionally, it adds the LXC option needed to run LXC on Ubuntu
15.10, but not on 14.04 where that option is unavailable and would
totally break LXC.
2016-01-23 11:45:47 -08:00
Jason Michalski 9a3331acaf Run provision.py outside of the virtualenv
By default we are placed inside a virtualenv by the .bash_profile using
/usr/bin/python forces the provisioning script to run outside of this
virtualenv.
2015-11-25 19:29:13 -08:00
Luke Faraone 0d7f749ad8 Run provision.py as a provisioner.
This way, vagrant up for the first time will set up the developer's VM
correctly

(imported from commit cee17b15e2f53a1b6de1f1ee16dbad00071ba55c)
2015-08-19 21:07:22 -07:00
Luke Faraone e2d416ad8b Clean up additional comments in the Vagrantfile.
I'll fixup this before publication.

(imported from commit a57cc240c6b57da4423749c13aa72fa63e4812c5)
2015-08-19 21:07:22 -07:00
Luke Faraone f38aa4ca39 Increase memory for VM
(imported from commit 1f3976bff1526483c5f7f791fbe66ee3dcbb7980)
2015-08-17 11:14:52 -07:00
Luke Faraone dd71771a82 Fix syntax error in Vagrantfile
(imported from commit 68366c2be0a0d08e332934100ef03570e9e20df4)
2015-08-17 10:18:40 -07:00
Luke Faraone e8ea761fbe Initial attempt at Vagrantization
This is slightly hacky; it doesn't support as many arches as I'd like, but it works.

(imported from commit 5993014b0518d6d6dd2856fbf73180830e934b5f)
2015-08-17 09:45:51 -07:00