| # -*- mode: ruby -*- |
| # vi: set ft=ruby : |
| |
| # This Vagrantfile is used for testing the installer. It creates 3 servers |
| # with a vanilla ubutu server image on it. |
| require 'yaml' |
| |
| # Load the settings which are tweaked by the installer to avoid naming conflicts |
| settings = YAML.load_file 'settings.vagrant.yaml' |
| |
| Vagrant.configure(2) do |config| |
| config.vm.synced_folder ".", "/vagrant", disabled: true |
| (1..3).each do |i| |
| config.vm.define "#{settings['server_name']}#{i}" do |d| |
| d.ssh.forward_agent = true |
| d.vm.box = settings["box_source"] |
| d.vm.hostname = "#{settings['server_name']}#{i}" |
| d.vm.provider "libvirt" do |v| |
| v.memory = 6144 |
| v.cpus = 2 |
| if settings['vProvider'] == "KVM" |
| v.cpu_mode = 'host-passthrough' |
| v.cpu_fallback = 'allow' |
| end |
| end |
| end |
| end |
| |
| if Vagrant.has_plugin?("vagrant-cachier") |
| config.cache.scope = :box |
| end |
| |
| end |