-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathVagrantfile.example
84 lines (65 loc) · 2.52 KB
/
Vagrantfile.example
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
$redhat_username = "jcastillo-nycrecords"
$redhat_password = "R%bOjIaNgu"
Vagrant.configure("2") do |config|
config.vm.box = "rhel-6.8"
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
vb.memory = "4096"
end
# Proxy Configuration
config.vm.provision "shell" do |s|
s.inline = 'sudo cp /vagrant/build_scripts/proxy.sh /etc/profile.d/'
end
config.vm.provision :reload
# RedHat Subscription Management
config.vm.provision "shell" do |s|
s.path = "build_scripts/subscription_manager.sh"
s.args = [$redhat_username, $redhat_password]
end
config.vm.provision :reload
config.vm.provision "shell" do |s|
s.inline = 'sudo yum -y groupinstall "Development Tools" && sudo /etc/init.d/vboxadd setup && echo "cd /vagrant" >> /home/vagrant/.bash_profile'
end
# Single server VM
config.vm.define "default", primary: true do |default|
default.vm.network "forwarded_port", guest: 80, host: 8080
default.vm.network "forwarded_port", guest: 443, host: 8443
default.vm.network "forwarded_port", guest: 5000, host: 8000
default.vm.network "forwarded_port", guest: 5432, host: 8432
default.vm.network "forwarded_port", guest: 8200, host: 8200
default.vm.network "private_network", ip: "10.0.0.2"
default.vm.provision "shell", path: "build_scripts/web_setup/web_setup.sh", args: 'single_server'
default.vm.provision "shell", path: "build_scripts/app_setup/app_setup.sh"
default.vm.provision "shell", path: "build_scripts/es_setup/es_setup.sh", args: 'single_server'
default.vm.provision "shell", path: "build_scripts/db_setup/db_setup.sh"
end
config.vm.define "web_1", autostart: false do |web|
# Web Server 1 Configuration
end
config.vm.define "web_2", autostart: false do |web|
# Web Server 1 Configuration
end
config.vm.define "app_1", autostart: false do |app|
# App Server 1 Configuration
end
config.vm.define "app_2", autostart: false do |app|
# App Server 2 Configuration
end
config.vm.define "db_1", autostart: false do |db|
# Database Server 1 Configuration
end
config.vm.define "db_2", autostart: false do |db|
# Database Server 2 Configuration
end
config.vm.define "es_1", autostart: false do |es|
# Elasticsearch Server 1 Configuration
end
config.vm.define "es_2", autostart: false do |es|
# Elasticsearch Server 1 Configuration
end
config.vm.define "es_3", autostart: false do |es|
# Elasticsearch Server 1 Configuration
end
end