From cc1a8ad5a94b0535bbaf9c1471a2a8d6d03ed48a Mon Sep 17 00:00:00 2001 From: infidel Date: Tue, 14 Mar 2023 15:32:53 +0700 Subject: [PATCH] Initial commit --- README.md | 81 ++++ .../.oai-ext-dn-deployment.yaml.swp | Bin 0 -> 12288 bytes .../basic-no-nrf/mysql-deployment.yaml | 66 +++ .../basic-no-nrf/oai-amf-deployment.yaml | 117 ++++++ .../basic-no-nrf/oai-ausf-deployment.yaml | 50 +++ .../basic-no-nrf/oai-ext-dn-deployment.yaml | 52 +++ .../basic-no-nrf/oai-smf-deployment.yaml | 134 ++++++ .../basic-no-nrf/oai-spgwu-deployment.yaml | 94 +++++ .../basic-no-nrf/oai-udm-deployment.yaml | 50 +++ .../basic-no-nrf/oai-udr-deployment.yaml | 56 +++ .../CoreNetwork/default/mysql-deployment.yaml | 63 +++ .../default/oai-amf-deployment.yaml | 144 +++++++ .../default/oai-ext-dn-deployment.yaml | 48 +++ .../default/oai-gnb-deployment.yaml | 72 ++++ .../default/oai-nr-ue-deployment.yaml | 56 +++ .../default/oai-nr-ue2-deployment.yaml | 56 +++ .../default/oai-nrf-deployment.yaml | 64 +++ .../default/oai-smf-deployment.yaml | 124 ++++++ .../default/oai-spgwu-deployment.yaml | 111 +++++ deployments/src/gnb_access_deployment.yaml | 119 ++++++ deployments/src/template_deployment.yaml | 115 +++++ deployments/src/template_ue_deployment.yaml | 81 ++++ deployments/trainee/gnb-cu-01.yaml | 115 +++++ deployments/trainee/gnb-cu-02.yaml | 115 +++++ deployments/trainee/gnb-cu-03.yaml | 115 +++++ deployments/trainee/gnb-du-01.yaml | 115 +++++ deployments/trainee/gnb-du-02.yaml | 115 +++++ deployments/trainee/gnb-du-03.yaml | 115 +++++ deployments/trainee/gnb-ue-01.yaml | 81 ++++ deployments/trainee/gnb-ue-02.yaml | 81 ++++ deployments/trainee/gnb-ue-03.yaml | 81 ++++ input/core_net_ipv4.csv | 11 + input/gnb_net_ipv4.csv | 5 + input/imsi_data.csv | 10 + input/main_data.csv | 3 + input/ngRAN.csv | 5 + net/core/amf-n2.yaml | 10 + net/core/amf.yaml | 10 + net/core/ausf.yaml | 10 + net/core/db.yaml | 10 + net/core/dn.yaml | 10 + net/core/nrf.yaml | 10 + net/core/smf.yaml | 10 + net/core/udm.yaml | 10 + net/core/udr.yaml | 10 + net/core/upf-n3.yaml | 10 + net/core/upf.yaml | 10 + net/gnb/cu-amf-01.yaml | 10 + net/gnb/cu-amf-02.yaml | 10 + net/gnb/cu-amf-03.yaml | 10 + net/gnb/cu-du-01.yaml | 10 + net/gnb/cu-du-02.yaml | 10 + net/gnb/cu-du-03.yaml | 10 + net/gnb/du-cu-01.yaml | 10 + net/gnb/du-cu-02.yaml | 10 + net/gnb/du-cu-03.yaml | 10 + net/gnb/ue-du-01.yaml | 10 + net/gnb/ue-du-02.yaml | 10 + net/gnb/ue-du-03.yaml | 10 + net/src/template_net.yaml | 10 + oai-master/5gc-deployment.yaml | 56 +++ oai-master/cu-deployment.yaml | 57 +++ oai-master/deployment.yaml | 65 +++ oai-master/du-deployment.yaml | 57 +++ oai-master/oai-net-core.yaml | 10 + oai-master/oai-net-cu.yaml | 10 + oai-master/oai-net-du.yaml | 11 + oai-master/pod.yaml | 21 + oai-trainee/cu-deployment.yaml | 56 +++ scripts/net_gen.sh | 396 ++++++++++++++++++ .../mysql-claim0-persistentvolumeclaim.yaml | 14 + .../mysql-claim1-persistentvolumeclaim.yaml | 14 + .../oai-amf-claim0-persistentvolumeclaim.yaml | 14 + .../oai-nrf-claim0-persistentvolumeclaim.yaml | 14 + .../oai-smf-claim0-persistentvolumeclaim.yaml | 14 + ...ai-spgwu-claim0-persistentvolumeclaim.yaml | 14 + .../rfsim5g-oai-public-net-networkpolicy.yaml | 14 + ...rfsim5g-oai-traffic-net-networkpolicy.yaml | 14 + 78 files changed, 3811 insertions(+) create mode 100644 README.md create mode 100644 deployments/CoreNetwork/basic-no-nrf/.oai-ext-dn-deployment.yaml.swp create mode 100644 deployments/CoreNetwork/basic-no-nrf/mysql-deployment.yaml create mode 100644 deployments/CoreNetwork/basic-no-nrf/oai-amf-deployment.yaml create mode 100644 deployments/CoreNetwork/basic-no-nrf/oai-ausf-deployment.yaml create mode 100644 deployments/CoreNetwork/basic-no-nrf/oai-ext-dn-deployment.yaml create mode 100644 deployments/CoreNetwork/basic-no-nrf/oai-smf-deployment.yaml create mode 100644 deployments/CoreNetwork/basic-no-nrf/oai-spgwu-deployment.yaml create mode 100644 deployments/CoreNetwork/basic-no-nrf/oai-udm-deployment.yaml create mode 100644 deployments/CoreNetwork/basic-no-nrf/oai-udr-deployment.yaml create mode 100644 deployments/CoreNetwork/default/mysql-deployment.yaml create mode 100644 deployments/CoreNetwork/default/oai-amf-deployment.yaml create mode 100644 deployments/CoreNetwork/default/oai-ext-dn-deployment.yaml create mode 100644 deployments/CoreNetwork/default/oai-gnb-deployment.yaml create mode 100644 deployments/CoreNetwork/default/oai-nr-ue-deployment.yaml create mode 100644 deployments/CoreNetwork/default/oai-nr-ue2-deployment.yaml create mode 100644 deployments/CoreNetwork/default/oai-nrf-deployment.yaml create mode 100644 deployments/CoreNetwork/default/oai-smf-deployment.yaml create mode 100644 deployments/CoreNetwork/default/oai-spgwu-deployment.yaml create mode 100644 deployments/src/gnb_access_deployment.yaml create mode 100644 deployments/src/template_deployment.yaml create mode 100644 deployments/src/template_ue_deployment.yaml create mode 100644 deployments/trainee/gnb-cu-01.yaml create mode 100644 deployments/trainee/gnb-cu-02.yaml create mode 100644 deployments/trainee/gnb-cu-03.yaml create mode 100644 deployments/trainee/gnb-du-01.yaml create mode 100644 deployments/trainee/gnb-du-02.yaml create mode 100644 deployments/trainee/gnb-du-03.yaml create mode 100644 deployments/trainee/gnb-ue-01.yaml create mode 100644 deployments/trainee/gnb-ue-02.yaml create mode 100644 deployments/trainee/gnb-ue-03.yaml create mode 100644 input/core_net_ipv4.csv create mode 100644 input/gnb_net_ipv4.csv create mode 100644 input/imsi_data.csv create mode 100644 input/main_data.csv create mode 100644 input/ngRAN.csv create mode 100644 net/core/amf-n2.yaml create mode 100644 net/core/amf.yaml create mode 100644 net/core/ausf.yaml create mode 100644 net/core/db.yaml create mode 100644 net/core/dn.yaml create mode 100644 net/core/nrf.yaml create mode 100644 net/core/smf.yaml create mode 100644 net/core/udm.yaml create mode 100644 net/core/udr.yaml create mode 100644 net/core/upf-n3.yaml create mode 100644 net/core/upf.yaml create mode 100644 net/gnb/cu-amf-01.yaml create mode 100644 net/gnb/cu-amf-02.yaml create mode 100644 net/gnb/cu-amf-03.yaml create mode 100644 net/gnb/cu-du-01.yaml create mode 100644 net/gnb/cu-du-02.yaml create mode 100644 net/gnb/cu-du-03.yaml create mode 100644 net/gnb/du-cu-01.yaml create mode 100644 net/gnb/du-cu-02.yaml create mode 100644 net/gnb/du-cu-03.yaml create mode 100644 net/gnb/ue-du-01.yaml create mode 100644 net/gnb/ue-du-02.yaml create mode 100644 net/gnb/ue-du-03.yaml create mode 100644 net/src/template_net.yaml create mode 100644 oai-master/5gc-deployment.yaml create mode 100644 oai-master/cu-deployment.yaml create mode 100644 oai-master/deployment.yaml create mode 100644 oai-master/du-deployment.yaml create mode 100644 oai-master/oai-net-core.yaml create mode 100644 oai-master/oai-net-cu.yaml create mode 100644 oai-master/oai-net-du.yaml create mode 100644 oai-master/pod.yaml create mode 100644 oai-trainee/cu-deployment.yaml create mode 100755 scripts/net_gen.sh create mode 100644 volumeclaims/mysql-claim0-persistentvolumeclaim.yaml create mode 100644 volumeclaims/mysql-claim1-persistentvolumeclaim.yaml create mode 100644 volumeclaims/oai-amf-claim0-persistentvolumeclaim.yaml create mode 100644 volumeclaims/oai-nrf-claim0-persistentvolumeclaim.yaml create mode 100644 volumeclaims/oai-smf-claim0-persistentvolumeclaim.yaml create mode 100644 volumeclaims/oai-spgwu-claim0-persistentvolumeclaim.yaml create mode 100644 volumeclaims/rfsim5g-oai-public-net-networkpolicy.yaml create mode 100644 volumeclaims/rfsim5g-oai-traffic-net-networkpolicy.yaml diff --git a/README.md b/README.md new file mode 100644 index 0000000..e5ee7f4 --- /dev/null +++ b/README.md @@ -0,0 +1,81 @@ +# Admin Tools + +1. Generate participants pods (CU,DU,UE) in bulks. +2. Generate all the necessary components. + + +## Templates + +### Deployments + +```bash +deployments/ +├── CoreNetwork +│   ├── basic-no-nrf +│   │   ├── mysql-deployment.yaml +│   │   ├── oai-amf-deployment.yaml +│   │   ├── oai-ausf-deployment.yaml +│   │   ├── oai-ext-dn-deployment.yaml +│   │   ├── oai-smf-deployment.yaml +│   │   ├── oai-spgwu-deployment.yaml +│   │   ├── oai-udm-deployment.yaml +│   │   └── oai-udr-deployment.yaml +│   └── default +│   ├── mysql-deployment.yaml +│   ├── oai-amf-deployment.yaml +│   ├── oai-ext-dn-deployment.yaml +│   ├── oai-gnb-deployment.yaml +│   ├── oai-nrf-deployment.yaml +│   ├── oai-nr-ue2-deployment.yaml +│   ├── oai-nr-ue-deployment.yaml +│   ├── oai-smf-deployment.yaml +│   └── oai-spgwu-deployment.yaml +├── src # Template sources +│   ├── gnb_access_deployment.yaml +│   ├── template_deployment.yaml +│   └── template_ue_deployment.yaml +└── trainee # Generated Configs + ├── gnb-cu-01.yaml + ├── gnb-cu-02.yaml + ├── gnb-cu-03.yaml + ├── gnb-du-01.yaml + ├── gnb-du-02.yaml + ├── gnb-du-03.yaml + ├── gnb-ue-01.yaml + ├── gnb-ue-02.yaml + └── gnb-ue-03.yaml +``` + +### Network Definitions (Multis CNI) + +```bash +net/ +├── core # Core Netowrks +│   ├── amf-n2.yaml +│   ├── amf.yaml +│   ├── ausf.yaml +│   ├── db.yaml +│   ├── dn.yaml +│   ├── nrf.yaml +│   ├── smf.yaml +│   ├── udm.yaml +│   ├── udr.yaml +│   ├── upf-n3.yaml +│   └── upf.yaml +├── gnb # Generated Network Template +│   ├── cu-amf-01.yaml +│   ├── cu-amf-02.yaml +│   ├── cu-amf-03.yaml +│   ├── cu-du-01.yaml +│   ├── cu-du-02.yaml +│   ├── cu-du-03.yaml +│   ├── du-cu-01.yaml +│   ├── du-cu-02.yaml +│   ├── du-cu-03.yaml +│   ├── ue-du-01.yaml +│   ├── ue-du-02.yaml +│   └── ue-du-03.yaml +└── src # Source Network template + └── template_net.yaml +``` + diff --git a/deployments/CoreNetwork/basic-no-nrf/.oai-ext-dn-deployment.yaml.swp b/deployments/CoreNetwork/basic-no-nrf/.oai-ext-dn-deployment.yaml.swp new file mode 100644 index 0000000000000000000000000000000000000000..acd32c102cc1f8abe3ebc1ce209cdf949282fba5 GIT binary patch literal 12288 zcmeI2zi%8x6vrp2!jBjf8Y=W~5CNgt_4yahxw0H5GKzm-pHtAFx!t+*;N6*FcJ}NO zNhs*)=u*)k5gPsg1QHz-2vI=|4LuSC;=AYjWyi6R5E7ARrLT8AKi~VjHzQeo&8a)9 zYqSteGd#~T_Qoq0)6f5Ui5)zgU`n@CDzmER)W;gjO>ydwUg!P(g7J1&CvjtSGv2UL zZ||y>kGmqzia3=vGu>QjU&PDC$#v=XjoXWxqEHFfhHKY~jZj=3c%EuL8Xr{)oNYoF z5eS@50;O;9h08lL)3vDzz}3l@>4hsh=aWV7IuHm10)apv5C{YUfj}S-IHv@>y}&+% z?-%?2&-LFIj=lT8hF2gE2m}IwKp+qZ1OkCTAP@)y0)apv5C}Yh1VqZ%JC_)H>nRwI z|NjsE{{Q_s#(su=fWCq5LOakRRD&j;$Kp+qZ1OkEoGl9YjUlw)x;2xvi<0P7#-!z#@x^-I0 z_C>eo_Z^O~PIXi!+cK?_ccmQbEM!tT<-5y9dlWm?$GWhtDP1DR_o~*@BA0a?LvIVy z^83O`k!4EgM8@8=cw1_o=(%=16CPnWvNfk`RG9}Hl0=&J?Te=3=~?P1LAC2Jczz+8 znTcw1l*$fi>1&I_NsClu5`I+WdMa&-y%(waRvM|0WyHH=ok?tgwY+F% zvij&5GK~-ETKHLdl@;77-L7`*kK!KT^~9HGb7Q-)wXxG!UB5-#ko3D##NVT}rR}$O zR<@RItc>jZPn_e)F>i-)A8S7`w&3oauvDk*)mx2~t+ndCy52aBlU}8Lq5N^G|6pTI z!nKP*njq7?P+GcSOCeoHC2}cAOsW0)@VpeFXM17ClTVpw&*at=GV0Ge@o!$V5|SL$eYjuUAGla7K|Qxvi5fvuwz7Z=r}fwJ6aF zN?MUJaepfu`XfV=9H+YPE&&{- zBHLON#i>d5q~nNag@O+%u~CS9SaMChM`&$u|6#YjSGn{8`7f$qc$wSk99G{2QozeL z?!)0dIY#htpmX7q-P=QGh0J8)jjI;K1p~$cBx-CBz!PsmVQsWmHl+h9SyT`$Zf9;< zby{9WZTb4vO)N)rra7bFoff!3?wk>X!LWZ5fFtln;P(`6SGqAQsb|8fJA;$}jUw*U F*x#ZaO633m literal 0 HcmV?d00001 diff --git a/deployments/CoreNetwork/basic-no-nrf/mysql-deployment.yaml b/deployments/CoreNetwork/basic-no-nrf/mysql-deployment.yaml new file mode 100644 index 0000000..d84f49d --- /dev/null +++ b/deployments/CoreNetwork/basic-no-nrf/mysql-deployment.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: mysql + app.kubernetes.io/part-of: CN-noNRF + name: mysql +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: mysql + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-db-net + creationTimestamp: null + labels: + io.kompose.network/demo-oai-public-net: "true" + io.kompose.service: mysql + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: MYSQL_DATABASE + value: oai_db + - name: MYSQL_PASSWORD + value: test + - name: MYSQL_ROOT_PASSWORD + value: linux + - name: MYSQL_USER + value: test + - name: TZ + value: Europe/Paris + image: mysql:8.0 + livenessProbe: + exec: + command: + - /bin/bash -c "/tmp/mysql-healthcheck.sh" + failureThreshold: 30 + periodSeconds: 10 + timeoutSeconds: 5 + name: mysql + resources: {} + volumeMounts: + - mountPath: /docker-entrypoint-initdb.d/ + name: mysql-claim0 + - mountPath: /tmp/mysql-healthcheck.sh + name: mysql-claim1 + restartPolicy: Always + volumes: + - name: mysql-claim0 + persistentVolumeClaim: + claimName: mysql-claim0 + - name: mysql-claim1 + persistentVolumeClaim: + claimName: mysql-claim1 +status: {} diff --git a/deployments/CoreNetwork/basic-no-nrf/oai-amf-deployment.yaml b/deployments/CoreNetwork/basic-no-nrf/oai-amf-deployment.yaml new file mode 100644 index 0000000..f35bf08 --- /dev/null +++ b/deployments/CoreNetwork/basic-no-nrf/oai-amf-deployment.yaml @@ -0,0 +1,117 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-amf + app.kubernetes.io/part-of: CN-noNRF + name: oai-amf +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-amf + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-amf-net, oai-amf-n2-net + creationTimestamp: null + labels: + io.kompose.network/demo-oai-public-net: "true" + io.kompose.service: oai-amf + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: NRF_FQDN + value: oai-nrf + - name: EXTERNAL_NRF + value: "no" + - name: EXTERNAL_AUSF + value: "yes" + - name: EXTERNAL_UDM + value: "no" + - name: AMF_INTERFACE_NAME_FOR_N11 + value: net1 + - name: AMF_INTERFACE_NAME_FOR_NGAP + value: net2 + - name: AMF_SET_ID + value: "1" + - name: AUSF_FQDN + value: oai-ausf + - name: AUSF_IPV4_ADDRESS + value: 192.168.33.18 + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: PLMN_SUPPORT_MCC + value: "208" + - name: PLMN_SUPPORT_MNC + value: "99" + - name: PLMN_SUPPORT_TAC + value: "0x0001" + - name: REGION_ID + value: "128" + - name: SD_1 + value: "1" + - name: SD_2 + value: "123" + - name: SELECTED_0 + value: "true" + - name: SERVED_GUAMI_AMF_SET_ID_0 + value: "1" + - name: SERVED_GUAMI_AMF_SET_ID_1 + value: "1" + - name: SERVED_GUAMI_MCC_0 + value: "208" + - name: SERVED_GUAMI_MCC_1 + value: "460" + - name: SERVED_GUAMI_MNC_0 + value: "99" + - name: SERVED_GUAMI_MNC_1 + value: "11" + - name: SERVED_GUAMI_REGION_ID_0 + value: "128" + - name: SERVED_GUAMI_REGION_ID_1 + value: "10" + - name: SMF_FQDN_0 + value: oai-smf + - name: SMF_INSTANCE_ID_0 + value: "1" + - name: SMF_IPV4_ADDR_0 + value: 192.168.33.12 + - name: SMF_FQDN_1 + value: oai-smf + - name: SMF_INSTANCE_ID_1 + value: "2" + - name: SMF_IPV4_ADDR_1 + value: 0.0.0.0 + - name: SST_0 + value: "1" + - name: SST_1 + value: "1" + - name: SST_2 + value: "222" + - name: TZ + value: Europe/paris + - name: UDM_FQDN + value: oai-udm + - name: UDM_IPV4_ADDRESS + value: 192.168.33.19 + - name: USE_FQDN_DNS + value: "no" + - name: USE_HTTP2 + value: "no" + image: oaisoftwarealliance/oai-amf:v1.5.0 + name: oai-amf + resources: {} + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/basic-no-nrf/oai-ausf-deployment.yaml b/deployments/CoreNetwork/basic-no-nrf/oai-ausf-deployment.yaml new file mode 100644 index 0000000..1ae7338 --- /dev/null +++ b/deployments/CoreNetwork/basic-no-nrf/oai-ausf-deployment.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-ausf + app.kubernetes.io/part-of: CN-noNRF + name: oai-ausf +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-ausf + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-ausf-net + creationTimestamp: null + labels: + io.kompose.network/demo-oai-public-net: "true" + io.kompose.service: oai-ausf + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: AUSF_NAME + value: OAI_AUSF + - name: REGISTER_NRF + value: "no" + - name: SBI_IF_NAME + value: net1 + - name: TZ + value: Europe/Paris + - name: UDM_FQDN + value: oai-udm + - name: UDM_IP_ADDRESS + value: 192.168.33.19 + - name: USE_FQDN_DNS + value: "no" + image: oaisoftwarealliance/oai-ausf:v1.5.0 + name: oai-ausf + resources: {} + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/basic-no-nrf/oai-ext-dn-deployment.yaml b/deployments/CoreNetwork/basic-no-nrf/oai-ext-dn-deployment.yaml new file mode 100644 index 0000000..fe27260 --- /dev/null +++ b/deployments/CoreNetwork/basic-no-nrf/oai-ext-dn-deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-ext-dn + app.kubernetes.io/part-of: CN-noNRF + name: oai-ext-dn +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-ext-dn + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-dn-net + creationTimestamp: null + labels: + io.kompose.network/demo-oai-public-net: "true" + io.kompose.service: oai-ext-dn + spec: + serviceAccountName: oai-sa + containers: + - args: + - /bin/bash + - -c + - 'trap : SIGTERM SIGINT; sleep infinity & wait' + command: + - /bin/bash + - -c + - ' apt update; apt install -y procps iptables iproute2 iperf iputils-ping; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip route add 12.1.1.0/24 via 192.168.33.15 dev net1; ip route; sleep infinity' + image: oaisoftwarealliance/trf-gen-cn5g:latest + livenessProbe: + exec: + command: + - /bin/bash -c "ip r | grep 12.1.1" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: oai-ext-dn + resources: {} + securityContext: + privileged: true + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/basic-no-nrf/oai-smf-deployment.yaml b/deployments/CoreNetwork/basic-no-nrf/oai-smf-deployment.yaml new file mode 100644 index 0000000..a580f05 --- /dev/null +++ b/deployments/CoreNetwork/basic-no-nrf/oai-smf-deployment.yaml @@ -0,0 +1,134 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-smf + app.kubernetes.io/part-of: CN-noNRF + name: oai-smf +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-smf + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-smf-net + creationTimestamp: null + labels: + io.kompose.network/demo-oai-public-net: "true" + io.kompose.service: oai-smf + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: AMF_API_VERSION + value: v1 + - name: AMF_FQDN + value: oai-amf + - name: AMF_IPV4_ADDRESS + value: 192.168.33.11 + - name: DEFAULT_CSCF_IPV4_ADDRESS + value: 127.0.0.1 + - name: DEFAULT_DNS_IPV4_ADDRESS + value: 1.1.1.1 + - name: DEFAULT_DNS_SEC_IPV4_ADDRESS + value: 8.8.8.8 + - name: DISCOVER_UPF + value: "false" + - name: DNN_NI0 + value: oai + - name: DNN_NI1 + value: oai.ipv4 + - name: DNN_NI2 + value: default + - name: DNN_NI3 + value: ims + - name: DNN_RANGE0 + value: 12.1.1.151 - 12.1.1.253 + - name: DNN_RANGE1 + value: 12.1.1.51 - 12.1.1.150 + - name: DNN_RANGE2 + value: 12.1.1.2 - 12.1.1.50 + - name: DNN_RANGE3 + value: 14.1.1.2 - 14.1.1.253 + - name: INSTANCE + value: "0" + - name: ENABLE_USAGE_REPORTING + value: "no" + - name: NSSAI_SD0 + value: "0xFFFFFF" + - name: NSSAI_SD1 + value: "1" + - name: NSSAI_SD2 + value: "123" + - name: NSSAI_SST0 + value: "1" + - name: NSSAI_SST1 + value: "1" + - name: NSSAI_SST2 + value: "222" + - name: REGISTER_NRF + value: "no" + - name: SESSION_AMBR_DL0 + value: 400Mbps + - name: SESSION_AMBR_DL1 + value: 200Mbps + - name: SESSION_AMBR_DL2 + value: 100Mbps + - name: SESSION_AMBR_UL0 + value: 200Mbps + - name: SESSION_AMBR_UL1 + value: 100Mbps + - name: SESSION_AMBR_UL2 + value: 50Mbps + - name: SMF_INTERFACE_NAME_FOR_N4 + value: net1 + - name: SMF_INTERFACE_NAME_FOR_SBI + value: net1 + - name: TYPE0 + value: IPv4 + - name: TYPE1 + value: IPv4 + - name: TYPE2 + value: IPv4 + - name: TYPE3 + value: IPv4v6 + - name: TZ + value: Europe/Paris + - name: UDM_FQDN + value: oai-udm + - name: USE_FQDN_UDM + value: "no" + - name: UDM_IPV4_ADDRESS + value: 192.168.33.19 + - name: UE_MTU + value: "1500" + - name: UPF_FQDN_0 + value: oai-spgwu-tiny + - name: UPF_IPV4_ADDRESS + value: 192.168.33.15 + - name: USE_FQDN_UPF + value: "no" + - name: USE_FQDN_DNS + value: "no" + - name: USE_LOCAL_SUBSCRIPTION_INFO + value: "yes" + - name: USE_NETWORK_INSTANCE + value: "yes" + image: oaisoftwarealliance/oai-smf:develop + name: oai-smf + resources: {} + restartPolicy: Always + hostAliases: + - ip: "192.168.33.15" + hostnames: + - "oai-spgwu-tiny" +status: {} diff --git a/deployments/CoreNetwork/basic-no-nrf/oai-spgwu-deployment.yaml b/deployments/CoreNetwork/basic-no-nrf/oai-spgwu-deployment.yaml new file mode 100644 index 0000000..08d572c --- /dev/null +++ b/deployments/CoreNetwork/basic-no-nrf/oai-spgwu-deployment.yaml @@ -0,0 +1,94 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-spgwu + app.kubernetes.io/part-of: CN-noNRF + name: oai-spgwu +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-spgwu + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-upf-net, oai-upf-n3-net + creationTimestamp: null + labels: + io.kompose.network/demo-oai-public-net: "true" + io.kompose.service: oai-spgwu + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: BYPASS_UL_PFCP_RULES + value: "no" + - name: DNN_0 + value: oai + - name: DNN_1 + value: oai.ipv4 + - name: DNN_2 + value: default + - name: ENABLE_5G_FEATURES + value: "yes" + - name: NETWORK_UE_IP + value: 12.1.1.0/24 + - name: NETWORK_UE_NAT_OPTION + value: "yes" + - name: NSSAI_SD_0 + value: "0xffffff" + - name: NSSAI_SD_1 + value: "1" + - name: NSSAI_SD_2 + value: "123" + - name: NSSAI_SST_0 + value: "1" + - name: NSSAI_SST_1 + value: "1" + - name: NSSAI_SST_2 + value: "222" + - name: PGW_INTERFACE_NAME_FOR_SGI + value: net1 + - name: REGISTER_NRF + value: "no" + - name: SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP + value: net2 + - name: SGW_INTERFACE_NAME_FOR_SX + value: net1 + - name: TZ + value: Europe/Paris + - name: UPF_FQDN_5G + value: oai-spgwu-tiny + - name: USE_FQDN_NRF + value: "no" + - name: NRF_FQDN + value: oai-nrf + - name: NRF_IPV4_ADDRESS + value: 0.0.0.0 + - name: SPGWC0_IP_ADDRESS + value: 192.168.34.10 + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 + name: oai-spgwu + resources: {} + securityContext: + capabilities: + add: + - NET_ADMIN + - SYS_ADMIN + drop: + - ALL + privileged: true + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/basic-no-nrf/oai-udm-deployment.yaml b/deployments/CoreNetwork/basic-no-nrf/oai-udm-deployment.yaml new file mode 100644 index 0000000..a883831 --- /dev/null +++ b/deployments/CoreNetwork/basic-no-nrf/oai-udm-deployment.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-udm + app.kubernetes.io/part-of: CN-noNRF + name: oai-udm +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-udm + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-udm-net + creationTimestamp: null + labels: + io.kompose.network/demo-oai-public-net: "true" + io.kompose.service: oai-udm + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: REGISTER_NRF + value: "no" + - name: SBI_IF_NAME + value: net1 + - name: TZ + value: Europe/Paris + - name: UDM_NAME + value: OAI_UDM + - name: UDR_FQDN + value: oai-udr + - name: UDR_IP_ADDRESS + value: 192.168.33.20 + - name: USE_FQDN_DNS + value: "no" + image: oaisoftwarealliance/oai-udm:v1.5.0 + name: oai-udm + resources: {} + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/basic-no-nrf/oai-udr-deployment.yaml b/deployments/CoreNetwork/basic-no-nrf/oai-udr-deployment.yaml new file mode 100644 index 0000000..a7e7f63 --- /dev/null +++ b/deployments/CoreNetwork/basic-no-nrf/oai-udr-deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-udr + app.kubernetes.io/part-of: CN-noNRF + name: oai-udr +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-udr + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ./docker-compose-basic-nonrf.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-udr-net + creationTimestamp: null + labels: + io.kompose.network/demo-oai-public-net: "true" + io.kompose.service: oai-udr + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: MYSQL_DB + value: oai_db + - name: MYSQL_IPV4_ADDRESS + value: 192.168.33.16 + - name: MYSQL_PASS + value: test + - name: MYSQL_USER + value: test + - name: REGISTER_NRF + value: "no" + - name: TZ + value: Europe/Paris + - name: UDR_INTERFACE_NAME_FOR_NUDR + value: net1 + - name: UDR_NAME + value: OAI_UDR + - name: USE_FQDN_DNS + value: "no" + - name: WAIT_MYSQL + value: "120" + image: oaisoftwarealliance/oai-udr:v1.5.0 + name: oai-udr + resources: {} + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/default/mysql-deployment.yaml b/deployments/CoreNetwork/default/mysql-deployment.yaml new file mode 100644 index 0000000..0da4dd2 --- /dev/null +++ b/deployments/CoreNetwork/default/mysql-deployment.yaml @@ -0,0 +1,63 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: mysql + name: mysql +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: mysql + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-public-net: "true" + io.kompose.service: mysql + spec: + containers: + - env: + - name: MYSQL_DATABASE + value: oai_db + - name: MYSQL_PASSWORD + value: test + - name: MYSQL_ROOT_PASSWORD + value: linux + - name: MYSQL_USER + value: test + - name: TZ + value: Europe/Paris + image: mysql:5.7 + livenessProbe: + exec: + command: + - /bin/bash -c "/tmp/mysql-healthcheck.sh" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: rfsim5g-mysql + resources: {} + volumeMounts: + - mountPath: /docker-entrypoint-initdb.d/oai_db.sql + name: mysql-claim0 + - mountPath: /tmp/mysql-healthcheck.sh + name: mysql-claim1 + restartPolicy: Always + volumes: + - name: mysql-claim0 + persistentVolumeClaim: + claimName: mysql-claim0 + - name: mysql-claim1 + persistentVolumeClaim: + claimName: mysql-claim1 +status: {} diff --git a/deployments/CoreNetwork/default/oai-amf-deployment.yaml b/deployments/CoreNetwork/default/oai-amf-deployment.yaml new file mode 100644 index 0000000..7ba37a2 --- /dev/null +++ b/deployments/CoreNetwork/default/oai-amf-deployment.yaml @@ -0,0 +1,144 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-amf + app.kubernetes.io/part-of: test-deployment + name: oai-amf-test +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-amf + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + k8s.v1.cni.cncf.io/networks: oai-amf-net, oai-amf-n2-net + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-public-net: "true" + io.kompose.service: oai-amf + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: AMF_INTERFACE_NAME_FOR_N11 + value: net1 + - name: AMF_INTERFACE_NAME_FOR_NGAP + value: net2 + - name: AMF_SET_ID + value: "1" + - name: AUSF_API_VERSION + value: v1 + - name: AUSF_FQDN + value: localhost + - name: AUSF_IPV4_ADDRESS + value: 0.0.0.0 + - name: AUSF_PORT + value: "80" + - name: EXTERNAL_AUSF + value: "no" + - name: INSTANCE + value: "0" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MYSQL_DB + value: oai_db + - name: MYSQL_PASS + value: linux + - name: MYSQL_SERVER + value: 192.168.33.16 + - name: MYSQL_USER + value: root + - name: NF_REGISTRATION + value: "no" + - name: EXTERNAL_NRF + value: "no" + - name: NRF_API_VERSION + value: v1 + - name: NRF_FQDN + value: oai-nrf + - name: NRF_IPV4_ADDRESS + value: 0.0.0.0 + - name: NRF_PORT + value: "80" + - name: OPERATOR_KEY + value: c42449363bbad02b66d16bc975d77cc1 + - name: PID_DIRECTORY + value: /var/run + - name: PLMN_SUPPORT_MCC + value: "208" + - name: PLMN_SUPPORT_MNC + value: "99" + - name: PLMN_SUPPORT_TAC + value: "0x0001" + - name: REGION_ID + value: "128" + - name: SD_0 + value: "0xffffff" + - name: SELECTED_0 + value: "true" + - name: SELECTED_1 + value: "false" + - name: SERVED_GUAMI_AMF_SET_ID_0 + value: "1" + - name: SERVED_GUAMI_AMF_SET_ID_1 + value: "1" + - name: SERVED_GUAMI_MCC_0 + value: "208" + - name: SERVED_GUAMI_MCC_1 + value: "460" + - name: SERVED_GUAMI_MNC_0 + value: "99" + - name: SERVED_GUAMI_MNC_1 + value: "11" + - name: SERVED_GUAMI_REGION_ID_0 + value: "128" + - name: SERVED_GUAMI_REGION_ID_1 + value: "10" + - name: USE_FQDN_SMF + value: "no" + - name: SMF_FQDN + value: oai-smf-svc + - name: SMF_FQDN_0 + value: oai-smf-svc + - name: SMF_HTTP_VERSION + value: v1 + - name: SMF_INSTANCE_ID + value: "0" + - name: SMF_IPV4_ADDR_0 + value: "192.168.33.12" + - name: SMF_SELECTION + value: "no" + - name: SST_0 + value: "1" + - name: TZ + value: Asia/Jakarta + - name: USE_FQDN_DNS + value: "no" + image: 'oaisoftwarealliance/oai-amf:latest' + livenessProbe: + exec: + command: + - /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 15 + name: rfsim5g-oai-amf + resources: {} + restartPolicy: Always + volumes: + - name: oai-amf-claim0 + persistentVolumeClaim: + claimName: oai-amf-claim0 +status: {} diff --git a/deployments/CoreNetwork/default/oai-ext-dn-deployment.yaml b/deployments/CoreNetwork/default/oai-ext-dn-deployment.yaml new file mode 100644 index 0000000..d88b2db --- /dev/null +++ b/deployments/CoreNetwork/default/oai-ext-dn-deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-ext-dn + app.kubernetes.io/part-of: test-deployment + name: oai-ext-dn-test +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-ext-dn + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-dn-net + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-traffic_net-net: "true" + io.kompose.service: oai-ext-dn + spec: + serviceAccountName: oai-sa + containers: + - command: + - /bin/bash + - -c + - ' apt update; apt install -y procps iptables iproute2 iperf iputils-ping; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip route add 12.1.1.0/24 via 192.168.33.15 dev net1; sleep infinity' + image: ubuntu:bionic + livenessProbe: + exec: + command: + - /bin/bash -c "ping -c 2 192.168.33.15" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: rfsim5g-oai-ext-dn + resources: {} + securityContext: + privileged: true + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/default/oai-gnb-deployment.yaml b/deployments/CoreNetwork/default/oai-gnb-deployment.yaml new file mode 100644 index 0000000..24f407d --- /dev/null +++ b/deployments/CoreNetwork/default/oai-gnb-deployment.yaml @@ -0,0 +1,72 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-gnb + name: oai-gnb +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-gnb + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-public-net: "true" + io.kompose.service: oai-gnb + spec: + containers: + - env: + - name: AMF_IP_ADDRESS + value: 192.168.71.132 + - name: GNB_NAME + value: gnb-rfsim + - name: GNB_NGA_IF_NAME + value: eth0 + - name: GNB_NGA_IP_ADDRESS + value: 192.168.71.140 + - name: GNB_NGU_IF_NAME + value: eth0 + - name: GNB_NGU_IP_ADDRESS + value: 192.168.71.140 + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: RFSIMULATOR + value: server + - name: SDR_ADDRS + value: serial=XXXXXXX + - name: TAC + value: "1" + - name: USE_ADDITIONAL_OPTIONS + value: --sa -E --rfsim --log_config.global_log_options level,nocolor,time + - name: USE_SA_TDD_MONO + value: "yes" + image: oai-gnb:develop + livenessProbe: + exec: + command: + - /bin/bash -c "pgrep nr-softmodem" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: rfsim5g-oai-gnb + resources: {} + securityContext: + privileged: true + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/default/oai-nr-ue-deployment.yaml b/deployments/CoreNetwork/default/oai-nr-ue-deployment.yaml new file mode 100644 index 0000000..98dcee2 --- /dev/null +++ b/deployments/CoreNetwork/default/oai-nr-ue-deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-nr-ue + name: oai-nr-ue +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-nr-ue + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-public-net: "true" + io.kompose.service: oai-nr-ue + spec: + containers: + - env: + - name: DNN + value: oai + - name: FULL_IMSI + value: "208990100001100" + - name: FULL_KEY + value: fec86ba6eb707ed08905757b1bb44b8f + - name: NSSAI_SST + value: "1" + - name: OPC + value: C42449363BBAD02B66D16BC975D77CC1 + - name: RFSIMULATOR + value: 192.168.71.140 + - name: USE_ADDITIONAL_OPTIONS + value: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time + image: oai-nr-ue:develop + livenessProbe: + exec: + command: + - /bin/bash -c "pgrep nr-uesoftmodem" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: rfsim5g-oai-nr-ue + resources: {} + securityContext: + privileged: true + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/default/oai-nr-ue2-deployment.yaml b/deployments/CoreNetwork/default/oai-nr-ue2-deployment.yaml new file mode 100644 index 0000000..a7fc281 --- /dev/null +++ b/deployments/CoreNetwork/default/oai-nr-ue2-deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-nr-ue2 + name: oai-nr-ue2 +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-nr-ue2 + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-public-net: "true" + io.kompose.service: oai-nr-ue2 + spec: + containers: + - env: + - name: DNN + value: oai + - name: FULL_IMSI + value: "208990100001101" + - name: FULL_KEY + value: fec86ba6eb707ed08905757b1bb44b8f + - name: NSSAI_SST + value: "1" + - name: OPC + value: C42449363BBAD02B66D16BC975D77CC1 + - name: RFSIMULATOR + value: 192.168.71.140 + - name: USE_ADDITIONAL_OPTIONS + value: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time + image: oai-nr-ue:develop + livenessProbe: + exec: + command: + - /bin/bash -c "pgrep nr-uesoftmodem" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: rfsim5g-oai-nr-ue2 + resources: {} + securityContext: + privileged: true + restartPolicy: Always +status: {} diff --git a/deployments/CoreNetwork/default/oai-nrf-deployment.yaml b/deployments/CoreNetwork/default/oai-nrf-deployment.yaml new file mode 100644 index 0000000..0334e57 --- /dev/null +++ b/deployments/CoreNetwork/default/oai-nrf-deployment.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-nrf + app.kubernetes.io/part-of: test-deployment + name: oai-nrf-test +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-nrf + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-nrf-net + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-public-net: "true" + io.kompose.network/oai-nrf-net: "true" + io.kompose.service: oai-nrf + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: INSTANCE + value: "0" + - name: NRF_API_VERSION + value: v1 + - name: NRF_INTERFACE_HTTP2_PORT_FOR_SBI + value: "9090" + - name: NRF_INTERFACE_NAME_FOR_SBI + value: net1 + - name: NRF_INTERFACE_PORT_FOR_SBI + value: "80" + - name: PID_DIRECTORY + value: /var/run + image: oaisoftwarealliance/oai-nrf:latest + livenessProbe: + exec: + command: + - /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: rfsim5g-oai-nrf + resources: {} + volumeMounts: + - mountPath: /openair-nrf/bin/nrf-healthcheck.sh + name: oai-nrf-claim0 + restartPolicy: Always + volumes: + - name: oai-nrf-claim0 + persistentVolumeClaim: + claimName: oai-nrf-claim0 +status: {} diff --git a/deployments/CoreNetwork/default/oai-smf-deployment.yaml b/deployments/CoreNetwork/default/oai-smf-deployment.yaml new file mode 100644 index 0000000..53e225b --- /dev/null +++ b/deployments/CoreNetwork/default/oai-smf-deployment.yaml @@ -0,0 +1,124 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-smf + app.kubernetes.io/part-of: test-deployment + name: oai-smf-test +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-smf + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-smf-net + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-public-net: "true" + io.kompose.service: oai-smf + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: AMF_API_VERSION + value: v1 + - name: AMF_FQDN + value: oai-amf + - name: AMF_IPV4_ADDRESS + value: 192.168.33.11 + - name: AMF_PORT + value: "80" + - name: DEFAULT_DNS_IPV4_ADDRESS + value: 172.21.3.100 + - name: DEFAULT_DNS_SEC_IPV4_ADDRESS + value: 4.4.4.4 + - name: DISCOVER_UPF + value: "no" + - name: DNN_NI0 + value: oai + - name: DNN_RANGE0 + value: 12.1.1.2 - 12.1.1.127 + - name: INSTANCE + value: "0" + - name: NRF_API_VERSION + value: v1 + - name: NRF_FQDN + value: oai-nrf + - name: NRF_IPV4_ADDRESS + value: 192.168.33.14 + - name: NRF_PORT + value: "80" + - name: NSSAI_SD0 + value: "0xFFFFFF" + - name: NSSAI_SST0 + value: "1" + - name: PID_DIRECTORY + value: /var/run + - name: REGISTER_NRF + value: "no" + - name: SESSION_AMBR_DL0 + value: 400Mbps + - name: SESSION_AMBR_UL0 + value: 200Mbps + - name: SMF_API_VERSION + value: v1 + - name: SMF_INTERFACE_HTTP2_PORT_FOR_SBI + value: "9090" + - name: SMF_INTERFACE_NAME_FOR_N4 + value: net1 + - name: SMF_INTERFACE_NAME_FOR_SBI + value: net1 + - name: SMF_INTERFACE_PORT_FOR_SBI + value: "80" + - name: TYPE0 + value: IPv4 + - name: TZ + value: Asia/jakarta + - name: UDM_API_VERSION + value: v1 + # - name: UPF_FQDN_0 + # value: "oai-spgwu" + - name: UPF_IPV4_ADDRESS + value: "192.168.33.15" + - name: USE_FQDN_DNS + value: "no" + - name: USE_FQDN_UPF + value: "no" + # - name: DEFAULT_CSCF_IPV4_ADDRESS + # value: "127.0.0.1" + - name: USE_LOCAL_SUBSCRIPTION_INFO + value: "yes" + - name: USE_NETWORK_INSTANCE + value: "no" + - name: UE_MTU + value: "1500" + + image: oaisoftwarealliance/oai-smf:v1.5.0 + livenessProbe: + exec: + command: + - /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: rfsim5g-oai-smf + resources: {} + volumeMounts: + - mountPath: /openair-smf/bin/smf-healthcheck.sh + name: oai-smf-claim0 + restartPolicy: Always + volumes: + - name: oai-smf-claim0 + persistentVolumeClaim: + claimName: oai-smf-claim0 +status: {} diff --git a/deployments/CoreNetwork/default/oai-spgwu-deployment.yaml b/deployments/CoreNetwork/default/oai-spgwu-deployment.yaml new file mode 100644 index 0000000..0432cce --- /dev/null +++ b/deployments/CoreNetwork/default/oai-spgwu-deployment.yaml @@ -0,0 +1,111 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: oai-spgwu + app.kubernetes.io/part-of: test-deployment + name: oai-spgwu-test +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: oai-spgwu + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../docker-compose.yaml + kompose.version: 1.26.0 (40646f47) + k8s.v1.cni.cncf.io/networks: oai-upf-net, oai-upf-n3-net + creationTimestamp: null + labels: + io.kompose.network/rfsim5g-oai-public-net: "true" + io.kompose.network/rfsim5g-oai-traffic-net: "true" + io.kompose.service: oai-spgwu + spec: + serviceAccountName: oai-sa + containers: + - env: + - name: BYPASS_UL_PFCP_RULES + value: "no" + - name: DNN_0 + value: oai + - name: ENABLE_5G_FEATURES + value: "yes" + - name: GTP_EXTENSION_HEADER_PRESENT + value: "yes" + - name: GW_ID + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC03 + value: "099" + - name: NETWORK_UE_IP + value: 12.1.1.0/24 + - name: NETWORK_UE_NAT_OPTION + value: "yes" + - name: NRF_API_VERSION + value: v1 + - name: NRF_FQDN + value: oai-nrf + - name: NRF_IPV4_ADDRESS + value: 192.168.33.14 + - name: NRF_PORT + value: "80" + - name: NSSAI_SD_0 + value: "0xffffff" + - name: NSSAI_SST_0 + value: "1" + - name: PGW_INTERFACE_NAME_FOR_SGI + value: net1 + - name: PID_DIRECTORY + value: /var/run + - name: REALM + value: openairinterface.org + - name: REGISTER_NRF + value: "no" + - name: SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP + value: net2 + - name: SGW_INTERFACE_NAME_FOR_SX + value: net1 + # - name: SPGWC0_IP_ADDRESS + # value: 192.168.33.12 + - name: TAC + value: "1" + - name: TZ + value: Europe/Paris + # - name: UPF_FQDN_5G + # value: oai-spgwu + - name: USE_FQDN_NRF + value: "no" + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 + livenessProbe: + exec: + command: + - /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" + failureThreshold: 5 + periodSeconds: 10 + timeoutSeconds: 5 + name: rfsim5g-oai-spgwu + resources: {} + securityContext: + capabilities: + add: + - SYS_ADMIN + - NET_ADMIN + drop: + - ALL + privileged: true + restartPolicy: Always + volumes: + - name: oai-spgwu-claim0 + persistentVolumeClaim: + claimName: oai-spgwu-claim0 +status: {} diff --git a/deployments/src/gnb_access_deployment.yaml b/deployments/src/gnb_access_deployment.yaml new file mode 100644 index 0000000..9544274 --- /dev/null +++ b/deployments/src/gnb_access_deployment.yaml @@ -0,0 +1,119 @@ +kind: DeploymentConfig +apiVersion: apps.openshift.io/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"@part_type@","name":"@part_of@"},{"apiVersion":"apps/v1","kind":"@part_type@","name":"@part_of@"}]' + name: oai-@trainee@ + generation: 28 + namespace: infidel-test + labels: + app: oai-@trainee@ + app.kubernetes.io/part-of: trainee-@role@ +spec: + strategy: + type: Rolling + rollingParams: + updatePeriodSeconds: 1 + intervalSeconds: 1 + timeoutSeconds: 600 + maxUnavailable: 0 + maxSurge: 1 + resources: {} + activeDeadlineSeconds: 21600 + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - inf-@mode@ + from: + kind: ImageStreamTag + namespace: infidel-test + name: 'oai-gnb-official:2023.w05' + - type: ConfigChange + replicas: 1 + revisionHistoryLimit: 10 + test: false + template: + metadata: + creationTimestamp: null + labels: + app: oai-inf-@mode@-sa + annotations: + k8s.v1.cni.cncf.io/networks: @net@ + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - name: inf-@mode@ + command: + - /bin/bash + - -c + - ' apt update; apt install -y vim tmux; ip route; sleep infinity' + resources: {} + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + add: + - SYS_ADMIN + - NET_ADMIN + privileged: true + env: + - name: RFSIMULATOR + value: server + - name: USE_SA_@mode_cap@ + value: "1" + - name: GNB_NAME + value: gnb-@trainee@ + - name: GNB_ID + value: "e@role@" + - name: TAC + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: AMF_IP_ADDRESS + value: "192.168.34.11" + - name: UPF_IP_ADDRESS + value: "192.168.34.10" + - name: GNB_NGA_IF_NAME + value: net1 + - name: GNB_NGA_IP_ADDRESS + value: "@ip_cu_amf@" + - name: GNB_NGU_IF_NAME + value: net1 + - name: GNB_NGU_IP_ADDRESS + value: "@ip_cu_amf@" + - name: F1_IF_NAME + value: "net2" + - name: F1_DU_IP_ADDRESS + value: "@ip_du_cu@" + - name: F1_CU_IP_ADDRESS + value: "@ip_cu_du@" + - name: F1_DU_D_PORT + value: "2153" + - name: F1_CU_D_PORT + value: "2153" + - name: USE_ADDITIONAL_OPTIONS + value: --sa --rfsim --log_config.global_log_options level,nocolor,time + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + diff --git a/deployments/src/template_deployment.yaml b/deployments/src/template_deployment.yaml new file mode 100644 index 0000000..57c44ff --- /dev/null +++ b/deployments/src/template_deployment.yaml @@ -0,0 +1,115 @@ +kind: DeploymentConfig +apiVersion: apps.openshift.io/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"@part_type@","name":"@part_of@"},{"apiVersion":"apps/v1","kind":"@part_type@","name":"@part_of@"}]' + name: oai-@trainee@ + generation: 28 + namespace: infidel-test + labels: + app: oai-@trainee@ + app.kubernetes.io/part-of: trainee-@role@ +spec: + strategy: + type: Rolling + rollingParams: + updatePeriodSeconds: 1 + intervalSeconds: 1 + timeoutSeconds: 600 + maxUnavailable: 0 + maxSurge: 1 + resources: {} + activeDeadlineSeconds: 21600 + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - inf-@mode@ + from: + kind: ImageStreamTag + namespace: infidel-test + name: 'oai-gnb-official:2023.w05' + - type: ConfigChange + replicas: 1 + revisionHistoryLimit: 10 + test: false + template: + metadata: + creationTimestamp: null + labels: + app: oai-inf-@mode@-sa + annotations: + k8s.v1.cni.cncf.io/networks: @net@ + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - name: inf-@mode@ + resources: {} + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + add: + - SYS_ADMIN + - NET_ADMIN + privileged: true + env: + - name: RFSIMULATOR + value: server + - name: USE_SA_@mode_cap@ + value: "1" + - name: GNB_NAME + value: gnb-@trainee@ + - name: GNB_ID + value: "e@role@" + - name: TAC + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: AMF_IP_ADDRESS + value: "192.168.34.11" + - name: UPF_IP_ADDRESS + value: "192.168.34.10" + - name: GNB_NGA_IF_NAME + value: net1 + - name: GNB_NGA_IP_ADDRESS + value: "@ip_cu_amf@" + - name: GNB_NGU_IF_NAME + value: net1 + - name: GNB_NGU_IP_ADDRESS + value: "@ip_cu_amf@" + - name: F1_IF_NAME + value: "net2" + - name: F1_DU_IP_ADDRESS + value: "@ip_du_cu@" + - name: F1_CU_IP_ADDRESS + value: "@ip_cu_du@" + - name: F1_DU_D_PORT + value: "2153" + - name: F1_CU_D_PORT + value: "2153" + - name: USE_ADDITIONAL_OPTIONS + value: --sa --rfsim --log_config.global_log_options level,nocolor,time + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + diff --git a/deployments/src/template_ue_deployment.yaml b/deployments/src/template_ue_deployment.yaml new file mode 100644 index 0000000..0a472f2 --- /dev/null +++ b/deployments/src/template_ue_deployment.yaml @@ -0,0 +1,81 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"@part_type@","name":"@part_of@"},{"apiVersion":"apps/v1","kind":"@part_type@","name":"@part_of@"}]' + name: oai-nr-ue-@role@ + + namespace: infidel-test + labels: + app.kubernetes.io/part-of: trainee-@role@ +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/part-of: trainee-@role@ + template: + metadata: + labels: + app.kubernetes.io/part-of: trainee-@role@ + creationTimestamp: null + annotations: + k8s.v1.cni.cncf.io/networks: '@net@' + kompose.cmd: kompose convert -f ../docker-compose.yaml + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - resources: {} + terminationMessagePath: /dev/termination-log + name: rfsim5g-oai-nr-ue + livenessProbe: + exec: + command: + - /bin/bash -c "pgrep nr-uesoftmodem" + timeoutSeconds: 5 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + env: + - name: DNN + value: oai + - name: FULL_IMSI + value: '@imsi_now@' + - name: FULL_KEY + value: @ki_now@ + - name: NSSAI_SST + value: '1' + - name: OPC + value: @opc_now@ + - name: RFSIMULATOR + value: @ip_du_cu@ + - name: USE_ADDITIONAL_OPTIONS + value: >- + --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod + --log_config.global_log_options level,nocolor,time + securityContext: + privileged: true + imagePullPolicy: IfNotPresent + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePolicy: File + image: 'oaisoftwarealliance/oai-nr-ue:develop' + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 diff --git a/deployments/trainee/gnb-cu-01.yaml b/deployments/trainee/gnb-cu-01.yaml new file mode 100644 index 0000000..b8b6924 --- /dev/null +++ b/deployments/trainee/gnb-cu-01.yaml @@ -0,0 +1,115 @@ +kind: DeploymentConfig +apiVersion: apps.openshift.io/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"Deployment","name":"oai-amf"},{"apiVersion":"apps/v1","kind":"Deployment","name":"oai-amf"}]' + name: oai-cu-01 + generation: 28 + namespace: infidel-test + labels: + app: oai-cu-01 + app.kubernetes.io/part-of: trainee-01 +spec: + strategy: + type: Rolling + rollingParams: + updatePeriodSeconds: 1 + intervalSeconds: 1 + timeoutSeconds: 600 + maxUnavailable: 0 + maxSurge: 1 + resources: {} + activeDeadlineSeconds: 21600 + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - inf-cu + from: + kind: ImageStreamTag + namespace: infidel-test + name: 'oai-gnb-official:2023.w05' + - type: ConfigChange + replicas: 1 + revisionHistoryLimit: 10 + test: false + template: + metadata: + creationTimestamp: null + labels: + app: oai-inf-cu-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-cu-amf-01-net,oai-cu-du-01-net + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - name: inf-cu + resources: {} + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + add: + - SYS_ADMIN + - NET_ADMIN + privileged: true + env: + - name: RFSIMULATOR + value: server + - name: USE_SA_CU + value: "1" + - name: GNB_NAME + value: gnb-cu-01 + - name: GNB_ID + value: "e01" + - name: TAC + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: AMF_IP_ADDRESS + value: "192.168.34.11" + - name: UPF_IP_ADDRESS + value: "192.168.34.10" + - name: GNB_NGA_IF_NAME + value: net1 + - name: GNB_NGA_IP_ADDRESS + value: "192.168.34.12" + - name: GNB_NGU_IF_NAME + value: net1 + - name: GNB_NGU_IP_ADDRESS + value: "192.168.34.12" + - name: F1_IF_NAME + value: "net2" + - name: F1_DU_IP_ADDRESS + value: "192.168.35.13" + - name: F1_CU_IP_ADDRESS + value: "192.168.35.12" + - name: F1_DU_D_PORT + value: "2153" + - name: F1_CU_D_PORT + value: "2153" + - name: USE_ADDITIONAL_OPTIONS + value: --sa --rfsim --log_config.global_log_options level,nocolor,time + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + diff --git a/deployments/trainee/gnb-cu-02.yaml b/deployments/trainee/gnb-cu-02.yaml new file mode 100644 index 0000000..ef26cd2 --- /dev/null +++ b/deployments/trainee/gnb-cu-02.yaml @@ -0,0 +1,115 @@ +kind: DeploymentConfig +apiVersion: apps.openshift.io/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"Deployment","name":"oai-amf"},{"apiVersion":"apps/v1","kind":"Deployment","name":"oai-amf"}]' + name: oai-cu-02 + generation: 28 + namespace: infidel-test + labels: + app: oai-cu-02 + app.kubernetes.io/part-of: trainee-02 +spec: + strategy: + type: Rolling + rollingParams: + updatePeriodSeconds: 1 + intervalSeconds: 1 + timeoutSeconds: 600 + maxUnavailable: 0 + maxSurge: 1 + resources: {} + activeDeadlineSeconds: 21600 + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - inf-cu + from: + kind: ImageStreamTag + namespace: infidel-test + name: 'oai-gnb-official:2023.w05' + - type: ConfigChange + replicas: 1 + revisionHistoryLimit: 10 + test: false + template: + metadata: + creationTimestamp: null + labels: + app: oai-inf-cu-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-cu-amf-02-net,oai-cu-du-02-net + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - name: inf-cu + resources: {} + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + add: + - SYS_ADMIN + - NET_ADMIN + privileged: true + env: + - name: RFSIMULATOR + value: server + - name: USE_SA_CU + value: "1" + - name: GNB_NAME + value: gnb-cu-02 + - name: GNB_ID + value: "e02" + - name: TAC + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: AMF_IP_ADDRESS + value: "192.168.34.11" + - name: UPF_IP_ADDRESS + value: "192.168.34.10" + - name: GNB_NGA_IF_NAME + value: net1 + - name: GNB_NGA_IP_ADDRESS + value: "192.168.34.13" + - name: GNB_NGU_IF_NAME + value: net1 + - name: GNB_NGU_IP_ADDRESS + value: "192.168.34.13" + - name: F1_IF_NAME + value: "net2" + - name: F1_DU_IP_ADDRESS + value: "192.168.35.16" + - name: F1_CU_IP_ADDRESS + value: "192.168.35.15" + - name: F1_DU_D_PORT + value: "2153" + - name: F1_CU_D_PORT + value: "2153" + - name: USE_ADDITIONAL_OPTIONS + value: --sa --rfsim --log_config.global_log_options level,nocolor,time + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + diff --git a/deployments/trainee/gnb-cu-03.yaml b/deployments/trainee/gnb-cu-03.yaml new file mode 100644 index 0000000..19a8e15 --- /dev/null +++ b/deployments/trainee/gnb-cu-03.yaml @@ -0,0 +1,115 @@ +kind: DeploymentConfig +apiVersion: apps.openshift.io/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"Deployment","name":"oai-amf"},{"apiVersion":"apps/v1","kind":"Deployment","name":"oai-amf"}]' + name: oai-cu-03 + generation: 28 + namespace: infidel-test + labels: + app: oai-cu-03 + app.kubernetes.io/part-of: trainee-03 +spec: + strategy: + type: Rolling + rollingParams: + updatePeriodSeconds: 1 + intervalSeconds: 1 + timeoutSeconds: 600 + maxUnavailable: 0 + maxSurge: 1 + resources: {} + activeDeadlineSeconds: 21600 + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - inf-cu + from: + kind: ImageStreamTag + namespace: infidel-test + name: 'oai-gnb-official:2023.w05' + - type: ConfigChange + replicas: 1 + revisionHistoryLimit: 10 + test: false + template: + metadata: + creationTimestamp: null + labels: + app: oai-inf-cu-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-cu-amf-03-net,oai-cu-du-03-net + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - name: inf-cu + resources: {} + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + add: + - SYS_ADMIN + - NET_ADMIN + privileged: true + env: + - name: RFSIMULATOR + value: server + - name: USE_SA_CU + value: "1" + - name: GNB_NAME + value: gnb-cu-03 + - name: GNB_ID + value: "e03" + - name: TAC + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: AMF_IP_ADDRESS + value: "192.168.34.11" + - name: UPF_IP_ADDRESS + value: "192.168.34.10" + - name: GNB_NGA_IF_NAME + value: net1 + - name: GNB_NGA_IP_ADDRESS + value: "192.168.34.14" + - name: GNB_NGU_IF_NAME + value: net1 + - name: GNB_NGU_IP_ADDRESS + value: "192.168.34.14" + - name: F1_IF_NAME + value: "net2" + - name: F1_DU_IP_ADDRESS + value: "192.168.35.19" + - name: F1_CU_IP_ADDRESS + value: "192.168.35.18" + - name: F1_DU_D_PORT + value: "2153" + - name: F1_CU_D_PORT + value: "2153" + - name: USE_ADDITIONAL_OPTIONS + value: --sa --rfsim --log_config.global_log_options level,nocolor,time + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + diff --git a/deployments/trainee/gnb-du-01.yaml b/deployments/trainee/gnb-du-01.yaml new file mode 100644 index 0000000..a189369 --- /dev/null +++ b/deployments/trainee/gnb-du-01.yaml @@ -0,0 +1,115 @@ +kind: DeploymentConfig +apiVersion: apps.openshift.io/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"oai-cu-01"},{"apiVersion":"apps/v1","kind":"DeploymentConfig","name":"oai-cu-01"}]' + name: oai-du-01 + generation: 28 + namespace: infidel-test + labels: + app: oai-du-01 + app.kubernetes.io/part-of: trainee-01 +spec: + strategy: + type: Rolling + rollingParams: + updatePeriodSeconds: 1 + intervalSeconds: 1 + timeoutSeconds: 600 + maxUnavailable: 0 + maxSurge: 1 + resources: {} + activeDeadlineSeconds: 21600 + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - inf-du + from: + kind: ImageStreamTag + namespace: infidel-test + name: 'oai-gnb-official:2023.w05' + - type: ConfigChange + replicas: 1 + revisionHistoryLimit: 10 + test: false + template: + metadata: + creationTimestamp: null + labels: + app: oai-inf-du-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-du-cu-01-net + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - name: inf-du + resources: {} + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + add: + - SYS_ADMIN + - NET_ADMIN + privileged: true + env: + - name: RFSIMULATOR + value: server + - name: USE_SA_TDD_DU + value: "1" + - name: GNB_NAME + value: gnb-du-01 + - name: GNB_ID + value: "e01" + - name: TAC + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: AMF_IP_ADDRESS + value: "192.168.34.11" + - name: UPF_IP_ADDRESS + value: "192.168.34.10" + - name: GNB_NGA_IF_NAME + value: net1 + - name: GNB_NGA_IP_ADDRESS + value: "192.168.34.12" + - name: GNB_NGU_IF_NAME + value: net1 + - name: GNB_NGU_IP_ADDRESS + value: "192.168.34.12" + - name: F1_IF_NAME + value: "net2" + - name: F1_DU_IP_ADDRESS + value: "192.168.35.13" + - name: F1_CU_IP_ADDRESS + value: "192.168.35.12" + - name: F1_DU_D_PORT + value: "2153" + - name: F1_CU_D_PORT + value: "2153" + - name: USE_ADDITIONAL_OPTIONS + value: --sa --rfsim --log_config.global_log_options level,nocolor,time + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + diff --git a/deployments/trainee/gnb-du-02.yaml b/deployments/trainee/gnb-du-02.yaml new file mode 100644 index 0000000..59d3371 --- /dev/null +++ b/deployments/trainee/gnb-du-02.yaml @@ -0,0 +1,115 @@ +kind: DeploymentConfig +apiVersion: apps.openshift.io/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"oai-cu-02"},{"apiVersion":"apps/v1","kind":"DeploymentConfig","name":"oai-cu-02"}]' + name: oai-du-02 + generation: 28 + namespace: infidel-test + labels: + app: oai-du-02 + app.kubernetes.io/part-of: trainee-02 +spec: + strategy: + type: Rolling + rollingParams: + updatePeriodSeconds: 1 + intervalSeconds: 1 + timeoutSeconds: 600 + maxUnavailable: 0 + maxSurge: 1 + resources: {} + activeDeadlineSeconds: 21600 + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - inf-du + from: + kind: ImageStreamTag + namespace: infidel-test + name: 'oai-gnb-official:2023.w05' + - type: ConfigChange + replicas: 1 + revisionHistoryLimit: 10 + test: false + template: + metadata: + creationTimestamp: null + labels: + app: oai-inf-du-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-du-cu-02-net + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - name: inf-du + resources: {} + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + add: + - SYS_ADMIN + - NET_ADMIN + privileged: true + env: + - name: RFSIMULATOR + value: server + - name: USE_SA_TDD_DU + value: "1" + - name: GNB_NAME + value: gnb-du-02 + - name: GNB_ID + value: "e02" + - name: TAC + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: AMF_IP_ADDRESS + value: "192.168.34.11" + - name: UPF_IP_ADDRESS + value: "192.168.34.10" + - name: GNB_NGA_IF_NAME + value: net1 + - name: GNB_NGA_IP_ADDRESS + value: "192.168.34.13" + - name: GNB_NGU_IF_NAME + value: net1 + - name: GNB_NGU_IP_ADDRESS + value: "192.168.34.13" + - name: F1_IF_NAME + value: "net2" + - name: F1_DU_IP_ADDRESS + value: "192.168.35.16" + - name: F1_CU_IP_ADDRESS + value: "192.168.35.15" + - name: F1_DU_D_PORT + value: "2153" + - name: F1_CU_D_PORT + value: "2153" + - name: USE_ADDITIONAL_OPTIONS + value: --sa --rfsim --log_config.global_log_options level,nocolor,time + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + diff --git a/deployments/trainee/gnb-du-03.yaml b/deployments/trainee/gnb-du-03.yaml new file mode 100644 index 0000000..a7f1c4f --- /dev/null +++ b/deployments/trainee/gnb-du-03.yaml @@ -0,0 +1,115 @@ +kind: DeploymentConfig +apiVersion: apps.openshift.io/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"oai-cu-03"},{"apiVersion":"apps/v1","kind":"DeploymentConfig","name":"oai-cu-03"}]' + name: oai-du-03 + generation: 28 + namespace: infidel-test + labels: + app: oai-du-03 + app.kubernetes.io/part-of: trainee-03 +spec: + strategy: + type: Rolling + rollingParams: + updatePeriodSeconds: 1 + intervalSeconds: 1 + timeoutSeconds: 600 + maxUnavailable: 0 + maxSurge: 1 + resources: {} + activeDeadlineSeconds: 21600 + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - inf-du + from: + kind: ImageStreamTag + namespace: infidel-test + name: 'oai-gnb-official:2023.w05' + - type: ConfigChange + replicas: 1 + revisionHistoryLimit: 10 + test: false + template: + metadata: + creationTimestamp: null + labels: + app: oai-inf-du-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-du-cu-03-net + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - name: inf-du + resources: {} + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + securityContext: + add: + - SYS_ADMIN + - NET_ADMIN + privileged: true + env: + - name: RFSIMULATOR + value: server + - name: USE_SA_TDD_DU + value: "1" + - name: GNB_NAME + value: gnb-du-03 + - name: GNB_ID + value: "e03" + - name: TAC + value: "1" + - name: MCC + value: "208" + - name: MNC + value: "99" + - name: MNC_LENGTH + value: "2" + - name: NSSAI_SST + value: "1" + - name: AMF_IP_ADDRESS + value: "192.168.34.11" + - name: UPF_IP_ADDRESS + value: "192.168.34.10" + - name: GNB_NGA_IF_NAME + value: net1 + - name: GNB_NGA_IP_ADDRESS + value: "192.168.34.14" + - name: GNB_NGU_IF_NAME + value: net1 + - name: GNB_NGU_IP_ADDRESS + value: "192.168.34.14" + - name: F1_IF_NAME + value: "net2" + - name: F1_DU_IP_ADDRESS + value: "192.168.35.19" + - name: F1_CU_IP_ADDRESS + value: "192.168.35.18" + - name: F1_DU_D_PORT + value: "2153" + - name: F1_CU_D_PORT + value: "2153" + - name: USE_ADDITIONAL_OPTIONS + value: --sa --rfsim --log_config.global_log_options level,nocolor,time + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + diff --git a/deployments/trainee/gnb-ue-01.yaml b/deployments/trainee/gnb-ue-01.yaml new file mode 100644 index 0000000..eb2bccb --- /dev/null +++ b/deployments/trainee/gnb-ue-01.yaml @@ -0,0 +1,81 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"oai-du-01"},{"apiVersion":"apps/v1","kind":"DeploymentConfig","name":"oai-du-01"}]' + name: oai-nr-ue-01 + + namespace: infidel-test + labels: + app.kubernetes.io/part-of: trainee-01 +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/part-of: trainee-01 + template: + metadata: + labels: + app.kubernetes.io/part-of: trainee-01 + creationTimestamp: null + annotations: + k8s.v1.cni.cncf.io/networks: 'oai-ue-du-01-net' + kompose.cmd: kompose convert -f ../docker-compose.yaml + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - resources: {} + terminationMessagePath: /dev/termination-log + name: rfsim5g-oai-nr-ue + livenessProbe: + exec: + command: + - /bin/bash -c "pgrep nr-uesoftmodem" + timeoutSeconds: 5 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + env: + - name: DNN + value: oai + - name: FULL_IMSI + value: '208990200000001' + - name: FULL_KEY + value: fec86ba6eb707ed08905757b1bb44b8f + - name: NSSAI_SST + value: '1' + - name: OPC + value: c42449363bbad02b66d16bc975d77cc1 + - name: RFSIMULATOR + value: 192.168.35.13 + - name: USE_ADDITIONAL_OPTIONS + value: >- + --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod + --log_config.global_log_options level,nocolor,time + securityContext: + privileged: true + imagePullPolicy: IfNotPresent + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePolicy: File + image: 'oaisoftwarealliance/oai-nr-ue:develop' + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 diff --git a/deployments/trainee/gnb-ue-02.yaml b/deployments/trainee/gnb-ue-02.yaml new file mode 100644 index 0000000..9be423c --- /dev/null +++ b/deployments/trainee/gnb-ue-02.yaml @@ -0,0 +1,81 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"oai-du-02"},{"apiVersion":"apps/v1","kind":"DeploymentConfig","name":"oai-du-02"}]' + name: oai-nr-ue-02 + + namespace: infidel-test + labels: + app.kubernetes.io/part-of: trainee-02 +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/part-of: trainee-02 + template: + metadata: + labels: + app.kubernetes.io/part-of: trainee-02 + creationTimestamp: null + annotations: + k8s.v1.cni.cncf.io/networks: 'oai-ue-du-02-net' + kompose.cmd: kompose convert -f ../docker-compose.yaml + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - resources: {} + terminationMessagePath: /dev/termination-log + name: rfsim5g-oai-nr-ue + livenessProbe: + exec: + command: + - /bin/bash -c "pgrep nr-uesoftmodem" + timeoutSeconds: 5 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + env: + - name: DNN + value: oai + - name: FULL_IMSI + value: '208990200000002' + - name: FULL_KEY + value: fec86ba6eb707ed08905757b1bb44b8f + - name: NSSAI_SST + value: '1' + - name: OPC + value: c42449363bbad02b66d16bc975d77cc1 + - name: RFSIMULATOR + value: 192.168.35.16 + - name: USE_ADDITIONAL_OPTIONS + value: >- + --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod + --log_config.global_log_options level,nocolor,time + securityContext: + privileged: true + imagePullPolicy: IfNotPresent + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePolicy: File + image: 'oaisoftwarealliance/oai-nr-ue:develop' + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 diff --git a/deployments/trainee/gnb-ue-03.yaml b/deployments/trainee/gnb-ue-03.yaml new file mode 100644 index 0000000..7ead7ac --- /dev/null +++ b/deployments/trainee/gnb-ue-03.yaml @@ -0,0 +1,81 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + annotations: + app.openshift.io/connects-to: '[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"oai-du-03"},{"apiVersion":"apps/v1","kind":"DeploymentConfig","name":"oai-du-03"}]' + name: oai-nr-ue-03 + + namespace: infidel-test + labels: + app.kubernetes.io/part-of: trainee-03 +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/part-of: trainee-03 + template: + metadata: + labels: + app.kubernetes.io/part-of: trainee-03 + creationTimestamp: null + annotations: + k8s.v1.cni.cncf.io/networks: 'oai-ue-du-03-net' + kompose.cmd: kompose convert -f ../docker-compose.yaml + spec: + restartPolicy: Always + serviceAccountName: oai-sa + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + securityContext: {} + containers: + - resources: {} + terminationMessagePath: /dev/termination-log + name: rfsim5g-oai-nr-ue + livenessProbe: + exec: + command: + - /bin/bash -c "pgrep nr-uesoftmodem" + timeoutSeconds: 5 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + env: + - name: DNN + value: oai + - name: FULL_IMSI + value: '208990200000003' + - name: FULL_KEY + value: fec86ba6eb707ed08905757b1bb44b8f + - name: NSSAI_SST + value: '1' + - name: OPC + value: c42449363bbad02b66d16bc975d77cc1 + - name: RFSIMULATOR + value: 192.168.35.19 + - name: USE_ADDITIONAL_OPTIONS + value: >- + --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod + --log_config.global_log_options level,nocolor,time + securityContext: + privileged: true + imagePullPolicy: IfNotPresent + volumeMounts: + - name: dev-tun + readOnly: true + mountPath: /dev/net/tun + terminationMessagePolicy: File + image: 'oaisoftwarealliance/oai-nr-ue:develop' + serviceAccount: oai-sa + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + type: '' + dnsPolicy: ClusterFirst + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 diff --git a/input/core_net_ipv4.csv b/input/core_net_ipv4.csv new file mode 100644 index 0000000..43af1d7 --- /dev/null +++ b/input/core_net_ipv4.csv @@ -0,0 +1,11 @@ +amf-n2,192.168.34.11/24 +amf,192.168.33.11/24 +smf,192.168.33.12/24 +nrf,192.168.33.14/24 +upf,192.168.33.15/24 +upf-n3,192.168.34.10/24 +db,192.168.33.16/24 +dn,192.168.33.17/24 +ausf,192.168.33.18/24 +udm,192.168.33.19/24 +udr,192.168.33.20/24 diff --git a/input/gnb_net_ipv4.csv b/input/gnb_net_ipv4.csv new file mode 100644 index 0000000..3c6b8b5 --- /dev/null +++ b/input/gnb_net_ipv4.csv @@ -0,0 +1,5 @@ +01,192.168.34.12,192.168.34.17 +02,192.168.34.13,192.168.34.18 +03,192.168.34.14,192.168.34.19 +04,192.168.34.15,192.168.34.20 +05,192.168.34.16,192.168.34.21 diff --git a/input/imsi_data.csv b/input/imsi_data.csv new file mode 100644 index 0000000..6350077 --- /dev/null +++ b/input/imsi_data.csv @@ -0,0 +1,10 @@ +01,208990200000001,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +02,208990200000002,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +03,208990200000003,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +04,208990200000004,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +05,208990200000005,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +06,208990200000006,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +07,208990200000007,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +08,208990200000008,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +09,208990200000009,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 +10,208990200000010,fec86ba6eb707ed08905757b1bb44b8f,c42449363bbad02b66d16bc975d77cc1 diff --git a/input/main_data.csv b/input/main_data.csv new file mode 100644 index 0000000..ad629a7 --- /dev/null +++ b/input/main_data.csv @@ -0,0 +1,3 @@ +01,192.168.34.12,192.168.35.12,192.168.35.13,192.168.35.14 +02,192.168.34.13,192.168.35.15,192.168.35.16,192.168.35.17 +03,192.168.34.14,192.168.35.18,192.168.35.19,192.168.35.20 diff --git a/input/ngRAN.csv b/input/ngRAN.csv new file mode 100644 index 0000000..42633aa --- /dev/null +++ b/input/ngRAN.csv @@ -0,0 +1,5 @@ +CU-001,192.168.34.12/24 +CU-002,192.168.34.13/24 +CU-003,192.168.34.14/24 +CU-004,192.168.34.15/24 +CU-005,192.168.34.16/24 diff --git a/net/core/amf-n2.yaml b/net/core/amf-n2.yaml new file mode 100644 index 0000000..c0c0d87 --- /dev/null +++ b/net/core/amf-n2.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-amf-n2-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-amf-n2-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.34.11/24" + } ] } }' + diff --git a/net/core/amf.yaml b/net/core/amf.yaml new file mode 100644 index 0000000..56349fd --- /dev/null +++ b/net/core/amf.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-amf-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-amf-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.11/24" + } ] } }' + diff --git a/net/core/ausf.yaml b/net/core/ausf.yaml new file mode 100644 index 0000000..4f9acf8 --- /dev/null +++ b/net/core/ausf.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-ausf-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-ausf-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.18/24" + } ] } }' + diff --git a/net/core/db.yaml b/net/core/db.yaml new file mode 100644 index 0000000..7cd6b15 --- /dev/null +++ b/net/core/db.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-db-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-db-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.16/24" + } ] } }' + diff --git a/net/core/dn.yaml b/net/core/dn.yaml new file mode 100644 index 0000000..db65879 --- /dev/null +++ b/net/core/dn.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-dn-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-dn-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.17/24" + } ] } }' + diff --git a/net/core/nrf.yaml b/net/core/nrf.yaml new file mode 100644 index 0000000..31e9d70 --- /dev/null +++ b/net/core/nrf.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-nrf-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-nrf-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.14/24" + } ] } }' + diff --git a/net/core/smf.yaml b/net/core/smf.yaml new file mode 100644 index 0000000..0e66ca7 --- /dev/null +++ b/net/core/smf.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-smf-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-smf-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.12/24" + } ] } }' + diff --git a/net/core/udm.yaml b/net/core/udm.yaml new file mode 100644 index 0000000..3c4b976 --- /dev/null +++ b/net/core/udm.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-udm-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-udm-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.19/24" + } ] } }' + diff --git a/net/core/udr.yaml b/net/core/udr.yaml new file mode 100644 index 0000000..dd6eb73 --- /dev/null +++ b/net/core/udr.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-udr-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-udr-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.20/24" + } ] } }' + diff --git a/net/core/upf-n3.yaml b/net/core/upf-n3.yaml new file mode 100644 index 0000000..1d4f145 --- /dev/null +++ b/net/core/upf-n3.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-upf-n3-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-upf-n3-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.34.10/24" + } ] } }' + diff --git a/net/core/upf.yaml b/net/core/upf.yaml new file mode 100644 index 0000000..23617cb --- /dev/null +++ b/net/core/upf.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-upf-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-upf-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.33.15/24" + } ] } }' + diff --git a/net/gnb/cu-amf-01.yaml b/net/gnb/cu-amf-01.yaml new file mode 100644 index 0000000..7a25e69 --- /dev/null +++ b/net/gnb/cu-amf-01.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-cu-amf-01-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-01-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.34.12/24" + } ] } }' + diff --git a/net/gnb/cu-amf-02.yaml b/net/gnb/cu-amf-02.yaml new file mode 100644 index 0000000..0c37ad6 --- /dev/null +++ b/net/gnb/cu-amf-02.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-cu-amf-02-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-02-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.34.13/24" + } ] } }' + diff --git a/net/gnb/cu-amf-03.yaml b/net/gnb/cu-amf-03.yaml new file mode 100644 index 0000000..ed85cff --- /dev/null +++ b/net/gnb/cu-amf-03.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-cu-amf-03-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-03-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.34.14/24" + } ] } }' + diff --git a/net/gnb/cu-du-01.yaml b/net/gnb/cu-du-01.yaml new file mode 100644 index 0000000..3262510 --- /dev/null +++ b/net/gnb/cu-du-01.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-cu-du-01-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-01-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.12/24" + } ] } }' + diff --git a/net/gnb/cu-du-02.yaml b/net/gnb/cu-du-02.yaml new file mode 100644 index 0000000..db5a00f --- /dev/null +++ b/net/gnb/cu-du-02.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-cu-du-02-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-02-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.15/24" + } ] } }' + diff --git a/net/gnb/cu-du-03.yaml b/net/gnb/cu-du-03.yaml new file mode 100644 index 0000000..e400cab --- /dev/null +++ b/net/gnb/cu-du-03.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-cu-du-03-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-03-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.18/24" + } ] } }' + diff --git a/net/gnb/du-cu-01.yaml b/net/gnb/du-cu-01.yaml new file mode 100644 index 0000000..6f4d7b9 --- /dev/null +++ b/net/gnb/du-cu-01.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-du-cu-01-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-01-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.13/24" + } ] } }' + diff --git a/net/gnb/du-cu-02.yaml b/net/gnb/du-cu-02.yaml new file mode 100644 index 0000000..28bd5c3 --- /dev/null +++ b/net/gnb/du-cu-02.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-du-cu-02-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-02-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.16/24" + } ] } }' + diff --git a/net/gnb/du-cu-03.yaml b/net/gnb/du-cu-03.yaml new file mode 100644 index 0000000..1050329 --- /dev/null +++ b/net/gnb/du-cu-03.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-du-cu-03-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-03-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.19/24" + } ] } }' + diff --git a/net/gnb/ue-du-01.yaml b/net/gnb/ue-du-01.yaml new file mode 100644 index 0000000..62b69a5 --- /dev/null +++ b/net/gnb/ue-du-01.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-ue-du-01-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-01-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.14/24" + } ] } }' + diff --git a/net/gnb/ue-du-02.yaml b/net/gnb/ue-du-02.yaml new file mode 100644 index 0000000..645cbb7 --- /dev/null +++ b/net/gnb/ue-du-02.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-ue-du-02-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-02-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.17/24" + } ] } }' + diff --git a/net/gnb/ue-du-03.yaml b/net/gnb/ue-du-03.yaml new file mode 100644 index 0000000..51d90f1 --- /dev/null +++ b/net/gnb/ue-du-03.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-ue-du-03-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-03-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "192.168.35.20/24" + } ] } }' + diff --git a/net/src/template_net.yaml b/net/src/template_net.yaml new file mode 100644 index 0000000..a21d415 --- /dev/null +++ b/net/src/template_net.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-@trainee@-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-@role@-net", "type": "macvlan", + "master": "ens8", "ipam": { "type": "static", "addresses": [ { "address": "@ip@" + } ] } }' + diff --git a/oai-master/5gc-deployment.yaml b/oai-master/5gc-deployment.yaml new file mode 100644 index 0000000..a5cf39a --- /dev/null +++ b/oai-master/5gc-deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + name: oai-inf-core-sa + labels: + app: oai-inf-core-sa +spec: + replicas: 1 + selector: + app: oai-inf-core-sa + strategy: + type: Rolling + rollingParams: + intervalSeconds: 1 + updatePeriodSeconds: 1 + maxUnavailable: 0 + maxSurge: 1 + minReadySeconds: 30 + template: + metadata: + labels: + app: oai-inf-core-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-core-net + spec: + securityContextConstraints: + - name: privileged + - name: oai-scc + serviceAccountName: oai-sa + containers: + - name: inf-core + image: image-registry.openshift-image-registry.svc:5000/infidel-test/oai-image-core + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + volumeMounts: + - mountPath: /dev/net/tun + readOnly: true + name: dev-tun + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + triggers: + - type: ConfigChange + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - oai-inf-core-sa + from: + kind: ImageStreamTag + name: oai-image-core:latest + namespace: infidel-test + diff --git a/oai-master/cu-deployment.yaml b/oai-master/cu-deployment.yaml new file mode 100644 index 0000000..28f1b4d --- /dev/null +++ b/oai-master/cu-deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + name: oai-inf-cu-sa + labels: + app: oai-inf-cu-sa +spec: + replicas: 3 + selector: + app: oai-inf-cu-sa + strategy: + type: Rolling + rollingParams: + intervalSeconds: 1 + updatePeriodSeconds: 1 + maxUnavailable: 0 + maxSurge: 1 + minReadySeconds: 30 + template: + metadata: + labels: + app: oai-inf-cu-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-cu-net + spec: + securityContextConstraints: + - name: privileged + - name: oai-scc + + serviceAccountName: oai-sa + containers: + - name: inf-cu + image: image-registry.openshift-image-registry.svc:5000/infidel-test/oai-image-du + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + volumeMounts: + - mountPath: /dev/net/tun + readOnly: true + name: dev-tun + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + triggers: + - type: ConfigChange + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - oai-inf-cu-sa + from: + kind: ImageStreamTag + name: oai-image-du:latest + namespace: infidel-test + diff --git a/oai-master/deployment.yaml b/oai-master/deployment.yaml new file mode 100644 index 0000000..d241f05 --- /dev/null +++ b/oai-master/deployment.yaml @@ -0,0 +1,65 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + name: oai-inf-deployment-6 + labels: + app: oai-inf-deployment-6 +spec: + replicas: 3 + selector: + app: oai-inf-deployment-6 + strategy: + type: Rolling + rollingParams: + intervalSeconds: 1 + updatePeriodSeconds: 1 + maxUnavailable: 0 + maxSurge: 1 + minReadySeconds: 30 + template: + metadata: + labels: + app: oai-inf-deployment-6 + spec: + securityContextConstraints: + - name: privileged + - name: oai-scc + + serviceAccountName: oai-sa + containers: + - name: cunt-cunt-tun + image: image-registry.openshift-image-registry.svc:5000/infidel-test/oai-inf-cu-6 + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + volumeMounts: + - mountPath: /dev/net/tun + readOnly: true + name: dev-tun + - name: cunt-cunt-tun + image: image-registry.openshift-image-registry.svc:5000/infidel-test/oai-du + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + volumeMounts: + - mountPath: /dev/net/tun + readOnly: true + name: dev-tun + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + triggers: + - type: ConfigChange + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - oai-inf-deployment-6 + from: + kind: ImageStreamTag + name: oai-inf:latest + namespace: infidel-test + diff --git a/oai-master/du-deployment.yaml b/oai-master/du-deployment.yaml new file mode 100644 index 0000000..5b1345e --- /dev/null +++ b/oai-master/du-deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + name: oai-inf-du-sa + labels: + app: oai-inf-du-sa +spec: + replicas: 3 + selector: + app: oai-inf-du-sa + strategy: + type: Rolling + rollingParams: + intervalSeconds: 1 + updatePeriodSeconds: 1 + maxUnavailable: 0 + maxSurge: 1 + minReadySeconds: 30 + template: + metadata: + labels: + app: oai-inf-du-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-du-net + spec: + securityContextConstraints: + - name: privileged + - name: oai-scc + + serviceAccountName: oai-sa + containers: + - name: inf-cu + image: image-registry.openshift-image-registry.svc:5000/infidel-test/oai-image-du + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + volumeMounts: + - mountPath: /dev/net/tun + readOnly: true + name: dev-tun + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + triggers: + - type: ConfigChange + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - oai-inf-du-sa + from: + kind: ImageStreamTag + name: oai-image-du:latest + namespace: infidel-test + diff --git a/oai-master/oai-net-core.yaml b/oai-master/oai-net-core.yaml new file mode 100644 index 0000000..0f53f69 --- /dev/null +++ b/oai-master/oai-net-core.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-cu-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-cu-net", "type": "macvlan", + "master": "enp7s0", "ipam": { "type": "static", "addresses": [ { "address": "192.168.12.14/24" + } ] } }' + diff --git a/oai-master/oai-net-cu.yaml b/oai-master/oai-net-cu.yaml new file mode 100644 index 0000000..0f53f69 --- /dev/null +++ b/oai-master/oai-net-cu.yaml @@ -0,0 +1,10 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-cu-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-cu-net", "type": "macvlan", + "master": "enp7s0", "ipam": { "type": "static", "addresses": [ { "address": "192.168.12.14/24" + } ] } }' + diff --git a/oai-master/oai-net-du.yaml b/oai-master/oai-net-du.yaml new file mode 100644 index 0000000..cb3c5df --- /dev/null +++ b/oai-master/oai-net-du.yaml @@ -0,0 +1,11 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: oai-du-net + namespace: infidel-test +spec: + config: '{ "cniVersion": "0.3.1", "name": "oai-cu-net", "type": "macvlan", + "master": "enp7s0", "ipam": { "type": "static", "addresses": [ { "address": "192.168.12.13/24" + } ] } }' + + diff --git a/oai-master/pod.yaml b/oai-master/pod.yaml new file mode 100644 index 0000000..3023d60 --- /dev/null +++ b/oai-master/pod.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Pod +metadata: + name: enb-cu-cunt-4 +spec: + serviceAccountName: oai-sa + containers: + - name: cunt-cunt-tun + image: image-registry.openshift-image-registry.svc:5000/infidel-test/oai-enb-cu + securityContext: + privileged: true + capabilities: + add: ["NET_ADMIN"] + volumeMounts: + - mountPath: /dev/net/tun + readOnly: true + name: dev-tun + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun diff --git a/oai-trainee/cu-deployment.yaml b/oai-trainee/cu-deployment.yaml new file mode 100644 index 0000000..aa7aaf7 --- /dev/null +++ b/oai-trainee/cu-deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + name: oai-inf-cu-sa + labels: + app: oai-inf-cu-sa +spec: + replicas: 3 + selector: + app: oai-inf-cu-sa + strategy: + type: Rolling + rollingParams: + intervalSeconds: 1 + updatePeriodSeconds: 1 + maxUnavailable: 0 + maxSurge: 1 + minReadySeconds: 30 + template: + metadata: + labels: + app: oai-inf-cu-sa + annotations: + k8s.v1.cni.cncf.io/networks: oai-cu-net + spec: + securityContextConstraints: + - name: privileged + - name: oai-scc + serviceAccountName: oai-sa + containers: + - name: inf-cu + image: image-registry.openshift-image-registry.svc:5000/infidel-test/oai-image-du + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + volumeMounts: + - mountPath: /dev/net/tun + readOnly: true + name: dev-tun + volumes: + - name: dev-tun + hostPath: + path: /dev/net/tun + triggers: + - type: ConfigChange + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - oai-inf-cu-sa + from: + kind: ImageStreamTag + name: oai-image-du:latest + namespace: infidel-test + diff --git a/scripts/net_gen.sh b/scripts/net_gen.sh new file mode 100755 index 0000000..af1ced5 --- /dev/null +++ b/scripts/net_gen.sh @@ -0,0 +1,396 @@ +#!/usr/bin/env bash + +set -uo pipefail + +# GLOBAL VARS +imsi_now="" +ki_now="" +opc_now="" + +function imsi_parser(){ + # echo "IMSI -> KI -> OPC" + while IFS=, read -r count imsi ki opc + do + # echo "[$count]" $imsi "->" $ki "->" "$opc" + if [ "$1" = "$count" ]; then + imsi_now="$imsi" + ki_now="$ki" + opc_now="$opc" + return + fi + done < input/imsi_data.csv +} + +function create_from_path() { + cd $1 + if echo "$1" | grep -iqF deploy; then + echo "Deployment Mode" + cu_confs=`ls -d ./*cu*` + for x in `ls -d $cu_confs`; do oc create -f $x -n infidel-test; done + echo "[CU Deployment] Delay, let the script breathe..." + sleep 5 + ue_confs=`ls -d ./*ue*` + for x in `ls -d $ue_confs`; do oc create -f $x -n infidel-test; done + echo "[UE Deployment] Delay, let the script breathe..." + sleep 2 + du_confs=`ls -d ./*du*` + for x in `ls -d $du_confs`; do oc create -f $x -n infidel-test; done + echo "[DU Deployment] Delay, let the script breathe..." + else + echo "Custom Mode" + for x in `ls -d .`; do oc create -f $x -n infidel-test; done + fi + cd - +} + +function clean_deployments(){ + + for x in $(oc get dc -n infidel-test -o jsonpath="{range .items[*]}{.metadata.name}{'\n'}{end}"); do oc delete dc $x -n infidel-test; done + for x in $(oc get deployments -n infidel-test -o jsonpath="{range .items[*]}{.metadata.name}{'\n'}{end}" | grep "0[0-9]"); do oc delete deployment $x -n infidel-test; done + for x in $(oc get network-attachment-definition -n infidel-test -o jsonpath="{range .items[*]}{.metadata.name}{'\n'}{end}" | grep "0[0-9]") ; do oc delete network-attachment-definition $x -n infidel-test; done + +} + +function deployment_gen(){ + + SOURCE_FILE="deployments/src/template_deployment.yaml" + echo "--------------------------[*]" + echo "${role} -> ${ip}" + export trainee=$role + + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + echo $v "->" $NEW_VAR + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="deployments/trainee/gnb-${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" +} + +function net_core_gen(){ + clear + rm net/core/* + echo "***************************" + echo "Core NET Generation" + echo "***************************" + while IFS=, read -r role ip + do + SOURCE_FILE="net/src/template_net.yaml" + echo $role "->" $ip + trainee=$role + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + echo $v "->" $NEW_VAR + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="net/core/${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" + done < input/core_net_ipv4.csv + echo "***************************" +} + + +function net_gen(){ + while IFS=, read -r role ip_cu_amf ip_cu_du ip_du_cu ip_ue_du + do + echo "IMSI DATA *************************" + imsi_parser $role + echo "IMSI" $imsi_now + echo "KI" $ki_now + echo "OPC" $opc_now + + echo "--------------------------[*]" + # GNB CU_AMF NET + SOURCE_FILE="net/src/template_net.yaml" + export trainee="cu-amf-$role" + export ip="$ip_cu_amf/24" + + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + echo $v "->" $NEW_VAR + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="net/gnb/cu-amf-${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" + + # GNB CU_DU NET + SOURCE_FILE="net/src/template_net.yaml" + export trainee="cu-du-$role" + export ip="$ip_cu_du/24" + + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + echo $v "->" $NEW_VAR + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="net/gnb/cu-du-${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" + + # GNB DU_CU NET + SOURCE_FILE="net/src/template_net.yaml" + export trainee="du-cu-$role" + export ip="$ip_du_cu/24" + + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + echo $v "->" $NEW_VAR + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="net/gnb/du-cu-${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" + + # GNB UE_DU NET + SOURCE_FILE="net/src/template_net.yaml" + export trainee="ue-du-$role" + export ip="$ip_ue_du/24" + + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + echo $v "->" $NEW_VAR + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="net/gnb/ue-du-${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" + + # GNB CU Deplpoyment + SOURCE_FILE="deployments/src/template_deployment.yaml" + echo "--------------------------[*]" + export trainee="cu-$role" + export net="oai-cu-amf-$role-net,oai-cu-du-$role-net" + export ip=$ip_du_cu + export mode="cu" + export mode_cap="CU" + export part_of="oai-amf" + export part_type="Deployment" + + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + echo $v "->" $NEW_VAR + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="deployments/trainee/gnb-cu-${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" + + # GNB DU Deplpoyment + SOURCE_FILE="deployments/src/template_deployment.yaml" + echo "--------------------------[*]" + export trainee="du-$role" + export net="oai-du-cu-$role-net" + export ip=$ip_du_cu + export mode="du" + export mode_cap="TDD_DU" + export part_of="oai-cu-$role" + export part_type="DeploymentConfig" + + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + echo $v "->" $NEW_VAR + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="deployments/trainee/gnb-du-${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" + + # GNB UE_DU Deplpoyment + SOURCE_FILE="deployments/src/template_ue_deployment.yaml" + echo "--------------------------[*]" + export trainee="ue-$role" + export net="oai-ue-du-$role-net" + export ip=$ip_ue_du + export mode="ue" + export mode_cap="TDD_DU" + export part_of="oai-du-$role" + export part_type="DeploymentConfig" + + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + echo $v "->" $NEW_VAR + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + + TARGET_FILE="deployments/trainee/gnb-ue-${role}.yaml" + EXPRESSIONS="${EXPRESSIONS#';'}" + sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + echo "${TARGET_FILE}" + echo "" + + # GNB DEMO_CU Deplpoyment + # SOURCE_FILE="deployments/src/gnb_access_deployment.yaml" + # echo "--------------------------[*]" + # export trainee="ue-demo-$role" + # export net="oai-ue-du-$role-net" + # export ip=$ip_ue_du + # export mode="ue" + # export mode_cap="TDD_DU" + # export part_of="oai-du-$role" + # export part_type="DeploymentConfig" + + # VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${SOURCE_FILE} | sort | uniq | xargs) + # EXPRESSIONS="" + # for v in ${VARS}; do + # NEW_VAR=`echo $v | sed -e "s#@##g"` + # if [[ "${!NEW_VAR}x" == "x" ]]; then + # echo "Error: Environment variable '${NEW_VAR}' is not set." \ + # "Config file '$(basename $c)' requires all of $VARS." + # exit 1 + # fi + # echo $v "->" $NEW_VAR + # EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + # done + # + # TARGET_FILE="deployments/trainee/gnb-demo-ue-${role}.yaml" + # EXPRESSIONS="${EXPRESSIONS#';'}" + # sed "${EXPRESSIONS}" ${SOURCE_FILE} > ${TARGET_FILE} + # echo "${TARGET_FILE}" + # echo "" + done < input/main_data.csv +} + +PS3="[!] Select operation : " +select mode in trainee_gnb_and_net clean_deployments create_from_path "Core Net Generation" "Imsi Parser" "Dirty Reload" "Deploy Access Demo"; +do + case $mode in + trainee_gnb_and_net) + rm deployments/trainee/*.yaml + rm net/gnb/*.yaml + net_gen + ;; + create_from_path) + echo "Where is the Path: " + echo "[!]-<$(pwd)>" + read -e -p '[!]-: ' path + create_from_path $path + ;; + clean_deployments) + PS3="[*] Clean Mode : " + select clear_mode in deployments nets exit; + do + case $clear_mode in + deployments) + clean_deployments 1 + ;; + nets) + clean_deployments 2 + ;; + exit) + break + ;; + esac + done + ;; + "Core Net Generation") + net_core_gen + ;; + "Imsi Parser") + imsi_parser + ;; + "Dirty Reload") + echo "Dirty Reload..." + clean_deployments 1 + create_from_path net/gnb + create_from_path deployments/trainee + ;; + "Deploy Access Demo") + echo "Editable Deployment" + ;; + *) + echo "Invalid option $REPLAY" + ;; + esac +done + + diff --git a/volumeclaims/mysql-claim0-persistentvolumeclaim.yaml b/volumeclaims/mysql-claim0-persistentvolumeclaim.yaml new file mode 100644 index 0000000..b709647 --- /dev/null +++ b/volumeclaims/mysql-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: mysql-claim0 + name: mysql-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/volumeclaims/mysql-claim1-persistentvolumeclaim.yaml b/volumeclaims/mysql-claim1-persistentvolumeclaim.yaml new file mode 100644 index 0000000..40c4e13 --- /dev/null +++ b/volumeclaims/mysql-claim1-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: mysql-claim1 + name: mysql-claim1 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/volumeclaims/oai-amf-claim0-persistentvolumeclaim.yaml b/volumeclaims/oai-amf-claim0-persistentvolumeclaim.yaml new file mode 100644 index 0000000..918fac2 --- /dev/null +++ b/volumeclaims/oai-amf-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: oai-amf-claim0 + name: oai-amf-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/volumeclaims/oai-nrf-claim0-persistentvolumeclaim.yaml b/volumeclaims/oai-nrf-claim0-persistentvolumeclaim.yaml new file mode 100644 index 0000000..08dd22f --- /dev/null +++ b/volumeclaims/oai-nrf-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: oai-nrf-claim0 + name: oai-nrf-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/volumeclaims/oai-smf-claim0-persistentvolumeclaim.yaml b/volumeclaims/oai-smf-claim0-persistentvolumeclaim.yaml new file mode 100644 index 0000000..eaab6c2 --- /dev/null +++ b/volumeclaims/oai-smf-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: oai-smf-claim0 + name: oai-smf-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/volumeclaims/oai-spgwu-claim0-persistentvolumeclaim.yaml b/volumeclaims/oai-spgwu-claim0-persistentvolumeclaim.yaml new file mode 100644 index 0000000..ef9ce55 --- /dev/null +++ b/volumeclaims/oai-spgwu-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: oai-spgwu-claim0 + name: oai-spgwu-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/volumeclaims/rfsim5g-oai-public-net-networkpolicy.yaml b/volumeclaims/rfsim5g-oai-public-net-networkpolicy.yaml new file mode 100644 index 0000000..4791600 --- /dev/null +++ b/volumeclaims/rfsim5g-oai-public-net-networkpolicy.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + creationTimestamp: null + name: rfsim5g-oai-public-net +spec: + ingress: + - from: + - podSelector: + matchLabels: + io.kompose.network/rfsim5g-oai-public-net: "true" + podSelector: + matchLabels: + io.kompose.network/rfsim5g-oai-public-net: "true" diff --git a/volumeclaims/rfsim5g-oai-traffic-net-networkpolicy.yaml b/volumeclaims/rfsim5g-oai-traffic-net-networkpolicy.yaml new file mode 100644 index 0000000..bb3f858 --- /dev/null +++ b/volumeclaims/rfsim5g-oai-traffic-net-networkpolicy.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + creationTimestamp: null + name: rfsim5g-oai-traffic-net +spec: + ingress: + - from: + - podSelector: + matchLabels: + io.kompose.network/rfsim5g-oai-traffic-net: "true" + podSelector: + matchLabels: + io.kompose.network/rfsim5g-oai-traffic-net: "true"