forked from eatsan/open5gs-ueransim-vagrant-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile.shell
79 lines (61 loc) · 2.37 KB
/
Vagrantfile.shell
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Variables
OPEN5GS_IPv4_ADDR = "192.168.56.10"
UERANSIM_IPv4_ADDR = "192.168.56.11"
TAC = "2"
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Common configs for both VMs are listed here
config.vm.box = "bento/ubuntu-18.04"
config.vm.box_version = "202112.19.0"
config.vm.box_check_update = false
config.vm.synced_folder ".", "/vagrant", disabled: true
# VM #1: OPEN5GS 5G core network (All-in-one)
config.vm.define "open5gs" do |open5gs|
open5gs.vm.network "private_network", ip: OPEN5GS_IPv4_ADDR
# open5gs.vm.network "public_network"
# forward port for guest tcp/3000 (Open5GS WebUI) to host 3030
open5gs.vm.network "forwarded_port", guest: 3000, host: 3030
open5gs.vm.provider "virtualbox" do |vb|
# Customize the amount of cpu & memory on the VM:
vb.memory = "4096"
vb.cpus = "2"
end
# Open5gs VM bootstrap provisioning with a shell script.
open5gs.vm.provision "shell" do |s|
s.path = "shell-provisioners/bootstrap-open5gs.sh"
s.args = [OPEN5GS_IPv4_ADDR, TAC]
end
# Open5gs VM provisioner for every up/reload
open5gs.vm.provision "shell", run: "always" do |s|
s.path = "shell-provisioners/always-open5gs.sh"
s.args = []
end
end
# VM#2: UERANSIM as our UE & RAN (gNB) Simulator
config.vm.define "ueransim" do |ueransim|
ueransim.vm.network "private_network", ip: UERANSIM_IPv4_ADDR
ueransim.vm.provider "virtualbox" do |vb|
# Customize the amount of cpu & memory on the VM:
vb.memory = "2048"
vb.cpus = "1"
end
#Enable provisioning with a shell script.
ueransim.vm.provision "shell" do |s|
s.path = "shell-provisioners/bootstrap-ueransim.sh"
s.args = [UERANSIM_IPv4_ADDR, OPEN5GS_IPv4_ADDR, TAC]
end
# UERANSIM VM provisioned for every up/reload
ueransim.vm.provision "shell", run: "always" do |s|
s.path = "shell-provisioners/always-ueransim.sh"
s.args = []
end
end
end