blob: 3686e763dbb4eed7f428fbbe2b3580f18085e0be [file] [log] [blame]
Zack Williamsa7104e32018-01-03 10:55:26 -07001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3#
4# controlkube Scenario Vagrantfile
5
6require 'yaml'
7settings = YAML.load_file('genconfig/config.yml')
8
9Vagrant.configure("2") do |config|
10
11 config.vm.box = settings["vagrant_box"]
12
13 config.vm.synced_folder '.', '/vagrant', disabled: true
14
15 # set the headnode VM
16 config.vm.define "head1" do |h|
17 h.vm.hostname = "head1"
18 h.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: '0.0.0.0'
19 h.vm.provider :virtualbox do |vb|
20 vb.memory = settings['head_vm_mem']
21 vb.cpus = settings['head_vm_cpu']
22 vb.linked_clone = true
23 end
24 h.vm.provider :libvirt do |v, override|
25 v.memory = settings['head_vm_mem']
26 v.cpus = settings['head_vm_cpu']
27 end
28 h.vm.network "private_network", # management network, eth1
29 ip: "0.1.1.0", # unused IP address (setting required)
30 auto_config: false,
31 virtualbox__intnet: settings['vm_management_network_name'],
32 libvirt__network_name: settings['vm_management_network_name'],
33 libvirt__forward_mode: "none",
34 libvirt__dhcp_enabled: false
35 end
36
37 config.vm.define "compute1" do |c|
38 c.vm.hostname = "compute1"
39 c.vm.provider :virtualbox do |vb|
40 vb.memory = settings['compute_vm_mem']
41 vb.cpus = settings['compute_vm_cpu']
42 vb.linked_clone = true
43 end
44 c.vm.provider :libvirt do |v|
45 v.memory = settings['compute_vm_mem']
46 v.cpus = settings['compute_vm_cpu']
47 end
48 c.vm.network "private_network", # management network, eth1
49 ip: "0.1.1.0", # unused IP address (setting required)
50 auto_config: false,
51 virtualbox__intnet: settings['vm_management_network_name'],
52 libvirt__network_name: settings['vm_management_network_name'],
53 libvirt__forward_mode: "none",
54 libvirt__dhcp_enabled: false
55 end
56
57 config.vm.define "compute2" do |c|
58 c.vm.hostname = "compute2"
59 c.vm.provider :virtualbox do |vb|
60 vb.memory = settings['compute_vm_mem']
61 vb.cpus = settings['compute_vm_cpu']
62 vb.linked_clone = true
63 end
64 c.vm.provider :libvirt do |v|
65 v.memory = settings['compute_vm_mem']
66 v.cpus = settings['compute_vm_cpu']
67 end
68 c.vm.network "private_network", # management network, eth1
69 ip: "0.1.1.0", # unused IP address (setting required)
70 auto_config: false,
71 virtualbox__intnet: settings['vm_management_network_name'],
72 libvirt__network_name: settings['vm_management_network_name'],
73 libvirt__forward_mode: "none",
74 libvirt__dhcp_enabled: false
75 end
76end
77