Commit Graph

78 Commits

Author SHA1 Message Date
Anders Kaseorg a543dcc8e3 Remove Debian 10 support.
As a consequence:

• Bump minimum supported Python version to 3.8.
• Move Vagrant environment to Ubuntu 20.04, which has Python 3.8.
• Move CI frontend tests to Ubuntu 20.04.
• Move production build test to Ubuntu 20.04.
• Move 3.4 upgrade test to Ubuntu 20.04.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-26 16:32:02 -07:00
Anders Kaseorg a58a71ef43 Remove Ubuntu 18.04 support.
As a consequence:

• Bump minimum supported Python version to 3.7.
• Move Vagrant environment to Debian 10, which has Python 3.7.
• Move CI frontend tests to Debian 10.
• Move production build test to Debian 10.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-21 17:26:14 -08:00
Anders Kaseorg 18891a84c3 Vagrantfile: Move inline provision script to a separate file.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-14 10:22:48 -07:00
Anders Kaseorg 19a7e24f1f Vagrantfile: Remove workarounds for ancient Vagrant bugs.
Vagrant 2.2.6 is the earliest version with the Docker usability test
fix, and is also conveniently the version in the Ubuntu 20.04
repository.  Users with older versions will get a friendly error
message from ‘Vagrant.require_version’ (and can install an updated
Vagrant from upstream).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-14 10:15:06 -07:00
rht 9ea3a982af
Vagrantfile: Fix typo.
This was introduced in
cc44aca49b.
2021-09-09 18:44:59 -04:00
Tim Abbott cc44aca49b vagrant: Simplify logic for Vagrant 1.8.7 bug.
This is very unlikely to happen since it's been years.
2021-09-09 11:15:49 -07:00
Anders Kaseorg 9e243c74ed shell: Replace ‘which’ utility with ‘command -v’ shell builtin.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-07 08:54:41 -07:00
Alex Vandiver eda9ce2364 locale: Use `C.UTF-8` rather than `en_US.UTF-8`.
The `en_US.UTF-8` locale may not be configured or generated on all
installs; it also requires that the `locales` package be installed.
If users generate the `en_US.UTF-8` locale without adding it to the
permanent set of system locales, the generated `en_US.UTF-8` stops
working when the `locales` package is updated.

Switch to using `C.UTF-8` in all cases, which is guaranteed to be
installed.

Fixes #15819.
2021-05-04 08:51:46 -07:00
IgnisDa 9b0ca74693 vagrant: Add hyperV support to vagrant config.
HyperV is native to Windows and should give a
significant performance boost over other vagrant
providers. Running the Zulip development environment
using HyperV requires a few custom changes. This
commit aims to add HyperV support to Zulip's Vagrant
configuration.

