This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVagrantfile.virtualbox
105 lines (73 loc) · 3.2 KB
/
Vagrantfile.virtualbox
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "puppetlabs/ubuntu-14.04-64-puppet"
if Vagrant.has_plugin?("vagrant-cachier")
# Configure cached packages to be shared between instances of the same base box.
# More info on the "Usage" link above
config.cache.scope = :box
config.cache.enable :generic, {
"wget" => { cache_dir: "/var/cache/wget" },
}
config.cache.synced_folder_opts = {
type: :nfs,
# The nolock option can be useful for an NFSv3 client that wants to avoid the
# NLM sideband protocol. Without this option, apt-get might hang if it tries
# to lock files needed for /var/cache/* operations. All of this can be avoided
# by using NFSv4 everywhere. Please note that the tcp option is not the default.
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
###
# Shared Folders
# Note: Don't enable synced folders AFTER installation-
# you will overwrite the installation.
###
# Mount point for puppet modules
config.vm.synced_folder "neurovault_puppet", "/mnt/etc/puppet/modules/neurovault", nfs:true, create:true
config.bindfs.bind_folder "/mnt/etc/puppet/modules/neurovault", "/etc/puppet/modules/neurovault"
# Mount point of neurovault environment
config.vm.synced_folder "nv_env", "/mnt/opt/nv_env", nfs:true, create:true
config.bindfs.bind_folder "/mnt/opt/nv_env", "/opt/nv_env"
# Mount point of image datastore
config.vm.synced_folder "image_data", "/mnt/opt/image_data", nfs:true, create:true
config.bindfs.bind_folder "/mnt/opt/image_data", "/opt/image_data"
# Mount point of pycortex datastore
config.vm.synced_folder "pycortex_data", "/mnt/opt/pycortex_data", nfs:true, create:true
config.bindfs.bind_folder "/mnt/opt/pycortex_data", "/opt/pycortex_data"
config.vm.network "private_network", ip: "192.168.33.10"
###
# VM Settings
###
config.vm.provider "virtualbox" do |vb|
# - use at least 2GB for reliable operation
# - use at least 4GB memory for Freesurfer to work
vb.memory = 4096
# - use the number of physical CPUs in your computer
vb.cpus = 4
# I/O APIC must be enabled for multiple CPUs
vb.customize ["modifyvm", :id, "--ioapic", "on"]
# change network parameters to improve performance: http://serverfault.com/questions/447775/virtualbox-slow-upload-speed-using-nat
vb.customize ["modifyvm", :id, "--natsettings1", "1500,1024,1024,1024,1024"]
# - set `vb.gui = true` for a windowing system (GUI)
# - this is useful for debugging networking issues, or if you wish to work
# directly from the VM.
#vb.gui = true
end
###
# Provisioning (puppet)
###
config.vm.provision "shell",
inline: "sh /etc/puppet/modules/neurovault/install_deps.sh"
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "neurovault_puppet/confs"
puppet.manifest_file = "nvault.pp"
puppet.options = [
'--verbose',
'--debug'
]
puppet.synced_folder_type = "nfs"
end
end