Repository navigation
Expand file tree
/
Copy pathconfig.env
More file actions
253 lines (232 loc) · 13.5 KB
/
Copy pathconfig.env
File metadata and controls
253 lines (232 loc) · 13.5 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# =============================================================================
# config.env — parameters of the Open5GS 5G core + UERANSIM on k3s
#
# This file is read (source) by install.sh, test.sh, uninstall.sh and
# scripts/subscribers.sh. It is bash syntax: no spaces around the "=".
# To use another file: CONFIG=/path/my.env sudo -E ./install.sh
# After changing any value, run ./install.sh again (idempotent).
# =============================================================================
# ----------------------------------------------------------------------------
# Host environment
# ----------------------------------------------------------------------------
# auto -> detects (graphical.target or NetworkManager active => desktop)
# desktop -> configures NetworkManager to ignore the k3s interfaces
# server -> does not touch NetworkManager
ENV_PROFILE="auto"
# k3s node address:
# stable -> (default) own virtual interface (dummy) with a fixed private IP,
# created at every boot. The cluster does NOT depend on the host IP: DHCP,
# switching Wi-Fi/cable or another network break nothing. The internet (N6)
# goes out through the current default route.
# iface -> uses the physical interface (old behavior). If the IP changes,
# ./install.sh must run again.
NODE_IP_MODE="stable"
STABLE_IFACE="k3s0" # name of the virtual interface (up to 15 characters)
STABLE_IP="10.254.254.1" # private IP, outside the LAN and the cluster CIDRs
# Physical interface/IP of the host. Empty = detected from the default route at run time.
# With NODE_IP_MODE=stable they are only used for the WebUI URL and for EXPOSE_RAN.
# A desktop is usually Wi-Fi/enpXsY; a server is usually ensX/enoX.
NODE_IFACE=""
NODE_IP=""
# User that gets ~/.kube/config (kubectl without sudo). Empty = whoever called
# sudo ($SUDO_USER); if the script runs directly as root, root is configured.
KUBECONFIG_USER=""
# Add the alias "k=kubectl" and completion to that user's ~/.bashrc
SHELL_EXTRAS=true
# Where the cloned charts and the helm binary (if installed by us) live
INSTALL_DIR="/opt/open5gs-k3s"
# Install linux-modules-extra-$(uname -r) if the sctp module does not exist
# (common on server "virtual"/cloud kernels).
AUTO_INSTALL_MODULES_EXTRA=true
# If UFW is active, open the cluster CIDRs and the needed ports.
CONFIGURE_UFW=true
# If firewalld is active, put the cluster networks in the "trusted" zone
# (without it, it rejects direct traffic between pods: UE<->gNB and N3 gNB<->UPF).
CONFIGURE_FIREWALLD=true
# ----------------------------------------------------------------------------
# Versions (pinned so that desktop and server stay the same)
# ----------------------------------------------------------------------------
K3S_VERSION="v1.36.5+k3s1"
HELM_VERSION="v3.22.1"
GRADIANT_CHARTS_REPO="https://github.com/Gradiant/5g-charts.git"
GRADIANT_CHARTS_REF="3f998fb7c5221589957593cf7b046eabb8aecb55" # open5gs chart 2.3.8 / Open5GS 2.7.5
OPEN5GS_IMAGE_TAG="" # empty = chart default (2.7.5)
UERANSIM_IMAGE_TAG="" # empty = chart default (3.2.6)
# ----------------------------------------------------------------------------
# Kubernetes (k3s)
# ----------------------------------------------------------------------------
K8S_NAMESPACE="open5gs"
OPEN5GS_RELEASE="open5gs" # prefix of the services (open5gs-amf-ngap, ...)
UERANSIM_RELEASE="ueransim"
K3S_CLUSTER_CIDR="10.42.0.0/16" # pod network
K3S_SERVICE_CIDR="10.43.0.0/16" # service network
K3S_EXTRA_ARGS=() # e.g. ("--disable=metrics-server")
HELM_TIMEOUT="20m" # the 1st install downloads several images
# ----------------------------------------------------------------------------
# PLMN / network identity
# ----------------------------------------------------------------------------
MCC="001" # 3 digits (test PLMN 001-01)
MNC="01" # 2 or 3 digits (leading zeros count: "01" != "001")
TAC="1" # DECIMAL (1..16777215). E.g. TAC 0x000064 => 100
AMF_REGION_ID="2" # 0..255
AMF_SET_ID="1" # 0..1023
NETWORK_NAME="InnovaOpen5GS"
# ----------------------------------------------------------------------------
# Slices (S-NSSAI) + DNN + UE IP pool
# Format of each item: "SST:SD:DNN:SUBNET_CIDR"
# SST = 1 (eMBB), 2 (URLLC), 3 (MIoT) ...
# SD = 6 hexadecimal digits, without 0x (mandatory)
# DNN = Data Network name (APN)
# SUBNET_CIDR = IPv4 pool of the UEs on this DNN; the gateway (.1) is on the UPF
# The FIRST item is the slice used by the UERANSIM gNB/UEs.
# ----------------------------------------------------------------------------
SLICES=(
"1:111111:internet:10.45.0.0/16"
"2:222222:internet2:10.46.0.0/16" # same as the innovaserver core (SIMs 0001 and 0022)
)
DNS_SERVERS="8.8.8.8 8.8.4.4" # handed to the UE in the PDU session
UE_MTU="1400"
# ----------------------------------------------------------------------------
# Open5GS WebUI (admin / 1423)
# ----------------------------------------------------------------------------
WEBUI_ENABLED=true
WEBUI_NODEPORT="30999" # http://NODE_IP:30999
OPEN5GS_METRICS=true
# ----------------------------------------------------------------------------
# Logs and metrics dashboard (Innova Center Dashboard) — docs/components/dashboard.md
# Runs as a pod in the cluster itself (nothing runs on the gNB machine).
# ----------------------------------------------------------------------------
DASHBOARD_ENABLED=true
DASHBOARD_NODEPORT="30998" # http://NODE_IP:30998
DASHBOARD_IMAGE="python:3.12-slim"
DASHBOARD_PASSWORD="" # empty = no password; with a password: user "admin"
# Settings tab: edit this file from the dashboard (own administrator password,
# generated by the install in ${INSTALL_DIR}/state/dashboard-admin-password). Saving only writes
# the file (with backup and validation); applying is still "sudo ./install.sh ...".
DASHBOARD_CONFIG_EDIT=true
# Persistent history: records ALL metrics (radio at 1 s resolution, core, machines,
# energy) and the core events in a SQLite file on this machine's disk, to compare setups
# later (History tab + "Record experiment" button). false = only the last minutes in memory.
DASHBOARD_PERSIST=true
DASHBOARD_PERSIST_DAYS="365" # deletes data older than this (0 = never)
DASHBOARD_PERSIST_MAX_GB="50" # file cap; above it the oldest data is deleted
DASHBOARD_HISTORY_SECONDS="900" # in-memory history (charts), in seconds
# gNB metrics (OCUDU): remote_control WebSocket (empty = no Radio tab)
GNB_METRICS_URL="ws://10.10.0.1:8001"
GNB_NAME="OCUDU + LiteOn"
# Real gNB log: the agent runs on THIS machine and reads the file over SSH (tail -F).
# Empty = off. Needs an SSH key of the install user to the gNB host.
GNB_LOG_SSH="innovaserver@10.10.0.1" # e.g. "innovaserver@10.10.0.1"
GNB_LOG_FILE="/tmp/gnb.log" # log: filename: of the gNB config
GNB_LOG_DROP='\[PHY *\] \[I\]' # regex of dropped lines (PHY info ≈ 95% of the volume); empty = everything
# Machines in the "Machines" tab (CPU, memory, temperature, network, disks, processes).
# This machine (core) is added automatically. The others are read over SSH from here
# (nothing is installed on them; only "nice python3 -" runs, reading /proc every 2 s).
# Format: "name|user@host|role". Needs the same SSH key as GNB_LOG_SSH.
DASHBOARD_LOCAL_ROLE="Core 5G (k3s)"
DASHBOARD_HOSTS=(
"innovaserver|innovaserver@10.10.0.1|gNB OCUDU + LiteOn"
)
# Terminal tab (administrator only, needs DASHBOARD_CONFIG_EDIT=true): shells in the browser, several at
# once. They run on THIS machine as the install user (agent open5gs-k3s-term); there is one more profile
# per DASHBOARD_HOSTS machine and for GNB_CTL_SSH (ssh with the same key). Anyone with the administrator
# password gets a shell: keep it off on networks you do not trust.
DASHBOARD_TERMINAL=true
DASHBOARD_TERMINAL_SUDO=true # true = sudo works inside the browser terminals
# MiEnergy energy meter (single-phase) attached to one of the machines: the dashboard reads
# the meter /Data page every 2 s (no InfluxDB/Grafana). Empty = off.
# The meter must be reachable from THIS machine (core network).
ENERGY_METER_URL="" # e.g. "http://192.168.68.105/Data"
ENERGY_METER_HOST="innovaserver" # measured machine (name in the Machines tab)
# RU (LiteOn FlexFi O-RU) in the RU tab: the dashboard logs in over SSH on the management port (RJ45)
# and only runs "show" commands (state, power, temperature, fronthaul, configuration).
# Empty = no RU tab. The passwords are NOT here: the agent reads the file
# /opt/open5gs-k3s/state/ru-credentials (lines RU_PASS=... and RU_ENABLE=...), created by hand.
RU_MGMT_IP="10.101.131.59"
RU_NAME="LiteOn FlexFi FR1"
RU_SSH_USER="user"
RU_MGMT_IFACE="" # interface of this machine on the RU switch (empty = the main network one)
RU_MGMT_LOCAL_CIDR="10.101.131.10/24" # extra IP of this machine on the RU management network (empty = do not add)
RU_POLL_SECONDS="10" # read interval
# Control tab: start/stop/restart each core function, UERANSIM and the OCUDU gNB
# (administrator password of the Settings tab; needs DASHBOARD_CONFIG_EDIT=true).
DASHBOARD_CONTROL=true
# OCUDU gNB from the Control tab (agent on the core machine; SSH = same key as GNB_LOG_SSH).
# k8s = gNB on Kubernetes (ocudu-gnb pod, ran/ocudu/; v3 default): start/stop
# with ran/ocudu/gnb.sh. Install OCUDU first: docs/installation.md (part 3).
# systemd = native gNB: "systemctl start/stop ocudu-gnb@<file>" on the gNB host
# (there, once with sudo: scripts/ocudu/setup-gnb-service.sh).
# GNB_CTL_SSH empty = no gNB control.
GNB_CTL_MODE="k8s"
GNB_CTL_SSH="innovaserver@10.10.0.1"
GNB_CTL_DIR="/home/innovaserver/ocudu" # OCUDU folder (configs/*.yml; in systemd mode also build/apps/gnb/gnb)
# SIM nicknames in the dashboard ("IMSI:name"). The UERANSIM UEs are marked automatically.
DASHBOARD_UE_NAMES=(
"001010000000022:Modem Telit FN990"
)
# Open5GS Prometheus metrics (AMF/SMF/UPF/PCF) for the Core tab.
# Changing this value RESTARTS the core on the next install (UEs reconnect).
OPEN5GS_METRICS=false
# ----------------------------------------------------------------------------
# MongoDB (Bitnami chart). The default image (MongoDB 8) requires a CPU with AVX.
# To pin another image, fill in the three fields, e.g.:
# MONGODB_IMAGE_REGISTRY="docker.io"
# MONGODB_IMAGE_REPOSITORY="bitnamilegacy/mongodb"
# MONGODB_IMAGE_TAG="8.0.13-debian-12-r0"
# ----------------------------------------------------------------------------
MONGODB_PERSISTENCE=true
MONGODB_PERSISTENCE_SIZE="2Gi"
MONGODB_IMAGE_REGISTRY=""
MONGODB_IMAGE_REPOSITORY=""
MONGODB_IMAGE_TAG=""
# ----------------------------------------------------------------------------
# RAN
# ----------------------------------------------------------------------------
DEPLOY_UERANSIM=true
# After each boot, check whether the UEs ping the UPF and, if not, restart
# in order UEs -> UPF/SMF/gNB (unit open5gs-k3s-heal). Manual: ./scripts/heal.sh
AUTO_HEAL=true
# Does the core start by itself at boot? false = at boot only the dashboard stays up: the
# open5gs-k3s-heal unit STOPS the core and UERANSIM, and you start them from the Control tab
# ("Start all", in order). An "install.sh"/"--deploy-only" brings everything up again.
CORE_AUTOSTART=false
# Expose N2 (SCTP 38412) and N3 (UDP 2152) on NODE_IP for an external gNB
# (srsRAN, OAI, commercial gNB). Experimental — see README.
EXPOSE_RAN=false
# Direct link to the real gNB (OCUDU on innovaserver) — Multus + macvlan.
# The AMF (N2) and UPF (N3) get a 2nd interface (net1) with their own IP on the
# RAN_LINK_IFACE port; the simulated gNB (UERANSIM) also uses this link, so
# test.sh tests the same path as the real gNB. Do not use together with EXPOSE_RAN.
# Warning: with the physical link down (cable/innovaserver off), the macvlan
# has no carrier and the simulated gNB does not connect either.
RAN_LINK_ENABLED=true
RAN_LINK_IFACE="enp5s0f1" # host port connected to the gNB
RAN_LINK_CIDR="10.10.0.0/24" # link network (the host uses 10.10.0.2, innovaserver 10.10.0.1)
RAN_LINK_MTU="9000"
AMF_N2_IP="10.10.0.10" # real gNB: cu_cp.amf.addr
UPF_N3_IP="10.10.0.11" # N3 address advertised by the UPF
GNB_SIM_IP="10.10.0.20" # UERANSIM gNB on the link
MULTUS_CHART_VERSION="v4.3.110" # rke2-multus chart (https://rke2-charts.rancher.io)
# Simulated UEs (UERANSIM). IMSI = MCC + MNC + MSIN.
# The MSIN has 15 - len(MCC) - len(MNC) digits (10 with a 2-digit MNC).
# The UEs get consecutive IMSIs starting at UE_MSIN_START and are
# registered in the core automatically.
UE_COUNT="1"
UE_MSIN_START="0000009001" # far from the real SIMs (0001, 0022, 0032, 0040, 0052)
UE_KEY="465B5CE8B199B49FAA5F0A2EE238A6BC"
UE_OPC="E8ED289DEBA952E4283B54E88E6183CA"
# ----------------------------------------------------------------------------
# Extra subscribers (e.g. real SIMs). Format:
# "IMSI:K:OPC" -> uses the 1st slice/DNN
# "IMSI:K:OPC:SST:SD:DNN" -> specific slice/DNN
# ----------------------------------------------------------------------------
SUBSCRIBERS=(
# "001010000000101:465B5CE8B199B49FAA5F0A2EE238A6BC:E8ED289DEBA952E4283B54E88E6183CA"
)
# ----------------------------------------------------------------------------
# Test (test.sh)
# ----------------------------------------------------------------------------
TEST_PING_COUNT="4"
TEST_INTERNET=true # also pings an external target through N6
TEST_PING_TARGET="8.8.8.8"
TEST_TIMEOUT="180" # seconds waiting for registration/session