Fixes part of zulip/zulip#16994
2021-04-13 21:04:44 -07:00
Anders Kaseorg 81ffc4e827 Vagrantfile: Reformat with Rufo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-24 12:12:04 -07:00
Anders Kaseorg c5cfce73cb Revert "Make sure Vagrant works with SELinux enabled"
This reverts commit 5ad831fdf0 (part
of #2395).

This block is five years old and predates multiple Ubuntu upgrades and
our switch from LXC to Docker; now it reportedly breaks provisioning
on SELinux systems instead of fixing it.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-01-26 13:14:06 -08:00
Anders Kaseorg 0ec0d7b68f vagrant: Add a setting to downgrade VirtualBox Guest Additions.
It seems the Ubuntu base image we use now has a new enough VirtualBox
Guest Additions to trigger the ETXTBSY bug even when it’s not upgraded
by the vagrant-vbguest plugin.  Provide and document a way to
downgrade it.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2020-12-19 11:51:38 -08:00
Aman 88821b960a vagrant: Add parallels as a provider.
There are file sharing issues with the macOS 10.15.6 and
vagrant. var/remote_cache_prefix was an empty file when using
VirtualBox and Docker on macOS.
Using parallels as a provider for vagrant fixes the issue.

Use --watch-poll which makes webpack to recompile
automatically on file changes, since inotify is not
working here too.
2020-08-14 16:03:51 -07:00
Anders Kaseorg f869701d15 Revert "vagrant: Add installation support for MacOS 10.15.6."
This reverts commit 6e0d4b9502.  It was
merged with no review and has various issues (see #16086).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-08-10 12:10:15 -07:00
Aman 6e0d4b9502 vagrant: Add installation support for MacOS 10.15.6.
There are file sharing issues with the mac version 10.15.6 and
vagrant. Using parallels as a provider for vagrant fixes the issue.
2020-08-09 23:21:13 -07:00
Tim Abbott 1a6799f15e vagrant: Remove uartmode1 woarkound.
We determined that this hack is unnecessary with the official hasicorp
boxes (and it caused problems for some users).

Discussion in this thread:

https://chat.zulip.org/#narrow/stream/21-provision-help/topic/Vagrant.20up.20not.20starting/near/881773
2020-06-22 14:56:38 -07:00
kadrianne e0dc0062eb vagrant: Switch VM box to the Hashicorp release.
This is important because the Hashicorp boxes are better designed, and
in particular, https://www.vagrantup.com/docs/boxes.html recommends
using the hashicorp boxes over the "ubuntu" namespace.
2020-06-22 14:51:31 -07:00
Anders Kaseorg 09e7a688b0 Revert "vagrant: Add NFS backend for file synchronization for OSX."
Reportedly the NFS synced folder type doesn’t work on macOS with the
Docker provider, while the default type does.  And it seems likely
that four years of Ubuntu updates will have resolved the guest crashes
that motivated the prior switch to NFS.

https://chat.zulip.org/#narrow/stream/21-provision-help/topic/experimental.20docker.20setup

This reverts commit 9e8ae68dfb (#7520).

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-12 16:04:00 -07:00
Anders Kaseorg eeeaf01eef Vagrantfile: Update Docker fallback patch for installed but broken case.
The corresponding upstream PR has been updated as well.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-30 16:01:45 -07:00
Anders Kaseorg 630f0fa761 Vagrantfile: Add UBUNTU_MIRROR configuration option.
The default http://archive.ubuntu.com/ubuntu/ is pretty slow in some
locations.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-29 16:19:39 -07:00
Anders Kaseorg ae393456f9 Vagrantfile: Remove LXC provider; move Docker provider to default.
This also means the default dev environment is now based on Ubuntu
18.04 (bionic), part of our overall effort to migrate off Ubuntu
Trusty.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-29 16:12:30 -07:00
Anders Kaseorg a698f87ed8 Vagrantfile: Add monkey patch to fix fallback from Docker provider.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-29 16:07:49 -07:00
Anders Kaseorg 2c0980e3a6 Vagrantfile: Remove VMmare Fusion provider.
Ubuntu 14.04 is EOL.  Mac users can use the VirtualBox provider (and
now maybe the Docker provider?).  We can add back the VMware Fusion
provider later if someone cares enough to get it working with Ubuntu
18.04.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-29 16:06:33 -07:00
Anders Kaseorg dc11f197a1 Vagrantfile: Update virtualbox image to bionic.
This is a key part of our process to deprecate Ubuntu trusty: migrating
the Zulip development environment on macOS and Window to Ubuntu 
Bionic.

As part of this, we need to remove ubuntu-server, because it now
depends on update-notifier-common.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-29 16:04:13 -07:00
Anders Kaseorg 1a68ef2951 Vagrantfile: Restore idempotency to vagrant provision.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-29 15:38:36 -07:00
Wyatt Hoodes 857c16d52d Vagrantfile: Add customization to remove log file.
An unnecessary log file gets generated when running vagrant up for the
first time with the Ubuntu Bionic box.  This looks like it is being
caused upstream by the base box containing a Vagrantfile with a line
that looks something like:

vb.customize [ ..., ..., ..., ..., \
File.join(Dir.pwd, "ubuntu-bionic-18.04-cloudimg-console.log") ]

The line added here negates this.
2019-05-29 14:46:54 -07:00
Anders Kaseorg f21d3be5fb dev-vagrant-docker: Copy the host user’s uid for the vagrant user.
This allows /srv/zulip to be writable from the guest even if the host
user’s uid is not 1000.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-27 19:21:51 -07:00
Anders Kaseorg b594708915 Vagrantfile: Be nicer to /etc/update-motd.d.
Some of its information is helpful.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-24 17:33:06 -07:00
Anders Kaseorg 684ebc2a5e Vagrantfile: Support docker provider.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-05-24 15:43:23 -07:00
Wyatt Hoodes aac09b22ac vagrant: Add option to specify system settings.
Two variables were declared and assigned the respective values of the
default settings for the system. If the keyword is used in the
~/.zulip-vagrant-config file, the value is assigned to the variable.

There is no straightforward way to customize the virtual machine's
number of cpus or memory, this commit addresses that fact.
2019-04-11 12:28:12 -07:00
Puneeth Chaganti 19990b06e9 vagrant: Use id -g for finding a user's group.
On OSX, the user id and group id don't match.  So while the previous
code was always wrong, it produced incorrect output there.  We can fix
this by replacing `whoami` with `id -g` for finding the current user's
group ID.
2018-11-01 10:08:08 -07:00
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