41 lines
1.7 KiB
Text
41 lines
1.7 KiB
Text
|
# vim: set ts=2 sw=2 et ft=ruby:
|
||
|
# frozen_string_literal: true
|
||
|
|
||
|
Vagrant.configure('2') do |config|
|
||
|
config.vm.box = 'debian/bookworm64'
|
||
|
|
||
|
config.vm.provider 'libvirt' do |domain|
|
||
|
domain.memory = 12_000
|
||
|
domain.nested = true
|
||
|
domain.cpu_mode = "host-model"
|
||
|
|
||
|
# domain.cpus = 2
|
||
|
#
|
||
|
domain.management_network_name = 'vagrant-libvirt-new'
|
||
|
domain.management_network_address = '192.168.124.0/24'
|
||
|
end
|
||
|
|
||
|
|
||
|
# config.vm.synced_folder '..', '/vagrant' #, type: 'nfs', mount_options: ['actimeo=2']
|
||
|
# config.vm.synced_folder '../../exercises', '/vagrant/exercises' #, type: 'nfs', mount_options: ['actimeo=2']
|
||
|
# config.vm.synced_folder '../../config', '/vagrant/config' #, type: 'nfs', mount_options: ['actimeo=2']
|
||
|
|
||
|
config.vm.define 'control' do |machine|
|
||
|
machine.vm.hostname = 'control'
|
||
|
|
||
|
[3000, 4000, 5000, 8000, 8080].each do |port|
|
||
|
machine.vm.network 'forwarded_port', guest: port, host: port, host_ip: '127.0.0.1'
|
||
|
end
|
||
|
machine.vm.network 'forwarded_port', guest: 80, host: 1080, host_ip: '127.0.0.1'
|
||
|
# machine.vm.network 'public_network', bridge: 'dummy0', auto_config: false
|
||
|
# machine.vm.network 'public_network', dev: 'br25', type: 'bridge', auto_config: false
|
||
|
machine.vm.network 'private_network', ip: '192.168.56.21', name: 'vagrant0'
|
||
|
machine.vm.network 'private_network', ip: '192.168.57.21', name: 'vagrant1'
|
||
|
machine.vm.network 'private_network', ip: '192.168.58.21', name: 'vagrant2'
|
||
|
end
|
||
|
|
||
|
config.vm.provision 'shell', name: 'provision/base', path: 'provision/base.sh', privileged: true
|
||
|
config.vm.provision 'shell', name: 'provision/openstack', path: 'provision/openstack.sh', privileged: false
|
||
|
config.vm.provision 'shell', inline: 'echo SUCCESS'
|
||
|
end
|