2024-02-28 11:21:26 +00:00
|
|
|
enable_nas = ENV["NAS"] || false
|
|
|
|
|
2023-10-21 22:22:23 +00:00
|
|
|
Vagrant.configure("2") do |config|
|
|
|
|
config.vm.box = "debian/bullseye64"
|
2023-10-23 12:26:55 +00:00
|
|
|
config.vm.synced_folder '.', '/vagrant', disabled: true # Allows WSL call to work within WSL filesystem
|
2023-10-30 15:54:48 +00:00
|
|
|
config.vm.provision :shell, path: "https://git.halis.io/athens-school/ISO-repository/raw/branch/master/quick-installer.sh", run: "once"
|
2023-10-21 22:22:23 +00:00
|
|
|
|
|
|
|
config.vm.provider "virtualbox" do |v|
|
2024-01-14 00:35:24 +00:00
|
|
|
v.memory = 2048
|
|
|
|
v.cpus = 2
|
2023-10-21 22:22:23 +00:00
|
|
|
end
|
|
|
|
|
2024-02-02 12:47:58 +00:00
|
|
|
config.vm.provider "libvirt" do |q|
|
|
|
|
q.memory = 2048
|
|
|
|
q.cpus = 2
|
|
|
|
end
|
|
|
|
|
2023-10-23 12:26:55 +00:00
|
|
|
boxes = [
|
2023-10-30 15:54:48 +00:00
|
|
|
{ :name => "hb-slim-1", :ip => "192.168.56.11"},
|
|
|
|
{ :name => "hb-slim-2", :ip => "192.168.56.12"},
|
|
|
|
{ :name => "hb-wide-1", :ip => "192.168.56.101", :cpus => 2, :memory => 4096},
|
|
|
|
{ :name => "hb-wide-2", :ip => "192.168.56.102", :cpus => 2, :memory => 4096},
|
2023-10-23 12:26:55 +00:00
|
|
|
]
|
2023-10-21 22:22:23 +00:00
|
|
|
|
2024-02-28 11:21:26 +00:00
|
|
|
if enable_nas != false
|
|
|
|
boxes.push({ :name => "nas", :ip => "192.168.56.200", :cpus => 2, :memory => 4096, :drive => { name: "extra_disk", size: "30GB" }})
|
|
|
|
end
|
|
|
|
|
2023-10-23 12:26:55 +00:00
|
|
|
boxes.each do |opts|
|
|
|
|
config.vm.define opts[:name] do |box|
|
|
|
|
box.vm.hostname = opts[:name]
|
2023-10-30 15:54:48 +00:00
|
|
|
box.vm.network "private_network", ip: opts[:ip]
|
2023-11-15 22:54:11 +00:00
|
|
|
if !opts[:drive].nil?
|
|
|
|
box.vm.disk :disk, size: opts[:drive][:size], name: opts[:drive][:name]
|
|
|
|
end
|
2024-02-02 12:47:58 +00:00
|
|
|
|
2023-10-23 12:26:55 +00:00
|
|
|
box.vm.provider "virtualbox" do |v|
|
|
|
|
if !opts[:memory].nil?
|
|
|
|
v.memory = opts[:memory]
|
|
|
|
end
|
|
|
|
if !opts[:cpus].nil?
|
|
|
|
v.cpus = opts[:cpus]
|
|
|
|
end
|
2023-10-21 22:22:23 +00:00
|
|
|
end
|
2024-02-02 12:47:58 +00:00
|
|
|
|
|
|
|
box.vm.provider "libvirt" do |q|
|
|
|
|
if !opts[:memory].nil?
|
|
|
|
q.memory = opts[:memory]
|
|
|
|
end
|
|
|
|
if !opts[:cpus].nil?
|
|
|
|
q.cpus = opts[:cpus]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-10-21 22:22:23 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|