-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
40 lines (31 loc) · 1.09 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Need to run these as vagrant user not root:
$user_config_script = <<-SCRIPT
chmod a+x /distance/Scripts/user-config.sh
su -c "source /distance/Scripts/user-config.sh" vagrant
SCRIPT
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
if Vagrant::Util::Platform.windows?
config.vm.synced_folder ".", "/distance"
elsif Vagrant.has_plugin?("vagrant-sshfs") then
config.vm.synced_folder ".", "/distance", type: "sshfs"
else
config.vm.synced_folder ".", "/distance", type: "rsync"
end
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.vm.provider "hyperv" do |hv|
hv.memory = "1024"
end
# Install dotnet:
config.vm.provision "shell", path: "Scripts/install-dotnet.sh"
# Install tshark:
config.vm.provision "shell", path: "Scripts/install-tshark.sh"
# Install distance runner:
config.vm.provision "file", source: "Scripts/distance", destination: "/distance/artifacts/distance"
# Modify environment for vagrant user:
config.vm.provision "shell", inline: $user_config_script
end