-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile.example
54 lines (42 loc) · 2.01 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
$default_system_name = "WomensActivism_" + Time.now.strftime("%m-%d-%Y_%H-%M")
$redhat_username = ENV['RH_USER'] || "RHSN_USERNAME"
$redhat_password = ENV['RH_PASSWORD'].to_s.empty? ? "RHSN_PASSWORD" : ENV['RH_PASSWORD']
$rhsn_system_name = ENV['RHSN_SYSTEM_NAME'].to_s.empty? ? $default_system_name : ENV['RHSN_SYSTEM_NAME']
Vagrant.configure("2") do |config|
config.vm.box = "rhel-6.8_vb-5.1.32"
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
vb.memory = "4096"
end
if ENV['http_proxy']
# 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
end
# RedHat Subscription Management
config.vm.provision "shell" do |s|
s.path = "build_scripts/subscription_manager.sh"
s.args = [$redhat_username, $redhat_password, $rhsn_system_name]
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: 10080
default.vm.network "forwarded_port", guest: 443, host: 10443
default.vm.network "forwarded_port", guest: 5000, host: 10000
default.vm.network "forwarded_port", guest: 5432, host: 10432
default.vm.network "forwarded_port", guest: 8200, host: 10200
default.vm.network "private_network", ip: "10.5.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", args:'single_server"
end
end