-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
66 lines (55 loc) · 1.97 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
54
55
56
57
58
59
60
61
62
63
64
65
66
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "network" do |machine|
machine.vm.box = "ubuntu/trusty64"
machine.vm.hostname = "network"
machine.vm.network :private_network, ip: "10.1.0.3",
:netmask => "255.255.0.0"
machine.vm.network :private_network, ip: "10.2.0.3",
:netmask => "255.255.0.0"
machine.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 1280]
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-vms"]
end
end
config.vm.define "compute-001" do |machine|
machine.vm.box = "ubuntu/trusty64"
machine.vm.hostname = "compute-001"
machine.vm.network :private_network, ip: "10.1.0.4",
:netmask => "255.255.0.0"
machine.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 1280]
end
end
config.vm.define "controller", primary: true do |machine|
machine.vm.box = "ubuntu/trusty64"
machine.vm.hostname = "controller"
machine.vm.network "forwarded_port", guest: 80, host: 8080
machine.vm.network :private_network, ip: "10.1.0.2",
:netmask => "255.255.0.0"
machine.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 2048]
end
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "provisioning/getreqs.yml"
ansible.limit = 'all'
end
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "provisioning/prep.yml"
ansible.limit = 'all'
end
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "provisioning/deploy.yml"
ansible.groups = {
"compute" => ["compute-001"]
}
ansible.limit = 'all'
end
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "provisioning/test.yml"
ansible.limit = 'all'
end
end
end