forked from adhearsion/SIPtreadmill
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
118 lines (100 loc) · 3 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
114
115
116
117
118
Vagrant.configure("2") do |config|
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.omnibus.chef_version = :latest
config.vm.define :dev do |dev|
dev.vm.network :private_network, ip: "10.203.132.10"
dev.vm.hostname = "dev.local.treadmill.mojolingo.net"
dev.vm.provider :virtualbox do |vb|
vb.name = "SIP-Treadmil-Dev"
end
dev.vm.synced_folder ".", "/srv/treadmill/current"
dev.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "apt"
chef.add_recipe "locale"
chef.add_recipe "treadmill::database"
chef.add_recipe "treadmill::app"
chef.add_recipe "phantomjs"
chef.log_level = :debug
chef.json = {
'locale' => {
'lang' => "en_US.utf8"
},
ruby_build: {
git_ref: 'v20130806',
},
'rvm' => {
'installs' => { 'vagrant' => true },
'user_installs' => [
{
'user' => 'vagrant',
'default_ruby' => '2.2.0',
'rubies' => ['2.2.0'],
'install_rubies' => true,
'gems' => {
'2.2.0' => [
{ 'name' => 'bundler' }
]
}
}
]
},
"authorization" => {
"sudo" => {
"users" => ["vagrant"],
"passwordless" => "true"
}
},
"postgresql" => {
"password" => {
"postgres" => "iloverandompasswordsbutthiswilldo"
}
}
}
end
end
config.vm.define :sink do |sink|
public_ip = "10.203.132.11"
sink.vm.network :private_network, ip: public_ip
sink.vm.hostname = "sink.local.treadmill.mojolingo.net"
sink.vm.provider :virtualbox do |vb|
vb.name = "SIP-Treadmil-sink"
end
sink.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "apt"
chef.add_recipe "freeswitch"
chef.log_level = :debug
chef.json = {
freeswitch: {
tls_only: false,
local_ip: public_ip,
dialplan: {
head_fragments: '<extension name="sink">
<condition>
<action application="answer"/>
<action application="sleep" data="10000"/>
</condition>
</extension>'
}
}
}
end
end
config.vm.define :deploy do |deploy|
deploy.vm.box = 'ubuntu/trusty64'
public_ip = "10.203.132.12"
deploy.vm.network :private_network, ip: public_ip
deploy.vm.hostname = "local.treadmill.mojolingo.net"
deploy.vm.provider :virtualbox do |vb|
vb.name = "SIP-Treadmil-Deploy"
end
deploy.vm.provision "shell", inline: <<-SCRIPT
wget -qO - https://deb.packager.io/key | sudo apt-key add -
echo "deb https://deb.packager.io/gh/mojolingo/SIPtreadmill trusty develop" | sudo tee /etc/apt/sources.list.d/SIPtreadmill.list
sudo apt-get -y update
sudo apt-get -y install siptreadmill
SCRIPT
end
end