This repository has been archived by the owner on Sep 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
47 lines (35 loc) · 1.57 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# We get the publicIP of this machine to pass it to ErizoController
require 'socket'
def my_first_private_ipv4
Socket.ip_address_list.detect{|intf| intf.ipv4_private?}
end
def my_first_public_ipv4
Socket.ip_address_list.detect{|intf| intf.ipv4? and !intf.ipv4_loopback? and !intf.ipv4_multicast? and !intf.ipv4_private?}
end
ip= my_first_public_ipv4.ip_address unless my_first_public_ipv4.nil?
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "hashicorp/precise32"
config.vm.provision :shell, :path => "bootstrap_licode.sh", :args => ip
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.network :forwarded_port, guest: 3001, host: 3001
config.vm.network :forwarded_port, guest: 8080, host: 8080
# port forwarding for licode
for i in 30000..31000
config.vm.network :forwarded_port, guest: i, host: i, protocol: 'udp'
end
config.vm.define "licode_dev" do |licode_dev|
end
## More than 1 Core
# vb.customize ["modifyvm", :id, "--ioapic", "on"]
# config.vm.provider :virtualbox do |vb|
# vb.customize ["modifyvm", :id, "--memory", "2048"]
# vb.customize ["modifyvm", :id, "--cpus", "2"]
end