Commit Graph

47 Commits

Author SHA1 Message Date
Kurian Benoy bfcd7b0151 Vagrantfile: Fix typo in spelling of problems.
Fixes #9596.
2018-06-01 11:58:09 -07:00
Puneeth Chaganti e6ac98cc9b vagrant: Get vagrant up and running with lxc 3.0.0 2018-05-02 21:04:27 -07:00
Armaan Ahluwalia f20671a509 webpack: Fix Hot Module Reloading in webpack.
This commit fixes hot module replacement in webpack. To do this
we open port 9994 used by webpack to communicate between browser
and devserver. The attempts to forward the proxy from 9991 failed
so the last resort was to open up the webpack port.
It also removes an uncessary plugin in the webpack config and moves
the --hot flag to tools/webpack.
2018-04-27 09:04:49 -07:00
Ben Reeves 05d3073960 vagrant: Fix link to testing docs in motd.
Change https://zulip.readthedocs.io/en/latest/testing.html to the new 
https://zulip.readthedocs.io/en/latest/testing/testing.html
2018-04-05 14:41:38 -07:00
Puneeth Chaganti 7bda069ced vagrant: Graciously fail when vagrant user can't write to /srv/zulip.
Fixes #1410.
2018-03-20 22:20:50 -07:00
Puneeth Chaganti 7929bf5c76 Don't replace the DEFAULT_SERVER_URL unless required
Trying to replace the string on newer versions of vagrant fails with a
'RuntimeError: can't modify frozen String' error. On newer versions of Vagrant,
the server URL is correct already.
2018-03-20 22:11:00 -07:00
Aayush Agrawal 65eeda7c9a vagrant: Replace guest motd with a custom Zulip motd.
Edits Vagrantfile to set custom motd message at /etc/motd and remove
all files under /etc/update-motd.d.

Fixes #7271.
2018-02-19 09:35:04 -08:00
Greg Price 424c887a27 Vagrantfile: Test directly for `lxc-ls`.
This avoids giving the same "no such command" error on Linux machines
that don't have LXC installed as we now avoid on non-Linux.
2018-02-16 11:29:29 -08:00
Vishnu Ks 718b3fcd6a Vagrantfile: Check for OS before patching the lxc-config.
Followup of e68b45d089
Without this vagrant up will fail on Windows.
https://chat.zulip.org/#narrow/stream/development.20help/topic/
Vagrant.20up.20error
2018-02-16 11:29:29 -08:00
Umair Khan e68b45d089 lxc: Fix lxc-config file from vagrant-lxc for LXC 2.1.0.
Fixed by greg to act only on version 2.1.0, not later; and
rewrote comment.

Fixes #7838.
2018-02-14 14:06:37 -08:00
Aman Agrawal 0db9f55924 Update versions for Vagrant and VirtualBox.
Update version of Vagrant from 1.8.6 to 2.0.2.
Update version of VirtualBox from 5.1.8 to 5.2.6.

We needed to update Vagrant because older versions have networking
problems on modern Macs, resulting in weird `apt` errors when
provisioning.

Commit message and some text tweaked by tabbott.
2018-02-12 15:46:59 -08:00
Vishnu Ks 680983d10e vagrantfile: Workaround for the atlas.hashicorp.com redirect removal.
This workaround is only for new users. Users who are/were using old
versions of Vagrant has to manually change the value of box
metadata_url. See https://github.com/hashicorp/vagrant/issues/9442
2018-02-08 13:54:19 -08:00
Umair Khan dd97c7e659 nfs: Allow read and write in NFS share.
Reference: https://linux.die.net/man/5/exports
2017-12-01 07:15:32 -08:00
Joshua Pan 9e8ae68dfb vagrant: Add NFS backend for file synchronization for OSX.
This is intended to fix serious issues with frequent guest crashes on
OSX High Sierra with Virtualbox and the default file synchronization.

Note from Tim: We've tried this idea before, and it worked for Mac,
but caused problems for non-Mac users of our Vagrant setup that
resulted in it being reverted in
1432e9afb0.

Hopefully the new conditional will handle things correctly in both Mac
and Linux.
2017-11-24 10:16:07 -08:00
Tim Abbott 1432e9afb0 Revert "vagrant: Switch Virtualbox to use NFS for syncing files."
This reverts commit 4d7f1e7c88.

Apparently, Vagrant's parsing seems to result in this demanding a
network connection.  Further investigation is needed.
2017-10-31 17:49:53 -07:00
Tim Abbott 4d7f1e7c88 vagrant: Switch Virtualbox to use NFS for syncing files.
This seems to help with frequent virtualbox guest crashes that we've
been having on Macs recently.

Thanks to Umair Khan for figuring this out.
2017-10-31 11:11:34 -07:00
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