2015-08-17 06:37:14 +02:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
|
|
|
|
VAGRANTFILE_API_VERSION = "2"
|
|
|
|
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
|
|
|
2015-08-18 02:05:53 +02:00
|
|
|
# For LXC. VirtualBox hosts use a different box, described below.
|
2015-08-17 06:37:14 +02:00
|
|
|
config.vm.box = "fgrehm/trusty64-lxc"
|
|
|
|
|
2015-08-18 02:05:53 +02:00
|
|
|
# The Zulip development environment runs on 9991 on the guest.
|
2015-08-17 06:37:14 +02:00
|
|
|
config.vm.network "forwarded_port", guest: 9991, host: 9991, host_ip: "127.0.0.1"
|
|
|
|
|
|
|
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
|
|
config.vm.synced_folder ".", "/srv/zulip"
|
|
|
|
|
2015-08-17 19:18:40 +02:00
|
|
|
config.vm.provider "virtualbox" do |vb, override|
|
2015-08-17 06:37:14 +02:00
|
|
|
override.vm.box = "ubuntu/trusty64"
|
2015-08-18 02:05:53 +02:00
|
|
|
# 2GiB seemed reasonable here. The VM OOMs with only 1024MiB.
|
2015-08-17 20:14:52 +02:00
|
|
|
vb.memory = 2048
|
2015-08-17 06:37:14 +02:00
|
|
|
end
|
2015-08-17 20:14:52 +02:00
|
|
|
|
2015-08-19 04:14:50 +02:00
|
|
|
$provision_script = <<SCRIPT
|
|
|
|
set -x
|
|
|
|
set -e
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y python-pbs
|
2015-11-26 04:29:13 +01:00
|
|
|
/usr/bin/python /srv/zulip/provision.py
|
2015-08-19 04:14:50 +02:00
|
|
|
SCRIPT
|
|
|
|
|
|
|
|
config.vm.provision "shell",
|
|
|
|
# We want provision.py to be run with the permissions of the vagrant user.
|
|
|
|
privileged: false,
|
|
|
|
inline: $provision_script
|
2015-08-17 06:37:14 +02:00
|
|
|
end
|