forked from secureCodeBox/secureCodeBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
58 lines (48 loc) · 1.95 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
# SPDX-FileCopyrightText: the secureCodeBox authors
#
# SPDX-License-Identifier: Apache-2.0
#
# All in one Vagrant box for the secureCodeBox.
#
Vagrant.configure("2") do |config|
base_dir = File.dirname(__FILE__)
config.vm.box = "debian/bullseye64"
config.vm.hostname = "securecodebox"
# We use the same defaults like Docker Desktop.
memory = 2048
cpus = 2
config.vm.provider :virtualbox do |c|
# https://www.vagrantup.com/docs/providers/virtualbox/configuration
c.memory = memory
c.cpus = cpus
end
config.vm.provider :vmware_desktop do |c|
# https://www.vagrantup.com/docs/providers/vmware/configuration
c.vmx["memsize"] = memory
c.vmx["numvcpus"] = cpus
end
config.vm.provider :hyperv do |c|
# https://www.vagrantup.com/docs/providers/hyperv/configuration
c.memory = memory
c.cpus = cpus
end
config.vm.provider :libvirt do |c|
# https://github.com/vagrant-libvirt/vagrant-libvirt
c.memory = memory
c.cpus = cpus
end
config.vm.provision :shell, path: "#{base_dir}/bin/install-minikube.sh"
# Using sudo -g to run the command w/ newly created group from installation w/o the need of relogin.
# Redirecting STDERR to /dev/null because Minikube print download progress
# for the images to STDERR which clutters up the Vagrant output w/ error output!
config.vm.provision :shell, privileged: false, inline: "sudo -g docker minikube start 2>/dev/null"
# Install everything from secureCodeBox via install script.
# Hint: The directory where the Vagrantfile lives is mapped into the box under the path /vagrant.
config.vm.provision :shell, privileged: false, inline: "sudo -g docker /vagrant/bin/install.sh --all"
# Do not automatically install VirtualBox guest additions, if available.
# Because this would take lot of time with additional reboot.
# Necessary for environments w/ guest additions available.
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.no_install = true
end
end