-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
35 lines (26 loc) · 868 Bytes
/
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
machines = Integer(ENV["MACHINES"] || 2)
Vagrant.configure("2") do |config|
# https://docs.vagrantup.com
config.vm.box = "bento/ubuntu-24.04"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "setup", "/vagrant_setup"
# https://developer.hashicorp.com/vagrant/docs/providers/virtualbox/configuration
config.vm.provider "virtualbox" do |vb|
vb.memory = 1024 * 4
vb.cpus = 2
# vb.customize ['modifyvm', :id, '--graphicscontroller', 'vmsvga']
end
(1..machines).each do |i|
config.vm.define "k-#{i}" do |node|
node.vm.hostname = "k-#{i}"
node.vm.network "public_network",
bridge: "enp6s0",
ip: "192.168.1.#{36+i}"
node.vm.provision "shell",
path: "setup/script",
args: ["192.168.1.#{36+i}"]
end
end
end