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