-
Notifications
You must be signed in to change notification settings - Fork 81
/
Vagrantfile
50 lines (38 loc) · 1.34 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
$script = <<EOF
set -xe
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y --force-yes git autoconf gcc-arm-none-eabi make build-essential
sudo apt-get install -y xen-hypervisor-4.4-amd64 bridge-utils
wget http://packages.erlang-solutions.com/site/esl/esl-erlang/FLAVOUR_1_general/esl-erlang_17.5-1~ubuntu~trusty_amd64.deb
sudo dpkg -i esl-erlang_17.5-1~ubuntu~trusty_amd64.deb || true
sudo apt-get install -f -y
sudo dpkg -i esl-erlang_17.5-1~ubuntu~trusty_amd64.deb
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
update-grub
# create a workspace for local pushes
sudo -u vagrant -i git init ling
sudo -u vagrant -i sh -c '(cd ling; git config receive.denyCurrentBranch ignore)'
# indir simplifies a lot of interactive scripting
cat > /usr/local/bin/indir << INLING
#!/usr/bin/env bash
cd \\$1; shift
exec "\\$@"
INLING
chmod +x /usr/local/bin/indir
# reboot for xen divert
reboot
EOF
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.memory = 2048
end
config.vm.hostname = "hackling"
config.vm.provision "shell", inline: $script
# xen kernel breaks vboxguest
config.vm.synced_folder ".", "/vagrant", disabled: true
end