aboutsummaryrefslogtreecommitdiff
path: root/script/jepsen.garage/Vagrantfile
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-04-18 13:59:03 +0200
committerAlex Auvolat <alex@adnab.me>2023-10-18 12:03:11 +0200
commitca4cc7e44f6143ec24be626c683ed5b14ff40295 (patch)
tree81e666ac8d076eae2b487ab49f0b28aabed90c08 /script/jepsen.garage/Vagrantfile
parent17ebb652730f69f53fe7d2b31fbf2db2075b9be7 (diff)
downloadgarage-ca4cc7e44f6143ec24be626c683ed5b14ff40295.tar.gz
garage-ca4cc7e44f6143ec24be626c683ed5b14ff40295.zip
jepsen connects to vagrant vms
Diffstat (limited to 'script/jepsen.garage/Vagrantfile')
-rw-r--r--script/jepsen.garage/Vagrantfile29
1 files changed, 29 insertions, 0 deletions
diff --git a/script/jepsen.garage/Vagrantfile b/script/jepsen.garage/Vagrantfile
new file mode 100644
index 00000000..da6a277f
--- /dev/null
+++ b/script/jepsen.garage/Vagrantfile
@@ -0,0 +1,29 @@
+# -*- 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|
+ config.vm.box = "generic/alpine38"
+
+ config.vm.provider "virtualbox" do |vb|
+ vb.gui = false
+ vb.memory = "512"
+ end
+
+ config.vm.provision "shell", inline: <<-SHELL
+ echo "root:root" | chpasswd
+ apk update
+ apk add wget
+ 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
+end