-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
60 lines (54 loc) · 2.21 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
51
52
53
54
55
56
57
58
59
60
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
# Vagrant.require_version "< 1.9.4" # 1.9.4 bug in connecting VM
Vagrant.configure(2) do |config|
config.vm.box = "westlife-eu/cernvm4"
if Vagrant::VERSION =~ /^1.9.3/
puts "vagrant version 1.9.3, fixing host_ip configuration "
# forward standard web
config.vm.network "forwarded_port", host_ip: "127.0.0.1", guest: 80, host: 8081
# forward depended tool (SCIPION)
config.vm.network "forwarded_port",host_ip: "127.0.0.1", guest: 8000, host: 8001
else
if Vagrant::VERSION =~ /^1.9.4/
puts "vagrant version 1.9.4 detected. Upgrade to version 1.9.5+ or downgrade to version 1.9.3 or bellow"
exit
else
puts "vagrant version:"
puts Vagrant::VERSION
# forward standard web
config.vm.network "forwarded_port", guest: 80, host: 8080
# forward depended tool (SCIPION)
config.vm.network "forwarded_port", guest: 8000, host: 8000
end
end
if Vagrant.has_plugin?("vagrant-proxyconf")
if ENV["http_proxy"]
config.proxy.http = ENV["http_proxy"] #"http://wwwcache.dl.ac.uk:8080"
end
if ENV["https_proxy"]
config.proxy.https = ENV["https_proxy"] #"http://wwwcache.dl.ac.uk:8080"
end
if ENV["no_proxy"]
config.proxy.no_proxy = ENV["no_proxy"] #"localhost,127.0.0.1"
end
end
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
#
# # Customize the amount of memory on the VM:
vb.memory = "2048"
vb.cpus = "2"
vb.customize ["modifyvm", :id, "--vram", "16"]
end
config.vm.synced_folder ".", "/vagrant"
# uncomment/comment desired bootstrap type, if VM should be build from sources use bootstrapsources.sh
# otherwise(default) use bootstrapcvmfs.sh
config.vm.provision "shell", path: "vf-standalone-src/bootstrapsources.sh"
# config.vm.provision "shell", path: "vf-standalone-bin/bootstrapcvmfs.sh"
end