This repository has been archived by the owner on Aug 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Vagrantfile
179 lines (140 loc) · 5.69 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box"
config.vm.box = "centos-min"
config.vm.synced_folder "provisioning/salt/roots/", "/srv/"
unless ENV['VAGRANT_SKIP_PYPI_DEV'] == '1'
config.vm.define "pypi_dev" do |pypi_dev|
pypi_dev.vm.hostname = "pypi-dev"
pypi_dev.vm.network "private_network", ip: "192.168.57.9"
pypi_dev.vm.network "private_network", ip: "172.16.57.9"
pypi_dev.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/web/pypi_dev"
s.run_highstate = true
end
end
end
if ENV['VAGRANT_MONITORING'] == '1'
config.vm.define "monitoring_server" do |monitoring_server|
monitoring_server.vm.hostname = "pypi-monitoring"
monitoring_server.vm.network "private_network", ip: "192.168.57.200"
monitoring_server.vm.network "private_network", ip: "172.16.57.200"
monitoring_server.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/monitoring/server"
s.run_highstate = true
end
end
end
if ENV['VAGRANT_PYPI'] == '1'
config.vm.define "pypi" do |pypi|
pypi.vm.network "private_network", ip: "192.168.57.10"
pypi.vm.network "private_network", ip: "172.16.57.10"
pypi.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/web/pypi"
s.run_highstate = true
end
end
config.vm.define "pypi_log" do |pypi_log|
pypi_log.vm.network "private_network", ip: "192.168.57.15"
pypi_log.vm.network "private_network", ip: "172.16.57.15"
pypi_log.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/web/pypi_log"
s.run_highstate = true
end
end
config.vm.define "mirror" do |mirror|
mirror.vm.network "private_network", ip: "192.168.57.20"
mirror.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/web/mirror"
s.run_highstate = true
end
end
end
if ENV['VAGRANT_POSTGRES_CLUSTER'] == '1'
config.vm.define "pg_primary" do |pg_primary|
pg_primary.vm.network "private_network", ip: "192.168.57.5"
pg_primary.vm.network "private_network", ip: "172.16.57.5"
pg_primary.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/pg_cluster/primary"
s.run_highstate = true
end
end
config.vm.define "pg_standby_0" do |pg_standby_0|
pg_standby_0.vm.network "private_network", ip: "192.168.57.6"
pg_standby_0.vm.network "private_network", ip: "172.16.57.6"
pg_standby_0.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/pg_cluster/standby_0"
s.run_highstate = true
end
end
config.vm.define "pgpool_0" do |pgpool_0|
pgpool_0.vm.network "private_network", ip: "192.168.57.7"
pgpool_0.vm.network "private_network", ip: "172.16.57.7"
pgpool_0.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/pg_cluster/pgpool_0"
s.run_highstate = true
end
end
config.vm.define "pgpool_1" do |pgpool_1|
pgpool_1.vm.network "private_network", ip: "192.168.57.8"
pgpool_1.vm.network "private_network", ip: "172.16.57.8"
pgpool_1.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/pg_cluster/pgpool_1"
s.run_highstate = true
end
end
end
if ENV['VAGRANT_GLUSTER'] == '1'
config.vm.define "gluster_0" do |gluster_0|
gluster_0.vm.network "private_network", ip: "192.168.57.30"
gluster_0.vm.network "private_network", ip: "172.16.57.30"
gluster_0.vm.provider :virtualbox do |vm|
file_to_disk = '.vagrant/tmp/gluster_0.vdi'
vm.customize ['createhd', '--filename', file_to_disk, '--size', 10 * 1024]
vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
gluster_0.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/gluster_cluster/node"
s.run_highstate = true
end
end
config.vm.define "gluster_1" do |gluster_1|
gluster_1.vm.network "private_network", ip: "192.168.57.31"
gluster_1.vm.network "private_network", ip: "172.16.57.31"
gluster_1.vm.provider :virtualbox do |vm|
file_to_disk = '.vagrant/tmp/gluster_1.vdi'
vm.customize ['createhd', '--filename', file_to_disk, '--size', 10 * 1024]
vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
gluster_1.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/gluster_cluster/node"
s.run_highstate = true
end
end
config.vm.define "gluster_client" do |gluster_client|
gluster_client.vm.network "private_network", ip: "192.168.57.39"
gluster_client.vm.network "private_network", ip: "172.16.57.39"
gluster_client.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/gluster_cluster/client"
s.run_highstate = true
end
end
end
end