forked from Zuehlke/linux-developer-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
41 lines (34 loc) · 1.27 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
Vagrant::configure("2") do |config|
# configure the basebox
config.vm.box = "tknerr/ubuntu1604-desktop"
config.vm.box_version = "2.0.27.1"
# override the basebox when testing (an approximation) with docker
config.vm.provider :docker do |docker, override|
override.vm.box = "tknerr/baseimage-ubuntu-16.04"
override.vm.box_version = "1.0.0"
end
# virtualbox customizations
config.vm.provider :virtualbox do |vbox, override|
vbox.customize ["modifyvm", :id,
"--name", "Etka Developer VM",
"--memory", 2048,
"--cpus", 4
]
vbox.gui = true
end
# set the hostname
config.vm.hostname = "etka-developer-vm.local"
# don't create a new keypair
config.ssh.insert_key = false
# Install ChefDK and trigger the Chef run from within the VM
config.vm.provision "shell", privileged: false, keep_color: true, run: 'always',
inline: "/vagrant/scripts/update-vm.sh #{ENV['UPDATE_VM_FLAGS']}"
# Ensure we cache as much as possible
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.enable :generic, {
"chef_file_cache" => { cache_dir: "/root/.chef/local-mode-cache/cache" },
"berks_cache" => { cache_dir: "/home/vagrant/.berkshelf" },
"m2_repo" => { cache_dir: "/home/vagrant/.m2/repository" }
}
end
end