-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtowards5gs_ueransim-corrected.yaml
585 lines (573 loc) · 16.5 KB
/
towards5gs_ueransim-corrected.yaml
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
---
# Source: ueransim/templates/gnb/gnb-configmap.yaml
#
# Software Name : towards5gs-helm
# SPDX-FileCopyrightText: Copyright (c) 2021 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0,
# the text of which is available at todo
# or see the "LICENSE" file for more details.
#
# Author: Abderaouf KHICHANE, Ilhem FAJJARI, Ayoub BOUSSELMI
# Software description: An open-source project providing Helm charts to deploy 5G components (Core + RAN) on top of Kubernetes
#
apiVersion: v1
kind: ConfigMap
metadata:
name: gnb-configmap
labels:
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
# Replace
# app: ueransim
# component: gnb
# by
app.kubernetes.io/name: ueransim
app.kubernetes.io/component: gnb
data:
gnb-config.yaml: |
mcc: '208' # Mobile Country Code value
mnc: '93' # Mobile Network Code value (2 or 3 digits)
nci: '0x000000010' # NR Cell Identity (36-bit)
idLength: 32 # NR gNB ID length in bits [22...32]
tac: 1 # Tracking Area Code
# List of supported S-NSSAIs by this gNB
slices:
- sst: 0x1
sd: 0x010203
# Indicates whether or not SCTP stream number errors should be ignored.
ignoreStreamIds: true
linkIp: 0.0.0.0 # gNB's local IP address for Radio Link Simulation (Usually same with local IP)
# gNB's local IP address for N2 Interface (Usually same with local IP)
ngapIp: 10.100.50.250
gtpIp: 10.100.50.236 # gNB's local IP address for N3 Interface (Usually same with local IP)
# List of AMF address information
amfConfigs:
- address: 10.100.50.249
port: 38412
---
# Source: ueransim/templates/ue/ue-configmap.yaml
#
# Software Name : towards5gs-helm
# SPDX-FileCopyrightText: Copyright (c) 2021 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0,
# the text of which is available at todo
# or see the "LICENSE" file for more details.
#
# Author: Abderaouf KHICHANE, Ilhem FAJJARI, Ayoub BOUSSELMI
# Software description: An open-source project providing Helm charts to deploy 5G components (Core + RAN) on top of Kubernetes
#
apiVersion: v1
kind: ConfigMap
metadata:
name: ue-configmap
labels:
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
# Replace
# app: ueransim
# component: ue
# by
app.kubernetes.io/name: ueransim
app.kubernetes.io/component: ue
data:
ue-config.yaml: |
supi: "imsi-208930000000003" # IMSI number
mcc: '208' # Mobile Country Code value
mnc: '93' # Mobile Network Code value (2 or 3 digits)
key: "8baf473f2f8fd09487cccbd7097c6862" # Operator code (OP or OPC) of the UE
op: "8e27b6af0e692e750f32667a3b14605d" # This value specifies the OP type and it can be either 'OP' or 'OPC'
opType: "OPC" # This value specifies the OP type and it can be either 'OP' or 'OPC'
amf: '8000' # Authentication Management Field (AMF) value
imei: '356938035643803' # IMEI number of the device
imeiSv: '4370816125816151'
# UAC Access Identities Configuration
uacAic:
mps: false
mcs: false
# UAC Access Control Class
uacAcc:
normalClass: 0
class11: false
class12: false
class13: false
class14: false
class15: false
sessions:
- type: "IPv4"
apn: "internet"
slice:
sst: 0x01
sd: 0x010203
# Configured NSSAI for this UE by HPLMN
configured-nssai:
- sst: 0x01
sd: 0x010203
# Default Configured NSSAI for this UE
default-nssai:
- sst: 1
sd: 1
# Supported encryption and integrity algorithms by this UE
integrity:
IA1: true
IA2: true
IA3: true
ciphering:
EA1: true
EA2: true
EA3: true
# Integrity protection maximum data rate for user plane
integrityMaxRate:
uplink: 'full'
downlink: 'full'
# List of gNB IP addresses for Radio Link Simulation
gnbSearchList:
- gnb-service
wrapper.sh: |
#!/bin/bash
mkdir /dev/net
mknod /dev/net/tun c 10 200
./nr-ue -c ../config/ue-config.yaml
---
# Source: ueransim/templates/gnb/gnb-service.yaml
#
# Software Name : towards5gs-helm
# SPDX-FileCopyrightText: Copyright (c) 2021 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0,
# the text of which is available at todo
# or see the "LICENSE" file for more details.
#
# Author: Abderaouf KHICHANE, Ilhem FAJJARI, Ayoub BOUSSELMI
# Software description: An open-source project providing Helm charts to deploy 5G components (Core + RAN) on top of Kubernetes
#
apiVersion: v1
kind: Service
metadata:
name: gnb-service
labels:
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
# Replace
# app: ueransim
# component: gnb
# by
app.kubernetes.io/name: ueransim
app.kubernetes.io/component: gnb
spec:
type: ClusterIP
ports:
- name: gnb-ue
port: 4997
protocol: UDP
selector:
# Replace
# app: ueransim
# component: gnb
#by
app.kubernetes.io/name: ueransim
app.kubernetes.io/component: gnb
---
# Source: ueransim/templates/gnb/gnb-deployment.yaml
#
# Software Name : towards5gs-helm
# SPDX-FileCopyrightText: Copyright (c) 2021 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0,
# the text of which is available at todo
# or see the "LICENSE" file for more details.
#
# Author: Abderaouf KHICHANE, Ilhem FAJJARI, Ayoub BOUSSELMI
# Software description: An open-source project providing Helm charts to deploy 5G components (Core + RAN) on top of Kubernetes
#
apiVersion: apps/v1
kind: Deployment
metadata:
name: towards5gs-ueransim-gnb
labels:
helm.sh/chart: ueransim-2.0.17
app.kubernetes.io/name: ueransim
app.kubernetes.io/instance: towards5gs
app.kubernetes.io/version: "v3.2.6"
app.kubernetes.io/managed-by: Helm
#COMMENT: app: ueransim
# Replace
# component: gnb
# by
app.kubernetes.io/component: gnb
spec:
selector:
matchLabels:
app.kubernetes.io/name: ueransim
app.kubernetes.io/instance: towards5gs
#COMMENT: app: ueransim
# Replace
# component: gnb
# by
app.kubernetes.io/component: gnb
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/name: ueransim
app.kubernetes.io/instance: towards5gs
#COMMENT: app: ueransim
# Replace
# component: gnb
# by
app.kubernetes.io/component: gnb
annotations:
k8s.v1.cni.cncf.io/networks: '[
{ "name": "n2network-towards5gs-ueransim",
"interface": "n2",
"ips": [ "10.100.50.250/29" ],
"gateway": [ "10.100.50.254" ]
},
{ "name": "n3network-towards5gs-ueransim",
"interface": "n3",
"ips": [ "10.100.50.236/29" ],
"gateway": [ "10.100.50.238" ]
}
]'
spec:
imagePullSecrets:
[]
securityContext:
{}
initContainers:
- name: wait-amf
image: towards5gs/sctp_test:latest
command: ["sh", "-c", "until sctp_test -s -H 0.0.0.0 -P 25000 -h 10.100.50.249 -p 38412; do echo waiting for the AMF; sleep 2; done;"]
containers:
- image: towards5gs/ueransim-gnb:v3.2.6
name: gnb
ports:
- name: gnb-ue
containerPort: 4997
protocol: UDP
securityContext:
capabilities:
add: ["NET_ADMIN"]
command: ["./nr-gnb"]
args: ["-c", "/ueransim/config/gnb-config.yaml"]
volumeMounts:
- mountPath: /ueransim/config
name: gnb-volume
resources:
requests:
cpu: 100m
memory: 256Mi
dnsPolicy: ClusterFirst
restartPolicy: Always
nodeSelector:
{}
affinity:
{}
tolerations:
[]
volumes:
- name: gnb-volume
configMap:
name: gnb-configmap
---
# Source: ueransim/templates/ue/ue-deployment.yaml
#
# Software Name : towards5gs-helm
# SPDX-FileCopyrightText: Copyright (c) 2021 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0,
# the text of which is available at todo
# or see the "LICENSE" file for more details.
#
# Author: Abderaouf KHICHANE, Ilhem FAJJARI, Ayoub BOUSSELMI
# Software description: An open-source project providing Helm charts to deploy 5G components (Core + RAN) on top of Kubernetes
#
apiVersion: apps/v1
kind: Deployment
metadata:
name: towards5gs-ueransim-ue
labels:
helm.sh/chart: ueransim-2.0.17
app.kubernetes.io/name: ueransim
app.kubernetes.io/instance: towards5gs
app.kubernetes.io/version: "v3.2.6"
app.kubernetes.io/managed-by: Helm
#COMMENT: app: ueransim
# Replace
# component: ue
# by
app.kubernetes.io/component: ue
spec:
selector:
matchLabels:
app.kubernetes.io/name: ueransim
app.kubernetes.io/instance: towards5gs
#COMMENT: app: ueransim
# Replace
# component: ue
# by
app.kubernetes.io/component: ue
replicas: 1
template:
metadata:
annotations:
labels:
app.kubernetes.io/name: ueransim
app.kubernetes.io/instance: towards5gs
#COMMENT: app: ueransim
# Replace
# component: ue
# by
app.kubernetes.io/component: ue
spec:
imagePullSecrets:
[]
securityContext:
{}
containers:
- image: towards5gs/ueransim-ue:v3.2.6
name: ue
securityContext:
capabilities:
add:
- NET_ADMIN
command: ["/ueransim/config/wrapper.sh"]
volumeMounts:
- mountPath: /ueransim/config
name: ue-volume
resources:
requests:
cpu: 100m
memory: 128Mi
dnsPolicy: ClusterFirst
restartPolicy: Always
nodeSelector:
{}
affinity:
{}
tolerations:
[]
volumes:
- name: ue-volume
configMap:
name: ue-configmap
items:
- key: ue-config.yaml
path: ue-config.yaml
- key: wrapper.sh
path: wrapper.sh
mode: 0755
---
# Source: ueransim/templates/gnb/gnb-n2-nad.yaml
#
# Software Name : towards5gs-helm
# SPDX-FileCopyrightText: Copyright (c) 2021 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0,
# the text of which is available at https://github.com/Orange-OpenSource/towards5gs-helm/blob/main/LICENSE
# or see the "LICENSE" file for more details.
#
# Author: Abderaouf KHICHANE, Ilhem FAJJARI, Ayoub BOUSSELMI
# Software description: An open-source project providing Helm charts to deploy 5G components (Core + RAN) on top of Kubernetes
#
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: n2network-towards5gs-ueransim
labels: #ADDED
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
spec:
config: '{
"cniVersion": "0.3.1",
"plugins": [
{
"type": "ipvlan",
"capabilities": { "ips": true },
"master": "eth0",
"mode": "l2",
"ipam": {
"type": "static",
"routes": [
{
"dst": "0.0.0.0/0",
"gw": "10.100.50.254"
}
]
}
}
]
}'
---
# Source: ueransim/templates/gnb/gnb-n3-nad.yaml
#
# Software Name : towards5gs-helm
# SPDX-FileCopyrightText: Copyright (c) 2021 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0,
# the text of which is available at https://github.com/Orange-OpenSource/towards5gs-helm/blob/main/LICENSE
# or see the "LICENSE" file for more details.
#
# Author: Abderaouf KHICHANE, Ilhem FAJJARI, Ayoub BOUSSELMI
# Software description: An open-source project providing Helm charts to deploy 5G components (Core + RAN) on top of Kubernetes
#
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: n3network-towards5gs-ueransim
labels: #ADDED
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
spec:
config: '{
"cniVersion": "0.3.1",
"plugins": [
{
"type": "ipvlan",
"capabilities": { "ips": true },
"master": "eth0",
"mode": "l2",
"ipam": {
"type": "static",
"routes": [
{
"dst": "0.0.0.0/0",
"gw": "10.100.50.238"
}
]
}
}
]
}'
---
# Source: ueransim/templates/tests/connectivity-test.yaml
#
# Software Name : towards5gs-helm
# SPDX-FileCopyrightText: Copyright (c) 2021 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0,
# the text of which is available at todo
# or see the "LICENSE" file for more details.
#
# Author: Abderaouf KHICHANE, Ilhem FAJJARI, Ayoub BOUSSELMI, Michal CHABIERA
# Software description: An open-source project providing Helm charts to deploy 5G components (Core + RAN) on top of Kubernetes
#
apiVersion: v1
kind: ServiceAccount
metadata:
name: towards5gs-ueransim-test-connection
annotations:
"helm.sh/hook": test
labels: #ADDED
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
---
# Source: ueransim/templates/tests/connectivity-test.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: connectivity-test-configmap
annotations:
"helm.sh/hook": test
labels: #ADDED
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
data:
script-connectivity-test.sh: |
#!/bin/bash
echo "Get ue pod name"
export pod_name=$(kubectl get pods --namespace default -l "component=ue" -o jsonpath="{.items[0].metadata.name}")
echo "${pod_name}"
echo "***********************************************************************"
echo ""
echo "Get ip address table for ${pod_name}"
ip_address="$(kubectl -n default exec -i ${pod_name} -- bash -c 'ip address')"
echo "${ip_address}"
tun_interface="$(echo "$ip_address" | awk '$1 ~ /^[0-9].*/ && $2 ~/^uesimtun0/ {print}')"
if [ -z "$tun_interface" ] ; then
echo ""
echo "uesimtun0 interface not found"
exit 1
fi
echo "***********************************************************************"
echo ""
echo "Test connectivity"
kubectl -n default exec -i ${pod_name} -- curl --interface uesimtun0 www.google.com
---
# Source: ueransim/templates/tests/connectivity-test.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: towards5gs-ueransim-test-connection
annotations:
"helm.sh/hook": test
labels: #ADDED
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["get", "create"]
---
# Source: ueransim/templates/tests/connectivity-test.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: towards5gs-ueransim-test-connection
annotations:
"helm.sh/hook": test
labels: #ADDED
helm.sh/chart: ueransim-2.0.17 #ADDED
app.kubernetes.io/instance: towards5gs #ADDED
subjects:
- kind: ServiceAccount
name: towards5gs-ueransim-test-connection
namespace: default
roleRef:
kind: ClusterRole
name: towards5gs-ueransim-test-connection
apiGroup: rbac.authorization.k8s.io
---
# Source: ueransim/templates/tests/connectivity-test.yaml
apiVersion: v1
kind: Pod
metadata:
name: "towards5gs-ueransim-test-connection"
labels:
helm.sh/chart: ueransim-2.0.17
app.kubernetes.io/name: ueransim
app.kubernetes.io/instance: towards5gs
app.kubernetes.io/version: "v3.2.6"
app.kubernetes.io/managed-by: Helm
annotations:
"helm.sh/hook": test
spec:
serviceAccountName: towards5gs-ueransim-test-connection
containers:
- name: ue-test-conncection
image: bitnami/kubectl:1.22.0
imagePullPolicy: IfNotPresent
command: ["bin/sh"]
args: ["/scripts/script-connectivity-test.sh"]
volumeMounts:
- name: connectivity-test-volume
mountPath: /scripts
readOnly: true
volumes:
- name: connectivity-test-volume
configMap:
defaultMode: 0755
name: connectivity-test-configmap
restartPolicy: Never