Merge "BUG:6009 Handling the FlowRemove Event message from the Event Listener"
[netvirt.git] / Vagrantfile
1 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
2 VAGRANTFILE_API_VERSION = "2"
3
4 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
5
6   config.vm.box = "trusty64"
7   config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box"
8   config.vm.provider "vmware_fusion" do |v, override|
9       override.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_ubuntu-14.04_chef-provisionerless.box"
10   end
11
12   config.vm.provision "shell", path: "resources/puppet/scripts/bootstrap.sh"
13
14   config.vm.provision "puppet" do |puppet|
15       puppet.hiera_config_path = "resources/puppet/hiera.yaml"
16       puppet.working_directory = "/vagrant/resources/puppet"
17       puppet.manifests_path = "resources/puppet/manifests"
18       puppet.manifest_file  = "base.pp"
19   end
20
21   num_compute_nodes = (ENV['DEVSTACK_NUM_COMPUTE_NODES'] || 1).to_i
22
23   # ip configuration
24   control_ip = "192.168.50.20"
25   compute_ip_base = "192.168.50."
26   compute_ips = num_compute_nodes.times.collect { |n| compute_ip_base + "#{n+21}" }
27
28   config.vm.define "devstack-control" do |control|
29     control.vm.hostname = "devstack-control"
30     control.vm.network "private_network", ip: "#{control_ip}"
31     control.vm.network "forwarded_port", guest: 8080, host: 8081
32     control.vm.provider :virtualbox do |vb|
33       vb.memory = 4096
34     end
35     control.vm.provider "vmware_fusion" do |vf|
36       vf.vmx["memsize"] = "4096"
37     end
38     control.vm.provider :libvirt do |lv|
39       lv.memory = 4096
40     end
41     control.vm.provision "puppet" do |puppet|
42       puppet.hiera_config_path = "resources/puppet/hiera.yaml"
43       puppet.working_directory = "/vagrant/resources/puppet"
44       puppet.manifests_path = "resources/puppet/manifests"
45       puppet.manifest_file  = "devstack-control.pp"
46     end
47   end
48
49   # Devstack Compute Nodes
50   num_compute_nodes.times do |n|
51     config.vm.define "devstack-compute-#{n+1}" do |compute|
52       compute_ip = compute_ips[n]
53       compute_index = n+1
54       compute.vm.hostname = "devstack-compute-#{compute_index}"
55       compute.vm.network "private_network", ip: "#{compute_ip}"
56       compute.vm.provider :virtualbox do |vb|
57         vb.memory = 4096
58       end
59       compute.vm.provider "vmware_fusion" do |vf|
60         vf.vmx["memsize"] = "4096"
61       end
62       compute.vm.provider :libvirt do |lv|
63         lv.memory = 4096
64       end
65       compute.vm.provision "puppet" do |puppet|
66         puppet.hiera_config_path = "resources/puppet/hiera.yaml"
67         puppet.working_directory = "/vagrant/resources/puppet"
68         puppet.manifests_path = "resources/puppet/manifests"
69         puppet.manifest_file  = "devstack-compute.pp"
70       end
71     end
72   end
73 end