Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 1 | # -*- mode: ruby -*- |
| 2 | # vi: set ft=ruby : |
| 3 | |
| 4 | # This Vagrantfile is used for testing the installer. It creates 3 servers |
| 5 | # with a vanilla ubutu server image on it. |
Sergio Slobodrian | d24189e | 2017-06-10 23:27:15 -0400 | [diff] [blame] | 6 | require 'yaml' |
| 7 | |
| 8 | # Load the settings which are tweaked by the installer to avoid naming conflicts |
| 9 | settings = YAML.load_file 'settings.vagrant.yaml' |
| 10 | |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 11 | Vagrant.configure(2) do |config| |
| 12 | config.vm.synced_folder ".", "/vagrant", disabled: true |
| 13 | (1..3).each do |i| |
Sergio Slobodrian | d24189e | 2017-06-10 23:27:15 -0400 | [diff] [blame] | 14 | config.vm.define "#{settings['server_name']}#{i}" do |d| |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 15 | d.ssh.forward_agent = true |
Sergio Slobodrian | d24189e | 2017-06-10 23:27:15 -0400 | [diff] [blame] | 16 | d.vm.box = settings["box_source"] |
| 17 | d.vm.hostname = "#{settings['server_name']}#{i}" |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 18 | d.vm.provider "libvirt" do |v| |
| 19 | v.memory = 6144 |
Sergio Slobodrian | cab0a39 | 2017-07-13 08:42:10 -0400 | [diff] [blame] | 20 | v.cpus = 2 |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 21 | v.cpu_mode = 'host-passthrough' |
| 22 | v.cpu_fallback = 'allow' |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 23 | end |
| 24 | end |
| 25 | end |
| 26 | |
| 27 | if Vagrant.has_plugin?("vagrant-cachier") |
| 28 | config.cache.scope = :box |
| 29 | end |
| 30 | |
| 31 | end |