Skip to content
Snippets Groups Projects
Commit 69064887 authored by Benoit Donneaux's avatar Benoit Donneaux
Browse files

Polish the Vagrantfile for libvirt/qemu

parent 9996c7c8
No related branches found
No related tags found
2 merge requests!396Support QEmu local grid,!384update production
......@@ -11,39 +11,41 @@ Vagrant.configure("2") do |config|
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# We do not need to sync the working dir. with our guests
config.vm.synced_folder ".", "/vagrant", disabled: true
# Select the base image
config.vm.box = "esselius/nixos"
config.vm.box_version = "20.09"
config.vm.box_check_update = false
# Tune QEmu guests
config.vm.provider :libvirt do |libvirt|
# Using a specific pool may help to manage the disk space
libvirt.storage_pool_name = pool_name
libvirt.snapshot_pool_name = pool_name
# No need of graphics - better use serial
libvirt.graphics_type = "none"
libvirt.video_type = "none"
end
# No need to sync the working dir. with the guest boxess
# Better use SFTP to transfer
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.define "payments.localdev" do |config|
config.vm.hostname = "payments"
config.vm.box = "esselius/nixos"
config.vm.box_version = "20.09"
config.vm.box_check_update = false
config.vm.provider :libvirt do |domain|
domain.cpus = 2
domain.memory = 1024
end
# Tune LibVirt/QEmu guests
config.vm.provider :libvirt do |domain|
# One CPU should work
domain.cpus = 1
# To use the self-updating deployment system you need more memory. Giving
# all of the VMs enough memory for this is rather taxing, though, and the
# self-updating deployment system is not particularly useful for local
# dev. But should you want to:
#
# config.vm.provider "virtualbox" do |v|
# v.memory = 4096
# end
# domain.memory = 4096
domain.memory = 512
# Using a specific pool may help to manage the disk space
domain.storage_pool_name = pool_name
domain.snapshot_pool_name = pool_name
# No need of graphics - better use serial
domain.graphics_type = "none"
domain.video_type = "none"
end
config.vm.define "payments.localdev" do |config|
config.vm.hostname = "payments"
# Assign a static IP address inside the VirtualBox host-only (Vagrant
# Assign a static IP address inside the box host-only (Vagrant
# calls it "private") network. The address must be in the range
# VirtualBox allows.
# https://www.virtualbox.org/manual/ch06.html#network_hostonly says some
......@@ -57,37 +59,16 @@ Vagrant.configure("2") do |config|
config.vm.define "storage1.localdev" do |config|
config.vm.hostname = "storage1"
config.vm.box = "esselius/nixos"
config.vm.box_version = "20.09"
config.vm.box_check_update = false
config.vm.provider :libvirt do |domain|
domain.cpus = 2
domain.memory = 1024
end
config.vm.network "private_network", ip: "192.168.56.22"
end
config.vm.define "storage2.localdev" do |config|
config.vm.hostname = "storage2"
config.vm.box = "esselius/nixos"
config.vm.box_version = "20.09"
config.vm.box_check_update = false
config.vm.provider :libvirt do |domain|
domain.cpus = 2
domain.memory = 1024
end
config.vm.network "private_network", ip: "192.168.56.23"
end
config.vm.define "monitoring.localdev" do |config|
config.vm.hostname = "monitoring"
config.vm.box = "esselius/nixos"
config.vm.box_version = "20.09"
config.vm.box_check_update = false
config.vm.provider :libvirt do |domain|
domain.cpus = 2
domain.memory = 1024
end
config.vm.network "private_network", ip: "192.168.56.24"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment