poc-ceph/Vagrantfile

48 lines
1.3 KiB
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provision "shell", before: :all do |shell|
shell.inline = <<-SHELL
apt-get update
SHELL
end
# MONs
(1..3).each do |i|
config.vm.define "ceph-mon-0#{i}" do |guest|
guest.vm.box = "generic/ubuntu2204"
guest.vm.hostname = "ceph-mon-0#{i}"
guest.vm.network "private_network", ip: "10.0.0.1#{i}"
guest.vm.network "private_network", ip: "10.1.0.1#{i}"
guest.vm.provider :libvirt do |libvirt|
libvirt.memory = 1024
libvirt.cpus = 1
end
end
end
# OSDs
(1..3).each do |i|
config.vm.define "ceph-osd-0#{i}" do |guest|
guest.vm.box = "generic/ubuntu2204"
guest.vm.hostname = "ceph-osd-0#{i}"
guest.vm.network "private_network", ip: "10.0.0.2#{i}"
guest.vm.network "private_network", ip: "10.1.0.2#{i}"
guest.vm.provider :libvirt do |libvirt|
libvirt.memory = 2024
libvirt.cpus = 2
libvirt.storage :file, size: "6G"
end
end
end
config.vm.define "cephfs-client" do |guest|
guest.vm.box = "generic/ubuntu2204"
guest.vm.hostname = "cephfs-client"
guest.vm.network "private_network", ip: "10.0.0.31"
end
end