Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 1 | # -*- mode: ruby -*- |
| 2 | # vi: set ft=ruby : |
| 3 | |
| 4 | Vagrant.configure(2) do |config| |
| 5 | |
| 6 | if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil |
alshabib | b6ae086 | 2016-08-26 10:55:48 -0700 | [diff] [blame] | 7 | config.vm.synced_folder "..", "/cord", mount_options: ["dmode=700,fmode=600"] |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 8 | else |
alshabib | b6ae086 | 2016-08-26 10:55:48 -0700 | [diff] [blame] | 9 | config.vm.synced_folder "..", "/cord" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 10 | end |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 11 | config.vm.synced_folder '.', '/vagrant', disabled: true |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 12 | |
| 13 | config.vm.define "corddev" do |d| |
Zsolt Haraszti | 5b5a42a | 2016-05-12 22:19:57 -0700 | [diff] [blame] | 14 | d.ssh.forward_agent = true |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 15 | d.vm.box = "ubuntu/trusty64" |
| 16 | d.vm.hostname = "corddev" |
| 17 | d.vm.network "private_network", ip: "10.100.198.200" |
David K. Bainbridge | 0bdec19 | 2016-10-13 18:10:10 -0700 | [diff] [blame] | 18 | d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
| 19 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/corddev.yml -c local" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 20 | d.vm.provider "virtualbox" do |v| |
| 21 | v.memory = 2048 |
| 22 | end |
Andy Bavier | 5c2e4fa | 2016-10-31 13:50:52 -0400 | [diff] [blame] | 23 | d.vm.provider :libvirt do |v, override| |
Andy Bavier | 8ce395f | 2016-10-14 12:51:30 -0400 | [diff] [blame] | 24 | v.memory = 2048 |
Andy Bavier | 5c2e4fa | 2016-10-31 13:50:52 -0400 | [diff] [blame] | 25 | override.vm.synced_folder "..", "/cord", type: "nfs" |
Andy Bavier | 99c11d3 | 2016-09-14 17:21:20 -0400 | [diff] [blame] | 26 | end |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 27 | end |
| 28 | |
| 29 | config.vm.define "prod" do |d| |
| 30 | d.vm.box = "ubuntu/trusty64" |
| 31 | d.vm.hostname = "prod" |
Andy Bavier | 51584d4 | 2016-12-02 08:39:13 -0500 | [diff] [blame] | 32 | d.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: '*' |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 33 | d.vm.network "private_network", ip: "10.100.198.201" |
Andy Bavier | 2505f59 | 2016-11-11 15:58:55 -0500 | [diff] [blame] | 34 | d.vm.network "private_network", |
| 35 | ip: "0.0.0.0", |
| 36 | auto_config: false, |
| 37 | virtualbox__intnet: "cord-mgmt-network", |
| 38 | libvirt__network_name: "cord-mgmt-network", |
| 39 | libvirt__forward_mode: "none", |
| 40 | libvirt__dhcp_enabled: false |
| 41 | d.vm.network "private_network", |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 42 | ip: "0.1.0.0", |
| 43 | mac: "02420a060101", |
| 44 | auto_config: false, |
| 45 | virtualbox__intnet: "head-node-leaf-1", |
| 46 | libvirt__network_name: "head-node-leaf-1", |
| 47 | libvirt__forward_mode: "none", |
Andy Bavier | 2505f59 | 2016-11-11 15:58:55 -0500 | [diff] [blame] | 48 | libvirt__dhcp_enabled: false |
David K. Bainbridge | 6f2cbe7 | 2016-08-19 15:48:07 -0700 | [diff] [blame] | 49 | d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
alshabib | b6ae086 | 2016-08-26 10:55:48 -0700 | [diff] [blame] | 50 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/prod.yml -c local" |
Zack Williams | 49af5e6 | 2017-03-24 18:02:56 -0700 | [diff] [blame^] | 51 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 cd /cord/build/platform-install; ansible-playbook -i inventory/head-localhost deploy-elasticstack-playbook.yml" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 52 | d.vm.provider "virtualbox" do |v| |
David K. Bainbridge | 97b3f2f | 2016-06-16 18:08:49 -0700 | [diff] [blame] | 53 | v.memory = 2048 |
| 54 | end |
Andy Bavier | 2505f59 | 2016-11-11 15:58:55 -0500 | [diff] [blame] | 55 | d.vm.provider :libvirt do |v, override| |
Scott Baker | 6f58e32 | 2016-12-09 14:47:07 -0800 | [diff] [blame] | 56 | v.memory = 24576 |
Andy Bavier | 2505f59 | 2016-11-11 15:58:55 -0500 | [diff] [blame] | 57 | v.cpus = 8 |
| 58 | v.storage :file, :size => '100G', :type => 'qcow2' |
Andy Bavier | 750bc6b | 2016-12-01 06:53:57 -0500 | [diff] [blame] | 59 | override.vm.synced_folder "..", "/cord", type: "nfs" |
Andy Bavier | 2505f59 | 2016-11-11 15:58:55 -0500 | [diff] [blame] | 60 | override.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/add-extra-drive.yml -c local" |
| 61 | end |
David K. Bainbridge | 97b3f2f | 2016-06-16 18:08:49 -0700 | [diff] [blame] | 62 | end |
| 63 | |
David K. Bainbridge | d506aa6 | 2016-06-22 16:06:39 -0700 | [diff] [blame] | 64 | config.vm.define "switch" do |s| |
| 65 | s.vm.box = "ubuntu/trusty64" |
| 66 | s.vm.hostname = "fakeswitch" |
| 67 | s.vm.network "private_network", ip: "10.100.198.253" |
| 68 | s.vm.network "private_network", |
| 69 | type: "dhcp", |
Andy Bavier | 2505f59 | 2016-11-11 15:58:55 -0500 | [diff] [blame] | 70 | virtualbox__intnet: "cord-fabric-network", |
| 71 | libvirt__network_name: "cord-fabric-network", |
David K. Bainbridge | d506aa6 | 2016-06-22 16:06:39 -0700 | [diff] [blame] | 72 | mac: "cc37ab000001" |
| 73 | s.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
alshabib | b6ae086 | 2016-08-26 10:55:48 -0700 | [diff] [blame] | 74 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/fakeswitch.yml -c local" |
David K. Bainbridge | d506aa6 | 2016-06-22 16:06:39 -0700 | [diff] [blame] | 75 | s.vm.provider "virtualbox" do |v| |
David K. Bainbridge | 97b3f2f | 2016-06-16 18:08:49 -0700 | [diff] [blame] | 76 | v.memory = 1048 |
David K. Bainbridge | d506aa6 | 2016-06-22 16:06:39 -0700 | [diff] [blame] | 77 | v.name = "fakeswitch" |
| 78 | end |
| 79 | end |
| 80 | |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 81 | config.vm.define "leaf-1" do |s| |
| 82 | s.vm.box = "ubuntu/trusty64" |
| 83 | s.vm.hostname = "leaf-1" |
| 84 | s.vm.network "private_network", |
| 85 | #type: "dhcp", |
| 86 | ip: "0.0.0.0", |
| 87 | auto_config: false, |
| 88 | virtualbox__intnet: "cord-mgmt-network", |
| 89 | libvirt__network_name: "cord-mgmt-network", |
| 90 | mac: "cc37ab000011" |
| 91 | s.vm.network "private_network", |
| 92 | ip: "0.1.0.0", |
| 93 | auto_config: false, |
| 94 | virtualbox__intnet: "head-node-leaf-1", |
| 95 | libvirt__network_name: "head-node-leaf-1", |
| 96 | libvirt__forward_mode: "none", |
| 97 | libvirt__dhcp_enabled: false |
| 98 | s.vm.network "private_network", |
| 99 | ip: "0.2.0.0", |
| 100 | auto_config: false, |
| 101 | virtualbox__intnet: "compute-node-1-leaf-1", |
| 102 | libvirt__network_name: "compute-node-1-leaf-1", |
| 103 | libvirt__forward_mode: "none", |
| 104 | libvirt__dhcp_enabled: false |
| 105 | s.vm.network "private_network", |
| 106 | ip: "0.5.0.0", |
| 107 | auto_config: false, |
| 108 | virtualbox__intnet: "leaf-1-spine-1", |
| 109 | libvirt__network_name: "leaf-1-spine-1", |
| 110 | libvirt__forward_mode: "none", |
| 111 | libvirt__dhcp_enabled: false |
| 112 | s.vm.network "private_network", |
| 113 | ip: "0.6.0.0", |
| 114 | auto_config: false, |
| 115 | virtualbox__intnet: "leaf-1-spine-2", |
| 116 | libvirt__network_name: "leaf-1-spine-2", |
| 117 | libvirt__forward_mode: "none", |
| 118 | libvirt__dhcp_enabled: false |
| 119 | s.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
| 120 | if (ENV['FABRIC'] == "1") |
| 121 | s.vm.provision :shell, path: "scripts/install.sh", args: "-3f" |
| 122 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/leafswitch.yml -c local -e 'fabric=true net_prefix=10.6.1'" |
| 123 | else |
| 124 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/leafswitch.yml -c local -e 'net_prefix=10.6.1'" |
| 125 | end |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 126 | s.vm.provider :libvirt do |v, override| |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 127 | v.memory = 512 |
| 128 | v.cpus = 1 |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 129 | override.vm.synced_folder "..", "/cord", type: "nfs" |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 130 | end |
| 131 | s.vm.provider "virtualbox" do |v, override| |
| 132 | v.memory = 512 |
| 133 | v.cpus = 1 |
| 134 | end |
| 135 | end |
| 136 | |
| 137 | config.vm.define "leaf-2" do |s| |
| 138 | s.vm.box = "ubuntu/trusty64" |
| 139 | s.vm.hostname = "leaf-2" |
| 140 | s.vm.network "private_network", |
| 141 | #type: "dhcp", |
| 142 | ip: "0.0.0.0", |
| 143 | auto_config: false, |
| 144 | virtualbox__intnet: "cord-mgmt-network", |
| 145 | libvirt__network_name: "cord-mgmt-network", |
| 146 | mac: "cc37ab000012" |
| 147 | s.vm.network "private_network", |
| 148 | ip: "0.3.0.0", |
| 149 | auto_config: false, |
| 150 | virtualbox__intnet: "compute-node-2-leaf-2", |
| 151 | libvirt__network_name: "compute-node-2-leaf-2", |
| 152 | libvirt__forward_mode: "none", |
| 153 | libvirt__dhcp_enabled: false |
| 154 | s.vm.network "private_network", |
| 155 | ip: "0.4.0.0", |
| 156 | auto_config: false, |
| 157 | virtualbox__intnet: "compute-node-3-leaf-2", |
| 158 | libvirt__network_name: "compute-node-3-leaf-2", |
| 159 | libvirt__forward_mode: "none", |
| 160 | libvirt__dhcp_enabled: false |
| 161 | s.vm.network "private_network", |
| 162 | ip: "0.7.0.0", |
| 163 | auto_config: false, |
| 164 | virtualbox__intnet: "leaf-2-spine-1", |
| 165 | libvirt__network_name: "leaf-2-spine-1", |
| 166 | libvirt__forward_mode: "none", |
| 167 | libvirt__dhcp_enabled: false |
| 168 | s.vm.network "private_network", |
| 169 | ip: "0.8.0.0", |
| 170 | auto_config: false, |
| 171 | virtualbox__intnet: "leaf-2-spine-2", |
| 172 | libvirt__network_name: "leaf-2-spine-2", |
| 173 | libvirt__forward_mode: "none", |
| 174 | libvirt__dhcp_enabled: false |
| 175 | s.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
| 176 | if (ENV['FABRIC'] == "1") |
| 177 | s.vm.provision :shell, path: "scripts/install.sh", args: "-3f" |
| 178 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/leafswitch.yml -c local -e 'fabric=true net_prefix=10.6.1'" |
| 179 | else |
| 180 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/leafswitch.yml -c local -e 'net_prefix=10.6.1'" |
| 181 | end |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 182 | s.vm.provider :libvirt do |v, override| |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 183 | v.memory = 512 |
| 184 | v.cpus = 1 |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 185 | override.vm.synced_folder "..", "/cord", type: "nfs" |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 186 | end |
| 187 | s.vm.provider "virtualbox" do |v, override| |
| 188 | v.memory = 512 |
| 189 | v.cpus = 1 |
| 190 | end |
| 191 | end |
| 192 | |
| 193 | config.vm.define "spine-1" do |s| |
| 194 | s.vm.box = "ubuntu/trusty64" |
| 195 | s.vm.hostname = "spine-1" |
| 196 | s.vm.network "private_network", |
| 197 | #type: "dhcp", |
| 198 | ip: "0.0.0.0", |
| 199 | auto_config: false, |
| 200 | virtualbox__intnet: "cord-mgmt-network", |
| 201 | libvirt__network_name: "cord-mgmt-network", |
| 202 | mac: "cc37ab000021" |
| 203 | s.vm.network "private_network", |
| 204 | ip: "0.5.0.0", |
| 205 | auto_config: false, |
| 206 | virtualbox__intnet: "leaf-1-spine-1", |
| 207 | libvirt__network_name: "leaf-1-spine-1", |
| 208 | libvirt__forward_mode: "none", |
| 209 | libvirt__dhcp_enabled: false |
| 210 | s.vm.network "private_network", |
| 211 | ip: "0.7.0.0", |
| 212 | auto_config: false, |
| 213 | virtualbox__intnet: "leaf-2-spine-1", |
| 214 | libvirt__network_name: "leaf-2-spine-1", |
| 215 | libvirt__forward_mode: "none", |
| 216 | libvirt__dhcp_enabled: false |
| 217 | s.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
| 218 | if (ENV['FABRIC'] == "1") |
| 219 | s.vm.provision :shell, path: "scripts/install.sh", args: "-3f" |
| 220 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/spineswitch.yml -c local -e 'fabric=true net_prefix=10.6.1'" |
| 221 | else |
| 222 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/spineswitch.yml -c local -e 'net_prefix=10.6.1'" |
| 223 | end |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 224 | s.vm.provider :libvirt do |v, override| |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 225 | v.memory = 512 |
| 226 | v.cpus = 1 |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 227 | override.vm.synced_folder "..", "/cord", type: "nfs" |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 228 | end |
| 229 | s.vm.provider "virtualbox" do |v, override| |
| 230 | v.memory = 512 |
| 231 | v.cpus = 1 |
| 232 | end |
| 233 | end |
| 234 | |
| 235 | config.vm.define "spine-2" do |s| |
| 236 | s.vm.box = "ubuntu/trusty64" |
| 237 | s.vm.hostname = "spine-2" |
| 238 | s.vm.network "private_network", |
| 239 | #type: "dhcp", |
| 240 | ip: "0.0.0.0", |
| 241 | auto_config: false, |
| 242 | virtualbox__intnet: "cord-mgmt-network", |
| 243 | libvirt__network_name: "cord-mgmt-network", |
| 244 | mac: "cc37ab000022" |
| 245 | s.vm.network "private_network", |
| 246 | ip: "0.6.0.0", |
| 247 | auto_config: false, |
| 248 | virtualbox__intnet: "leaf-1-spine-2", |
| 249 | libvirt__network_name: "leaf-1-spine-2", |
| 250 | libvirt__forward_mode: "none", |
| 251 | libvirt__dhcp_enabled: false |
| 252 | s.vm.network "private_network", |
| 253 | ip: "0.8.0.0", |
| 254 | auto_config: false, |
| 255 | virtualbox__intnet: "leaf-2-spine-2", |
| 256 | libvirt__network_name: "leaf-2-spine-2", |
| 257 | libvirt__forward_mode: "none", |
| 258 | libvirt__dhcp_enabled: false |
| 259 | s.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
| 260 | if (ENV['FABRIC'] == "1") |
| 261 | s.vm.provision :shell, path: "scripts/install.sh", args: "-3f" |
| 262 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/spineswitch.yml -c local -e 'fabric=true net_prefix=10.6.1'" |
| 263 | else |
| 264 | s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/spineswitch.yml -c local -e 'net_prefix=10.6.1'" |
| 265 | end |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 266 | s.vm.provider :libvirt do |v, override| |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 267 | v.memory = 512 |
| 268 | v.cpus = 1 |
Andy Bavier | ec9829a | 2017-02-05 07:58:26 -0500 | [diff] [blame] | 269 | override.vm.synced_folder "..", "/cord", type: "nfs" |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 270 | end |
| 271 | s.vm.provider "virtualbox" do |v, override| |
| 272 | v.memory = 512 |
| 273 | v.cpus = 1 |
| 274 | end |
| 275 | end |
| 276 | |
alshabib | cb8e09b | 2016-09-06 11:41:29 -0700 | [diff] [blame] | 277 | config.vm.define "testbox" do |d| |
| 278 | d.vm.box = "fgrehm/trusty64-lxc" |
| 279 | d.ssh.forward_agent = true |
| 280 | d.vm.hostname = "testbox" |
| 281 | d.vm.network "private_network", ip: "10.0.3.100", lxc__bridge_name: 'lxcbr0' |
| 282 | d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
| 283 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/corddev.yml -c local" |
| 284 | config.vm.provider :lxc do |lxc| |
| 285 | # Same effect as 'customize ["modifyvm", :id, "--memory", "1024"]' for VirtualBox |
| 286 | lxc.customize 'cgroup.memory.limit_in_bytes', '2048M' |
alshabib | 270d766 | 2016-09-06 14:09:18 -0700 | [diff] [blame] | 287 | lxc.customize 'aa_profile', 'unconfined' |
| 288 | lxc.customize 'cgroup.devices.allow', 'b 7:* rwm' |
| 289 | lxc.customize 'cgroup.devices.allow', 'c 10:237 rwm' |
alshabib | cb8e09b | 2016-09-06 11:41:29 -0700 | [diff] [blame] | 290 | end |
David K. Bainbridge | a0a36e9 | 2016-10-13 18:05:33 -0700 | [diff] [blame] | 291 | end |
alshabib | cb8e09b | 2016-09-06 11:41:29 -0700 | [diff] [blame] | 292 | |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 293 | config.vm.define "compute-node-1" do |c| |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 294 | c.vm.communicator = "none" |
| 295 | c.vm.hostname = "compute-node-1" |
| 296 | c.vm.network "private_network", |
| 297 | adapter: 1, |
| 298 | ip: "0.0.0.0", |
| 299 | auto_config: false, |
| 300 | virtualbox__intnet: "cord-mgmt-network", |
| 301 | libvirt__network_name: "cord-mgmt-network" |
| 302 | c.vm.network "private_network", |
| 303 | adapter: 2, # The fabric interface for each node |
| 304 | ip: "0.2.0.0", |
| 305 | auto_config: false, |
| 306 | virtualbox__intnet: "compute-node-1-leaf-1", |
| 307 | libvirt__network_name: "compute-node-1-leaf-1", |
| 308 | libvirt__forward_mode: "none", |
| 309 | libvirt__dhcp_enabled: false |
| 310 | c.vm.provider :libvirt do |v| |
| 311 | v.memory = 8192 |
| 312 | v.cpus = 4 |
| 313 | v.machine_virtual_size = 100 |
| 314 | v.storage :file, :size => '100G', :type => 'qcow2' |
| 315 | v.boot 'network' |
| 316 | v.boot 'hd' |
| 317 | v.nested = true |
| 318 | end |
| 319 | c.vm.provider "virtualbox" do |v, override| |
| 320 | override.vm.box = "clink15/pxe" |
| 321 | v.memory = 1048 |
| 322 | v.gui = "true" |
| 323 | end |
| 324 | end |
| 325 | |
| 326 | config.vm.define "compute-node-2" do |c| |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 327 | c.vm.communicator = "none" |
| 328 | c.vm.hostname = "compute-node-2" |
| 329 | c.vm.network "private_network", |
| 330 | adapter: 1, |
| 331 | ip: "0.0.0.0", |
| 332 | auto_config: false, |
| 333 | virtualbox__intnet: "cord-mgmt-network", |
| 334 | libvirt__network_name: "cord-mgmt-network" |
| 335 | c.vm.network "private_network", |
| 336 | adapter: 2, # The fabric interface for each node |
| 337 | ip: "0.3.0.0", |
| 338 | auto_config: false, |
| 339 | virtualbox__intnet: "compute-node-2-leaf-2", |
| 340 | libvirt__network_name: "compute-node-2-leaf-2", |
| 341 | libvirt__forward_mode: "none", |
| 342 | libvirt__dhcp_enabled: false |
| 343 | c.vm.provider :libvirt do |v| |
| 344 | v.memory = 8192 |
| 345 | v.cpus = 4 |
| 346 | v.machine_virtual_size = 100 |
| 347 | v.storage :file, :size => '100G', :type => 'qcow2' |
| 348 | v.boot 'network' |
| 349 | v.boot 'hd' |
| 350 | v.nested = true |
| 351 | end |
| 352 | c.vm.provider "virtualbox" do |v, override| |
| 353 | override.vm.box = "clink15/pxe" |
| 354 | v.memory = 1048 |
| 355 | v.gui = "true" |
| 356 | end |
| 357 | end |
| 358 | |
| 359 | config.vm.define "compute-node-3" do |c| |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 360 | c.vm.communicator = "none" |
| 361 | c.vm.hostname = "compute-node-3" |
| 362 | c.vm.network "private_network", |
| 363 | adapter: 1, |
| 364 | ip: "0.0.0.0", |
| 365 | auto_config: false, |
| 366 | virtualbox__intnet: "cord-mgmt-network", |
| 367 | libvirt__network_name: "cord-mgmt-network" |
| 368 | c.vm.network "private_network", |
| 369 | adapter: 2, # The fabric interface for each node |
| 370 | ip: "0.4.0.0", |
| 371 | auto_config: false, |
| 372 | virtualbox__intnet: "compute-node-3-leaf-2", |
| 373 | libvirt__network_name: "compute-node-3-leaf-2", |
| 374 | libvirt__forward_mode: "none", |
| 375 | libvirt__dhcp_enabled: false |
| 376 | c.vm.provider :libvirt do |v| |
| 377 | v.memory = 8192 |
| 378 | v.cpus = 4 |
| 379 | v.machine_virtual_size = 100 |
| 380 | v.storage :file, :size => '100G', :type => 'qcow2' |
| 381 | v.boot 'network' |
| 382 | v.boot 'hd' |
| 383 | v.nested = true |
| 384 | end |
| 385 | c.vm.provider "virtualbox" do |v, override| |
| 386 | override.vm.box = "clink15/pxe" |
| 387 | v.memory = 1048 |
| 388 | v.gui = "true" |
Andy Bavier | 99c11d3 | 2016-09-14 17:21:20 -0400 | [diff] [blame] | 389 | end |
| 390 | end |
| 391 | |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 392 | if Vagrant.has_plugin?("vagrant-cachier") |
| 393 | config.cache.scope = :box |
| 394 | end |
| 395 | |
| 396 | end |