forked from lorin/devstack-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
44 lines (36 loc) · 1.55 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
config.vm.box = "ubuntu/trusty64"
config.ssh.forward_agent = true
# eth1, this will be the endpoint
config.vm.network :private_network, ip: "192.168.27.100"
# eth2, this will be the OpenStack "public" network
# ip and subnet mask should match floating_ip_range var in devstack.yml
config.vm.network :private_network, ip: "172.24.4.225", :netmask => "255.255.255.0", :auto_config => false
# config for default (VirtualBox) provider
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", 6144]
vb.customize ["modifyvm", :id, "--cpus", 2]
# eth2 must be in promiscuous mode for floating IPs to be accessible
vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
end
# config for KVM (libvirt) provider
config.vm.provider :libvirt do |lv, override|
override.vm.box = "matjazp/ubuntu-trusty64"
lv.memory = 8192
lv.cpus = 2
lv.nested = true
lv.volume_cache = 'none'
end
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "devstack.yml"
ansible.verbose = "v"
end
config.vm.provision :shell, :inline => "cd devstack; sudo -u vagrant env HOME=/home/vagrant ./stack.sh"
config.vm.provision :shell, :inline => "ovs-vsctl add-port br-ex eth2"
config.vm.provision :shell, :inline => "virsh net-destroy default"
end