This repository has been archived by the owner on Nov 29, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
66 lines (57 loc) · 1.81 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
MEMORY = ENV['VAGRANT_MEMORY'] || '512'
CORES = ENV['VAGRANT_CORES'] || '1'
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_i]
vb.customize ["modifyvm", :id, "--cpus", CORES.to_i]
end
config.berkshelf.enabled = true
config.omnibus.chef_version = :latest
config.vm.provision :shell, :inline => "ulimit -n 10000"
config.vm.provision :shell, :path => "script/bootstrap.sh"
config.vm.define "database" do |database|
database.vm.hostname = "rubycas-database-server-berkshelf"
database.vm.network :private_network, ip: "33.33.33.11"
database.vm.provision :chef_solo do |chef|
chef.data_bags_path = 'data_bags'
chef.json = {
:mysql => {
:server_root_password => 'rootpass',
:server_debian_password => 'debpass',
:server_repl_password => 'replpass',
:bind_address => '33.33.33.11'
},
:postgresql => {
:password => {
:postgres => '123456'
}
},
:rubycas => {
:database => {
:password => 'pass'
}
}
}
chef.run_list = [
"recipe[rubycas::database]",
]
end
database.vm.provision :shell, :path => "script/create_mock_authenticator_db.sh"
end
config.vm.define "app" do |app|
app.vm.hostname = "rubycas-app-server-berkshelf"
app.vm.network :private_network, ip: "33.33.33.10"
app.vm.provision :chef_solo do |chef|
chef.data_bags_path = 'data_bags'
chef.json = {}
chef.run_list = [
"recipe[rubycas::server]",
"recipe[rubycas::nginx]"
]
end
end
end