This repository has been archived by the owner on Nov 30, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathVagrantfile
113 lines (103 loc) · 3.42 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
#!/usr/bin/env ruby
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
config.vm.box = 'opscode_ubuntu-12.04_chef-provisionerless'
config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box'
config.berkshelf.enabled = true
config.omnibus.chef_version = '11.4.4'
config.vm.provider 'virtualbox' do |vb|
vb.customize ['modifyvm', :id, '--memory', '768']
end
config.vm.define :app do |app|
app.vm.host_name = 'rubygems-org-app'
app.vm.network 'private_network', :ip => '33.33.33.10'
app.vm.provision 'chef_solo' do |chef|
chef.roles_path = 'chef/roles'
chef.data_bags_path = 'chef/data_bags'
chef.add_role 'app'
chef.add_role 'vagrant'
chef.json = {
"application" => {
"name" => "rubygems",
"repository" => "https://github.com/rubygems/rubygems.org.git",
"rails_env" => "staging",
"rails_root" => "/applications/rubygems/staging",
"server_names" => ["vagrant.rubygems.org"],
"use_ssl" => true,
"force_ssl" => true,
"rails_postgresql_host" => "localhost",
"ssl_key" => "dev.rubygems.org.key",
"ssl_cert" => "dev.rubygems.org.crt",
"app_server" => {
"name" => "thin",
"concurrency" => 4
}
},
"environment_variables" => {
"RAILS_ENV" => "staging",
"RACK_ENV" => "staging",
"REDIS_URL" => "redis://localhost:6379/0",
"TMOUT" => "600"
}
}
end
end
config.vm.define :balancer do |balancer|
balancer.vm.host_name = 'rubygems-org-balancer'
balancer.vm.network 'private_network', :ip => '33.33.33.11'
balancer.vm.provision 'chef_solo' do |chef|
chef.roles_path = 'chef/roles'
chef.data_bags_path = 'chef/data_bags'
chef.add_role 'balancer'
chef.add_role 'vagrant'
chef.json = {
"application" => {
"name" => "rubygems",
"repository" => "https://github.com/rubygems/rubygems.org.git",
"rails_env" => "staging",
"rails_root" => "/applications/rubygems/staging",
"server_names" => ["vagrant.rubygems.org"],
"use_ssl" => true,
"force_ssl" => true,
"ssl_key" => "dev.rubygems.org.key",
"ssl_cert" => "dev.rubygems.org.crt",
"app_server" => {
"name" => "thin",
"concurrency" => 4
}
}
}
end
end
config.vm.define :dbmaster do |dbmaster|
dbmaster.vm.host_name = 'rubygems-org-dbmaster'
dbmaster.vm.network 'private_network', :ip => '33.33.33.12'
dbmaster.vm.provision 'chef_solo' do |chef|
chef.roles_path = 'chef/roles'
chef.data_bags_path = 'chef/data_bags'
chef.add_role 'db_master'
chef.add_role 'vagrant'
end
end
config.vm.define :search do |search|
search.vm.host_name = 'rubygems-org-search'
search.vm.network 'private_network', :ip => '33.33.33.13'
search.vm.provision 'chef_solo' do |chef|
chef.roles_path = 'chef/roles'
chef.data_bags_path = 'chef/data_bags'
chef.add_role 'search'
chef.add_role 'vagrant'
chef.json = {
"elasticsearch" => {
"cluster" => {
"name" => "rubygems_vagrant"
},
"bootstrap" => {
"mlockall" => false
}
}
}
end
end
end