-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
53 lines (48 loc) · 2.24 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
45
46
47
48
49
50
51
52
53
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "raring64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.define :controller do |controller_config|
controller_config.vm.hostname = "controller"
controller_config.vm.network :private_network, ip: "192.168.2.10"
# ignore the ip address in next line - it won't be set in the VM
controller_config.vm.network :private_network, ip: "192.168.3.10", auto_config: false
controller_config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", 4]
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
vb.customize ["modifyvm", :id, "--nictype3", "virtio"]
vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
end
controller_config.vm.provision :ansible do |ansible|
ansible.playbook = "devstack.yml"
ansible.inventory_file = "ansible_hosts"
ansible.limit = "controller"
ansible.verbose = true
end
end
config.vm.define :compute1 do |compute1_config|
compute1_config.vm.hostname = "compute1"
compute1_config.vm.network :private_network, ip: "192.168.2.11"
# ignore the ip address in next line - it won'tbe set in the VM
compute1_config.vm.network :private_network, ip: "192.168.3.11", auto_config: false
compute1_config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", 4]
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
vb.customize ["modifyvm", :id, "--nictype3", "virtio"]
vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
end
compute1_config.vm.provision :ansible do |ansible|
ansible.playbook = "devstack.yml"
ansible.inventory_file = "ansible_hosts"
ansible.limit = "compute1"
ansible.verbose = true
end
end
end