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
112 lines (87 loc) · 3.47 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
# -*- 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 = "https://github.com/CommanderK5/packer-centos-template/releases/download/0.6.8/vagrant-centos-6.8.box"
config.vm.box = "centos-min"
config.vm.provision "shell", inline: "yum -y update nss\*"
# Fix for https://bugs.centos.org/view.php?id=9212
config.vm.provision "shell", inline: "yum -y update python"
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_BACKUP'] == '1'
config.vm.define "backup" do |backup|
backup.vm.network "private_network", ip: "192.168.57.201"
backup.vm.network "private_network", ip: "172.16.57.201"
backup.vm.provider :virtualbox do |vm|
file_to_disk = '.vagrant/tmp/backup.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
backup.vm.provision :salt do |s|
s.verbose = true
s.install_type = "git v0.17.2"
s.minion_config = "provisioning/salt/minion/backup/server"
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.install_type = "git v0.17.2"
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.install_type = "git v0.17.2"
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.install_type = "git v0.17.2"
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.install_type = "git v0.17.2"
s.minion_config = "provisioning/salt/minion/web/mirror"
s.run_highstate = true
end
end
end
end