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