garage/script/jepsen.garage/Vagrantfile

32 lines
1 KiB
Ruby
Raw Normal View History

2023-04-18 11:59:03 +00:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
def vm(config, hostname, ip)
config.vm.hostname = hostname
config.vm.network "private_network", ip: ip
end
Vagrant.configure("2") do |config|
2023-04-18 14:10:07 +00:00
config.vm.box = "generic/debian10"
2023-04-18 11:59:03 +00:00
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "512"
vb.customize ["modifyvm", :id, "--vram=12"]
2023-04-18 11:59:03 +00:00
end
config.vm.provision "shell", inline: <<-SHELL
echo "root:root" | chpasswd
2023-04-18 14:10:07 +00:00
mkdir -p /root/.ssh
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJpaBZdYxHqMxhv2RExAOa7nkKhPBOHupMP3mYaZ73w9 lx@lindy" >> /root/.ssh/authorized_keys
2023-04-18 11:59:03 +00:00
SHELL
config.vm.define "n1" do |config| vm(config, "n1", "192.168.56.21") end
config.vm.define "n2" do |config| vm(config, "n2", "192.168.56.22") end
config.vm.define "n3" do |config| vm(config, "n3", "192.168.56.23") end
config.vm.define "n4" do |config| vm(config, "n4", "192.168.56.24") end
config.vm.define "n5" do |config| vm(config, "n5", "192.168.56.25") end
config.vm.define "n6" do |config| vm(config, "n6", "192.168.56.26") end
2023-04-18 11:59:03 +00:00
end