diff --git a/.gitignore b/.gitignore index 5135b338717c5707dd0dc3d77b0edb0e92892cde..37d3433597ad22934964076ce14427c0c9d88308 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,9 @@ charts/oai-5g-core/oai-5g-basic/Chart.lock charts/oai-5g-core/oai-5g-basic/charts/ charts/oai-5g-core/oai-5g-advance/Chart.lock charts/oai-5g-core/oai-5g-advance/charts/ +charts/e2e_scenarios/case1/Chart.lock +charts/e2e_scenarios/case1/charts/ +charts/e2e_scenarios/case2/Chart.lock +charts/e2e_scenarios/case2/charts/ +charts/e2e_scenarios/case3/Chart.lock +charts/e2e_scenarios/case3/charts/ diff --git a/charts/e2e_scenarios/case1/Chart.yaml b/charts/e2e_scenarios/case1/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..89c2fa3eec3fe694f600d55e11fc8d13daf63329 --- /dev/null +++ b/charts/e2e_scenarios/case1/Chart.yaml @@ -0,0 +1,71 @@ +apiVersion: v2 +name: monolithic-ran +type: application +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png +version: 2.1.0 +description: Charts for testing monolithic ran use case + +appVersion: 2.1.0 + +keywords: + - 5GCN + - AMF + - SMF + - NRF + - UPF + - UDM + - UDR + - AUSF + - gNB + - NRUE +# - Traffic_server + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org + +dependencies: +- condition: mysql.enabled + name: mysql + repository: "file://../../oai-5g-core/mysql" + version: 9.0.1 +- condition: oai-nrf.enabled + name: oai-nrf + repository: "file://../../oai-5g-core/oai-nrf" + version: v2.1.0 +- condition: oai-udr.enabled + name: oai-udr + repository: "file://../../oai-5g-core/oai-udr" + version: v2.1.0 +- condition: oai-udm.enabled + name: oai-udm + repository: "file://../../oai-5g-core/oai-udm" + version: v2.1.0 +- condition: oai-ausf.enabled + name: oai-ausf + repository: "file://../../oai-5g-core/oai-ausf" + version: v2.1.0 +- condition: oai-amf.enabled + name: oai-amf + repository: "file://../../oai-5g-core/oai-amf" + version: v2.1.0 +- condition: oai-smf.enabled + name: oai-smf + repository: "file://../../oai-5g-core/oai-smf" + version: v2.1.0 +- condition: oai-upf.enabled + name: oai-upf + repository: "file://../../oai-5g-core/oai-upf" + version: v2.1.0 +- condition: oai-gnb.enabled + name: oai-gnb + repository: "file://../../oai-5g-ran/oai-gnb" + version: 2.1.0 +- condition: oai-nr-ue.enabled + name: oai-nr-ue + repository: "file://../../oai-5g-ran/oai-nr-ue" + version: 2.1.0 +- condition: oai-traffic-server.enabled + name: oai-traffic-server + repository: "file://../../oai-5g-core/oai-traffic-server" + version: v1 diff --git a/charts/e2e_scenarios/case1/config.yaml b/charts/e2e_scenarios/case1/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c5b8356571e09557c9672ff2232f8fbcbeb59d22 --- /dev/null +++ b/charts/e2e_scenarios/case1/config.yaml @@ -0,0 +1,193 @@ +############# Common configuration + +# Log level for all the NFs +log_level: + general: info + +# If you enable registration, the other NFs will use the NRF discovery mechanism +register_nf: + general: yes + +http_version: 2 +curl_timeout: 6000 #milliseconds can be changed if the network have issues + +## general single_nssai configuration +## Defines YAML anchors, which are reused in the config file +snssais: + - &embb_slice1 + sst: 1 + - &embb_slice2 + sst: 1 + sd: 000001 # in hex + +############## SBI Interfaces +### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms +nfs: + amf: + host: oai-amf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n2: + interface_name: eth0 + port: 38412 + smf: + host: oai-smf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n4: + interface_name: eth0 + port: 8805 + upf: + host: oai-upf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n3: + interface_name: eth0 + port: 2152 + n4: + interface_name: eth0 + port: 8805 + n6: + interface_name: eth0 + n9: + interface_name: eth0 + port: 2152 + udm: + host: oai-udm + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + udr: + host: oai-udr + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + ausf: + host: oai-ausf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + nrf: + host: oai-nrf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + +#### Common for UDR and AMF +database: + host: mysql + user: test + type: mysql + password: test + database_name: oai_db + generate_random: true + connection_timeout: 300 # seconds + +############## NF-specific configuration +amf: + amf_name: "OAI-AMF" + # This really depends on if we want to keep the "mini" version or not + support_features_options: + enable_simple_scenario: no # "no" by default with the normal deployment scenarios with AMF/SMF/UPF/AUSF/UDM/UDR/NRF. + # set it to "yes" to use with the minimalist deployment scenario (including only AMF/SMF/UPF) by using the internal AUSF/UDM implemented inside AMF. + # There's no NRF in this scenario, SMF info is taken from "nfs" section. + enable_nssf: no + enable_smf_selection: yes + relative_capacity: 30 + statistics_timer_interval: 20 # in seconds + emergency_support: false + served_guami_list: + - mcc: 001 + mnc: 01 + amf_region_id: 01 + amf_set_id: 001 + amf_pointer: 01 + plmn_support_list: + - mcc: 001 + mnc: 01 + tac: 0x0001 + nssai: + - *embb_slice1 + - *embb_slice2 + supported_integrity_algorithms: + - "NIA1" + - "NIA2" + supported_encryption_algorithms: + - "NEA0" + - "NEA1" + - "NEA2" + +smf: + ue_mtu: 1500 + support_features: + use_local_subscription_info: no # Use infos from local_subscription_info or from UDM + use_local_pcc_rules: yes # Use infos from local_pcc_rules or from PCF + # we resolve from NRF, this is just to configure usage_reporting + upfs: + - host: oai-upf + config: + enable_usage_reporting: no + ue_dns: + primary_ipv4: "10.3.2.200" + primary_ipv6: "2001:4860:4860::8888" + secondary_ipv4: "8.8.8.8" + secondary_ipv6: "2001:4860:4860::8888" + ims: + pcscf_ipv4: "192.168.70.139" + pcscf_ipv6: "fe80::7915:f408:1787:db8b" + # the DNN you configure here should be configured in "dnns" + # follows the SmfInfo datatype from 3GPP TS 29.510 + smf_info: + sNssaiSmfInfoList: + - sNssai: *embb_slice1 + dnnSmfInfoList: + - dnn: "oai" + - sNssai: *embb_slice2 + dnnSmfInfoList: + - dnn: "ims" + local_subscription_infos: + - single_nssai: *embb_slice1 + dnn: "oai" + qos_profile: + 5qi: 5 + session_ambr_ul: "200Mbps" + session_ambr_dl: "400Mbps" + - single_nssai: *embb_slice2 + dnn: "ims" + qos_profile: + 5qi: 2 + session_ambr_ul: "100Mbps" + session_ambr_dl: "200Mbps" + +upf: + support_features: + enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off + enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off + remote_n6_gw: 127.0.0.1 # Dummy host since simple-switch does not use N6 GW + upf_info: + sNssaiUpfInfoList: + - sNssai: *embb_slice1 + dnnUpfInfoList: + - dnn: oai + - sNssai: *embb_slice2 + dnnUpfInfoList: + - dnn: ims + +## DNN configuration +dnns: + - dnn: "oai" + pdu_session_type: "IPV4" + ipv4_subnet: "12.1.1.0/24" + - dnn: "ims" + pdu_session_type: "IPV4V6" + ipv4_subnet: "14.1.1.0/24" diff --git a/charts/e2e_scenarios/case1/templates/core-cm.yaml b/charts/e2e_scenarios/case1/templates/core-cm.yaml new file mode 100644 index 0000000000000000000000000000000000000000..92a8bbf219de6de3f0c8985a240c037cd216aaca --- /dev/null +++ b/charts/e2e_scenarios/case1/templates/core-cm.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.global.coreNetworkConfigMap }} +data: + {{ (.Files.Glob "config.yaml").AsConfig | indent 2 | trim }} diff --git a/charts/e2e_scenarios/case1/values.yaml b/charts/e2e_scenarios/case1/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b69dc763172ba6785cae9dd29d19f6bbdd01d783 --- /dev/null +++ b/charts/e2e_scenarios/case1/values.yaml @@ -0,0 +1,356 @@ +global: + kubernetesDistribution: Vanilla #Openshift/Vanilla Kubernetes for Upstream Kubernetes + coreNetworkConfigMap: core + commonConfigMap: gnb + clusterIpServiceIpAllocation: false #this will allocate ip-address to cluster Ip service + waitForAMF: true #gNB waits for AMF + waitForRadio: true #UE waits for RFSimulated gNB + waitForNRF: true #All NFs wait for NRF to be ready + waitForUDR: true + http2Param: "--http2-prior-knowledge" # if waitForNRF is true and http2 is used for all NF then this param is needed + timeout: 1 +mysql: + enabled: true + imagePullPolicy: IfNotPresent + oai5gdatabase: basic + imagePullSecrets: + - name: "regcred" + persistence: + enabled: false + resources: + requests: + memory: 512Mi + cpu: 200m + limits: + memory: 512Mi + cpu: 200m +oai-nrf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-nrf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi + nodeName: "" +oai-udr: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-udr ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-udm: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-udm ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-ausf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-ausf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-amf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-amf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n2Interface: + create: false + ipAdd: "172.21.6.206" + netmask: "22" + name: "n2" #name inside the pod + ## If you do not have a gateway leave the field empty + gateway: 172.21.7.254 + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + resources: + define: false + limits: + nf: + cpu: 250m + memory: 256Mi + requests: + nf: + cpu: 250m + memory: 256Mi +oai-upf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-upf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + # create an extra interface for N3 in case the gNB is outside the cluster network or there is a need to have dedicated interface for N3 + ## Change these ip-addresses according to your environment + ## N4, N6 are optional only if you want that UPF uses different subnets for different 3gpp interfaces. + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n3Interface: + create: false + ipAdd: "172.21.8.95" + netmask: "22" + name: "n3" #name inside the pod + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you don't want to add a default route in your pod then replace this field with "" + routes: "" + hostInterface: "bond0" + ## For n4 it is better to re-use eth0 interface inside the pod (primary CNI of Kubernetes) + n4Interface: + create: false + ipAdd: "192.168.24.2" + netmask: "24" + name: "n4" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" + n6Interface: + create: false + ipAdd: "192.168.22.2" + name: "n6" + netmask: "24" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" + #NOTE: If the interface you selected for n6 does not have internet access then UE will not be able to reach internet + resources: + define: false + limits: + nf: + cpu: 500m + memory: 512Mi + requests: + nf: + cpu: 500m + memory: 512Mi +oai-traffic-server: + enabled: true + trafficServer: + repository: docker.io/oaisoftwarealliance/trf-gen-cn5g + version: latest + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + multus: + create: false + ipAdd: "172.21.6.12" + netmask: "22" + defaultGateway: "172.21.7.254" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + ueroute: 12.1.1.0/24 + upfHost: oai-upf + routeInterface: eth0 + noOfIperf3Server: 2 + resources: + define: false + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + nodeSelector: {} + nodeName: "" +oai-smf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-smf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n4Interface: + create: false + ipAdd: "192.168.24.3" + netmask: "24" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + # routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 250m + memory: 256Mi + requests: + nf: + cpu: 250m + memory: 256Mi + nodeSelector: {} + nodeName: "" +oai-gnb: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-gnb + version: 2024.w32 + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + # if default gatway is left blank then it will be removed + defaultGateway: "" + n2Interface: + create: false + # #name inside the pod is hardcoded right now + # name: "n2" + ipAdd: "172.21.6.90" + netmask: "22" + # if gatway is empty then it will be removed + #gateway: "172.21.7.254" + #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + n3Interface: + create: false + ipAdd: "172.21.8.91" + # #name inside the pod is hardcoded right now + # name: "n3" + netmask: "22" + # if gatway is empty then it will be removed + #gateway: "172.21.11.254" + #routes: + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + ruInterface: #Only needed if using a ethernet based RU/USRP + create: false + ipAdd: "192.168.80.90" + # #name inside the pod is hardcoded right now + # name: "ru" + netmask: "24" + # if gatway is commented then it will be removed + gateway: "192.168.80.1" #In case you don't have a gateway remove it from here + ## The value must be [0, master's MTU]. If commented it will masters MTU + #mtu: 1500 + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + timeZone: "Europe/Paris" + useAdditionalOptions: "--sa --rfsim --log_config.global_log_options level,nocolor,time" + gnbName: "oai-gnb-rfsim" + mcc: "001" # check the information with AMF, SMF, UPF + mnc: "01" # check the information with AMF, SMF, UPF + tac: "1" # check the information with AMF + sst: "1" #currently only 4 standard values are allowed 1,2,3,4 + usrp: rfsim #allowed values rfsim, b2xx, n3xx or x3xx + amfhost: "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94 + n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 + n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 + resources: + define: false + limits: + nf: + cpu: 3000m + memory: 2Gi + requests: + nf: + cpu: 3000m + memory: 2Gi + nodeSelector: {} + nodeName: "" +oai-nr-ue: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-nr-ue + version: 2024.w32 + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + config: + timeZone: "Europe/Paris" + rfSimServer: "oai-ran" # ip-address of rfsim or service name oai-gnb or oai-du + fullImsi: "001010000000100" # make sure all the below entries are present in the subscriber database + fullKey: "fec86ba6eb707ed08905757b1bb44b8f" + opc: "C42449363BBAD02B66D16BC975D77CC1" + dnn: "oai" + sst: "1" # configure according to gnb and amf, smf and upf + sd: "16777215" + usrp: "rfsim" # allowed rfsim, b2xx, n3xx, x3xx + useAdditionalOptions: "--sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time" + resources: + define: false + limits: + nf: + cpu: 2000m + memory: 2Gi + requests: + nf: + cpu: 2000m + memory: 2Gi + nodeSelector: {} + nodeName: "" diff --git a/charts/e2e_scenarios/case2/Chart.yaml b/charts/e2e_scenarios/case2/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6b3d11057778fb52dd0ac751a4aa820e0f9486b6 --- /dev/null +++ b/charts/e2e_scenarios/case2/Chart.yaml @@ -0,0 +1,76 @@ +apiVersion: v2 +name: f1-split +type: application +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png +version: 2.1.0 +description: Charts for testing f1-split ran use case + +appVersion: 2.1.0 + +keywords: + - 5GCN + - AMF + - SMF + - NRF + - UPF + - UDM + - UDR + - AUSF + - CU + - DU + - NRUE + - Traffic_server + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org + +dependencies: +- condition: mysql.enabled + name: mysql + repository: "file://../../oai-5g-core/mysql" + version: 9.0.1 +- condition: oai-nrf.enabled + name: oai-nrf + repository: "file://../../oai-5g-core/oai-nrf" + version: v2.1.0 +- condition: oai-udr.enabled + name: oai-udr + repository: "file://../../oai-5g-core/oai-udr" + version: v2.1.0 +- condition: oai-udm.enabled + name: oai-udm + repository: "file://../../oai-5g-core/oai-udm" + version: v2.1.0 +- condition: oai-ausf.enabled + name: oai-ausf + repository: "file://../../oai-5g-core/oai-ausf" + version: v2.1.0 +- condition: oai-amf.enabled + name: oai-amf + repository: "file://../../oai-5g-core/oai-amf" + version: v2.1.0 +- condition: oai-smf.enabled + name: oai-smf + repository: "file://../../oai-5g-core/oai-smf" + version: v2.1.0 +- condition: oai-upf.enabled + name: oai-upf + repository: "file://../../oai-5g-core/oai-upf" + version: v2.1.0 +- condition: oai-cu.enabled + name: oai-cu + repository: "file://../../oai-5g-ran/oai-cu" + version: 2.1.0 +- condition: oai-du.enabled + name: oai-du + repository: "file://../../oai-5g-ran/oai-du" + version: 2.1.0 +- condition: oai-nr-ue.enabled + name: oai-nr-ue + repository: "file://../../oai-5g-ran/oai-nr-ue" + version: 2.1.0 +- condition: oai-traffic-server.enabled + name: oai-traffic-server + repository: "file://../../oai-5g-core/oai-traffic-server" + version: v1 diff --git a/charts/e2e_scenarios/case2/config.yaml b/charts/e2e_scenarios/case2/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c5b8356571e09557c9672ff2232f8fbcbeb59d22 --- /dev/null +++ b/charts/e2e_scenarios/case2/config.yaml @@ -0,0 +1,193 @@ +############# Common configuration + +# Log level for all the NFs +log_level: + general: info + +# If you enable registration, the other NFs will use the NRF discovery mechanism +register_nf: + general: yes + +http_version: 2 +curl_timeout: 6000 #milliseconds can be changed if the network have issues + +## general single_nssai configuration +## Defines YAML anchors, which are reused in the config file +snssais: + - &embb_slice1 + sst: 1 + - &embb_slice2 + sst: 1 + sd: 000001 # in hex + +############## SBI Interfaces +### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms +nfs: + amf: + host: oai-amf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n2: + interface_name: eth0 + port: 38412 + smf: + host: oai-smf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n4: + interface_name: eth0 + port: 8805 + upf: + host: oai-upf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n3: + interface_name: eth0 + port: 2152 + n4: + interface_name: eth0 + port: 8805 + n6: + interface_name: eth0 + n9: + interface_name: eth0 + port: 2152 + udm: + host: oai-udm + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + udr: + host: oai-udr + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + ausf: + host: oai-ausf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + nrf: + host: oai-nrf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + +#### Common for UDR and AMF +database: + host: mysql + user: test + type: mysql + password: test + database_name: oai_db + generate_random: true + connection_timeout: 300 # seconds + +############## NF-specific configuration +amf: + amf_name: "OAI-AMF" + # This really depends on if we want to keep the "mini" version or not + support_features_options: + enable_simple_scenario: no # "no" by default with the normal deployment scenarios with AMF/SMF/UPF/AUSF/UDM/UDR/NRF. + # set it to "yes" to use with the minimalist deployment scenario (including only AMF/SMF/UPF) by using the internal AUSF/UDM implemented inside AMF. + # There's no NRF in this scenario, SMF info is taken from "nfs" section. + enable_nssf: no + enable_smf_selection: yes + relative_capacity: 30 + statistics_timer_interval: 20 # in seconds + emergency_support: false + served_guami_list: + - mcc: 001 + mnc: 01 + amf_region_id: 01 + amf_set_id: 001 + amf_pointer: 01 + plmn_support_list: + - mcc: 001 + mnc: 01 + tac: 0x0001 + nssai: + - *embb_slice1 + - *embb_slice2 + supported_integrity_algorithms: + - "NIA1" + - "NIA2" + supported_encryption_algorithms: + - "NEA0" + - "NEA1" + - "NEA2" + +smf: + ue_mtu: 1500 + support_features: + use_local_subscription_info: no # Use infos from local_subscription_info or from UDM + use_local_pcc_rules: yes # Use infos from local_pcc_rules or from PCF + # we resolve from NRF, this is just to configure usage_reporting + upfs: + - host: oai-upf + config: + enable_usage_reporting: no + ue_dns: + primary_ipv4: "10.3.2.200" + primary_ipv6: "2001:4860:4860::8888" + secondary_ipv4: "8.8.8.8" + secondary_ipv6: "2001:4860:4860::8888" + ims: + pcscf_ipv4: "192.168.70.139" + pcscf_ipv6: "fe80::7915:f408:1787:db8b" + # the DNN you configure here should be configured in "dnns" + # follows the SmfInfo datatype from 3GPP TS 29.510 + smf_info: + sNssaiSmfInfoList: + - sNssai: *embb_slice1 + dnnSmfInfoList: + - dnn: "oai" + - sNssai: *embb_slice2 + dnnSmfInfoList: + - dnn: "ims" + local_subscription_infos: + - single_nssai: *embb_slice1 + dnn: "oai" + qos_profile: + 5qi: 5 + session_ambr_ul: "200Mbps" + session_ambr_dl: "400Mbps" + - single_nssai: *embb_slice2 + dnn: "ims" + qos_profile: + 5qi: 2 + session_ambr_ul: "100Mbps" + session_ambr_dl: "200Mbps" + +upf: + support_features: + enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off + enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off + remote_n6_gw: 127.0.0.1 # Dummy host since simple-switch does not use N6 GW + upf_info: + sNssaiUpfInfoList: + - sNssai: *embb_slice1 + dnnUpfInfoList: + - dnn: oai + - sNssai: *embb_slice2 + dnnUpfInfoList: + - dnn: ims + +## DNN configuration +dnns: + - dnn: "oai" + pdu_session_type: "IPV4" + ipv4_subnet: "12.1.1.0/24" + - dnn: "ims" + pdu_session_type: "IPV4V6" + ipv4_subnet: "14.1.1.0/24" diff --git a/charts/e2e_scenarios/case2/templates/core-cm.yaml b/charts/e2e_scenarios/case2/templates/core-cm.yaml new file mode 100644 index 0000000000000000000000000000000000000000..92a8bbf219de6de3f0c8985a240c037cd216aaca --- /dev/null +++ b/charts/e2e_scenarios/case2/templates/core-cm.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.global.coreNetworkConfigMap }} +data: + {{ (.Files.Glob "config.yaml").AsConfig | indent 2 | trim }} diff --git a/charts/e2e_scenarios/case2/values.yaml b/charts/e2e_scenarios/case2/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d5fc9fea1e76b8d714f1b8a1a72efcd72b8ac559 --- /dev/null +++ b/charts/e2e_scenarios/case2/values.yaml @@ -0,0 +1,402 @@ +global: + kubernetesDistribution: Vanilla #Openshift/Vanilla Kubernetes for Upstream Kubernetes + coreNetworkConfigMap: core + clusterIpServiceIpAllocation: false #this will allocate ip-address to cluster Ip service + waitForAMF: true #gNB waits for AMF + waitForRadio: true #UE waits for RFSimulated gNB + waitForNRF: true #All NFs wait for NRF to be ready + waitForUDR: true + http2Param: "--http2-prior-knowledge" # if waitForNRF is true and http2 is used for all NF then this param is needed + timeout: 1 +mysql: + enabled: true + imagePullPolicy: IfNotPresent + oai5gdatabase: basic + imagePullSecrets: + - name: "regcred" + persistence: + enabled: false + resources: + requests: + memory: 512Mi + cpu: 200m + limits: + memory: 512Mi + cpu: 200m +oai-nrf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-nrf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi + nodeName: "" +oai-udr: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-udr ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-udm: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-udm ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-ausf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-ausf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-amf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-amf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n2Interface: + create: false + ipAdd: "172.21.6.206" + netmask: "22" + name: "n2" #name inside the pod + ## If you do not have a gateway leave the field empty + gateway: 172.21.7.254 + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + resources: + define: false + limits: + nf: + cpu: 250m + memory: 256Mi + requests: + nf: + cpu: 250m + memory: 256Mi +oai-upf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-upf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + # create an extra interface for N3 in case the gNB is outside the cluster network or there is a need to have dedicated interface for N3 + ## Change these ip-addresses according to your environment + ## N4, N6 are optional only if you want that UPF uses different subnets for different 3gpp interfaces. + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n3Interface: + create: false + ipAdd: "172.21.8.95" + netmask: "22" + name: "n3" #name inside the pod + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you don't want to add a default route in your pod then replace this field with "" + routes: "" + hostInterface: "bond0" + ## For n4 it is better to re-use eth0 interface inside the pod (primary CNI of Kubernetes) + n4Interface: + create: false + ipAdd: "192.168.24.2" + netmask: "24" + name: "n4" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" + n6Interface: + create: false + ipAdd: "192.168.22.2" + name: "n6" + netmask: "24" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" + #NOTE: If the interface you selected for n6 does not have internet access then UE will not be able to reach internet + resources: + define: false + limits: + nf: + cpu: 500m + memory: 512Mi + requests: + nf: + cpu: 500m + memory: 512Mi +oai-traffic-server: + enabled: true + trafficServer: + repository: docker.io/oaisoftwarealliance/trf-gen-cn5g + version: latest + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + multus: + create: false + ipAdd: "172.21.6.12" + netmask: "22" + defaultGateway: "172.21.7.254" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + ueroute: 12.1.1.0/24 + upfHost: oai-upf + routeInterface: eth0 + noOfIperf3Server: 2 + resources: + define: false + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + nodeSelector: {} + nodeName: "" +oai-smf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-smf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n4Interface: + create: false + ipAdd: "192.168.24.3" + netmask: "24" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + # routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 250m + memory: 256Mi + requests: + nf: + cpu: 250m + memory: 256Mi + nodeSelector: {} + nodeName: "" +oai-cu: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-gnb + version: 2024.w32 + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + defaultGateway: "" + f1Interface: + create: false + ipAdd: "192.168.18.22" + netmask: "24" + name: "f1" + # if gatway is commented then it will be removed + #gateway: "172.21.19.254" + #routes: + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + n2Interface: + create: false + ipAdd: "172.21.6.208" + name: "n2" + netmask: "22" + # if gatway is empty then it will be removed + #gateway: "172.21.7.254" + #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + n3Interface: + create: false + ipAdd: "192.168.25.24" + netmask: "24" + name: "n3" + # if gatway is commented then it will be removed + #gateway: "172.21.11.254" + #routes: + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + timeZone: "Europe/Paris" + useAdditionalOptions: "--sa --log_config.global_log_options level,nocolor,time" + # If mounting the configuration file then below parameters are not used + cuName: "oai-cu" + mcc: "001" # check the information with AMF, SMF, UPF + mnc: "01" # check the information with AMF, SMF, UPF + tac: "1" # check the information with AMF + sst: "1" + amfhost: "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94 + n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 + n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 + f1IfName: "eth0" #if multus.f1Interface.create is true then use multus.f1Interface.Ipadd + f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + resources: + define: false + limits: + nf: + cpu: 500m + memory: 512Mi + requests: + nf: + cpu: 500m + memory: 512Mi + nodeSelector: +oai-du: + enabled: true + kubernetesDistribution: Kubernetes #Kubernetes/Kubernetes Kubernetes for Upstream Kubernetes + nfimage: + repository: docker.io/oaisoftwarealliance/oai-gnb + version: 2024.w32 + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + # if default gatway is left blank then it will be removed + defaultGateway: "" + f1Interface: + create: false + ipAdd: "192.168.20.23" + netmask: "24" + name: "f1" + # if gatway is empty then it will be removed + #gateway: "172.21.7.254" + #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + ruInterface: #Only needed if using a ethernet based RU/USRP + create: false + ipAdd: "192.168.80.90" + netmask: "24" + name: "ru" + # if gatway is commented then it will be remove + #gateway: "192.168.80.1" #In case you don't have a gateway remove it from here + ## The value must be [0, master's MTU]. If commented it will masters MTU + #mtu: 9000 + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + timeZone: "Europe/Paris" + useAdditionalOptions: "--sa --rfsim --log_config.global_log_options level,nocolor,time" + duName: "oai-du-rfsim" + usrp: rfsim #allowed values rfsim, b2xx, n3xx or x3xx + f1IfName: "eth0" #if multus.f1Interface.create is true then use f1 + cuHost: "oai-cu" ## Ip-address or hostname + f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + resources: + define: false + limits: + nf: + cpu: 3000m + memory: 2Gi + requests: + nf: + cpu: 3000m + memory: 2Gi + nodeSelector: +oai-nr-ue: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-nr-ue + version: 2024.w32 + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + config: + timeZone: "Europe/Paris" + rfSimServer: "oai-ran" # ip-address of rfsim or service name oai-gnb or oai-du + fullImsi: "001010000000100" # make sure all the below entries are present in the subscriber database + fullKey: "fec86ba6eb707ed08905757b1bb44b8f" + opc: "C42449363BBAD02B66D16BC975D77CC1" + dnn: "oai" + sst: "1" # configure according to gnb and amf, smf and upf + sd: "16777215" + usrp: "rfsim" # allowed rfsim, b2xx, n3xx, x3xx + useAdditionalOptions: "--sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time" + resources: + define: false + limits: + nf: + cpu: 2000m + memory: 4Gi + requests: + nf: + cpu: 2000m + memory: 4Gi + nodeSelector: diff --git a/charts/e2e_scenarios/case3/Chart.yaml b/charts/e2e_scenarios/case3/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..df93f5b4fde0e0591d4b1e1364d810a3c82d6514 --- /dev/null +++ b/charts/e2e_scenarios/case3/Chart.yaml @@ -0,0 +1,81 @@ +apiVersion: v2 +name: e1-f1-split +type: application +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png +version: 2.1.0 +description: Charts for testing e1-f1-split ran use case + +appVersion: 2.1.0 + +keywords: + - 5GCN + - AMF + - SMF + - NRF + - UPF + - UDM + - UDR + - AUSF + - CU-CP + - CU-UP + - DU + - NRUE + - Traffic_server + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org + +dependencies: +- condition: mysql.enabled + name: mysql + repository: "file://../../oai-5g-core/mysql" + version: 9.0.1 +- condition: oai-nrf.enabled + name: oai-nrf + repository: "file://../../oai-5g-core/oai-nrf" + version: v2.1.0 +- condition: oai-udr.enabled + name: oai-udr + repository: "file://../../oai-5g-core/oai-udr" + version: v2.1.0 +- condition: oai-udm.enabled + name: oai-udm + repository: "file://../../oai-5g-core/oai-udm" + version: v2.1.0 +- condition: oai-ausf.enabled + name: oai-ausf + repository: "file://../../oai-5g-core/oai-ausf" + version: v2.1.0 +- condition: oai-amf.enabled + name: oai-amf + repository: "file://../../oai-5g-core/oai-amf" + version: v2.1.0 +- condition: oai-smf.enabled + name: oai-smf + repository: "file://../../oai-5g-core/oai-smf" + version: v2.1.0 +- condition: oai-upf.enabled + name: oai-upf + repository: "file://../../oai-5g-core/oai-upf" + version: v2.1.0 +- condition: oai-cu-cp.enabled + name: oai-cu-cp + repository: "file://../../oai-5g-ran/oai-cu-cp" + version: 2.1.0 +- condition: oai-cu-up.enabled + name: oai-cu-up + repository: "file://../../oai-5g-ran/oai-cu-up" + version: 2.1.0 +- condition: oai-du.enabled + name: oai-du + repository: "file://../../oai-5g-ran/oai-du" + version: 2.1.0 +- condition: oai-nr-ue.enabled + name: oai-nr-ue + repository: "file://../../oai-5g-ran/oai-nr-ue" + version: 2.1.0 +- condition: oai-traffic-server.enabled + name: oai-traffic-server + repository: "file://../../oai-5g-core/oai-traffic-server" + version: v1 diff --git a/charts/e2e_scenarios/case3/config.yaml b/charts/e2e_scenarios/case3/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c5b8356571e09557c9672ff2232f8fbcbeb59d22 --- /dev/null +++ b/charts/e2e_scenarios/case3/config.yaml @@ -0,0 +1,193 @@ +############# Common configuration + +# Log level for all the NFs +log_level: + general: info + +# If you enable registration, the other NFs will use the NRF discovery mechanism +register_nf: + general: yes + +http_version: 2 +curl_timeout: 6000 #milliseconds can be changed if the network have issues + +## general single_nssai configuration +## Defines YAML anchors, which are reused in the config file +snssais: + - &embb_slice1 + sst: 1 + - &embb_slice2 + sst: 1 + sd: 000001 # in hex + +############## SBI Interfaces +### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms +nfs: + amf: + host: oai-amf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n2: + interface_name: eth0 + port: 38412 + smf: + host: oai-smf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n4: + interface_name: eth0 + port: 8805 + upf: + host: oai-upf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + n3: + interface_name: eth0 + port: 2152 + n4: + interface_name: eth0 + port: 8805 + n6: + interface_name: eth0 + n9: + interface_name: eth0 + port: 2152 + udm: + host: oai-udm + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + udr: + host: oai-udr + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + ausf: + host: oai-ausf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + nrf: + host: oai-nrf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + +#### Common for UDR and AMF +database: + host: mysql + user: test + type: mysql + password: test + database_name: oai_db + generate_random: true + connection_timeout: 300 # seconds + +############## NF-specific configuration +amf: + amf_name: "OAI-AMF" + # This really depends on if we want to keep the "mini" version or not + support_features_options: + enable_simple_scenario: no # "no" by default with the normal deployment scenarios with AMF/SMF/UPF/AUSF/UDM/UDR/NRF. + # set it to "yes" to use with the minimalist deployment scenario (including only AMF/SMF/UPF) by using the internal AUSF/UDM implemented inside AMF. + # There's no NRF in this scenario, SMF info is taken from "nfs" section. + enable_nssf: no + enable_smf_selection: yes + relative_capacity: 30 + statistics_timer_interval: 20 # in seconds + emergency_support: false + served_guami_list: + - mcc: 001 + mnc: 01 + amf_region_id: 01 + amf_set_id: 001 + amf_pointer: 01 + plmn_support_list: + - mcc: 001 + mnc: 01 + tac: 0x0001 + nssai: + - *embb_slice1 + - *embb_slice2 + supported_integrity_algorithms: + - "NIA1" + - "NIA2" + supported_encryption_algorithms: + - "NEA0" + - "NEA1" + - "NEA2" + +smf: + ue_mtu: 1500 + support_features: + use_local_subscription_info: no # Use infos from local_subscription_info or from UDM + use_local_pcc_rules: yes # Use infos from local_pcc_rules or from PCF + # we resolve from NRF, this is just to configure usage_reporting + upfs: + - host: oai-upf + config: + enable_usage_reporting: no + ue_dns: + primary_ipv4: "10.3.2.200" + primary_ipv6: "2001:4860:4860::8888" + secondary_ipv4: "8.8.8.8" + secondary_ipv6: "2001:4860:4860::8888" + ims: + pcscf_ipv4: "192.168.70.139" + pcscf_ipv6: "fe80::7915:f408:1787:db8b" + # the DNN you configure here should be configured in "dnns" + # follows the SmfInfo datatype from 3GPP TS 29.510 + smf_info: + sNssaiSmfInfoList: + - sNssai: *embb_slice1 + dnnSmfInfoList: + - dnn: "oai" + - sNssai: *embb_slice2 + dnnSmfInfoList: + - dnn: "ims" + local_subscription_infos: + - single_nssai: *embb_slice1 + dnn: "oai" + qos_profile: + 5qi: 5 + session_ambr_ul: "200Mbps" + session_ambr_dl: "400Mbps" + - single_nssai: *embb_slice2 + dnn: "ims" + qos_profile: + 5qi: 2 + session_ambr_ul: "100Mbps" + session_ambr_dl: "200Mbps" + +upf: + support_features: + enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off + enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off + remote_n6_gw: 127.0.0.1 # Dummy host since simple-switch does not use N6 GW + upf_info: + sNssaiUpfInfoList: + - sNssai: *embb_slice1 + dnnUpfInfoList: + - dnn: oai + - sNssai: *embb_slice2 + dnnUpfInfoList: + - dnn: ims + +## DNN configuration +dnns: + - dnn: "oai" + pdu_session_type: "IPV4" + ipv4_subnet: "12.1.1.0/24" + - dnn: "ims" + pdu_session_type: "IPV4V6" + ipv4_subnet: "14.1.1.0/24" diff --git a/charts/e2e_scenarios/case3/templates/core-cm.yaml b/charts/e2e_scenarios/case3/templates/core-cm.yaml new file mode 100644 index 0000000000000000000000000000000000000000..92a8bbf219de6de3f0c8985a240c037cd216aaca --- /dev/null +++ b/charts/e2e_scenarios/case3/templates/core-cm.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.global.coreNetworkConfigMap }} +data: + {{ (.Files.Glob "config.yaml").AsConfig | indent 2 | trim }} diff --git a/charts/e2e_scenarios/case3/values.yaml b/charts/e2e_scenarios/case3/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3cc849633448aa981974a11a7594a38adf38f9a8 --- /dev/null +++ b/charts/e2e_scenarios/case3/values.yaml @@ -0,0 +1,458 @@ +global: + kubernetesDistribution: Vanilla #Openshift/Vanilla Kubernetes for Upstream Kubernetes + coreNetworkConfigMap: core + clusterIpServiceIpAllocation: false #this will allocate ip-address to cluster Ip service + waitForAMF: true #gNB waits for AMF + waitForRadio: true #UE waits for RFSimulated gNB + waitForNRF: true #All NFs wait for NRF to be ready + waitForUDR: true + http2Param: "--http2-prior-knowledge" # if waitForNRF is true and http2 is used for all NF then this param is needed + timeout: 1 +mysql: + enabled: true + imagePullPolicy: IfNotPresent + oai5gdatabase: basic + imagePullSecrets: + - name: "regcred" + persistence: + enabled: false + resources: + requests: + memory: 512Mi + cpu: 200m + limits: + memory: 512Mi + cpu: 200m +oai-nrf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-nrf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi + nodeName: "" +oai-udr: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-udr ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-udm: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-udm ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-ausf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-ausf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 150m + memory: 128Mi + requests: + nf: + cpu: 150m + memory: 128Mi +oai-amf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-amf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n2Interface: + create: false + ipAdd: "172.21.6.206" + netmask: "22" + name: "n2" #name inside the pod + ## If you do not have a gateway leave the field empty + gateway: 172.21.7.254 + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + resources: + define: false + limits: + nf: + cpu: 250m + memory: 256Mi + requests: + nf: + cpu: 250m + memory: 256Mi +oai-upf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-upf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + # create an extra interface for N3 in case the gNB is outside the cluster network or there is a need to have dedicated interface for N3 + ## Change these ip-addresses according to your environment + ## N4, N6 are optional only if you want that UPF uses different subnets for different 3gpp interfaces. + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n3Interface: + create: false + ipAdd: "172.21.8.95" + netmask: "22" + name: "n3" #name inside the pod + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you don't want to add a default route in your pod then replace this field with "" + routes: "" + hostInterface: "bond0" + ## For n4 it is better to re-use eth0 interface inside the pod (primary CNI of Kubernetes) + n4Interface: + create: false + ipAdd: "192.168.24.2" + netmask: "24" + name: "n4" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" + n6Interface: + create: false + ipAdd: "192.168.22.2" + name: "n6" + netmask: "24" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + routes: "" + hostInterface: "bond0" + #NOTE: If the interface you selected for n6 does not have internet access then UE will not be able to reach internet + resources: + define: false + limits: + nf: + cpu: 500m + memory: 512Mi + requests: + nf: + cpu: 500m + memory: 512Mi +oai-traffic-server: + enabled: true + trafficServer: + repository: docker.io/oaisoftwarealliance/trf-gen-cn5g + version: latest + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + multus: + create: false + ipAdd: "172.21.6.12" + netmask: "22" + defaultGateway: "172.21.7.254" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + ueroute: 12.1.1.0/24 + upfHost: oai-upf + routeInterface: eth0 + noOfIperf3Server: 2 + resources: + define: false + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + nodeSelector: {} + nodeName: "" +oai-smf: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-smf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + ## If you don't want to add a default route in your pod then replace this field with "" + defaultGateway: "" + n4Interface: + create: false + ipAdd: "192.168.24.3" + netmask: "24" + ## If you do not have a gateway leave the field empty + gateway: "" + ## If you do not want to add any routes in your pod then leave this field empty + # routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" + imagePullSecrets: + - name: "regcred" + resources: + define: false + limits: + nf: + cpu: 250m + memory: 256Mi + requests: + nf: + cpu: 250m + memory: 256Mi + nodeSelector: {} + nodeName: "" +oai-cu-cp: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-gnb + version: 2024.w32 + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + # to remove the default gateway change it with "" + defaultGateway: "" + e1Interface: + create: false + ipAdd: "192.168.18.12" + netmask: "24" + name: "e1" + # if gatway is empty then it will be removed + #gateway: "" + #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + n2Interface: + create: false + ipAdd: "172.21.6.208" + netmask: "22" + name: "n2" + # if gatway is empty then it will be removed + #gateway: "" + #routes: + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + f1cInterface: + create: false + ipAdd: "192.168.20.22" + netmask: "24" + name: "f1c" + # if gatway is empty then it will be removed + #gateway: "" + #routes: + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + timeZone: "Europe/Paris" + useAdditionalOptions: "--sa --log_config.global_log_options level,nocolor,time" + cucpName: "oai-cu-cp" + amfhost: "oai-amf" # amf ip-address or service-name oai-amf or 172.21.6.94 + n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 or you can only use 1 interface e1 or eth0 + f1IfName: "eth0" #if multus.f1Interface.create is true then use f1 or you can only use 1 interface e1 or eth0 + e1IfName: "eth0" #if multus.f1Interface.create is true then use e1 or you can only use 1 interface e1 or eth0 + f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + resources: + define: true + limits: + nf: + cpu: 500m + memory: 512Mi + requests: + nf: + cpu: 500m + memory: 512Mi + nodeSelector: +oai-cu-up: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-nr-cuup + version: 2024.w32 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + # to remove the default gateway change it with "" + defaultGateway: "" + e1Interface: + create: false + ipAdd: "192.168.18.13" + netmask: "24" + name: "e1" + # if gatway is empty then it will be removed + #gateway: "" + #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + n3Interface: + create: false + ipAdd: "192.168.25.24" + netmask: "24" + name: "n3" + # if gatway is empty then it will be removed + #gateway: "" + #routes: [] + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + f1uInterface: + create: false + ipAdd: "192.168.20.24" + netmask: "24" + name: "f1u" + # if gatway is empty then it will be removed + #gateway: "" + #routes: [] + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + timeZone: "Europe/Paris" + useAdditionalOptions: "--sa" + cuupName: "oai-cuup" + cuCpHost: "oai-cu" # Service name or ip-address + n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 + n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface e1 or eth0 + f1IfName: "eth0" #if multus.f1uInterface.create is true then use f1 or you can only use 1 interface e1 or eth0 + e1IfName: "eth0" #if multus.e1Interface.create is true then use e1 or you can only use 1 interface e1 or eth0 + f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + resources: + define: true + limits: + nf: + cpu: 500m + memory: 512Mi + requests: + nf: + cpu: 500m + memory: 512Mi + nodeSelector: +oai-du: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-gnb + version: 2024.w32 + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: true #only for taking pcaps inside network function pod + multus: + # if default gatway is left blank then it will be removed + defaultGateway: "" + f1Interface: + create: false + ipAdd: "192.168.20.23" + netmask: "24" + name: "f1" + # if gatway is empty then it will be removed + #gateway: "172.21.7.254" + #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + ruInterface: #Only needed if using a ethernet based RU/USRP + create: false + ipAdd: "192.168.80.90" + netmask: "24" + name: "ru" + # if gatway is commented then it will be remove + #gateway: "192.168.80.1" #In case you don't have a gateway remove it from here + ## The value must be [0, master's MTU]. If commented it will masters MTU + #mtu: 9000 + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + timeZone: "Europe/Paris" + useAdditionalOptions: "--sa --rfsim --log_config.global_log_options level,nocolor,time" + duName: "oai-du-rfsim" + usrp: rfsim #allowed values rfsim, b2xx, n3xx or x3xx + f1IfName: "eth0" #if multus.f1Interface.create is true then use f1 + cuHost: "oai-cu" ## Ip-address or hostname + f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + resources: + define: false + limits: + nf: + cpu: 3000m + memory: 2Gi + requests: + nf: + cpu: 3000m + memory: 2Gi + nodeSelector: +oai-nr-ue: + enabled: true + nfimage: + repository: docker.io/oaisoftwarealliance/oai-nr-ue + version: 2024.w32 + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + config: + timeZone: "Europe/Paris" + rfSimServer: "oai-ran" # ip-address of rfsim or service name oai-gnb or oai-du + fullImsi: "001010000000100" # make sure all the below entries are present in the subscriber database + fullKey: "fec86ba6eb707ed08905757b1bb44b8f" + opc: "C42449363BBAD02B66D16BC975D77CC1" + dnn: "oai" + sst: "1" # configure according to gnb and amf, smf and upf + sd: "16777215" + usrp: "rfsim" # allowed rfsim, b2xx, n3xx, x3xx + useAdditionalOptions: "--sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time" + resources: + define: false + limits: + nf: + cpu: 2000m + memory: 4Gi + requests: + nf: + cpu: 2000m + memory: 4Gi + nodeSelector: + diff --git a/charts/oai-5g-core/mysql/Chart.yaml b/charts/oai-5g-core/mysql/Chart.yaml index c30221a9ace7daed76e1728133008cbd5fea597a..95c21fac25c77a79da3e4ab9ca06c48c1c795904 100755 --- a/charts/oai-5g-core/mysql/Chart.yaml +++ b/charts/oai-5g-core/mysql/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: mysql -version: 8.0.31 -appVersion: 8.0.31 -description: mysql chart used for oai5g core +version: 9.0.1 +appVersion: 9.0.1 +description: mysql chart used for oai5g core keywords: - mysql - database diff --git a/charts/oai-5g-core/mysql/initialization/oai_db-basic.sql b/charts/oai-5g-core/mysql/initialization/oai_db-basic.sql index da82a0bf4baad9352a590b556d6ddb49a89e0f45..a2eadd19d3e0b4012840b0faf53a5df936013021 100755 --- a/charts/oai-5g-core/mysql/initialization/oai_db-basic.sql +++ b/charts/oai-5g-core/mysql/initialization/oai_db-basic.sql @@ -175,7 +175,22 @@ INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPe ('001010000000111', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000111'); INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES ('001010000000112', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000112'); - +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010000000113', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000113'); +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010000000114', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000114'); +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010000000115', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000115'); +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010000000116', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000116'); +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010000000117', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000117'); +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010000000118', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000118'); +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010000000119', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000119'); +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010000000120', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000120'); -- -------------------------------------------------------- @@ -346,8 +361,22 @@ INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singl ('001010000000111', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES ('001010000000112', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); - - +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000113', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000114', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000115', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000116', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000117', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000118', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000119', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000120', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); -- -- AUTO_INCREMENT for table `SdmSubscriptions` diff --git a/charts/oai-5g-core/mysql/values.yaml b/charts/oai-5g-core/mysql/values.yaml index 0624268ced27f908c0de16996e8d4b9d7bec0570..b043cc4989bc19799cd2d783f11dea5948378536 100644 --- a/charts/oai-5g-core/mysql/values.yaml +++ b/charts/oai-5g-core/mysql/values.yaml @@ -2,7 +2,7 @@ ## ref: https://hub.docker.com/r/library/mysql/tags/ ## image: "docker.io/mysql" -imageTag: "5.7" +imageTag: "9.0.1" replicas: 1 diff --git a/charts/oai-5g-core/oai-5g-advance/Chart.yaml b/charts/oai-5g-core/oai-5g-advance/Chart.yaml index c3e47318d37c5b7bb7792b4461288a74aa71c14e..058a1c46f569dea259a93970d7ca637b8c9d54fd 100644 --- a/charts/oai-5g-core/oai-5g-advance/Chart.yaml +++ b/charts/oai-5g-core/oai-5g-advance/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: oai-5g-advance -version: v2.0.1 -appVersion: master-v2.0.1 +version: v2.1.0 +appVersion: master-v2.1.0 icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png description: OAI 5G Release 16 Core Network type: application @@ -17,6 +17,8 @@ keywords: - NSSF - AUSF - UPF + - LMF + - Traffic_server maintainers: - name: OPENAIRINTERFACE @@ -26,40 +28,44 @@ dependencies: - condition: mysql.enabled name: mysql repository: "file://../mysql" - version: 8.0.31 + version: 9.0.1 - condition: oai-nssf.enabled name: oai-nssf repository: "file://../oai-nssf" - version: v2.0.1 + version: v2.1.0 - condition: oai-nrf.enabled name: oai-nrf repository: "file://../oai-nrf" - version: v2.0.1 + version: v2.1.0 - condition: oai-udr.enabled name: oai-udr repository: "file://../oai-udr" - version: v2.0.1 + version: v2.1.0 - condition: oai-udm.enabled name: oai-udm repository: "file://../oai-udm" - version: v2.0.1 + version: v2.1.0 - condition: oai-ausf.enabled name: oai-ausf repository: "file://../oai-ausf" - version: v2.0.1 + version: v2.1.0 - condition: oai-amf.enabled name: oai-amf repository: "file://../oai-amf" - version: v2.0.1 + version: v2.1.0 - condition: oai-smf.enabled name: oai-smf repository: "file://../oai-smf" - version: v2.0.1 + version: v2.1.0 - condition: oai-upf.enabled name: oai-upf repository: "file://../oai-upf" - version: v2.0.1 -#- condition: oai-traffic-server.enabled -# name: oai-traffic-server -# repository: "file://../oai-traffic-server" -# version: v1 \ No newline at end of file + version: v2.1.0 +- condition: oai-lmf.enabled + name: oai-lmf + repository: "file://../oai-lmf" + version: v2.1.0 +- condition: oai-traffic-server.enabled + name: oai-traffic-server + repository: "file://../oai-traffic-server" + version: v1 diff --git a/charts/oai-5g-core/oai-5g-advance/config.yaml b/charts/oai-5g-core/oai-5g-advance/config.yaml index fd98897bf15cc2443c9f5cfae6509994cda35ee3..30d895270fb120dfb69e5123d57f0a34476d12ff 100644 --- a/charts/oai-5g-core/oai-5g-advance/config.yaml +++ b/charts/oai-5g-core/oai-5g-advance/config.yaml @@ -9,6 +9,7 @@ register_nf: general: yes http_version: 2 +curl_timeout: 6000 #milliseconds can be changed if the network have issues ## general single_nssai configuration ## Defines YAML anchors, which are reused in the config file @@ -40,6 +41,12 @@ nfs: n4: interface_name: eth0 port: 8805 + lmf: + host: oai-lmf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 upf: host: oai-upf sbi: @@ -173,6 +180,21 @@ smf: session_ambr_ul: "100Mbps" session_ambr_dl: "200Mbps" +############### LMF Configuration +lmf: + http_threads_count: 8 + gnb_id_bits_count: 28 + num_gnb: 1 + trp_info_wait_ms: 10000 + positioning_wait_ms: 10000 + measurement_wait_ms: 10000 + support_features: + request_trp_info: no + determine_num_gnb: yes + use_http2: yes + use_fqdn_dns: no + register_nrf: yes + upf: support_features: enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off @@ -194,4 +216,4 @@ dnns: ipv4_subnet: "12.1.1.0/24" - dnn: "ims" pdu_session_type: "IPV4V6" - ipv4_subnet: "14.1.1.0/24" \ No newline at end of file + ipv4_subnet: "14.1.1.0/24" diff --git a/charts/oai-5g-core/oai-5g-advance/nssf_slice_config.yaml b/charts/oai-5g-core/oai-5g-advance/nssf_slice_config.yaml index 1721eea59712e7f7ba56932a549c55a809d43d08..0fb7c42b6cf5be98141305fe55b15734dd01ee22 100644 --- a/charts/oai-5g-core/oai-5g-advance/nssf_slice_config.yaml +++ b/charts/oai-5g-core/oai-5g-advance/nssf_slice_config.yaml @@ -1,7 +1,7 @@ # Reference:- TS 29.531 R16.0.0., Section- 6.1.6 Data Model info: version: 2.0.0 - description: OAI-NSSF Release v2.0.1 + description: OAI-NSSF Release v2.1.0 configuration: nsiInfoList: - snssai: diff --git a/charts/oai-5g-core/oai-5g-advance/values.yaml b/charts/oai-5g-core/oai-5g-advance/values.yaml index 499a049f23cfd3fa9ecc451a3b1734a220989795..9c490ad9a7d6976b1b85ecda90461267b9e0972a 100644 --- a/charts/oai-5g-core/oai-5g-advance/values.yaml +++ b/charts/oai-5g-core/oai-5g-advance/values.yaml @@ -1,7 +1,9 @@ global: - nfConfigurationConfigMap: oai-5g-advance + kubernetesDistribution: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes + coreNetworkConfigMap: oai-5g-advance clusterIpServiceIpAllocation: true #this will allocate ip-address to cluster Ip service waitForNRF: true + waitForUDR: true http2Param: "--http2-prior-knowledge" # if waitForNRF is true and http2 is used for all NF then this param is needed timeout: 1 mysql: @@ -14,10 +16,9 @@ mysql: enabled: false oai-nrf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-nrf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -28,10 +29,9 @@ oai-nrf: nodeSelector: {} oai-nssf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-nssf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent imagePullSecrets: @@ -42,10 +42,22 @@ oai-nssf: nodeSelector: {} oai-udr: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-udr ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: false #only for taking pcaps inside network function pod + imagePullSecrets: + - name: "regcred" + config: + logLevel: "debug" #allowed info/error/debug + nodeSelector: {} +oai-lmf: + enabled: true + nfimage: # image name either locally present or in a public/private repository + repository: docker.io/oaisoftwarealliance/oai-lmf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -56,10 +68,9 @@ oai-udr: nodeSelector: {} oai-udm: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-udm ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -70,10 +81,9 @@ oai-udm: nodeSelector: {} oai-ausf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-ausf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -84,10 +94,9 @@ oai-ausf: nodeSelector: {} oai-amf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-amf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -98,22 +107,20 @@ oai-amf: defaultGateway: "" n2Interface: create: false - Ipadd: "172.21.6.94" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "n2" + ipAdd: "172.21.6.94" + netmask: "22" + name: "n2" ## If you do not have a gateway leave the field empty - Gateway: + gateway: ## If you do not want to add any routes in your pod then leave this field empty routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled nodeSelector: {} oai-upf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-upf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -127,66 +134,70 @@ oai-upf: defaultGateway: "" n3Interface: create: false - Ipadd: "172.21.8.95" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "n3" + ipAdd: "172.21.8.95" + netmask: "22" + name: "n3" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you don't want to add a default route in your pod then replace this field with "" routes: [{'dst': '10.8.0.0/24','gw': '172.21.11.254'}, {'dst': '10.9.0.0/24','gw': '172.21.11.254'}] hostInterface: "bond0" ## For n4 it is better to re-use eth0 interface inside the pod (primary CNI of Kubernetes) n4Interface: create: false - Ipadd: "192.168.24.2" - Netmask: "24" - # #name inside the pod is hardcoded right now - # name: "n4" + ipAdd: "192.168.24.2" + netmask: "24" + name: "n4" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: "" hostInterface: "bond0" n6Interface: create: false - Ipadd: "192.168.22.2" - # #name inside the pod is hardcoded right now - # name: "n6" - Netmask: "24" + ipAdd: "192.168.22.2" + name: "n6" + netmask: "24" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: "" hostInterface: "bond0" #NOTE: If the interface you selected for n6If is wrong then traffic will not be routed towards internet nodeSelector: {} -# oai-traffic-server: -# enabled: false -# weight: 6 -# kubernetesType: Vanilla -# trafficServer: -# repository: docker.io/oaisoftwarealliance/trf-gen-cn5g -# version: latest -# #pullPolicy: IfNotPresent or Never or Always -# pullPolicy: IfNotPresent -# #Without multus traffic server won't be able to forward packets to spgwu if can't use server then add an extra container in spgwu with iperf3 or install iperf3 package in tcpdump container -# multus: -# create: true -# IPadd: "172.21.6.99" -# Netmask: "22" -# defaultGateway: "172.21.7.254" -# hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled -# config: -# ueroute: 12.1.1.0/24 -# upfIpadd: 172.21.6.95 -# noOfIperf3Server: 10 +oai-traffic-server: + enabled: true + trafficServer: + repository: docker.io/oaisoftwarealliance/trf-gen-cn5g + version: latest + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + multus: + create: false + ipAdd: "172.21.6.12" + netmask: "22" + defaultGateway: "172.21.7.254" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + ueroute: 12.1.1.0/24 + upfHost: oai-upf + routeInterface: eth0 + noOfIperf3Server: 2 + resources: + define: false + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + nodeSelector: {} + nodeName: "" oai-smf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-smf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -195,10 +206,11 @@ oai-smf: defaultGateway: "" n4Interface: create: false - Ipadd: "192.168.24.3" - Netmask: "24" + ipAdd: "192.168.24.3" + netmask: "24" + name: "n4" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" diff --git a/charts/oai-5g-core/oai-5g-basic/Chart.yaml b/charts/oai-5g-core/oai-5g-basic/Chart.yaml index 4721ebf8ac8a1740f13d0ee1705a1a88a9f77cab..86d72ea95c8aec9b5ebc247703b667221d867de4 100644 --- a/charts/oai-5g-core/oai-5g-basic/Chart.yaml +++ b/charts/oai-5g-core/oai-5g-basic/Chart.yaml @@ -2,10 +2,10 @@ apiVersion: v2 name: oai-5g-basic type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 description: OAI 5G Release 16 Core Network -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5GCN @@ -16,7 +16,7 @@ keywords: - UDM - UDR - AUSF -# - Traffic_server + - Traffic_server maintainers: - name: OPENAIRINTERFACE @@ -26,37 +26,41 @@ dependencies: - condition: mysql.enabled name: mysql repository: "file://../mysql" - version: 8.0.31 + version: 9.0.1 - condition: oai-nrf.enabled name: oai-nrf repository: "file://../oai-nrf" - version: v2.0.1 + version: v2.1.0 - condition: oai-udr.enabled name: oai-udr repository: "file://../oai-udr" - version: v2.0.1 + version: v2.1.0 - condition: oai-udm.enabled name: oai-udm repository: "file://../oai-udm" - version: v2.0.1 + version: v2.1.0 - condition: oai-ausf.enabled name: oai-ausf repository: "file://../oai-ausf" - version: v2.0.1 + version: v2.1.0 - condition: oai-amf.enabled name: oai-amf repository: "file://../oai-amf" - version: v2.0.1 + version: v2.1.0 - condition: oai-smf.enabled name: oai-smf repository: "file://../oai-smf" - version: v2.0.1 + version: v2.1.0 - condition: oai-upf.enabled name: oai-upf repository: "file://../oai-upf" - version: v2.0.1 -#- condition: oai-traffic-server.enabled -# name: oai-traffic-server -# repository: "file://../oai-traffic-server" -# version: v1 + version: v2.1.0 +- condition: oai-lmf.enabled + name: oai-lmf + repository: "file://../oai-lmf" + version: v2.1.0 +- condition: oai-traffic-server.enabled + name: oai-traffic-server + repository: "file://../oai-traffic-server" + version: v1 diff --git a/charts/oai-5g-core/oai-5g-basic/README.md b/charts/oai-5g-core/oai-5g-basic/README.md index 6126cd17edf4884994deea0024876594ec1e83b1..9e298966e2d2662ab9ab8d76eb421ec217914f01 100644 --- a/charts/oai-5g-core/oai-5g-basic/README.md +++ b/charts/oai-5g-core/oai-5g-basic/README.md @@ -9,7 +9,8 @@ Basic deployment contains 5. OAI-AUSF 6. OAI-UDM 7. OAI-UPF -8. MYSQL (Subscriber database) +8. OAI-LMF +9. MYSQL (Subscriber database) **Disclaimer**: Starting version 2.0.0 of OAI 5G Core network functions their configuration will be in `config.yaml` and all infrastructure related information including image definition will be in `values.yaml`. @@ -39,4 +40,4 @@ If you want to use `oai-upf` with a single interface then you can enable any one n6If: "eth0" # n6 multus.n6Interface.create is true ``` -Make sure `n3` subnet is reachable from gNB. \ No newline at end of file +Make sure `n3` subnet is reachable from gNB. diff --git a/charts/oai-5g-core/oai-5g-basic/config.yaml b/charts/oai-5g-core/oai-5g-basic/config.yaml index 69f85ac365cadb52cb2d5346b375b575b0bffd26..6bede0c786ce4b394fa1301b564d5ca327f11e03 100644 --- a/charts/oai-5g-core/oai-5g-basic/config.yaml +++ b/charts/oai-5g-core/oai-5g-basic/config.yaml @@ -2,14 +2,14 @@ # Log level for all the NFs log_level: - general: info + general: debug # If you enable registration, the other NFs will use the NRF discovery mechanism register_nf: general: yes http_version: 2 - +curl_timeout: 6000 #milliseconds can be changed if the network have issues ## general single_nssai configuration ## Defines YAML anchors, which are reused in the config file snssais: @@ -69,6 +69,12 @@ nfs: port: 80 api_version: v1 interface_name: eth0 + lmf: + host: oai-lmf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 ausf: host: oai-ausf sbi: @@ -158,16 +164,31 @@ smf: - single_nssai: *embb_slice1 dnn: "oai" qos_profile: - 5qi: 5 + 5qi: 6 session_ambr_ul: "200Mbps" session_ambr_dl: "400Mbps" - single_nssai: *embb_slice2 dnn: "ims" qos_profile: - 5qi: 2 + 5qi: 5 session_ambr_ul: "100Mbps" session_ambr_dl: "200Mbps" +############### LMF Configuration +lmf: + http_threads_count: 8 + gnb_id_bits_count: 28 + num_gnb: 1 + trp_info_wait_ms: 10000 + positioning_wait_ms: 10000 + measurement_wait_ms: 10000 + support_features: + request_trp_info: no + determine_num_gnb: yes + use_http2: yes + use_fqdn_dns: no + register_nrf: yes + upf: support_features: enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off @@ -190,4 +211,3 @@ dnns: - dnn: "ims" pdu_session_type: "IPV4V6" ipv4_subnet: "14.1.1.0/24" - diff --git a/charts/oai-5g-core/oai-5g-basic/values.yaml b/charts/oai-5g-core/oai-5g-basic/values.yaml index 5eb7dfbb47bb033d45f4fa56b0042424aaa2e806..cefe230dca9b0f6a560f5fb1c65bc32d085cc7fa 100644 --- a/charts/oai-5g-core/oai-5g-basic/values.yaml +++ b/charts/oai-5g-core/oai-5g-basic/values.yaml @@ -1,7 +1,9 @@ global: - nfConfigurationConfigMap: oai-5g-basic + kubernetesDistribution: Vanilla #Openshift/Vanilla Kubernetes for Upstream Kubernetes + coreNetworkConfigMap: oai-5g-basic clusterIpServiceIpAllocation: true #this will allocate ip-address to cluster Ip service waitForNRF: true + waitForUDR: true http2Param: "--http2-prior-knowledge" # if waitForNRF is true and http2 is used for all NF then this param is needed timeout: 1 mysql: @@ -14,13 +16,39 @@ mysql: enabled: false oai-nrf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-nrf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod + ## Only if you want to store all pcaps in persistent volume + persistent: + sharedvolume: false + #storageClass: "nfs-client" #If value is "-" default storageClass will be used + storageClass: "-" + size: 1Gi + start: + nrf: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false + imagePullSecrets: + - name: "regcred" + config: + logLevel: "debug" #allowed info/error/debug + nodeSelector: {} +oai-lmf: + enabled: true + nfimage: # image name either locally present or in a public/private repository + repository: docker.io/oaisoftwarealliance/oai-lmf ## The image will be pulled from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + includeTcpDumpContainer: false #only for taking pcaps inside network function pod + persistent: + sharedvolume: false + start: + lmf: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false imagePullSecrets: - name: "regcred" config: @@ -28,13 +56,18 @@ oai-nrf: nodeSelector: {} oai-udr: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-udr ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod + ## Only if you want to store all pcaps in persistent volume + persistent: + sharedvolume: false + start: + udr: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false imagePullSecrets: - name: "regcred" config: @@ -42,13 +75,18 @@ oai-udr: nodeSelector: {} oai-udm: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-udm ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod + ## Only if you want to store all pcaps in persistent volume + persistent: + sharedvolume: false + start: + udm: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false imagePullSecrets: - name: "regcred" config: @@ -56,13 +94,18 @@ oai-udm: nodeSelector: {} oai-ausf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-ausf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod + ## Only if you want to store all pcaps in persistent volume + persistent: + sharedvolume: false + start: + ausf: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false imagePullSecrets: - name: "regcred" config: @@ -70,13 +113,18 @@ oai-ausf: nodeSelector: {} oai-amf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-amf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod + ## Only if you want to store all pcaps in persistent volume + persistent: + sharedvolume: false + start: + amf: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false imagePullSecrets: - name: "regcred" multus: @@ -84,25 +132,29 @@ oai-amf: defaultGateway: "" n2Interface: create: false - Ipadd: "172.21.6.94" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "n2" + ipAdd: "172.21.6.94" + netmask: "22" + name: "n2" ## If you do not have a gateway leave the field empty - Gateway: + gateway: ## If you do not want to add any routes in your pod then leave this field empty routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled nodeSelector: {} oai-upf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-upf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod + ## Only if you want to store all pcaps in persistent volume + persistent: + sharedvolume: false + start: + upf: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false imagePullSecrets: - name: "regcred" # create an extra interface for N3 incase the gNB is outside the cluster network or there is a need to have dedicated interface for N3 @@ -113,78 +165,89 @@ oai-upf: defaultGateway: "" n3Interface: create: false - Ipadd: "172.21.8.95" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "n3" + ipAdd: "172.21.8.95" + netmask: "22" + name: "n3" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you don't want to add a default route in your pod then replace this field with "" routes: [{'dst': '10.8.0.0/24','gw': '172.21.11.254'}, {'dst': '10.9.0.0/24','gw': '172.21.11.254'}] hostInterface: "bond0" ## For n4 it is better to re-use eth0 interface inside the pod (primary CNI of Kubernetes) n4Interface: create: false - Ipadd: "192.168.24.2" - Netmask: "24" - # #name inside the pod is hardcoded right now - # name: "n4" + ipAdd: "192.168.24.2" + netmask: "24" + name: "n4" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: "" hostInterface: "bond0" n6Interface: create: false - Ipadd: "192.168.22.2" - # #name inside the pod is hardcoded right now - # name: "n6" - Netmask: "24" + ipAdd: "192.168.22.2" + name: "n6" + netmask: "24" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: "" hostInterface: "bond0" #NOTE: If the interface you selected for n6If is wrong then traffic will not be routed towards internet nodeSelector: {} -# oai-traffic-server: -# enabled: false -# weight: 6 -# kubernetesType: Vanilla -# trafficServer: -# repository: docker.io/oaisoftwarealliance/trf-gen-cn5g -# version: latest -# #pullPolicy: IfNotPresent or Never or Always -# pullPolicy: IfNotPresent -# #Without multus traffic server won't be able to forward packets to spgwu if can't use server then add an extra container in spgwu with iperf3 or install iperf3 package in tcpdump container -# multus: -# create: true -# IPadd: "172.21.6.99" -# Netmask: "22" -# defaultGateway: "172.21.7.254" -# hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled -# config: -# ueroute: 12.1.1.0/24 -# upfIpadd: 172.21.6.95 -# noOfIperf3Server: 10 +oai-traffic-server: + enabled: true + trafficServer: + repository: docker.io/oaisoftwarealliance/trf-gen-cn5g + version: latest + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + multus: + create: false + ipAdd: "172.21.6.12" + netmask: "22" + defaultGateway: "172.21.7.254" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + ueroute: 12.1.1.0/24 + upfHost: oai-upf + routeInterface: eth0 + noOfIperf3Server: 2 + resources: + define: false + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + nodeSelector: {} + nodeName: "" oai-smf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-smf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod + ## Only if you want to store all pcaps in persistent volume + persistent: + sharedvolume: false + start: + smf: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false multus: ## If you don't want to add a default route in your pod then replace this field with "" defaultGateway: "" n4Interface: create: false - Ipadd: "192.168.24.3" - Netmask: "24" + ipAdd: "192.168.24.3" + netmask: "24" + name: "n4" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" diff --git a/charts/oai-5g-core/oai-5g-mini/Chart.yaml b/charts/oai-5g-core/oai-5g-mini/Chart.yaml index 431476ab9511372f5d6a449d5dbb73293ab4cc37..76238c44d260c44570213214cb8d3b10f429671a 100644 --- a/charts/oai-5g-core/oai-5g-mini/Chart.yaml +++ b/charts/oai-5g-core/oai-5g-mini/Chart.yaml @@ -2,10 +2,10 @@ apiVersion: v2 name: oai-5g-mini type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 description: OAI 5G Release 16 Core Network -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5GCN @@ -13,6 +13,7 @@ keywords: - SMF - NRF #Optional but if you want to remove please configure AMF, SMF and UPF with each others IP-Address - UPF + - Traffic Server maintainers: - name: OPENAIRINTERFACE @@ -22,24 +23,24 @@ dependencies: - condition: mysql.enabled name: mysql repository: "file://../mysql" - version: 8.0.31 + version: 9.0.1 - condition: oai-nrf.enabled name: oai-nrf repository: "file://../oai-nrf" - version: v2.0.1 + version: v2.1.0 - condition: oai-amf.enabled name: oai-amf repository: "file://../oai-amf" - version: v2.0.1 + version: v2.1.0 - condition: oai-smf.enabled name: oai-smf repository: "file://../oai-smf" - version: v2.0.1 + version: v2.1.0 - condition: oai-upf.enabled name: oai-upf repository: "file://../oai-upf" - version: v2.0.1 -#- condition: oai-traffic-server.enabled -# name: oai-traffic-server -# repository: "file://../oai-traffic-server" -# version: v1 \ No newline at end of file + version: v2.1.0 +- condition: oai-traffic-server.enabled + name: oai-traffic-server + repository: "file://../oai-traffic-server" + version: v1 diff --git a/charts/oai-5g-core/oai-5g-mini/README.md b/charts/oai-5g-core/oai-5g-mini/README.md index b185fed4ad420a083378106925627cb53278c40d..33b28557e5a2b06f9d1e7e12edb5510537c151fc 100644 --- a/charts/oai-5g-core/oai-5g-mini/README.md +++ b/charts/oai-5g-core/oai-5g-mini/README.md @@ -11,7 +11,7 @@ Mini deployment contains **Disclaimer**: Starting version 2.0.0 of OAI 5G Core network functions their configuration will be in `config.yaml` and all infrastructure related information including image definition will be in `values.yaml`. -If the gNB is in a different cluster or different subnet than pod subnet. Then you need to make sure AMF and SPGWU/UPF is reachable from the gNB host machine. You can use AMF and SPGWU/UPF multus interface. In SPGWU/UPF `n3Interface` should be able to reach gNB host machine/pod/container. +If the gNB is in a different cluster or different subnet than pod subnet. Then you need to make sure AMF and UPF is reachable from the gNB host machine. You can use AMF and UPF multus interface. In UPF `n3Interface` should be able to reach gNB host machine/pod/container. Once you are sure with the configuration parameters you can deploy these charts following the below steps. @@ -37,4 +37,4 @@ If you want to use `oai-upf` with a single interface then you can enable any one n6If: "eth0" # n6 multus.n6Interface.create is true ``` -Make sure `n3` subnet is reachable from gNB. \ No newline at end of file +Make sure `n3` subnet is reachable from gNB. diff --git a/charts/oai-5g-core/oai-5g-mini/config.yaml b/charts/oai-5g-core/oai-5g-mini/config.yaml index 06d7bb1db05faa572befb58ba832f46cd8dde1d4..01c95b70bb864b6c891da45a970db60e5b582fd1 100644 --- a/charts/oai-5g-core/oai-5g-mini/config.yaml +++ b/charts/oai-5g-core/oai-5g-mini/config.yaml @@ -9,6 +9,7 @@ register_nf: general: yes http_version: 2 +curl_timeout: 6000 #milliseconds can be changed if the network have issues ## general single_nssai configuration ## Defines YAML anchors, which are reused in the config file @@ -171,4 +172,4 @@ dnns: ipv4_subnet: "12.1.1.128/25" - dnn: "ims" pdu_session_type: "IPV4V6" - ipv4_subnet: "14.1.1.2/24" \ No newline at end of file + ipv4_subnet: "14.1.1.2/24" diff --git a/charts/oai-5g-core/oai-5g-mini/values.yaml b/charts/oai-5g-core/oai-5g-mini/values.yaml index c12b6fb31e96180bbc63072d0677b3a2a8995b3f..f68da38411f0d5793e37bf29d1d1317d72450877 100644 --- a/charts/oai-5g-core/oai-5g-mini/values.yaml +++ b/charts/oai-5g-core/oai-5g-mini/values.yaml @@ -1,7 +1,9 @@ global: - nfConfigurationConfigMap: oai-5g-mini - clusterIpServiceIpAllocation: false #this will allocate ip-address to cluster Ip service + kubernetesDistribution: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes + coreNetworkConfigMap: oai-5g-mini + clusterIpServiceIpAllocation: true #this will allocate ip-address to cluster Ip service waitForNRF: true + waitForUDR: false http2Param: "--http2-prior-knowledge" # if waitForNRF is true and http2 is used for all NF then this param is needed timeout: 1 mysql: @@ -14,10 +16,9 @@ mysql: enabled: false oai-nrf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-nrf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -28,10 +29,9 @@ oai-nrf: nodeSelector: {} oai-amf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-amf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -42,22 +42,21 @@ oai-amf: defaultGateway: "" n2Interface: create: false - Ipadd: "172.21.6.94" - Netmask: "22" + ipAdd: "172.21.6.94" + netmask: "22" # #name inside the pod is hardcoded right now # name: "n2" ## If you do not have a gateway leave the field empty - Gateway: + gateway: ## If you do not want to add any routes in your pod then leave this field empty routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled nodeSelector: {} oai-upf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-upf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -71,66 +70,73 @@ oai-upf: defaultGateway: "" n3Interface: create: false - Ipadd: "172.21.8.95" - Netmask: "22" + ipAdd: "172.21.8.95" + netmask: "22" # #name inside the pod is hardcoded right now # name: "n3" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you don't want to add a default route in your pod then replace this field with "" routes: [{'dst': '10.8.0.0/24','gw': '172.21.11.254'}, {'dst': '10.9.0.0/24','gw': '172.21.11.254'}] hostInterface: "bond0" ## For n4 it is better to re-use eth0 interface inside the pod (primary CNI of Kubernetes) n4Interface: create: false - Ipadd: "192.168.24.2" - Netmask: "24" + ipAdd: "192.168.24.2" + netmask: "24" # #name inside the pod is hardcoded right now # name: "n4" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: "" hostInterface: "bond0" n6Interface: create: false - Ipadd: "192.168.22.2" + ipAdd: "192.168.22.2" # #name inside the pod is hardcoded right now # name: "n6" - Netmask: "24" + netmask: "24" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: "" hostInterface: "bond0" #NOTE: If the interface you selected for n6If is wrong then traffic will not be routed towards internet nodeSelector: {} -#oai-traffic-server: -# enabled: false -# weight: 6 -# kubernetesType: Vanilla -# trafficServer: -# repository: docker.io/oaisoftwarealliance/trf-gen-cn5g -# version: latest -# #pullPolicy: IfNotPresent or Never or Always -# pullPolicy: IfNotPresent -# #Without multus traffic server won't be able to forward packets to spgwu if can't use server then add an extra container in spgwu with iperf3 or install iperf3 package in tcpdump container -# multus: -# create: true -# IPadd: "172.21.6.99" -# Netmask: "22" -# defaultGateway: "172.21.7.254" -# hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled -# config: -# ueroute: 12.1.1.0/24 -# upfIpadd: 172.21.6.95 -# noOfIperf3Server: 10 +oai-traffic-server: + enabled: true + trafficServer: + repository: docker.io/oaisoftwarealliance/trf-gen-cn5g + version: latest + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + multus: + create: false + ipAdd: "172.21.6.12" + netmask: "22" + defaultGateway: "172.21.7.254" + hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled + config: + ueroute: 12.1.1.0/24 + upfHost: oai-upf + routeInterface: eth0 + noOfIperf3Server: 2 + resources: + define: false + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + nodeSelector: {} + nodeName: "" oai-smf: enabled: true - kubernetesType: Vanilla #Openshift/Vanilla Vanilla for Upstream Kubernetes nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-smf ## The image will be pulled from dockerhub - version: v2.0.1 ## The branch to be used to pull from dockerhub + version: v2.1.0 ## The branch to be used to pull from dockerhub # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent includeTcpDumpContainer: false #only for taking pcaps inside network function pod @@ -139,14 +145,14 @@ oai-smf: defaultGateway: "" n4Interface: create: false - Ipadd: "192.168.24.3" - Netmask: "24" + ipAdd: "192.168.24.3" + netmask: "24" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" nodeSelector: {} imagePullSecrets: - name: "regcred" - nodeSelector: {} \ No newline at end of file + nodeSelector: {} diff --git a/charts/oai-5g-core/oai-amf/Chart.yaml b/charts/oai-5g-core/oai-amf/Chart.yaml index 7a7b35584a1cbb881e296e460b81a9132abb094c..a40a8adddb4d715d926450096210d69b983e7ee4 100644 --- a/charts/oai-5g-core/oai-amf/Chart.yaml +++ b/charts/oai-5g-core/oai-amf/Chart.yaml @@ -26,9 +26,9 @@ type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5GCN @@ -41,4 +41,4 @@ sources: maintainers: - name: OPENAIRINTERFACE - email: contact@openairinterface.org \ No newline at end of file + email: contact@openairinterface.org diff --git a/charts/oai-5g-core/oai-amf/README.md b/charts/oai-5g-core/oai-amf/README.md index b5c79153efb581f9902d453043dde87b2e9abd29..678b57f84f9ce860350a4c548e5164e5ab60da37 100644 --- a/charts/oai-5g-core/oai-amf/README.md +++ b/charts/oai-5g-core/oai-amf/README.md @@ -1,6 +1,7 @@ # Helm Chart for OAI Access and Mobility Function (AMF) -The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12 and 4.13 There are no special resource requirements for AMF. +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. + **NOTE**: All the extra interfaces/multus interfaces created inside the pod are using `macvlan` mode. If your environment does not allow using `macvlan` then you need to change the multus definition. @@ -12,7 +13,7 @@ Starting version 2.0.0 of OAI 5G Core network functions their configuration will OAI-AMF follows 3GPP release 16, more information about the feature set can be found on [AMFs WiKi page](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf/-/wikis/home). The source code be downloaded from [GitLab](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf) -OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-AMF/) publishes every `develop` and `master` branch image of OAI-AMF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-amf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 20.04/22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-AMF/) publishes every `develop` and `master` branch image of OAI-AMF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-amf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-AMF creates multiples Kubernetes resources, @@ -47,25 +48,29 @@ The directory structure [Values.yaml](./values.yaml) contains all the configurable parameters. Below table defines the configurable parameters. -|Parameter |Allowed Values |Remark | -|-----------------------------|-------------------------------|-----------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | -|nfimage.repository |Image Name | | -|nfimage.version |Image tag | | -|nfimage.pullPolicy |IfNotPresent or Never or Always| | -|imagePullSecrets.name |String |Good to use for docker hub | -|serviceAccount.create |true/false | | -|serviceAccount.annotations |String | | -|serviceAccount.name |String | | -|exposedPorts.sctp |Integer |SCTP port to be exposed | -|exposedPorts.http |Integer |HTTP port to be exposed | -|podSecurityContext.runAsUser |Integer (0,65534) |Mandatory to use 0 | -|podSecurityContext.runAsGroup|Integer (0,65534) |Mandatory to use 0 | -|multus.create |true/false |default false | -|multus.n2IPadd |IPV4 |NA | -|multus.n2Netmask |Netmask |NA | -|multus.defaultGateway |IPV4 |Default route inside container (optional)| -|multus.hostInterface |HostInterface Name |NA | +| +|Parameter |Allowed Values |Remark | +|------------------------------------|-------------------------------|-----------------------------------------| +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|nfimage.repository |Image Name | | +|nfimage.version |Image tag | | +|nfimage.pullPolicy |IfNotPresent or Never or Always| | +|imagePullSecrets.name |String |Good to use for docker hub | +|serviceAccount.create |true/false | | +|serviceAccount.annotations |String | | +|serviceAccount.name |String | | +|exposedPorts.sctp |Integer |SCTP port to be exposed | +|exposedPorts.http |Integer |HTTP port to be exposed | +|podSecurityContext.runAsUser |Integer (0,65534) |Mandatory to use 0 | +|podSecurityContext.runAsGroup |Integer (0,65534) |Mandatory to use 0 | +|multus.n2Interface.create |true/false |default false | +|multus.n2Interface.ipAdd |IPV4 |NA | +|multus.n2Interface.netmask |netmask |NA | +|multus.n2Interface.gateway(optional)|netmask |NA | +|multus.n2Interface.name (optional) |Interface name inside container|NA | +|multus.n2Interface.routes (optional)|Routes |NA | +|multus.defaultGateway |IPV4 |Default route inside container (optional)| +|multus.hostInterface |HostInterface Name |NA | ## Advanced Debugging Parameters @@ -108,4 +113,4 @@ Better to use the parent charts from: ## Note 1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. -2. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [presistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. \ No newline at end of file +2. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [persistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-amf/templates/_helpers.tpl b/charts/oai-5g-core/oai-amf/templates/_helpers.tpl index c073003e5f5a74a5467850704b34efdc71dc88df..a35cfcfc40a31c86691cb1bf2a5319f342b6b780 100644 --- a/charts/oai-5g-core/oai-amf/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-amf/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-amf.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-amf.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-amf.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-amf/templates/deployment.yaml b/charts/oai-5g-core/oai-amf/templates/deployment.yaml index fe622b4a4279101258492414007463811cbc9cef..615c595bb0fa0b5bab3e50a9cc6d61ce513c753b 100644 --- a/charts/oai-5g-core/oai-amf/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-amf/templates/deployment.yaml @@ -19,13 +19,13 @@ spec: annotations: k8s.v1.cni.cncf.io/networks: >- [{ - "name": "{{ .Chart.Name }}-n2", - "interface": "n2" + "name": "{{ .Chart.Name }}-{{ .Values.multus.n2Interface.name }}", + "interface": "{{ .Values.multus.n2Interface.name }}" {{- if .Values.multus.defaultGateway }} ,"default-route": ["{{ .Values.multus.defaultGateway }}"] {{- end }} - {{- if .Values.multus.n2Interface.Gateway }} - ,"gateway": "{{ .Values.multus.n2Interface.Gateway }}" + {{- if .Values.multus.n2Interface.gateway }} + ,"gateway": "{{ .Values.multus.n2Interface.gateway }}" {{- end }} }] {{- end }} @@ -39,12 +39,35 @@ spec: {{- if .Values.global }}{{ if .Values.global.waitForNRF }} initContainers: - name: init - image: docker.io/alpine/curl:3.14 + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 imagePullPolicy: IfNotPresent - command: + command: - /bin/sh - -c - until curl --connect-timeout {{ .Values.global.timeout }} --head -X GET http://oai-nrf/nnrf-nfm/v1/nf-instances?nf-type='NRF' {{ .Values.global.http2Param }}; do echo waiting for oai-nrf; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m + {{ if .Values.global.waitForUDR }} + - name: init-udr + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - until ncat -zv {{ .Values.config.udrHost }} 80 ; do echo waiting for oai-udr to start; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m + {{ end }} {{- end }}{{ end }} containers: {{- if .Values.includeTcpDumpContainer }} @@ -71,7 +94,7 @@ spec: command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -126,11 +149,6 @@ spec: name: http protocol: TCP {{- if .Values.start.amf}} - # command: - # - /openair-amf/bin/oai_amf - # - -c - # - /openair-amf/etc/conf.yaml - # - -o {{- else}} command: - /bin/sleep @@ -146,17 +164,17 @@ spec: {{- end }} - configMap: {{- if .Values.global }} - name: {{ .Values.global.nfConfigurationConfigMap }} + name: {{ .Values.global.coreNetworkConfigMap }} {{- else }} name: {{ .Chart.Name }}-configmap {{- end }} name: configuration dnsPolicy: ClusterFirst restartPolicy: Always - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} - nodeSelector: + nodeSelector: {{- toYaml .Values.nodeSelector | nindent 12 }} {{- end }} {{- if .Values.nodeName}} diff --git a/charts/oai-5g-core/oai-amf/templates/multus.yaml b/charts/oai-5g-core/oai-amf/templates/multus.yaml index beef1679d9f32b486178c33545308013106fa1f0..11f9440d4601e66c8c44e7cc585f64f6cb91dbd9 100644 --- a/charts/oai-5g-core/oai-amf/templates/multus.yaml +++ b/charts/oai-5g-core/oai-amf/templates/multus.yaml @@ -14,7 +14,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n2Interface.Ipadd "/" .Values.multus.n2Interface.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.n2Interface.ipAdd "/" .Values.multus.n2Interface.netmask | nospace | quote }} } ] {{- if .Values.multus.n2Interface.routes }} diff --git a/charts/oai-5g-core/oai-amf/templates/rbac.yaml b/charts/oai-5g-core/oai-amf/templates/rbac.yaml index e218d4fcd61c95de8f1aea047c38b3b0a4c81ade..4c81270327d5a3ba5fc917adf1756ca7ea44075c 100644 --- a/charts/oai-5g-core/oai-amf/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-amf/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -25,7 +25,7 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role diff --git a/charts/oai-5g-core/oai-amf/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-amf/templates/serviceaccount.yaml index 21c813d6a41f817b3c4eda3770cf4f86da0634ed..374f5f8223ec3ba33545d045a13a842eea99eb61 100644 --- a/charts/oai-5g-core/oai-amf/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-amf/templates/serviceaccount.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-amf/values.yaml b/charts/oai-5g-core/oai-amf/values.yaml index 15298bcd3ca45694c3c689bc7acf6b782afead92..5dad11726d560eec38ad9264d3b8039ef8842200 100644 --- a/charts/oai-5g-core/oai-amf/values.yaml +++ b/charts/oai-5g-core/oai-amf/values.yaml @@ -1,23 +1,22 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-amf ## The image will be pulled from dockerhub - version: v2.0.1 #image tag, develop tag for experimental features + version: develop #image tag, develop tag for experimental features # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent ## good to use when pulling images from docker-hub mention -imagePullSecrets: - - name: "regcred" +#imagePullSecrets: +# - name: "regcred" serviceAccount: # Specifies whether a service account should be created create: true # Annotations to add to the service account annotations: {} - name: "oai-amf-sa" exposedPorts: sctp: 38412 @@ -28,10 +27,10 @@ podSecurityContext: runAsUser: 0 runAsGroup: 0 -# AMF needs two seperate interface one for http (for SBI) and other one for SCTP (N1/N2) to communicate with gNB. +# AMF needs two separate interface one for http (for SBI) and other one for SCTP (N1/N2) to communicate with gNB. # But for experimentation only one interface can be used. # When you need multus: -# 1. you want seperate interface for N1/N2 and Namf +# 1. you want separate interface for N1/N2 and Namf # 2. Your gnB is outside the cluster and the host machine can communicate but pods can not then you can provide ip-address in the same range as your host machine # 3. You want static ip-address for N1/N2 interface, Namf can be discovered by its service name @@ -41,12 +40,13 @@ multus: defaultGateway: "172.21.7.254" n2Interface: create: false - Ipadd: "172.21.6.94" - Netmask: "22" + ipAdd: "172.21.6.94" + netmask: "22" ## If you do not have a gateway leave the field empty - Gateway: + gateway: ## If you do not want to add any routes in your pod then leave this field empty routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}] + name: 'n2' hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled ## Incase the pod is not able to resolve the FQDN of other network @@ -59,17 +59,19 @@ start: includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent #To store PCAP of NF in a sharedVolume so it can be easily fetched (PVC is created with NRF charts so make sure in NRF it is true) persistent: sharedvolume: false +config: + udrHost: oai-udr + ## NF is the network function and tcpdump is the tcpdump container. ## To know more about request and limit it is better to understand that how Kubernetes QoS works. ## https://kubernetes.io/docs/concepts/configuration/manage-resources-containers @@ -101,4 +103,4 @@ terminationGracePeriodSeconds: 5 nodeSelector: {} -nodeName: \ No newline at end of file +nodeName: diff --git a/charts/oai-5g-core/oai-ausf/Chart.yaml b/charts/oai-5g-core/oai-ausf/Chart.yaml index c5f4fc9730d261bbc73db5a58132efe14ddebfc7..fb44b6ba55a806913a244d17a26b25b3086b3760 100644 --- a/charts/oai-5g-core/oai-ausf/Chart.yaml +++ b/charts/oai-5g-core/oai-ausf/Chart.yaml @@ -26,9 +26,9 @@ type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5GCN diff --git a/charts/oai-5g-core/oai-ausf/README.md b/charts/oai-5g-core/oai-ausf/README.md index 206eb5c2795a2515820f2bf1e52d2f5f7f92f24a..bbe3223ea5c32f46b26659fef973b163f275b39a 100644 --- a/charts/oai-5g-core/oai-ausf/README.md +++ b/charts/oai-5g-core/oai-ausf/README.md @@ -1,6 +1,7 @@ # Helm Chart for OAI Authentication Server Function (AUSF) -The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12 and 4.13. There are no special resource requirements for AUSF. +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. + ## Disclaimer @@ -10,7 +11,7 @@ Starting version 2.0.0 of OAI 5G Core network functions their configuration will OAI-AUSF follows 3GPP release 16, more information about the feature set can be found on [AUSFs WiKi page](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-ausf/-/wikis/home). The source code be downloaded from [GitLab](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-ausf) -OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-AUSF/) publishes every `develop` and `master` branch image of OAI-AMF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-amf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 18.04/20.04/22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-AUSF/) publishes every `develop` and `master` branch image of OAI-AMF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-amf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-AUSF creates multiples Kubernetes resources, @@ -43,7 +44,7 @@ The directory structure |Parameter |Allowed Values |Remark | |-----------------------------|-------------------------------|-----------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -93,4 +94,4 @@ Better to use the parent charts from: ## Note -1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [presistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. \ No newline at end of file +1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [persistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-ausf/templates/_helpers.tpl b/charts/oai-5g-core/oai-ausf/templates/_helpers.tpl index 6f5c1a8e16522d19a466ae5cb9feb5dcec03923d..b9163492d034070f2d7712494fafc97f9c00d879 100644 --- a/charts/oai-5g-core/oai-ausf/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-ausf/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-ausf.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-ausf.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-ausf.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-ausf/templates/deployment.yaml b/charts/oai-5g-core/oai-ausf/templates/deployment.yaml index dfc94a9a4b7d5eb87b662539d80d233f383251cf..01d88b4270461a07174a869102817f4ba99d7283 100644 --- a/charts/oai-5g-core/oai-ausf/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-ausf/templates/deployment.yaml @@ -25,12 +25,19 @@ spec: {{- if .Values.global }}{{ if .Values.global.waitForNRF }} initContainers: - name: init - image: docker.io/alpine/curl:3.14 + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - until curl --connect-timeout {{ .Values.global.timeout }} --head -X GET http://oai-nrf/nnrf-nfm/v1/nf-instances?nf-type='NRF' {{ .Values.global.http2Param }}; do echo waiting for oai-nrf; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m {{- end }}{{ end }} containers: {{- if .Values.includeTcpDumpContainer }} @@ -57,7 +64,7 @@ spec: command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -122,7 +129,7 @@ spec: volumes: - configMap: {{- if .Values.global }} - name: {{ .Values.global.nfConfigurationConfigMap }} + name: {{ .Values.global.coreNetworkConfigMap }} {{- else }} name: {{ .Chart.Name }}-configmap {{- end }} @@ -137,7 +144,7 @@ spec: dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} nodeSelector: diff --git a/charts/oai-5g-core/oai-ausf/templates/rbac.yaml b/charts/oai-5g-core/oai-ausf/templates/rbac.yaml index e218d4fcd61c95de8f1aea047c38b3b0a4c81ade..4c81270327d5a3ba5fc917adf1756ca7ea44075c 100644 --- a/charts/oai-5g-core/oai-ausf/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-ausf/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -25,7 +25,7 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role diff --git a/charts/oai-5g-core/oai-ausf/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-ausf/templates/serviceaccount.yaml index 21c813d6a41f817b3c4eda3770cf4f86da0634ed..374f5f8223ec3ba33545d045a13a842eea99eb61 100644 --- a/charts/oai-5g-core/oai-ausf/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-ausf/templates/serviceaccount.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-ausf/values.yaml b/charts/oai-5g-core/oai-ausf/values.yaml index 71a47b7cee9521e057559f8d9e6b9684bbb08b15..8faf6040c406e3050fc74bf9d6766fce2e8f5add 100644 --- a/charts/oai-5g-core/oai-ausf/values.yaml +++ b/charts/oai-5g-core/oai-ausf/values.yaml @@ -1,16 +1,16 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: repository: docker.io/oaisoftwarealliance/oai-ausf ## oaisoftwarealliance/oai-ausf # image name either locally present or in a public/private repository - version: v2.0.1 #image tag, develop tag for experimental features + version: develop #image tag, develop tag for experimental features #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent ## good to use when pulling images from docker-hub mention -imagePullSecrets: - - name: "regcred" +# imagePullSecrets: +# - name: "regcred" serviceAccount: # Specifies whether a service account should be created @@ -37,10 +37,9 @@ start: includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent @@ -80,4 +79,4 @@ terminationGracePeriodSeconds: 5 nodeSelector: {} -nodeName: \ No newline at end of file +nodeName: diff --git a/charts/oai-5g-core/oai-lmf/Chart.yaml b/charts/oai-5g-core/oai-lmf/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b0188c01023dee004833c1feaf3f81b09b0085e8 --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/Chart.yaml @@ -0,0 +1,44 @@ +################################################################################ +# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The OpenAirInterface Software Alliance licenses this file to You under +# the OAI Public License, Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.openairinterface.org/?page_id=698 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------------------------------------- +# For more information about the OpenAirInterface (OAI) Software Alliance: +# contact@openairinterface.org +################################################################################ +apiVersion: v2 +name: oai-lmf +description: A Helm chart for NRF network function + +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +version: v2.1.0 + +appVersion: v2.1.0 + +keywords: + - 5GCN + - NRF + +sources: + - https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-lmf + - https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed + - https://openairinterface.org/ + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/oai-5g-core/oai-lmf/README.md b/charts/oai-5g-core/oai-lmf/README.md new file mode 100644 index 0000000000000000000000000000000000000000..159d220b96dc8ed7160635165e06e5277abdce03 --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/README.md @@ -0,0 +1,105 @@ +# Helm Chart for OAI Location Management Function (LMF) + +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. + + +## Disclaimer + +Starting version 2.0.0 of OAI 5G Core network functions their configuration will be in `config.yaml` and all infrastructure related information including image definition will be in `values.yaml`. + +## Introduction + +OAI-LMF follows 3GPP release 16, more information about the feature set can be found on [LMFs WiKi page](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-lmf/-/wikis/home). The source code be downloaded from [GitLab](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-lmf) + +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-LMF/) publishes every `develop` and `master` branch image of OAI-LMF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-lmf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. + +The helm chart of OAI-LMF creates multiples Kubernetes resources, + +1. Service +2. Role Base Access Control (RBAC) (role and role bindings) +3. Deployment +4. Configmap (Contains mounted configuration file of LMF) +5. Service account +6. PVC (optional only when enabled): It is used for saving pcaps. + +The directory structure + +``` +├── Chart.yaml +├── templates +│  ├── configmap.yaml +│  ├── deployment.yaml +│  ├── _helpers.tpl +│  ├── NOTES.txt +│  ├── pvc.yaml (optional only when enabled): It is used for saving pcaps. +│  ├── rbac.yaml +│  ├── serviceaccount.yaml +│  └── service.yaml +├── config.yaml (Configuration of the network function) +└── values.yaml + +1 directory, 10 files +``` + +## Parameters + +[Values.yaml](./values.yaml) contains all the configurable parameters. Below table defines the configurable parameters. + + +|Parameter |Allowed Values |Remark | +|-----------------------------|-------------------------------|-----------------------------------------| +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|nfimage.repository |Image Name | | +|nfimage.version |Image tag | | +|nfimage.pullPolicy |IfNotPresent or Never or Always| | +|imagePullSecrets.name |String |Good to use for docker hub | +|serviceAccount.create |true/false | | +|serviceAccount.annotations |String | | +|serviceAccount.name |String | | +|podSecurityContext.runAsUser |Integer (0,65534) |Mandatory to use 0 | +|podSecurityContext.runAsGroup|Integer (0,65534) |Mandatory to use 0 | + + +Only needed if you are doing advanced debugging + + +|Parameter |Allowed Values |Remark | +|---------------------------------|-------------------------------|----------------------------------------------| +|start.lmf |true/false |If true lmf container will go in sleep mode | +|start.tcpdump |true/false |If true tcpdump container will go in sleepmode| +|includeTcpDumpContainer |true/false |If false no tcpdump container will be there | +|tcpdumpimage.repository |Image Name | | +|tcpdumpimage.version |Image tag | | +|tcpdumpimage.pullPolicy |IfNotPresent or Never or Always| | +|persistent.sharedvolume |true/false |Save the pcaps in a shared volume with LMF | +|persistent.storageClass |String |Storage class else default SC of your cluster will be used| +|persistent.size |In Gi/Mi |Size of PVC | +|resources.define |true/false | | +|resources.limits.tcpdump.cpu |string |Unit m for milicpu or cpu | +|resources.limits.tcpdump.memory |string |Unit Mi/Gi/MB/GB | +|resources.limits.nf.cpu |string |Unit m for milicpu or cpu | +|resources.limits.nf.memory |string |Unit Mi/Gi/MB/GB | +|resources.requests.tcpdump.cpu |string |Unit m for milicpu or cpu | +|resources.requests.tcpdump.memory|string |Unit Mi/Gi/MB/GB | +|resources.requests.nf.cpu |string |Unit m for milicpu or cpu | +|resources.requests.nf.memory |string |Unit Mi/Gi/MB/GB | +|readinessProbe |true/false |default true | +|livenessProbe |true/false |default false | +|terminationGracePeriodSeconds |5 |In seconds (default 5) | +|nodeSelector |Node label | | +|nodeName |Node Name | | + + +## Installation + +Better to use the parent charts from: + +1. [oai-5g-basic](../oai-5g-basic/README.md) for basic deployment of OAI-5G Core + +```bash +helm install oai-lmf . +``` + +## Note + +1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and configure the storage class. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-lmf/config.yaml b/charts/oai-5g-core/oai-lmf/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a2333d4aa47dceb2ab109cb740cc1da2f9b754ba --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/config.yaml @@ -0,0 +1,118 @@ +# OAI CN Configuration File +### This file can be used by all OAI NFs +### Some fields are specific to an NF and will be ignored by other NFs + +## NOTE ON YAML ANCHORS ## +# We use YAML anchors to ease the configuration and to avoid duplicating parts of the configuration. +# This is especially true for the SNSSAIs, as we have to define them for multiple NFs. +# Please note that the use of anchors is not mandatory, and you can define the SNSSAI in each NF yourself. +# You can read more about anchors here: https://yaml.org/spec/1.2.2/#anchors-and-aliases + +############# Common configuration + +# Log level for all the NFs +log_level: + general: debug + +# If you enable registration, the other NFs will use the NRF discovery mechanism +register_nf: + general: no + +http_version: 2 + +## general single_nssai configuration +## Defines YAML anchors, which are reused in the config file +snssais: + - &embb_slice1 + sst: 1 + - &embb_slice2 + sst: 1 + sd: 000001 # in hex + +############## SBI Interfaces +### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms +nfs: + lmf: + host: oai-lmf + sbi: + port: 80 + api_version: v1 + interface_name: eth0 + amf: + host: oai-amf + sbi: + port: 80 + api_version: v1 + nrf: + host: oai-nrf + sbi: + port: 80 + api_version: v1 + +############### LMF Configuration +lmf: + http_threads_count: 8 + gnb_id_bits_count: 28 + num_gnb: 1 + trp_info_wait_ms: 10000 + positioning_wait_ms: 10000 + measurement_wait_ms: 10000 + support_features: + request_trp_info: no + determine_num_gnb: yes + use_http2: yes + use_fqdn_dns: no + register_nrf: yes + +############## NF-specific configuration +smf: + ue_mtu: 1500 + support_features: + use_local_subscription_info: yes # Use infos from local_subscription_info or from UDM + use_local_pcc_rules: yes # Use infos from local_pcc_rules or from PCF + discover_upf: yes + # we resolve from NRF, this is just to configure usage_reporting + upfs: + - host: oai-upf + config: + enable_usage_reporting: no + ue_dns: + primary_ipv4: "10.3.2.200" + primary_ipv6: "2001:4860:4860::8888" + secondary_ipv4: "8.8.8.8" + secondary_ipv6: "2001:4860:4860::8888" + ims: + pcscf_ipv4: "192.168.70.139" + pcscf_ipv6: "fe80::7915:f408:1787:db8b" + # the DNN you configure here should be configured in "dnns" + # follows the SmfInfo datatype from 3GPP TS 29.510 + smf_info: + sNssaiSmfInfoList: + - sNssai: *embb_slice1 + dnnSmfInfoList: + - dnn: "oai" + - sNssai: *embb_slice2 + dnnSmfInfoList: + - dnn: "ims" + local_subscription_infos: + - single_nssai: *embb_slice1 + dnn: "oai" + qos_profile: + 5qi: 5 + session_ambr_ul: "200Mbps" + session_ambr_dl: "400Mbps" + - single_nssai: *embb_slice2 + dnn: "ims" + qos_profile: + 5qi: 2 + session_ambr_ul: "100Mbps" + session_ambr_dl: "200Mbps" + +## DNN configuration +dnns: + - dnn: "oai" + pdu_session_type: "IPV4" + ipv4_subnet: "12.1.1.0/24" + - dnn: "ims" + pdu_session_type: "IPV4V6" + ipv4_subnet: "14.1.1.0/24" diff --git a/charts/oai-5g-core/oai-lmf/templates/NOTES.txt b/charts/oai-5g-core/oai-lmf/templates/NOTES.txt new file mode 100644 index 0000000000000000000000000000000000000000..1da88670a931d555b87a24faa420566efea13315 --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/templates/NOTES.txt @@ -0,0 +1,3 @@ +1. Get the application name and service bus ip-address by running these commands: +export NRF_POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-lmf.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +export NRF_SBI=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-lmf.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[*].status.podIP}") \ No newline at end of file diff --git a/charts/oai-5g-core/oai-lmf/templates/_helpers.tpl b/charts/oai-5g-core/oai-lmf/templates/_helpers.tpl new file mode 100644 index 0000000000000000000000000000000000000000..ea91c6ded23f2cbedd634ff666c3c0990a848b8c --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-lmf.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-lmf.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-lmf.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-lmf.labels" -}} +helm.sh/chart: {{ include "oai-lmf.chart" . }} +{{ include "oai-lmf.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-lmf.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-lmf.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-lmf.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-lmf.fullname" .) .Chart.Name }} +{{- else -}} + {{ default "default" .Chart.Name }} +{{- end -}} +{{- end -}} diff --git a/charts/oai-5g-core/oai-lmf/templates/configmap.yaml b/charts/oai-5g-core/oai-lmf/templates/configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3a22fe8b4df0a8fddf1ec285a5ebbd7e3bc18687 --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/templates/configmap.yaml @@ -0,0 +1,8 @@ +{{- if not .Values.global }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Chart.Name }}-configmap +data: + {{ (.Files.Glob "config.yaml").AsConfig | indent 2 | trim }} +{{- end }} \ No newline at end of file diff --git a/charts/oai-5g-core/oai-lmf/templates/deployment.yaml b/charts/oai-5g-core/oai-lmf/templates/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8b404c80799daabf0a8e83fac301b3945458116f --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/templates/deployment.yaml @@ -0,0 +1,143 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-lmf.labels" . | nindent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + {{- include "oai-lmf.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-lmf.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} + {{- if .Values.global }}{{ if .Values.global.waitForNRF }} + initContainers: + - name: init + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - until curl --connect-timeout {{ .Values.global.timeout }} --head -X GET http://oai-nrf/nnrf-nfm/v1/nf-instances?nf-type='NRF' {{ .Values.global.http2Param }}; do echo waiting for oai-nrf; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m + {{- end }}{{ end }} + containers: + {{- if .Values.includeTcpDumpContainer }} + - name: tcpdump + image: "{{ .Values.tcpdumpimage.repository }}:{{ .Values.tcpdumpimage.version }}" + imagePullPolicy: {{ .Values.tcpdumpimage.pullPolicy }} + {{- if .Values.resources.define}} + resources: + requests: + memory: {{ .Values.resources.requests.tcpdump.memory | quote }} + cpu: {{ .Values.resources.requests.tcpdump.cpu | quote }} + limits: + memory: {{ .Values.resources.limits.tcpdump.memory | quote }} + cpu: {{ .Values.resources.limits.tcpdump.cpu | quote }} + {{- end}} + securityContext: + privileged: true + capabilities: + add: + - NET_ADMIN + drop: + - ALL + {{- if .Values.start.tcpdump}} + command: + - /bin/sh + - -c + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + {{- else}} + command: + - /bin/sleep + - infinity + {{- end}} + {{- if .Values.includeTcpDumpContainer}} + {{- if .Values.persistent.sharedvolume}} + volumeMounts: + - mountPath: "/tmp/pcap" + name: cn5g-pvc + {{- end}} + {{- end}} + {{- end }} + - name: lmf + image: "{{ .Values.nfimage.repository }}:{{ .Values.nfimage.version }}" + volumeMounts: + - mountPath: /openair-lmf/etc + name: configuration + imagePullPolicy: {{ .Values.nfimage.pullPolicy }} + {{- if .Values.resources.define}} + resources: + requests: + memory: {{ .Values.resources.requests.nf.memory | quote }} + cpu: {{ .Values.resources.requests.nf.cpu | quote }} + limits: + memory: {{ .Values.resources.limits.nf.memory | quote }} + cpu: {{ .Values.resources.limits.nf.cpu | quote }} + {{- end}} + {{- if .Values.readinessProbe}} + readinessProbe: + exec: + command: + - /bin/bash + - /openair-lmf/bin/healthcheck.sh + initialDelaySeconds: 2 + periodSeconds: 2 + {{- end}} + {{- if .Values.livenessProbe}} + livenessProbe: + exec: + command: + - /bin/bash + - /openair-lmf/bin/healthcheck.sh + initialDelaySeconds: 15 + periodSeconds: 5 + {{- end}} + ports: + - containerPort: {{ .Values.exposedPorts.sbi }} + name: http + protocol: TCP + volumes: + {{- if .Values.includeTcpDumpContainer}} + {{- if .Values.persistent.sharedvolume}} + - name: cn5g-pvc + persistentVolumeClaim: + claimName: cn5g-pvc + {{- end }} + {{- end }} + - configMap: + {{- if .Values.global }} + name: {{ .Values.global.coreNetworkConfigMap }} + {{- else }} + name: {{ .Chart.Name }}-configmap + {{- end }} + name: configuration + dnsPolicy: ClusterFirst + restartPolicy: Always + serviceAccountName: {{ .Chart.Name }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- if .Values.nodeSelector}} + nodeSelector: + {{- toYaml .Values.nodeSelector | nindent 12 }} + {{- end }} + {{- if .Values.nodeName}} + nodeName: {{ .Values.nodeName }} + {{- end }} diff --git a/charts/oai-5g-core/oai-lmf/templates/rbac.yaml b/charts/oai-5g-core/oai-lmf/templates/rbac.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4c81270327d5a3ba5fc917adf1756ca7ea44075c --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/templates/rbac.yaml @@ -0,0 +1,34 @@ +--- +{{- if eq .Values.kubernetesDistribution "Openshift" }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role +rules: +- apiGroups: + - security.openshift.io +{{- if .Values.includeTcpDumpContainer }} + resourceNames: + - privileged +{{- else }} + resourceNames: + - anyuid +{{- end }} + resources: + - securitycontextconstraints + verbs: + - use +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding +subjects: +- kind: ServiceAccount + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: Role + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role + apiGroup: rbac.authorization.k8s.io +{{- end }} diff --git a/charts/oai-5g-core/oai-lmf/templates/service.yaml b/charts/oai-5g-core/oai-lmf/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2ef01834ba6e8bc58c709f2d446c38d40366a21d --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-lmf.labels" . | nindent 4 }} +spec: + type: ClusterIP + {{- if .Values.global }}{{ if not .Values.global.clusterIpServiceIpAllocation }} + clusterIP: None + {{- end }}{{ end }} + ports: + - name: http + # Port accessible outside cluster + port: {{ .Values.exposedPorts.sbi }} + # Port to forward config inside the pod + targetPort: {{ .Values.exposedPorts.sbi }} + protocol: TCP + selector: + {{- include "oai-lmf.selectorLabels" . | nindent 4 }} diff --git a/charts/oai-5g-core/oai-lmf/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-lmf/templates/serviceaccount.yaml new file mode 100644 index 0000000000000000000000000000000000000000..374f5f8223ec3ba33545d045a13a842eea99eb61 --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/templates/serviceaccount.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-lmf/values.yaml b/charts/oai-5g-core/oai-lmf/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3467e5f5ef626004a11b211199ac0fe83a70bd62 --- /dev/null +++ b/charts/oai-5g-core/oai-lmf/values.yaml @@ -0,0 +1,79 @@ +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift + +## In case of using these charts on Openshift then please use UBI images +## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift +nfimage: + repository: docker.io/oaisoftwarealliance/oai-lmf + version: develop #image tag, develop tag for experimental features + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + +## good to use when pulling images from docker-hub mention +# imagePullSecrets: +# - name: "regcred" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-lmf-sa" + +#service type is fixed to clusterIP, it is only support for non multus interface (eth0) + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +exposedPorts: + sbi: 80 + +## Debugging section +start: + lmf: true #If false the network function container will run in sleep mode for manually testing + tcpdump: false + +includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging + +tcpdumpimage: + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + +# To store PCAP of NF in a sharedVolume so it can be easily fetched +persistent: + sharedvolume: false + +## NF is the network function and tcpdump is the tcpdump container. +## To know more about request and limit it is better to understand that how Kubernetes QoS works. +## https://kubernetes.io/docs/concepts/configuration/manage-resources-containers +## https://kubernetes.io/docs/concepts/workloads/pods/pod-qos +resources: + define: false + limits: + nf: + cpu: 100m + memory: 128Mi + #If tcpdump container is disabled this value will not be used + tcpdump: + cpu: 100m + memory: 128Mi + requests: + nf: + cpu: 100m + memory: 128Mi + #If tcpdump container is disabled this value will not be used + tcpdump: + cpu: 100m + memory: 128Mi + +readinessProbe: true + +livenessProbe: false + +terminationGracePeriodSeconds: 5 + +nodeSelector: {} + +nodeName: diff --git a/charts/oai-5g-core/oai-nrf/Chart.yaml b/charts/oai-5g-core/oai-nrf/Chart.yaml index 4ce8d0ac2d25ea6826d5a06bd7e4b0d5e8642500..1c6f72cd1597809c2db603cf0a7e0d76287ae618 100644 --- a/charts/oai-5g-core/oai-nrf/Chart.yaml +++ b/charts/oai-5g-core/oai-nrf/Chart.yaml @@ -26,9 +26,9 @@ type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5GCN diff --git a/charts/oai-5g-core/oai-nrf/README.md b/charts/oai-5g-core/oai-nrf/README.md index 0fcd8ade12d8f5b05d01d5c96a693b1d270c7c1b..3e293331bf2597aa48e40055be9afe97bd0e8041 100644 --- a/charts/oai-5g-core/oai-nrf/README.md +++ b/charts/oai-5g-core/oai-nrf/README.md @@ -1,6 +1,7 @@ # Helm Chart for OAI Network Registry Function (NRF) -The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12 and 4.13 There are no special resource requirements for NRF. +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. + ## Disclaimer @@ -10,7 +11,7 @@ Starting version 2.0.0 of OAI 5G Core network functions their configuration will OAI-NRF follows 3GPP release 16, more information about the feature set can be found on [NRFs WiKi page](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf/-/wikis/home). The source code be downloaded from [GitLab](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf) -OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-NRF/) publishes every `develop` and `master` branch image of OAI-NRF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-nrf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 18.04/20.04/22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-NRF/) publishes every `develop` and `master` branch image of OAI-NRF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-nrf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-NRF creates multiples Kubernetes resources, @@ -47,7 +48,7 @@ The directory structure |Parameter |Allowed Values |Remark | |-----------------------------|-------------------------------|-----------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -64,7 +65,7 @@ Only needed if you are doing advanced debugging |Parameter |Allowed Values |Remark | |---------------------------------|-------------------------------|----------------------------------------------| -|start.ausf |true/false |If true nrf container will go in sleep mode | +|start.nrf |true/false |If true nrf container will go in sleep mode | |start.tcpdump |true/false |If true tcpdump container will go in sleepmode| |includeTcpDumpContainer |true/false |If false no tcpdump container will be there | |tcpdumpimage.repository |Image Name | | @@ -103,4 +104,4 @@ helm install oai-nrf . ## Note -1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and configure the storage class. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. \ No newline at end of file +1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and configure the storage class. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-nrf/templates/_helpers.tpl b/charts/oai-5g-core/oai-nrf/templates/_helpers.tpl index 98c007986e73f141403942a5d458dc90a82c96ee..1d15a926a3e608630ef3b01244272a79e6c239d4 100644 --- a/charts/oai-5g-core/oai-nrf/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-nrf/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-nrf.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nrf.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-nrf.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-nrf/templates/deployment.yaml b/charts/oai-5g-core/oai-nrf/templates/deployment.yaml index db482a93290dfdaf48cf4ba55d8b60552d096df7..9e6634fecd9a58b3cbc57aed217f8de366bafdf7 100644 --- a/charts/oai-5g-core/oai-nrf/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-nrf/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -101,7 +101,7 @@ spec: volumes: - configMap: {{- if .Values.global }} - name: {{ .Values.global.nfConfigurationConfigMap }} + name: {{ .Values.global.coreNetworkConfigMap }} {{- else }} name: {{ .Chart.Name }}-configmap {{- end }} @@ -115,7 +115,7 @@ spec: {{- end }} dnsPolicy: ClusterFirst restartPolicy: Always - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} nodeSelector: @@ -123,4 +123,4 @@ spec: {{- end }} {{- if .Values.nodeName}} nodeName: {{ .Values.nodeName }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/charts/oai-5g-core/oai-nrf/templates/rbac.yaml b/charts/oai-5g-core/oai-nrf/templates/rbac.yaml index e218d4fcd61c95de8f1aea047c38b3b0a4c81ade..4c81270327d5a3ba5fc917adf1756ca7ea44075c 100644 --- a/charts/oai-5g-core/oai-nrf/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-nrf/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -25,7 +25,7 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role diff --git a/charts/oai-5g-core/oai-nrf/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-nrf/templates/serviceaccount.yaml index 21c813d6a41f817b3c4eda3770cf4f86da0634ed..374f5f8223ec3ba33545d045a13a842eea99eb61 100644 --- a/charts/oai-5g-core/oai-nrf/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-nrf/templates/serviceaccount.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-nrf/values.yaml b/charts/oai-5g-core/oai-nrf/values.yaml index c43338b8fde84fc0d004f37fd455a2b2ff8e2866..38377c4e1e0ee33b9410b6230f4802a53d0febad 100644 --- a/charts/oai-5g-core/oai-nrf/values.yaml +++ b/charts/oai-5g-core/oai-nrf/values.yaml @@ -1,16 +1,16 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: repository: docker.io/oaisoftwarealliance/oai-nrf - version: v2.0.1 #image tag, develop tag for experimental features + version: develop #image tag, develop tag for experimental features # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent ## good to use when pulling images from docker-hub mention -imagePullSecrets: - - name: "regcred" +# imagePullSecrets: +# - name: "regcred" serviceAccount: # Specifies whether a service account should be created @@ -33,12 +33,11 @@ start: nrf: true #If false the network function container will run in sleep mode for manually testing tcpdump: false -includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging +includeTcpDumpContainer: true #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent diff --git a/charts/oai-5g-core/oai-nssf/Chart.yaml b/charts/oai-5g-core/oai-nssf/Chart.yaml index 083708290eaf3a03af9126a1268ca65ef5df2526..f6dce804d4f3119abc90fc29390d23171d1dfd08 100644 --- a/charts/oai-5g-core/oai-nssf/Chart.yaml +++ b/charts/oai-5g-core/oai-nssf/Chart.yaml @@ -26,9 +26,9 @@ type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5GCN diff --git a/charts/oai-5g-core/oai-nssf/README.md b/charts/oai-5g-core/oai-nssf/README.md new file mode 100644 index 0000000000000000000000000000000000000000..181d31b272c13157f6fa5a4063f596bb9c2ce50c --- /dev/null +++ b/charts/oai-5g-core/oai-nssf/README.md @@ -0,0 +1,100 @@ +# Helm Chart for OAI Authentication Server Function (LMF) + +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. + + +## Disclaimer + +Starting version 2.0.0 of OAI 5G Core network functions their configuration will be in `config.yaml` and all infrastructure related information including image definition will be in `values.yaml`. + +## Introduction + +OAI-LMF follows 3GPP release 16, more information about the feature set can be found on [NSSFs WiKi page](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nssf/-/wikis/home). The source code be downloaded from [GitLab](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nssf) + +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-LMF/) publishes every `develop` and `master` branch image of OAI-AMF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-amf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. + +The helm chart of OAI-LMF creates multiples Kubernetes resources, + +1. Service +2. Role Base Access Control (RBAC) (role and role bindings) +3. Deployment +4. Configmap (Contains the configuration file for AMF) +5. Service account + +The directory structure + +``` +├── Chart.yaml +├── README.md +├── templates +│  ├── configmap.yaml +│  ├── deployment.yaml +│  ├── _helpers.tpl +│  ├── NOTES.txt +│  ├── rbac.yaml +│  ├── serviceaccount.yaml +│  └── service.yaml +└── values.yaml (Parent file contains all the configurable parameters) +``` + +## Parameters + +[Values.yaml](./values.yaml) contains all the configurable parameters. Below table defines the configurable parameters. + + +|Parameter |Allowed Values |Remark | +|-----------------------------|-------------------------------|-----------------------------------------| +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|nfimage.repository |Image Name | | +|nfimage.version |Image tag | | +|nfimage.pullPolicy |IfNotPresent or Never or Always| | +|imagePullSecrets.name |String |Good to use for docker hub | +|serviceAccount.create |true/false | | +|serviceAccount.annotations |String | | +|serviceAccount.name |String | | +|podSecurityContext.runAsUser |Integer (0,65534) |Mandatory to use 0 | +|podSecurityContext.runAsGroup|Integer (0,65534) |Mandatory to use 0 | + + +## Advanced Debugging Parameters + +Only needed if you are doing advanced debugging + + +|Parameter |Allowed Values |Remark | +|---------------------------------|-------------------------------|----------------------------------------------| +|start.nssf |true/false |If true nssf container will go in sleep mode | +|start.tcpdump |true/false |If true tcpdump container will go in sleepmode| +|includeTcpDumpContainer |true/false |If false no tcpdump container will be there | +|tcpdumpimage.repository |Image Name | | +|tcpdumpimage.version |Image tag | | +|tcpdumpimage.pullPolicy |IfNotPresent or Never or Always| | +|persistent.sharedvolume |true/false |Save the pcaps in a shared volume with NRF | +|resources.define |true/false | | +|resources.limits.tcpdump.cpu |string |Unit m for milicpu or cpu | +|resources.limits.tcpdump.memory |string |Unit Mi/Gi/MB/GB | +|resources.limits.nf.cpu |string |Unit m for milicpu or cpu | +|resources.limits.nf.memory |string |Unit Mi/Gi/MB/GB | +|resources.requests.tcpdump.cpu |string |Unit m for milicpu or cpu | +|resources.requests.tcpdump.memory|string |Unit Mi/Gi/MB/GB | +|resources.requests.nf.cpu |string |Unit m for milicpu or cpu | +|resources.requests.nf.memory |string |Unit Mi/Gi/MB/GB | +|readinessProbe |true/false |default true | +|livenessProbe |true/false |default false | +|terminationGracePeriodSeconds |5 |In seconds (default 5) | +|nodeSelector |Node label | | +|nodeName |Node Name | | + +## Installation + +Better to use the parent charts from: + +1. [oai-5g-advance](../oai-5g-slicing/README.md) for basic deployment with NSSF extra + +``` +helm install nssf oai-nssf +``` + +## Note + +1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [persistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-nssf/templates/_helpers.tpl b/charts/oai-5g-core/oai-nssf/templates/_helpers.tpl index 83ae6576dc73606b455bc0137523a4a1033ac677..bc2f3b0e151ce3f532fc22f67bc81497e8383421 100644 --- a/charts/oai-5g-core/oai-nssf/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-nssf/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-nssf.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nssf.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-nssf.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-nssf/templates/deployment.yaml b/charts/oai-5g-core/oai-nssf/templates/deployment.yaml index cef8bbacac1217d4e95f0036de0e3973f72ac310..4d4ab53f23cad5acdc74070175b8b5ae2acfa83e 100644 --- a/charts/oai-5g-core/oai-nssf/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-nssf/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -119,7 +119,7 @@ spec: {{- end }} - configMap: {{- if .Values.global }} - name: {{ .Values.global.nfConfigurationConfigMap }} + name: {{ .Values.global.coreNetworkConfigMap }} {{- else }} name: {{ .Chart.Name }}-configmap {{- end }} @@ -127,7 +127,7 @@ spec: dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} nodeSelector: diff --git a/charts/oai-5g-core/oai-nssf/templates/rbac.yaml b/charts/oai-5g-core/oai-nssf/templates/rbac.yaml index e218d4fcd61c95de8f1aea047c38b3b0a4c81ade..4c81270327d5a3ba5fc917adf1756ca7ea44075c 100644 --- a/charts/oai-5g-core/oai-nssf/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-nssf/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -25,7 +25,7 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role diff --git a/charts/oai-5g-core/oai-nssf/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-nssf/templates/serviceaccount.yaml index 21c813d6a41f817b3c4eda3770cf4f86da0634ed..374f5f8223ec3ba33545d045a13a842eea99eb61 100644 --- a/charts/oai-5g-core/oai-nssf/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-nssf/templates/serviceaccount.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-nssf/values.yaml b/charts/oai-5g-core/oai-nssf/values.yaml index 0eb468c9c0b2f18cac612bc0c173da513d04c331..3d3a066f9d5aba196c44b910c19393a5626ec5a0 100644 --- a/charts/oai-5g-core/oai-nssf/values.yaml +++ b/charts/oai-5g-core/oai-nssf/values.yaml @@ -1,13 +1,13 @@ -kubernetesType: Vanilla # Vanilla (Community Kubernetes) or Openshift (For RedHat Openshift) +kubernetesDistribution: Vanilla # Vanilla (Community Kubernetes) or Openshift (For RedHat Openshift) nfimage: repository: docker.io/oaisoftwarealliance/oai-nssf # image name either locally present or in a public/private repository - version: v2.0.1 #image tag, develop tag for experimental features + version: develop #image tag, develop tag for experimental features #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent -imagePullSecrets: - - name: "regcred" +# imagePullSecrets: +# - name: "regcred" serviceAccount: # Specifies whether a service account should be created @@ -35,10 +35,10 @@ start: includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent #To store PCAP of NF in a sharedVolume so it can be easily fetched (PVC is created with NRF charts so make sure in NRF it is true) persistent: diff --git a/charts/oai-5g-core/oai-smf/Chart.yaml b/charts/oai-5g-core/oai-smf/Chart.yaml index 9a7b7856b07a59696252f63464905a255b45385b..9ffb5c6c5eb4940744e37e53172942fc8d3375bc 100644 --- a/charts/oai-5g-core/oai-smf/Chart.yaml +++ b/charts/oai-5g-core/oai-smf/Chart.yaml @@ -26,9 +26,9 @@ type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5G diff --git a/charts/oai-5g-core/oai-smf/README.md b/charts/oai-5g-core/oai-smf/README.md index 784e38463077bf6ff53033bf3ab1e615aa98a062..8873d140756a00f5e0f0ad78b016ddccf856eb5d 100644 --- a/charts/oai-5g-core/oai-smf/README.md +++ b/charts/oai-5g-core/oai-smf/README.md @@ -1,6 +1,7 @@ # Helm Chart for OAI Session Management Function (SMF) -The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12 and 4.13. There are no special resource requirements for SMF. +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. + **NOTE**: All the extra interfaces/multus interfaces created inside the pod are using `macvlan` mode. If your environment does not allow using `macvlan` then you need to change the multus definition. @@ -12,7 +13,7 @@ Starting version 2.0.0 of OAI 5G Core network functions their configuration will OAI-SMF follows 3GPP release 16, more information about the feature set can be found on [SMFs WiKi page](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf/-/wikis/home). The source code be downloaded from [GitLab](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf) -OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-SMF/) publishes every `develop` and `master` branch image of OAI-SMF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-smf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 18.04/20.04/22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-SMF/) publishes every `develop` and `master` branch image of OAI-SMF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-smf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-SMF creates multiples Kubernetes resources, @@ -47,26 +48,27 @@ The directory structure -|Parameter |Allowed Values |Remark | -|--------------------------------|-------------------------------|-------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | -|nfimage.repository |Image Name | | -|nfimage.version |Image tag | | -|nfimage.pullPolicy |IfNotPresent or Never or Always| | -|imagePullSecrets.name |String |Good to use for docker hub | -|serviceAccount.create |true/false | | -|serviceAccount.annotations |String | | -|serviceAccount.name |String | | -|podSecurityContext.runAsUser |Integer (0,65534) |Mandatory to use 0 | -|podSecurityContext.runAsGroup |Integer (0,65534) |Mandatory to use 0 | -|multus.create |true/false |default false | -|multus.n4Interface.create |true/false | | -|multus.n4Interface.Ipadd |Ip-Address | | -|multus.n4Interface.Netmask |Netmask | | -|multus.n4Interface.Gateway |Ip-Address | | -|multus.n4Interface.routes |Json |Routes if you want to add in your pod| -|multus.n4Interface.hostInterface|host interface |Host interface on which pod will run | -|multus.defaultGateway |Ip-Address |Default route inside pod | + +|Parameter |Allowed Values |Remark | +|------------------------------------|-------------------------------|-----------------------------------------| +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|nfimage.repository |Image Name | | +|nfimage.version |Image tag | | +|nfimage.pullPolicy |IfNotPresent or Never or Always| | +|imagePullSecrets.name |String |Good to use for docker hub | +|serviceAccount.create |true/false | | +|serviceAccount.annotations |String | | +|serviceAccount.name |String | | +|podSecurityContext.runAsUser |Integer (0,65534) |Mandatory to use 0 | +|podSecurityContext.runAsGroup |Integer (0,65534) |Mandatory to use 0 | +|multus.n4Interface.create |true/false |default false | +|multus.n4Interface.ipAdd |IPV4 |NA | +|multus.n4Interface.netmask |netmask |NA | +|multus.n4Interface.gateway(optional)|netmask |NA | +|multus.n4Interface.name (optional) |Interface name inside container|NA | +|multus.n4Interface.routes (optional)|Routes |NA | +|multus.defaultGateway |IPV4 |Default route inside container (optional)| +|multus.n4Interface.hostInterface |HostInterface Name |NA | ## Advanced Debugging Parameters @@ -109,4 +111,4 @@ Better to use the parent charts from: ## Note 1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. -2. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [presistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. \ No newline at end of file +2. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [persistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-smf/templates/_helpers.tpl b/charts/oai-5g-core/oai-smf/templates/_helpers.tpl index 0ec6219e3c59a6da9b4ca1bbe56b16e7784eaf21..2949af2a6dad8228612d84cdfcbbe882a8e948ae 100644 --- a/charts/oai-5g-core/oai-smf/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-smf/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-smf.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-smf.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-smf.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-smf/templates/deployment.yaml b/charts/oai-5g-core/oai-smf/templates/deployment.yaml index bcec9ca10662df05d3cdd88eb4d2876639045bde..3e929fcf2418f95831f8e38296f56bdb7915accd 100644 --- a/charts/oai-5g-core/oai-smf/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-smf/templates/deployment.yaml @@ -20,12 +20,12 @@ spec: k8s.v1.cni.cncf.io/networks: >- [{ "name": "{{ .Chart.Name }}-n4", - "interface": "n4" + "interface": "{{ .Values.multus.n4Interface.name }}" {{- if .Values.multus.defaultGateway }} ,"default-route": ["{{ .Values.multus.defaultGateway }}"] {{- end }} - {{- if .Values.multus.n4Interface.Gateway }} - ,"gateway": "{{ .Values.multus.n4Interface.Gateway }}" + {{- if .Values.multus.n4Interface.gateway }} + ,"gateway": "{{ .Values.multus.n4Interface.gateway }}" {{- end }} }] {{- end }} @@ -39,12 +39,19 @@ spec: {{- if .Values.global }}{{ if .Values.global.waitForNRF }} initContainers: - name: init - image: docker.io/alpine/curl:3.14 + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - until curl --connect-timeout {{ .Values.global.timeout }} --head -X GET http://oai-nrf/nnrf-nfm/v1/nf-instances?nf-type='NRF' {{ .Values.global.http2Param }}; do echo waiting for oai-nrf; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m {{- end }}{{ end }} containers: {{- if .Values.includeTcpDumpContainer }} @@ -71,7 +78,7 @@ spec: command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -132,7 +139,7 @@ spec: volumes: - configMap: {{- if .Values.global }} - name: {{ .Values.global.nfConfigurationConfigMap }} + name: {{ .Values.global.coreNetworkConfigMap }} {{- else }} name: {{ .Chart.Name }}-configmap {{- end }} @@ -146,7 +153,7 @@ spec: {{- end }} dnsPolicy: ClusterFirst restartPolicy: Always - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} nodeSelector: @@ -154,4 +161,4 @@ spec: {{- end }} {{- if .Values.nodeName}} nodeName: {{ .Values.nodeName }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/charts/oai-5g-core/oai-smf/templates/multus.yaml b/charts/oai-5g-core/oai-smf/templates/multus.yaml index ba7b4a3f2a77e43b27c8fb72cbec4fa43ba6b162..2c11623f7d5eff7da154c151aaae5c1b1a9955cf 100644 --- a/charts/oai-5g-core/oai-smf/templates/multus.yaml +++ b/charts/oai-5g-core/oai-smf/templates/multus.yaml @@ -14,7 +14,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n4Interface.Ipadd "/" .Values.multus.n4Interface.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.n4Interface.ipAdd "/" .Values.multus.n4Interface.netmask | nospace | quote }} } ] {{- if .Values.multus.n4Interface.routes }} diff --git a/charts/oai-5g-core/oai-smf/templates/rbac.yaml b/charts/oai-5g-core/oai-smf/templates/rbac.yaml index e218d4fcd61c95de8f1aea047c38b3b0a4c81ade..4c81270327d5a3ba5fc917adf1756ca7ea44075c 100644 --- a/charts/oai-5g-core/oai-smf/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-smf/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -25,7 +25,7 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role diff --git a/charts/oai-5g-core/oai-smf/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-smf/templates/serviceaccount.yaml index 21c813d6a41f817b3c4eda3770cf4f86da0634ed..374f5f8223ec3ba33545d045a13a842eea99eb61 100644 --- a/charts/oai-5g-core/oai-smf/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-smf/templates/serviceaccount.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-smf/values.yaml b/charts/oai-5g-core/oai-smf/values.yaml index 8424d8987c1e2d59d2b090784da6dab6fc7cf269..d6508a10adbc3fadcf5d86f69f25acb4141e6a78 100644 --- a/charts/oai-5g-core/oai-smf/values.yaml +++ b/charts/oai-5g-core/oai-smf/values.yaml @@ -1,16 +1,16 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: repository: docker.io/oaisoftwarealliance/oai-smf #docker.io/oaisoftwarealliance/oai-smf # dockerhub oaisoftwarealliance/oai-smf - version: v2.0.1 #image tag, develop tag for experimental features + version: develop #image tag, develop tag for experimental features #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent # good to use when pulling images from docker-hub mention for RHEL images it can be commented -imagePullSecrets: - - name: "regcred" +# imagePullSecrets: +# - name: "regcred" serviceAccount: # Specifies whether a service account should be created @@ -28,10 +28,10 @@ exposedPorts: sbi: 80 n4: 8805 -# SMF needs two seperate interface one for http and other one for N4 to communicate with UPD. +# SMF needs two separate interface one for http and other one for N4 to communicate with UPD. # But for experimentation only one interface can be used. # When you need multus: -# 1. you want seperate interface for N4 and Nsmf +# 1. you want separate interface for N4 and Nsmf # 2. Your UPF is outside the cluster and the host machine can communicate but pods can not then you can provide ip-address in the same range as your host machine # 3. You want static ip-address for N4 interface, Namf can be discovered by its service name @@ -41,12 +41,12 @@ multus: defaultGateway: "" n4Interface: create: false - Ipadd: "192.168.24.3" - Netmask: "24" + ipAdd: "192.168.24.3" + netmask: "24" #name inside the pod is hardcoded right now #name: "n4" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty #routes: [{'dst': '10.8.0.0/24','gw': '192.168.24.254'}, {'dst': '10.9.0.0/24','gw': '192.168.24.254'}] hostInterface: "bond0" @@ -54,20 +54,19 @@ multus: ## Debugging section start: smf: true #If false the network function container will run in sleep mode for manually testing - tcpdump: true + tcpdump: false includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent #To store PCAP of NF in a sharedVolume so it can be easily fetched (PVC is created with NRF charts so make sure in NRF it is true) persistent: - sharedvolume: true + sharedvolume: false ## NF is the network function and tcpdump is the tcpdump container. ## To know more about request and limit it is better to understand that how Kubernetes QoS works. diff --git a/charts/oai-5g-core/oai-traffic-server/README.md b/charts/oai-5g-core/oai-traffic-server/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a6c1386078fff9866745b9dd0dbb6467e66277e7 --- /dev/null +++ b/charts/oai-5g-core/oai-traffic-server/README.md @@ -0,0 +1,83 @@ +# Helm Chart for OAI Traffic Server + +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. + + +**NOTE**: All the extra interfaces/multus interfaces created inside the pod are using `macvlan` mode. If your environment does not allow using `macvlan` then you need to change the multus definition. + +## Introduction + +OAI-Traffic-Server image is built using this [dockerfile](). The traffic server is used as iperf3 server. + +The helm chart of OAI-Traffic-Server creates multiples Kubernetes resources, + +1. Role Base Access Control (RBAC) (role and role bindings) +2. Deployment +3. Configmap (Contains the mounted configuration file for SMF) +4. Service account +5. Network-attachment-definition (Optional only when multus is used) + +The directory structure + +``` +├── Chart.yaml +├── README.md +├── templates +│  ├── configmap.yaml +│  ├── deployment.yaml +│  ├── _helpers.tpl +│  ├── multus.yaml +│  ├── NOTES.txt +│  ├── rbac.yaml +│  ├── serviceaccount.yaml +├── config.yaml (Configuration of the network function) +└── values.yaml (Parent file contains all the configurable parameters) +``` + +## Parameters + +[Values.yaml](./values.yaml) contains all the configurable parameters. Below table defines the configurable parameters. + + + +|Parameter |Allowed Values |Remark | +|-----------------------------|-------------------------------|-----------------------------------------| +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|trafficServer.repository |Image Name | | +|trafficServer.version |Image tag | | +|trafficServer.pullPolicy |IfNotPresent or Never or Always| | +|imagePullSecrets.name |String |Good to use for docker hub | +|serviceAccount.create |true/false | | +|serviceAccount.annotations |String | | +|serviceAccount.name |String | | +|podSecurityContext.runAsUser |Integer (0,65534) |Mandatory to use 0 | +|podSecurityContext.runAsGroup|Integer (0,65534) |Mandatory to use 0 | +|multus.create |true/false |default false | +|multus.ipAdd |IPV4 |NA | +|multus.netmask |netmask |NA | +|multus.gateway(optional) |netmask |NA | +|multus.defaultGateway |IPV4 |Default route inside container (optional)| +|multus.hostInterface |HostInterface Name |NA | | + + +## Advanced Debugging Parameters + +Only needed if you are doing advanced debugging + + +|Parameter |Allowed Values |Remark | +|-----------------------------|------------------------|-------------------------| +|config.ueroute |Any |ue subnet | +|config.upfHost |UPF ip-address or fqdn | | +|config.noOfIperf3Server |number of iperf3 servers| | +|resources.define |true/false |default false | +|resources.limits.cpu |string |Unit m for milicpu or cpu| +|resources.limits.memory |string |Unit Mi/Gi/MB/GB | +|resources.requests.cpu |string |Unit m for milicpu or cpu| +|resources.requests.memory |string |Unit Mi/Gi/MB/GB | +|readinessProbe |true/false |default true | +|livenessProbe |true/false |default false | +|terminationGracePeriodSeconds|5 |In seconds (default 5) | +|nodeSelector |Node label | | +|nodeName |Node Name | | + diff --git a/charts/oai-5g-core/oai-traffic-server/templates/_helpers.tpl b/charts/oai-5g-core/oai-traffic-server/templates/_helpers.tpl index 9bfa002b529a4071b11ab6d2e4c55b5aacd57505..7a4ebeb5856717240749058587e9524dffcc5fd7 100644 --- a/charts/oai-5g-core/oai-traffic-server/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-traffic-server/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-traffic-server.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-traffic-server.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-traffic-server.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-traffic-server/templates/configmap.yaml b/charts/oai-5g-core/oai-traffic-server/templates/configmap.yaml index a83446b3501b739d49f56249b7497fc2ac2f2f64..d04f5ad9b2267ea087adad05c36250f6cfe860a0 100644 --- a/charts/oai-5g-core/oai-traffic-server/templates/configmap.yaml +++ b/charts/oai-5g-core/oai-traffic-server/templates/configmap.yaml @@ -6,7 +6,11 @@ metadata: data: script.sh: | #!/bin/bash - ip route add {{ .Values.config.ueroute }} via {{ .Values.config.upfIpadd }} dev net1 + {{- if .Values.multus.create }} + ip route add {{ .Values.config.ueroute }} via {{ .Values.config.upfHost }} dev net1 + {{- else }} + ip route add {{ .Values.config.ueroute }} via $(getent ahostsv4 {{ .Values.config.upfHost }} | awk 'NR==1{print $1}') dev eth0 + {{- end }} num_servers={{ .Values.config.noOfIperf3Server }} base_port=5200 # Run iperf multiple times diff --git a/charts/oai-5g-core/oai-traffic-server/templates/deployment.yaml b/charts/oai-5g-core/oai-traffic-server/templates/deployment.yaml index b0d349deb5b584a3ea5732cd3a40e72672f495f1..6f3797470c69ef2b8ccafed4765ff1a6b2e65270 100644 --- a/charts/oai-5g-core/oai-traffic-server/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-traffic-server/templates/deployment.yaml @@ -18,15 +18,36 @@ spec: labels: app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/instance: {{ .Chart.Name }} + {{- if .Values.multus.create }} annotations: k8s.v1.cni.cncf.io/networks: >- [{ "name": "{{ .Chart.Name }}-net1", "default-route": ["{{ .Values.multus.defaultGateway }}"] }] + {{- end }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} + initContainers: + - name: init + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - until ncat -zv {{ .Values.config.upfHost }} 2152 --udp ; do echo waiting for oai-upf to start; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m containers: - name: iperf3 volumeMounts: @@ -35,14 +56,18 @@ spec: subPath: script.sh command: ["/tmp/script.sh"] image: "{{ .Values.trafficServer.repository }}:{{ .Values.trafficServer.version }}" + {{- if .Values.resources.define}} + resources: + requests: + memory: {{ .Values.resources.requests.memory | quote }} + cpu: {{ .Values.resources.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.limits.memory | quote }} + cpu: {{ .Values.resources.limits.cpu | quote }} + {{- end}} imagePullPolicy: IfNotPresent securityContext: - privileged: true - capabilities: - add: - - NET_ADMIN - drop: - - ALL + {{- toYaml .Values.securityContext | nindent 12 }} {{- if .Values.readinessProbe}} readinessProbe: exec: @@ -69,7 +94,7 @@ spec: dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} nodeSelector: diff --git a/charts/oai-5g-core/oai-traffic-server/templates/multus.yaml b/charts/oai-5g-core/oai-traffic-server/templates/multus.yaml index 65880ec48b5f19b98135e255f1f19312fe3a1ba9..004ffaf349b95022e5c7432cb15906d7d99a0cc7 100644 --- a/charts/oai-5g-core/oai-traffic-server/templates/multus.yaml +++ b/charts/oai-5g-core/oai-traffic-server/templates/multus.yaml @@ -14,7 +14,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.IPadd "/" .Values.multus.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.ipAdd "/" .Values.multus.netmask | nospace | quote }} } ] } diff --git a/charts/oai-5g-core/oai-traffic-server/templates/rbac.yaml b/charts/oai-5g-core/oai-traffic-server/templates/rbac.yaml index 7a0b362f28eb2d9442e018e77fc9e5a7a8c2e3c2..53f6946b674147a22318ba3c875991d12e7ab59c 100644 --- a/charts/oai-5g-core/oai-traffic-server/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-traffic-server/templates/rbac.yaml @@ -1,6 +1,6 @@ {{- if .Values.enabled }} --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -21,7 +21,7 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role diff --git a/charts/oai-5g-core/oai-traffic-server/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-traffic-server/templates/serviceaccount.yaml index 6ff79827934c6210961a070ad9685cb5c32d8e7c..ad99be77747fc4a04dc29b704f4e1c3f1789fe10 100644 --- a/charts/oai-5g-core/oai-traffic-server/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-traffic-server/templates/serviceaccount.yaml @@ -2,5 +2,5 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} {{- end }} diff --git a/charts/oai-5g-core/oai-traffic-server/values.yaml b/charts/oai-5g-core/oai-traffic-server/values.yaml index e48e1dd27bb83fd5d975f7622a50c98267caef21..5b85180cc580c228db41a0dd8427187c1442f3a4 100644 --- a/charts/oai-5g-core/oai-traffic-server/values.yaml +++ b/charts/oai-5g-core/oai-traffic-server/values.yaml @@ -1,4 +1,4 @@ -kubernetesType: Vanilla # Vanilla (Community Kubernetes) or Openshift (For RedHat Openshift) +kubernetesDistribution: Vanilla # Vanilla (Community Kubernetes) or Openshift (For RedHat Openshift) podSecurityContext: runAsUser: 0 @@ -10,6 +10,10 @@ trafficServer: #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent +# good to use when pulling images from docker-hub mention for RHEL images it can be commented +# imagePullSecrets: +# - name: "regcred" + serviceAccount: # Specifies whether a service account should be created create: true @@ -19,16 +23,37 @@ serviceAccount: multus: create: false - IPadd: "172.21.6.99" - Netmask: "22" + ipAdd: "172.21.6.99" + netmask: "22" defaultGateway: "172.21.7.254" hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled config: ueroute: 12.1.1.0/24 - upfIpadd: 172.21.6.95 + upfHost: 172.21.6.95 noOfIperf3Server: 10 +securityContext: + capabilities: + add: + - NET_ADMIN + - NET_RAW + drop: + - ALL + +## NF is the network function and tcpdump is the tcpdump container. +## To know more about request and limit it is better to understand that how Kubernetes QoS works. +## https://kubernetes.io/docs/concepts/configuration/manage-resources-containers +## https://kubernetes.io/docs/concepts/workloads/pods/pod-qos +resources: + define: false + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + readinessProbe: true livenessProbe: false diff --git a/charts/oai-5g-core/oai-udm/Chart.yaml b/charts/oai-5g-core/oai-udm/Chart.yaml index 40244523c49c4ae78851388dc56d42cafe3d205f..ac44ff85e563e203af748803affdd5a10799adc9 100644 --- a/charts/oai-5g-core/oai-udm/Chart.yaml +++ b/charts/oai-5g-core/oai-udm/Chart.yaml @@ -27,9 +27,9 @@ type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5GCN diff --git a/charts/oai-5g-core/oai-udm/README.md b/charts/oai-5g-core/oai-udm/README.md index 3bcb84e6a3fa41bda4883a8dd565d96464d8910e..63679793090f8935804ed4869ea9f042f6baf65a 100644 --- a/charts/oai-5g-core/oai-udm/README.md +++ b/charts/oai-5g-core/oai-udm/README.md @@ -1,6 +1,6 @@ # Helm Chart for OAI Unified Data Management (UDM) -The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12, 4.13 There are no special resource requirements for AMF. +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. # Disclaimer @@ -10,7 +10,7 @@ Starting version 2.0.0 of OAI 5G Core network functions their configuration will OAI-UDM follows 3GPP release 16, more information about the feature set can be found on [UDMs WiKi page](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udm/-/wikis/home). The source code be downloaded from [GitLab](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udm) -OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-UDM/) publishes every `develop` and `master` branch image of OAI-UDM on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-udm) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 18.04/20.04/22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-UDM/) publishes every `develop` and `master` branch image of OAI-UDM on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-udm) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-UDM creates multiples Kubernetes resources, @@ -44,7 +44,7 @@ The directory structure |Parameter |Allowed Values |Remark | |-----------------------------|-------------------------------|-----------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -93,4 +93,4 @@ Better to use the parent charts from: ## Note -1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [presistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. \ No newline at end of file +1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [persistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-udm/templates/_helpers.tpl b/charts/oai-5g-core/oai-udm/templates/_helpers.tpl index 55372166aab80aca08dcbe5f812b7885f99f8368..7bf706ad698a8e44a406982c4f85df11eca09a08 100644 --- a/charts/oai-5g-core/oai-udm/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-udm/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-udm.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-udm.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-udm.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-udm/templates/deployment.yaml b/charts/oai-5g-core/oai-udm/templates/deployment.yaml index e73e76a89a34a68bda9f39fd78bfb29049421401..e759a5d6979dfeaecd1c5760d2fd7f33cee85d9e 100644 --- a/charts/oai-5g-core/oai-udm/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-udm/templates/deployment.yaml @@ -25,12 +25,19 @@ spec: {{- if .Values.global }}{{ if .Values.global.waitForNRF }} initContainers: - name: init - image: docker.io/alpine/curl:3.14 + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - until curl --connect-timeout {{ .Values.global.timeout }} --head -X GET http://oai-nrf/nnrf-nfm/v1/nf-instances?nf-type='NRF' {{ .Values.global.http2Param }}; do echo waiting for oai-nrf; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m {{- end }}{{ end }} containers: {{- if .Values.includeTcpDumpContainer }} @@ -57,7 +64,7 @@ spec: command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -122,7 +129,7 @@ spec: volumes: - configMap: {{- if .Values.global }} - name: {{ .Values.global.nfConfigurationConfigMap }} + name: {{ .Values.global.coreNetworkConfigMap }} {{- else }} name: {{ .Chart.Name }}-configmap {{- end }} @@ -137,7 +144,7 @@ spec: dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} nodeSelector: diff --git a/charts/oai-5g-core/oai-udm/templates/rbac.yaml b/charts/oai-5g-core/oai-udm/templates/rbac.yaml index e218d4fcd61c95de8f1aea047c38b3b0a4c81ade..4c81270327d5a3ba5fc917adf1756ca7ea44075c 100644 --- a/charts/oai-5g-core/oai-udm/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-udm/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -25,7 +25,7 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role diff --git a/charts/oai-5g-core/oai-udm/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-udm/templates/serviceaccount.yaml index 21c813d6a41f817b3c4eda3770cf4f86da0634ed..374f5f8223ec3ba33545d045a13a842eea99eb61 100644 --- a/charts/oai-5g-core/oai-udm/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-udm/templates/serviceaccount.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-udm/values.yaml b/charts/oai-5g-core/oai-udm/values.yaml index 5eaa4dff8079a7d3d2c5e920520f297571acd4f1..2d8da0e787495d4b1f882d70163d97bbe512105e 100644 --- a/charts/oai-5g-core/oai-udm/values.yaml +++ b/charts/oai-5g-core/oai-udm/values.yaml @@ -1,16 +1,16 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: - repository: docker.io/oaisoftwarealliance/oai-udm - version: v2.0.1 #image tag, develop tag for experimental features + repository: docker.io/oaisoftwarealliance/oai-udm + version: develop #image tag, develop tag for experimental features #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent ## good to use when pulling images from docker-hub mention -imagePullSecrets: - - name: "regcred" +# imagePullSecrets: +# - name: "regcred" serviceAccount: # Specifies whether a service account should be created @@ -34,12 +34,11 @@ start: includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent #To store PCAP of NF in a sharedVolume so it can be easily fetched (PVC is created with NRF charts so make sure in NRF it is true) persistent: diff --git a/charts/oai-5g-core/oai-udr/Chart.yaml b/charts/oai-5g-core/oai-udr/Chart.yaml index e22f98bf4184ea77f71e651eba119fd662b33461..02d3e43e364ae6ecc69a2d191d7a36eeb1a3e2b0 100644 --- a/charts/oai-5g-core/oai-udr/Chart.yaml +++ b/charts/oai-5g-core/oai-udr/Chart.yaml @@ -27,9 +27,9 @@ type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5GCN @@ -42,4 +42,4 @@ sources: maintainers: - name: OPENAIRINTERFACE - email: contact@openairinterface.org \ No newline at end of file + email: contact@openairinterface.org diff --git a/charts/oai-5g-core/oai-udr/README.md b/charts/oai-5g-core/oai-udr/README.md index f99a208cdc1e6e3c40b811f0a26038f0e95e2c9d..73f74f55859591e99da1c6b2bf665fcedeb04a9b 100644 --- a/charts/oai-5g-core/oai-udr/README.md +++ b/charts/oai-5g-core/oai-udr/README.md @@ -1,6 +1,7 @@ # Helm Chart for OAI Unified Data Repository (UDR) -The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12 and 4.13. There are no special resource requirements for AUSF. +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. There are no special resource requirements for this NF. + # Disclaimer @@ -10,7 +11,7 @@ Starting version 2.0.0 of OAI 5G Core network functions their configuration will OAI-UDR follows 3GPP release 16, more information about the feature set can be found on [UDRs WiKi page](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udr/-/wikis/home). The source code be downloaded from [GitLab](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udr) -OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-UDR/) publishes every `develop` and `master` branch image of OAI-UDR on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-udr) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 18.04/20.04/22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-UDR/) publishes every `develop` and `master` branch image of OAI-UDR on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-udr) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-UDR creates multiples Kubernetes resources, @@ -44,7 +45,7 @@ The directory structure |Parameter |Allowed Values |Remark | |-----------------------------|-------------------------------|-----------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -94,4 +95,4 @@ Better to use the parent charts from: ## Note -1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [presistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. \ No newline at end of file +1. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [persistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-udr/templates/_helpers.tpl b/charts/oai-5g-core/oai-udr/templates/_helpers.tpl index 795500136d4f68a0efd7a2123355ccb2c82eb98c..b09c9ef78a77c6acdb13541fe2bef5b86da6a5a5 100644 --- a/charts/oai-5g-core/oai-udr/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-udr/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-udr.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-udr.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-udr.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-udr/templates/deployment.yaml b/charts/oai-5g-core/oai-udr/templates/deployment.yaml index e5f7cfea39c6e409ca0deb2a8be395bef3dade3d..0033c0e8c75c21182753f70c3cd13437b0a53805 100644 --- a/charts/oai-5g-core/oai-udr/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-udr/templates/deployment.yaml @@ -23,12 +23,19 @@ spec: {{- if .Values.global }}{{ if .Values.global.waitForNRF }} initContainers: - name: init - image: docker.io/alpine/curl:3.14 + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - until curl --connect-timeout {{ .Values.global.timeout }} --head -X GET http://oai-nrf/nnrf-nfm/v1/nf-instances?nf-type='NRF' {{ .Values.global.http2Param }}; do echo waiting for oai-nrf; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m {{- end }}{{ end }} containers: {{- if .Values.includeTcpDumpContainer }} @@ -55,7 +62,7 @@ spec: command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -120,7 +127,7 @@ spec: volumes: - configMap: {{- if .Values.global }} - name: {{ .Values.global.nfConfigurationConfigMap }} + name: {{ .Values.global.coreNetworkConfigMap }} {{- else }} name: {{ .Chart.Name }}-configmap {{- end }} @@ -135,7 +142,7 @@ spec: dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} nodeSelector: diff --git a/charts/oai-5g-core/oai-udr/templates/rbac.yaml b/charts/oai-5g-core/oai-udr/templates/rbac.yaml index e218d4fcd61c95de8f1aea047c38b3b0a4c81ade..4c81270327d5a3ba5fc917adf1756ca7ea44075c 100644 --- a/charts/oai-5g-core/oai-udr/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-udr/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -25,7 +25,7 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role diff --git a/charts/oai-5g-core/oai-udr/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-udr/templates/serviceaccount.yaml index 21c813d6a41f817b3c4eda3770cf4f86da0634ed..374f5f8223ec3ba33545d045a13a842eea99eb61 100644 --- a/charts/oai-5g-core/oai-udr/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-udr/templates/serviceaccount.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-udr/values.yaml b/charts/oai-5g-core/oai-udr/values.yaml index 01e05254b2c4a4ee9705ed298df75fbf4de12f66..ace2654eea253ad2640c50915bf7b6925d64dd81 100644 --- a/charts/oai-5g-core/oai-udr/values.yaml +++ b/charts/oai-5g-core/oai-udr/values.yaml @@ -1,15 +1,15 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: repository: docker.io/oaisoftwarealliance/oai-udr # image name either locally present or in a public/private repository - version: v2.0.1 #image tag, develop tag for experimental features + version: develop #image tag, develop tag for experimental features #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent -imagePullSecrets: - - name: "regcred" +# imagePullSecrets: +# - name: "regcred" serviceAccount: # Specifies whether a service account should be created @@ -35,10 +35,9 @@ start: includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent @@ -77,4 +76,4 @@ terminationGracePeriodSeconds: 5 nodeSelector: {} -nodeName: \ No newline at end of file +nodeName: diff --git a/charts/oai-5g-core/oai-upf/Chart.yaml b/charts/oai-5g-core/oai-upf/Chart.yaml index d561c73836623f06a039a10175c5f5d4ec92d96a..0c07704a3e42b3765584afdda7bd4b2b92eef2a8 100644 --- a/charts/oai-5g-core/oai-upf/Chart.yaml +++ b/charts/oai-5g-core/oai-upf/Chart.yaml @@ -26,9 +26,9 @@ type: application icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png -version: v2.0.1 +version: v2.1.0 -appVersion: v2.0.1 +appVersion: v2.1.0 keywords: - 5G @@ -40,4 +40,4 @@ sources: maintainers: - name: OPENAIRINTERFACE - email: contact@openairinterface.org \ No newline at end of file + email: contact@openairinterface.org diff --git a/charts/oai-5g-core/oai-upf/README.md b/charts/oai-5g-core/oai-upf/README.md index f8cf79a95ac62103936cb2168ae9e233d2be744d..5aea8f2c8aa0375f88d52ef2071e796eb368131f 100644 --- a/charts/oai-5g-core/oai-upf/README.md +++ b/charts/oai-5g-core/oai-upf/README.md @@ -1,8 +1,8 @@ # Helm Chart for OAI User Plane Network Function (UPF) -The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12 and 4.13. UPF requires eBPF in the kernel if you want to test it in eBPF mode else it can be used with simple switch. In both the modes UPF requires `privileged` flag to be `true`. UPF needs to create tunnel interface for GTP and it creates NAT rules for packets to go towards internet from N6. +The helm-chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. UPF requires eBPF in the kernel if you want to test it in eBPF mode else it can be used with simple switch. In both the modes UPF requires `privileged` flag to be `true`. UPF needs to create tunnel interface for GTP and it creates NAT rules for packets to go towards internet from N6. -**NOTE**: All the extra interfaces/multus interfaces created inside the pod are using `macvlan` mode. If your environment does not allow using `macvlan` then you need to change the multus definations. +**NOTE**: All the extra interfaces/multus interfaces created inside the pod are using `macvlan` mode. If your environment does not allow using `macvlan` then you need to change the multus definitions. # Disclaimer @@ -12,7 +12,7 @@ Starting version 2.0.0 of OAI 5G Core network functions their configuration will [OAI-UPF](https://github.com/OPENAIRINTERFACE/openair-spgwu-tiny) is the 4G CUPS S/PGWU. We modified it to work for 5G deployments with GTP-U extension header. -OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN-SPGWU-TINY/) publishes every `develop` and `master` branch image of OAI-UPF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-upf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 18.04/20.04/22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +OAI [Jenkins Platform](https://jenkins-oai.eurecom.fr/job/OAI-CN-SPGWU-TINY/) publishes every `develop` and `master` branch image of OAI-UPF on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-upf) with tag `develop` and `latest` respectively. Apart from that you can find tags for every release `VX.X.X`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-UPF creates multiples Kubernetes resources, @@ -46,37 +46,39 @@ The directory structure [Values.yaml](./values.yaml) contains all the configurable parameters. Below table defines the configurable parameters. -|Parameter |Allowed Values |Remark | -|--------------------------------|-------------------------------|-------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | -|nfimage.repository |Image Name | | -|nfimage.version |Image tag | | -|nfimage.pullPolicy |IfNotPresent or Never or Always| | -|imagePullSecrets.name |String |Good to use for docker hub | -|serviceAccount.create |true/false | | -|serviceAccount.annotations |String | | -|serviceAccount.name |String | | -|podSecurityContext.runAsUser |Integer (0,65534) | | -|podSecurityContext.runAsGroup |Integer (0,65534) | | -|multus.n3Interface.create |true/false | | -|multus.n3Interface.Ipadd |Ip-Address | | -|multus.n3Interface.Netmask |Netmask | | -|multus.n3Interface.Gateway |Ip-Address | | -|multus.n3Interface.routes |Json |Routes if you want to add in your pod| -|multus.n3Interface.hostInterface|host interface |Host interface on which pod will run | -|multus.n4Interface.create |true/false | | -|multus.n4Interface.Ipadd |Ip-Address | | -|multus.n4Interface.Netmask |Netmask | | -|multus.n4Interface.Gateway |Ip-Address |This interface is used to communicate with NRF | -|multus.n4Interface.routes |Json |Routes if you want to add in your pod| -|multus.n4Interface.hostInterface|host interface |Host interface on which pod will run | -|multus.n6Interface.create |true/false | | -|multus.n6Interface.Ipadd |Ip-Address | | -|multus.n6Interface.Netmask |Netmask | | -|multus.n6Interface.Gateway |Ip-Address | | -|multus.n6Interface.routes |Json |Routes if you want to add in your pod| -|multus.n6Interface.hostInterface|host interface |Host interface on which pod will run | -|multus.defaultGateway |Ip-Address |Default route inside pod | + +|Parameter |Allowed Values |Remark | +|------------------------------------|-------------------------------|-----------------------------------------| +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|nfimage.repository |Image Name | | +|nfimage.version |Image tag | | +|nfimage.pullPolicy |IfNotPresent or Never or Always| | +|imagePullSecrets.name |String |Good to use for docker hub | +|serviceAccount.create |true/false | | +|serviceAccount.annotations |String | | +|serviceAccount.name |String | | +|podSecurityContext.runAsUser |Integer (0,65534) | | +|podSecurityContext.runAsGroup |Integer (0,65534) | | +|multus.n3Interface.create |true/false |default false | +|multus.n3Interface.ipAdd |IPV4 |NA | +|multus.n3Interface.netmask |netmask |NA | +|multus.n3Interface.gateway(optional)|netmask |NA | +|multus.n3Interface.name (optional) |Interface name inside container|NA | +|multus.n3Interface.routes (optional)|Routes |NA | +|multus.n4Interface.create |true/false |default false | +|multus.n4Interface.ipAdd |IPV4 |NA | +|multus.n4Interface.netmask |netmask |NA | +|multus.n4Interface.gateway(optional)|netmask |NA | +|multus.n4Interface.name (optional) |Interface name inside container|NA | +|multus.n4Interface.routes (optional)|Routes |NA | +|multus.n6Interface.create |true/false |default false | +|multus.n6Interface.ipAdd |IPV4 |NA | +|multus.n6Interface.netmask |netmask |NA | +|multus.n6Interface.gateway(optional)|netmask |NA | +|multus.n6Interface.name (optional) |Interface name inside container|NA | +|multus.n6Interface.routes (optional)|Routes |NA | +|multus.defaultGateway |IPV4 |Default route inside container (optional)| +|multus.hostInterface |HostInterface Name |NA | ### Configuration parameter @@ -120,4 +122,4 @@ Better to use the parent charts from: ## Note 1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. -2. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [presistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. \ No newline at end of file +2. If you are using tcpdump container to take pcaps automatically (`start.tcpdump` is true) you can enable `persistent.sharedvolume` and [persistent volume](./oai-nrf/values.yaml) in NRF. To store the pcaps of all the NFs in one location. It is to ease the automated collection of pcaps. diff --git a/charts/oai-5g-core/oai-upf/templates/_helpers.tpl b/charts/oai-5g-core/oai-upf/templates/_helpers.tpl index a45f110cf86864afb9e0b24c268f1ada2b6dbc1f..341f5f515ab715cc3fd12189d9541f579148a4d8 100644 --- a/charts/oai-5g-core/oai-upf/templates/_helpers.tpl +++ b/charts/oai-5g-core/oai-upf/templates/_helpers.tpl @@ -56,8 +56,8 @@ Create the name of the service account to use */}} {{- define "oai-upf.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-upf.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-upf.fullname" .) .Chart.Name }} {{- else -}} - {{ default "default" .Values.serviceAccount.name }} + {{ default "default" .Chart.Name }} {{- end -}} {{- end -}} diff --git a/charts/oai-5g-core/oai-upf/templates/deployment.yaml b/charts/oai-5g-core/oai-upf/templates/deployment.yaml index b8454bb1b03922e5d3d1cc1dbddeeb2dd1ca5675..2e51af6e7d5ca4c3e6e9f807a6e1e5efa8d212a7 100644 --- a/charts/oai-5g-core/oai-upf/templates/deployment.yaml +++ b/charts/oai-5g-core/oai-upf/templates/deployment.yaml @@ -19,30 +19,32 @@ spec: annotations: k8s.v1.cni.cncf.io/networks: >- [{ - "name": "{{ .Chart.Name }}-n3", - "interface": "n3" + {{- if .Values.multus.n3Interface.create }} + "name": "{{ .Chart.Name }}-{{ .Values.multus.n3Interface.name }}", + "interface": "{{ .Values.multus.n3Interface.name }}" {{- if .Values.multus.defaultGateway }} ,"default-route": ["{{ .Values.multus.defaultGateway }}"] {{- end }} - {{- if .Values.multus.n3Interface.Gateway }} - ,"gateway": "{{ .Values.multus.n3Interface.Gateway }}" + {{- if .Values.multus.n3Interface.gateway }} + ,"gateway": "{{ .Values.multus.n3Interface.gateway }}" {{- end }} + {{- end }} } {{- if .Values.multus.n4Interface.create }} ,{ - "name": "{{ .Chart.Name }}-n4", - "interface": "n4" - {{- if .Values.multus.n4Interface.Gateway }} - ,"gateway": "{{ .Values.multus.n4Interface.Gateway }}" + "name": "{{ .Chart.Name }}-{{ .Values.multus.n4Interface.name }}", + "interface": "{{ .Values.multus.n4Interface.name }}" + {{- if .Values.multus.n4Interface.gateway }} + ,"gateway": "{{ .Values.multus.n4Interface.gateway }}" {{- end }} } {{- end }} {{- if .Values.multus.n6Interface.create }} ,{ - "name": "{{ .Chart.Name }}-n6", - "interface": "n6" - {{- if .Values.multus.n6Interface.Gateway }} - ,"gateway": "{{ .Values.multus.n6Interface.Gateway }}" + "name": "{{ .Chart.Name }}-{{ .Values.multus.n6Interface.name }}", + "interface": "{{ .Values.multus.n6Interface.name }}" + {{- if .Values.multus.n6Interface.gateway }} + ,"gateway": "{{ .Values.multus.n6Interface.gateway }}" {{- end }} } {{- end }} @@ -58,12 +60,19 @@ spec: {{- if .Values.global }}{{ if .Values.global.waitForNRF }} initContainers: - name: init - image: docker.io/alpine/curl:3.14 + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - until curl --connect-timeout {{ .Values.global.timeout }} --head -X GET http://oai-nrf/nnrf-nfm/v1/nf-instances?nf-type='NRF' {{ .Values.global.http2Param }}; do echo waiting for oai-nrf; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m {{- end }}{{ end }} containers: {{- if .Values.includeTcpDumpContainer }} @@ -85,7 +94,7 @@ spec: command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -148,7 +157,7 @@ spec: volumes: - configMap: {{- if .Values.global }} - name: {{ .Values.global.nfConfigurationConfigMap }} + name: {{ .Values.global.coreNetworkConfigMap }} {{- else }} name: {{ .Chart.Name }}-configmap {{- end }} @@ -163,7 +172,7 @@ spec: dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler - serviceAccountName: {{ .Values.serviceAccount.name }} + serviceAccountName: {{ .Chart.Name }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.nodeSelector}} nodeSelector: @@ -171,4 +180,4 @@ spec: {{- end }} {{- if .Values.nodeName}} nodeName: {{ .Values.nodeName }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/charts/oai-5g-core/oai-upf/templates/multus.yaml b/charts/oai-5g-core/oai-upf/templates/multus.yaml index 05d57dfc61389063438f4c1c82c061a40a590833..348a27cc295f483f642ef4275076ebe32fa124be 100644 --- a/charts/oai-5g-core/oai-upf/templates/multus.yaml +++ b/charts/oai-5g-core/oai-upf/templates/multus.yaml @@ -14,7 +14,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n3Interface.Ipadd "/" .Values.multus.n3Interface.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.n3Interface.ipAdd "/" .Values.multus.n3Interface.netmask | nospace | quote }} } ] {{- if .Values.multus.n3Interface.routes }} @@ -39,7 +39,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n4Interface.Ipadd "/" .Values.multus.n4Interface.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.n4Interface.ipAdd "/" .Values.multus.n4Interface.netmask | nospace | quote }} } ] {{- if .Values.multus.n4Interface.routes }} @@ -64,7 +64,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n6Interface.Ipadd "/" .Values.multus.n6Interface.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.n6Interface.ipAdd "/" .Values.multus.n6Interface.netmask | nospace | quote }} } ] {{- if .Values.multus.n6Interface.routes }} diff --git a/charts/oai-5g-core/oai-upf/templates/rbac.yaml b/charts/oai-5g-core/oai-upf/templates/rbac.yaml index aed4d16a89647719ce3fc71eea05ca8fdde0e2ac..4bf5db7ecc04b05e519bfd0a9cb0f63e07f34076 100644 --- a/charts/oai-5g-core/oai-upf/templates/rbac.yaml +++ b/charts/oai-5g-core/oai-upf/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -20,10 +20,10 @@ metadata: name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} roleRef: kind: Role name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role apiGroup: rbac.authorization.k8s.io -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/oai-5g-core/oai-upf/templates/serviceaccount.yaml b/charts/oai-5g-core/oai-upf/templates/serviceaccount.yaml index a78df204ce29c9460797fdb7d68ebf53eabb09e3..ea0ea3c642f207319a92135e83ee8c47896f1529 100644 --- a/charts/oai-5g-core/oai-upf/templates/serviceaccount.yaml +++ b/charts/oai-5g-core/oai-upf/templates/serviceaccount.yaml @@ -1,5 +1,5 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.name }} + name: {{ .Chart.Name }} diff --git a/charts/oai-5g-core/oai-upf/values.yaml b/charts/oai-5g-core/oai-upf/values.yaml index be887ac89519a1457495983d3cf8bc02c70af949..ea9bb7baee9c811acc3749050c791bb46ea10c06 100644 --- a/charts/oai-5g-core/oai-upf/values.yaml +++ b/charts/oai-5g-core/oai-upf/values.yaml @@ -1,23 +1,23 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: repository: docker.io/oaisoftwarealliance/oai-upf # dockerhub oaisoftwarealliance/oai-upf - version: v2.0.1 #image tag, develop tag for experimental features + version: develop #image tag, develop tag for experimental features # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent ## good to use when pulling images from docker-hub -imagePullSecrets: - - name: "regcred" +# imagePullSecrets: +# - name: "regcred" serviceAccount: # Specifies whether a service account should be created create: true # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: "oai-upf" + name: "oai-upf-sa" podSecurityContext: runAsUser: 0 @@ -29,43 +29,42 @@ exposedPorts: n4: 8805 # default port no need to change unless necessary n3: 2152 # default port no need to change unless necessary -# create an extra interface for N3 incase the gNB is outside the cluster network or there is a need to have dedicated interface for N3 -## Change these ip-addresses according to your environment -## N4, N6 are optional only if you want that UPF uses different subnets for different 3gpp interfaces. +# oai-upf can be configured with multiple interface which may correspond to 3GPP logical interfaces. There can be one to one or one to many. +# In case of one to one mapping n3,n4,n6 all can have separate virtual interfaces. +# In one to many mapping n3,n4,n6 all can be mapped to one virtual interface. +# Interface mapping is strictly based on your networking environment +## Change these ip-addresses according to your environment multus: ## If you don't want to add a default route in your pod then leave this field empty defaultGateway: "" - n3Interface: + n3Interface: # use this interface if using one interface for all 3GPP interfaces create: false - Ipadd: "172.21.12.95" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "n3" + ipAdd: "172.21.12.95" + netmask: "22" + name: "n3" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: [{'dst': '10.8.0.0/24','gw': '172.21.15.254'}, {'dst': '10.9.0.0/24','gw': '172.21.15.254'}] hostInterface: "bond0" n4Interface: create: false - Ipadd: "192.168.24.2" - Netmask: "24" - # #name inside the pod is hardcoded right now - # name: "n4" + ipAdd: "192.168.24.2" + netmask: "24" + name: "n4" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: "" hostInterface: "bond0" n6Interface: create: false - Ipadd: "192.168.22.2" - # #name inside the pod is hardcoded right now - # name: "n6" - Netmask: "24" + ipAdd: "192.168.22.2" + name: "n6" + netmask: "24" ## If you do not have a gateway leave the field empty - Gateway: "" + gateway: "" ## If you do not want to add any routes in your pod then leave this field empty routes: "" hostInterface: "bond0" @@ -77,10 +76,9 @@ start: includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 #pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent diff --git a/charts/oai-5g-ran/oai-cu-cp/Chart.yaml b/charts/oai-5g-ran/oai-cu-cp/Chart.yaml index 900f501d5da04bf825db294322e1aa6c1cac3508..04758b67e09aa18aa7d035c9aa641d8d939d44ce 100644 --- a/charts/oai-5g-ran/oai-cu-cp/Chart.yaml +++ b/charts/oai-5g-ran/oai-cu-cp/Chart.yaml @@ -37,7 +37,7 @@ icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_fin # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.0 +version: 2.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/oai-5g-ran/oai-cu-cp/README.md b/charts/oai-5g-ran/oai-cu-cp/README.md index 6258eee387fc18876e831cbf738261b3dafe4859..1981d3651bd0c69ac29099cd783ce41bb896cf8c 100644 --- a/charts/oai-5g-ran/oai-cu-cp/README.md +++ b/charts/oai-5g-ran/oai-cu-cp/README.md @@ -2,7 +2,7 @@ Before using this helm-chart we recommend you read about OAI codebase and its working from the documents listed on [OAI gitlab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/doc). Here you can find a dedicated document on [F1 design](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/F1-design.md) and [E1 design](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/E1-design.md) -**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10 and 4.12. It requires minimum 1CPU and 1Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin for multiple interfaces. +**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10 and 4.16. It requires minimum 1CPU and 1Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin for multiple interfaces. ## Introduction @@ -13,7 +13,7 @@ The [codebase](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop) 1. `oaisoftwarealliance/oai-gnb` for monolithic gNB, DU, CU, CU-CP 2. `oaisoftwarealliance/oai-nr-cuup` for CU-UP. -Each image has develop tag and a dedicated week tag for example `2023.w18`. We only publish Ubuntu 18.04/20.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +Each image has develop tag and a dedicated week tag for example `2024.w32`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-CU-CP creates multiples Kubernetes resources, @@ -22,7 +22,7 @@ The helm chart of OAI-CU-CP creates multiples Kubernetes resources, 3. Deployment 4. Configmap 5. Service account -6. Network-attachment-defination (Optional only when multus is used) +6. Network-attachment-definition (Optional only when multus is used) The directory structure @@ -47,7 +47,7 @@ The directory structure |Parameter |Allowed Values |Remark | |---------------------------------|-------------------------------|---------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -58,26 +58,28 @@ The directory structure |podSecurityContext.runAsUser |Integer (0,65534) | | |podSecurityContext.runAsGroup |Integer (0,65534) | | |multus.defaultGateway |Ip-Address |default route in the pod | -|multus.n2Interface.create |true/false | | -|multus.n2Interface.IPadd |Ip-Address | | -|multus.n2Interface.Netmask |Netmask | | -|multus.n2Interface.Gateway |Ip-Address | | -|multus.n2Interface.routes |Json |Routes you want to add in the pod| -|multus.n2Interface.hostInterface |host interface |Host machine interface name | -|multus.e1Interface.create |true/false | | -|multus.e1Interface.IPadd |Ip-Address) | | -|multus.e1Interface.Netmask |Netmask | | -|multus.e1Interface.Gateway |Ip-Address | | -|multus.e1Interface.routes |Json |Routes you want to add in the pod| -|multus.e1Interface.hostInterface |host interface |Host machine interface name | -|multus.f1cInterface.create |true/false | | -|multus.f1cInterface.IPadd |Ip-Address | | -|multus.f1cInterface.Netmask |Netmask | | -|multus.f1cInterface.Gateway |Ip-Address | | -|multus.f1cInterface.routes |Json |Routes you want to add in the pod| -|multus.f1cInterface.hostInterface|host interface |Host machine interface name | - -The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters of oai-gnb-cu-cp. If you want to use your own configuration file for oai-gnb-cu-cp. It is recommended to copy it in `templates/configmap.yaml` and set `config.mountConfig` as `true`. The command line arguments for oai-gnb-cu-cp is provided in `config.useAdditionalOptions`. +|multus.e1Interface.ipAdd |IPV4 |NA | +|multus.e1Interface.netmask |netmask |NA | +|multus.e1Interface.gateway(optional)|netmask |NA | +|multus.e1Interface.name (optional) |Interface name inside container|NA | +|multus.e1Interface.routes (optional)|Routes |NA | +|multus.n2Interface.create |true/false |default false | +|multus.n2Interface.ipAdd |IPV4 |NA | +|multus.n2Interface.netmask |netmask |NA | +|multus.n2Interface.gateway(optional)|netmask |NA | +|multus.n2Interface.name (optional) |Interface name inside container|NA | +|multus.n2Interface.routes (optional)|Routes |NA | +|multus.f1cInterface.create |true/false |default false | +|multus.f1cInterface.ipAdd |IPV4 |NA | +|multus.f1cInterface.netmask |netmask |NA | +|multus.f1cInterface.gateway(optional)|netmask |NA | +|multus.f1cInterface.name (optional) |Interface name inside container|NA | +|multus.f1cInterface.routes (optional)|Routes |NA | +|multus.defaultGateway |IPV4 |Default route inside container (optional)| +|multus.hostInterface |HostInterface Name |NA | + + +The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters of oai-cu-cp. If you want to use your own configuration file for oai-cu-cp. It is recommended to copy it in `templates/configmap.yaml`. The command line arguments for oai-cu-cp is provided in `config.useAdditionalOptions`. You can find [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF) different sample configuration files for different bandwidths and frequencies. The binary of oai-gnb is called as `nr-softmodem`. To know more about its functioning and command line parameters you can visit this [page](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/RUNMODEM.md). @@ -93,7 +95,7 @@ If you want to use only one interface then you have to configure some parameters ``` local_s_if_name = "e1"; - local_s_address = "{{ .Values.multus.e1Interface.IPadd }}"; + local_s_address = "{{ .Values.multus.e1Interface.ipAdd }}"; remote_s_address = "{{ .Values.config.f1duIpAddress }}"; local_s_portc = 501; local_s_portd = 2153; @@ -106,7 +108,7 @@ If you want to use only one interface then you have to configure some parameters ( { type = "cp"; - ipv4_cucp = "{{ .Values.multus.e1Interface.IPadd }}"; + ipv4_cucp = "{{ .Values.multus.e1Interface.ipAdd }}"; port_cucp = 38462; ipv4_cuup = "{{ .Values.config.e1IpAddress }}"; port_cuup = 38462; @@ -118,7 +120,7 @@ If you want to use only one interface then you have to configure some parameters NETWORK_INTERFACES : { GNB_INTERFACE_NAME_FOR_NG_AMF = "e1"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "{{ .Values.multus.e1Interface.IPadd }}"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "{{ .Values.multus.e1Interface.ipAdd }}"; }; ``` diff --git a/charts/oai-5g-ran/oai-cu-cp/templates/configmap.yaml b/charts/oai-5g-ran/oai-cu-cp/templates/configmap.yaml index e467bd892796a62a6a512ac4d1845fe6848b80a1..4be2657b4345c34684d3199096c1acd5ad0d8870 100644 --- a/charts/oai-5g-ran/oai-cu-cp/templates/configmap.yaml +++ b/charts/oai-5g-ran/oai-cu-cp/templates/configmap.yaml @@ -23,7 +23,11 @@ data: // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = {{ .Values.config.tac}}; + {{- if .Values.config.sd }} + plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}}; sd = {{ .Values.config.sd}} }) }); + {{- else}} plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}} }) }); + {{- end}} nr_cellid = 12345678L; @@ -47,12 +51,7 @@ data: ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "@AMF_IP_ADDRESS@"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ( { ipv4 = "@AMF_IP_ADDRESS@";}); E1_INTERFACE = ( @@ -60,14 +59,13 @@ data: type = "cp"; ipv4_cucp = "@CUCP_IP_ADDRESS@"; port_cucp = 38462; - ipv4_cuup = "127.0.0.1"; + ipv4_cuup = "0.0.0.0"; port_cuup = 38462; } ) NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "{{ .Values.config.n2IfName}}"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "@N2_IP_ADDRESS@"; }; } diff --git a/charts/oai-5g-ran/oai-cu-cp/templates/deployment.yaml b/charts/oai-5g-ran/oai-cu-cp/templates/deployment.yaml index bfd31f56531f50315eab851cee89c211d94e91bd..de4d413010c378e870714ad744bd5b345b38685a 100644 --- a/charts/oai-5g-ran/oai-cu-cp/templates/deployment.yaml +++ b/charts/oai-5g-ran/oai-cu-cp/templates/deployment.yaml @@ -20,22 +20,31 @@ spec: annotations: k8s.v1.cni.cncf.io/networks: >- [{ - "name": "{{ .Chart.Name }}-e1", - "interface": "e1" + "name": "{{ .Chart.Name }}-{{ .Values.multus.e1Interface.name }}", + "interface": "{{ .Values.multus.e1Interface.name }}" {{- if .Values.multus.defaultGateway }} ,"default-route": ["{{ .Values.multus.defaultGateway }}"] {{- end }} + {{- if .Values.multus.e1Interface.gateway }} + ,"gateway": "{{ .Values.multus.e1Interface.gateway }}" + {{- end }} } {{- if .Values.multus.n2Interface.create }} ,{ - "name": "{{ .Chart.Name }}-n2", - "interface": "n2" + "name": "{{ .Chart.Name }}-{{ .Values.multus.n2Interface.name }}", + "interface": "{{ .Values.multus.n2Interface.name }}" + {{- if .Values.multus.n2Interface.gateway }} + ,"gateway": "{{ .Values.multus.n2Interface.gateway }}" + {{- end }} } {{- end }} {{- if .Values.multus.f1cInterface.create }} ,{ - "name": "{{ .Chart.Name }}-f1c", - "interface": "f1" + "name": "{{ .Chart.Name }}-{{ .Values.multus.f1cInterface.name }}", + "interface": "{{ .Values.multus.f1cInterface.name }}" + {{- if .Values.multus.f1cInterface.gateway }} + ,"gateway": "{{ .Values.multus.f1cInterface.gateway }}" + {{- end }} } {{- end }} ] @@ -47,9 +56,28 @@ spec: imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} + {{- if .Values.global }}{{ if .Values.global.waitForAMF }} + initContainers: + - name: init + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - until ncat -zv {{ .Values.config.amfhost }} 38412 --sctp ; do echo waiting for oai-amf to start; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m + {{- end }}{{ end }} containers: - - name: gnbcucp + - name: oaicucp image: "{{ .Values.nfimage.repository }}:{{ .Values.nfimage.version }}" + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} volumeMounts: - mountPath: /opt/oai-gnb/etc name: configuration @@ -74,7 +102,7 @@ spec: - containerPort: {{ .Values.config.f1cuPort}} name: f1c protocol: UDP - {{- if .Values.start.gnbcucp}} + {{- if .Values.start.oaicucp}} command: [ "/bin/bash", "-c" ] args: - AMF_IP_ADDRESS=$(getent hosts $AMF_HOST | awk '{print $1}'); @@ -106,8 +134,6 @@ spec: value: {{ .Values.config.n2IfName }} - name: E1_IF_NAME value: {{ .Values.config.e1IfName }} - - name: N3_IF_NAME - value: {{ .Values.config.n3IfName }} - name: F1_IF_NAME value: {{ .Values.config.f1IfName }} {{- if .Values.includeTcpDumpContainer }} @@ -124,17 +150,17 @@ spec: cpu: {{ .Values.resources.limits.tcpdump.cpu | quote }} {{- end}} securityContext: - privileged: true capabilities: add: - NET_ADMIN + - NET_RAW drop: - ALL {{- if .Values.start.tcpdump}} command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep diff --git a/charts/oai-5g-ran/oai-cu-cp/templates/multus.yaml b/charts/oai-5g-ran/oai-cu-cp/templates/multus.yaml index b5519bec28ba7d1b2e8b409f5fbf2fade21825eb..3843158afacba3148a4fe06277ac2fa89ea4902d 100644 --- a/charts/oai-5g-ran/oai-cu-cp/templates/multus.yaml +++ b/charts/oai-5g-ran/oai-cu-cp/templates/multus.yaml @@ -14,9 +14,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.e1Interface.IPadd "/" .Values.multus.e1Interface.Netmask | nospace | quote }} - {{- if .Values.multus.e1Interface.Gateway }} - ,"gateway": {{- cat .Values.multus.e1Interface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.e1Interface.ipAdd "/" .Values.multus.e1Interface.netmask | nospace | quote }} + {{- if .Values.multus.e1Interface.gateway }} + ,"gateway": {{- cat .Values.multus.e1Interface.gateway | nospace | quote }} {{- end }} } ] @@ -42,9 +42,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n2Interface.IPadd "/" .Values.multus.n2Interface.Netmask | nospace | quote }} - {{- if .Values.multus.n2Interface.Gateway }} - ,"gateway": {{- cat .Values.multus.n2Interface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.n2Interface.ipAdd "/" .Values.multus.n2Interface.netmask | nospace | quote }} + {{- if .Values.multus.n2Interface.gateway }} + ,"gateway": {{- cat .Values.multus.n2Interface.gateway | nospace | quote }} {{- end }} } ] @@ -70,9 +70,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.f1cInterface.IPadd "/" .Values.multus.f1cInterface.Netmask | nospace | quote }} - {{- if .Values.multus.f1cInterface.Gateway }} - ,"gateway": {{- cat .Values.multus.f1cInterface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.f1cInterface.ipAdd "/" .Values.multus.f1cInterface.netmask | nospace | quote }} + {{- if .Values.multus.f1cInterface.gateway }} + ,"gateway": {{- cat .Values.multus.f1cInterface.gateway | nospace | quote }} {{- end }} } ] @@ -81,4 +81,4 @@ spec: {{- end }} } }' -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/oai-5g-ran/oai-cu-cp/templates/rbac.yaml b/charts/oai-5g-ran/oai-cu-cp/templates/rbac.yaml index aed4d16a89647719ce3fc71eea05ca8fdde0e2ac..3293eb305c81d5a8a6da778e2774029b97f1474b 100644 --- a/charts/oai-5g-ran/oai-cu-cp/templates/rbac.yaml +++ b/charts/oai-5g-ran/oai-cu-cp/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/charts/oai-5g-ran/oai-cu-cp/values.yaml b/charts/oai-5g-ran/oai-cu-cp/values.yaml index 290d5e4b6e0a26470d076b83759f4803bcb1941f..322787617ec13d9455f50ba11f40100862dbfadd 100644 --- a/charts/oai-5g-ran/oai-cu-cp/values.yaml +++ b/charts/oai-5g-ran/oai-cu-cp/values.yaml @@ -1,10 +1,10 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-gnb ## dockerhub oaisoftwarealliance/oai-gnb - version: 2023.w49 # image tag or develop + version: 2024.w32 # image tag or develop # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent @@ -21,41 +21,40 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "oai-cu-cp-sa" -## CU-CP can work with 1 virtual ip-address here we are using three different virtual interfaces. -## In case you are using 1 ip-address for all 3 logical interfaces then please change it template/configmap.yaml -## Change these ip-addresses according to your environment +# oai-cu-cp can be configured with multiple interface which may correspond to 3GPP logical interfaces. There can be one to one or one to many. +# In case of one to one mapping e1,f1c,n2 all can have separate virtual interfaces. +# In one to many mapping e1,f1c and n2 all can be mapped to one virtual interface. +# Interface mapping is strictly based on your networking environment +## Change these ip-addresses according to your environment multus: # to remove the default gateway change it with "" defaultGateway: "" - e1Interface: + e1Interface: # use this interface if using one interface for all 3GPP interfaces create: false - IPadd: "192.168.18.12" - Netmask: "24" - # #name inside the pod is hardcoded right now - # name: "e1" + ipAdd: "192.168.18.12" + netmask: "24" + name: "e1" # if gatway is empty then it will be removed - #Gateway: "" + #gateway: "" #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled n2Interface: create: false - IPadd: "172.21.6.98" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "n2" + ipAdd: "172.21.6.98" + netmask: "22" + name: "n2" # if gatway is empty then it will be removed - #Gateway: "" + #gateway: "" #routes: hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled f1cInterface: create: false - IPadd: "172.21.16.92" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "f1c" + ipAdd: "172.21.16.92" + netmask: "22" + name: "f1c" # if gatway is empty then it will be removed - #Gateway: "" + #gateway: "" #routes: hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled @@ -71,29 +70,31 @@ config: sst: "1" #currently only 4 standard values are allowed 1,2,3,4 amfhost: "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94 n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 - n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 f1IfName: "eth0" #if multus.f1Interface.create is true then use f1 e1IfName: "eth0" #if multus.f1Interface.create is true then use e1 - f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different - f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + f1cuPort: "2153" #2153 if using same interface for f1 and n2 else standard port 2152 should be use if f1 and n3 interface are different + f1duPort: "2153" #2153 if using same interface for f1 and n2 else standard port 2152 should be use if f1 and n3 interface are different # Debugging section podSecurityContext: runAsUser: 0 runAsGroup: 0 +securityContext: + privileged: false + start: - gnbcucp: true + oaicucp: true tcpdump: false includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent + ## NF is the network function and tcpdump is the tcpdump container. ## To know more about request and limit it is better to understand that how Kubernetes QoS works. diff --git a/charts/oai-5g-ran/oai-cu-up/Chart.yaml b/charts/oai-5g-ran/oai-cu-up/Chart.yaml index 79972c8b520f71a9aa98bfdcff1b02579f116716..654de02eeb8315d6e7109a9d33b6b4857fe3e88f 100644 --- a/charts/oai-5g-ran/oai-cu-up/Chart.yaml +++ b/charts/oai-5g-ran/oai-cu-up/Chart.yaml @@ -37,7 +37,7 @@ icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_fin # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.0 +version: 2.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/oai-5g-ran/oai-cu-up/README.md b/charts/oai-5g-ran/oai-cu-up/README.md index 4f8fc84a6207e21c9c1dfe8a638e977878fefee6..46b918b633a59a0fc25cc4cfe385a578b4c61670 100644 --- a/charts/oai-5g-ran/oai-cu-up/README.md +++ b/charts/oai-5g-ran/oai-cu-up/README.md @@ -2,7 +2,7 @@ Before using this helm-chart we recommend you read about OAI codebase and its working from the documents listed on [OAI gitlab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/doc). Here you can find a dedicated document on [F1 design](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/F1-design.md) and [E1 design](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/E1-design.md) -**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10 and 4.12. It requires minimum 1CPU and 1Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin for multiple interfaces. +**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.15. It requires minimum 1CPU and 1Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin for multiple interfaces. ## Introduction @@ -13,7 +13,7 @@ The [codebase](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop) 1. `oaisoftwarealliance/oai-gnb` for monolithic gNB, DU, CU, CU-CP 2. `oaisoftwarealliance/oai-nr-cuup` for CU-UP. -Each image has develop tag and a dedicated week tag for example `2023.w18`. We only publish Ubuntu 18.04/20.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +Each image has develop tag and a dedicated week tag for example `2024.w32`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-CU-UP creates multiples Kubernetes resources, @@ -22,7 +22,7 @@ The helm chart of OAI-CU-UP creates multiples Kubernetes resources, 3. Deployment 4. Configmap 5. Service account -6. Network-attachment-defination (Optional only when multus is used) +6. Network-attachment-definition (Optional only when multus is used) The directory structure @@ -45,10 +45,9 @@ The directory structure [Values.yaml](./values.yaml) contains all the configurable parameters. Below table defines the configurable parameters. The ip-addresses of N3, E1 and F1U have to be pre-configured in the configuration. Most of the primary CNIs do not allow static ip-address allocation. To overcome this we are using multus-cni with static ip-address allocation. At minimum you have to create one multus interface which you can use for N3, E1 and F1U. If you want you can create dedicated interfaces for N3, E1 and F1U. - |Parameter |Allowed Values |Remark | |---------------------------------|-------------------------------|---------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -58,27 +57,27 @@ The directory structure |serviceAccount.name |String | | |podSecurityContext.runAsUser |Integer (0,65534) | | |podSecurityContext.runAsGroup |Integer (0,65534) | | -|multus.defaultGateway |Ip-Address |default route in the pod | -|multus.n3Interface.create |true/false | | -|multus.n3Interface.IPadd |Ip-Address | | -|multus.n3Interface.Netmask |Netmask | | -|multus.n3Interface.Gateway |Ip-Address | | -|multus.n3Interface.routes |Json |Routes you want to add in the pod| -|multus.n3Interface.hostInterface |host interface |Host machine interface name | -|multus.e1Interface.create |true/false | | -|multus.e1Interface.IPadd |Ip-Address) | | -|multus.e1Interface.Netmask |Netmask | | -|multus.e1Interface.Gateway |Ip-Address | | -|multus.e1Interface.hostInterface |host interface | | -|multus.e1Interface.routes |Json |Routes you want to add in the pod| -|multus.f1uInterface.create |true/false | | -|multus.f1uInterface.IPadd |Ip-Address | | -|multus.f1uInterface.Netmask |Netmask | | -|multus.f1uInterface.Gateway |Ip-Address | | -|multus.f1uInterface.routes |Json |Routes you want to add in the pod| -|multus.f1uInterface.hostInterface|host interface |Host machine interface name | - -The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters of oai-gnb-cu-cp. If you want to use your own configuration file for oai-cu-up. It is recommended to copy it in `templates/configmap.yaml` and set `config.mountConfig` as `true`. The command line arguments for oai-cu-up is provided in `config.useAdditionalOptions`. +|multus.e1Interface.ipAdd |IPV4 |NA | +|multus.e1Interface.netmask |netmask |NA | +|multus.e1Interface.gateway(optional)|netmask |NA | +|multus.e1Interface.name (optional) |Interface name inside container|NA | +|multus.e1Interface.routes (optional)|Routes |NA | +|multus.n3Interface.create |true/false |default false | +|multus.n3Interface.ipAdd |IPV4 |NA | +|multus.n3Interface.netmask |netmask |NA | +|multus.n3Interface.gateway(optional)|netmask |NA | +|multus.n3Interface.name (optional) |Interface name inside container|NA | +|multus.n3Interface.routes (optional)|Routes |NA | +|multus.f1uInterface.create |true/false |default false | +|multus.f1uInterface.ipAdd |IPV4 |NA | +|multus.f1uInterface.netmask |netmask |NA | +|multus.f1uInterface.gateway(optional)|netmask |NA | +|multus.f1uInterface.name (optional) |Interface name inside container|NA | +|multus.f1uInterface.routes (optional)|Routes |NA | +|multus.defaultGateway |IPV4 |Default route inside container (optional)| +|multus.hostInterface |HostInterface Name |NA | + +The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters of oai-cu-up. If you want to use your own configuration file for oai-cu-up. It is recommended to copy it in `templates/configmap.yaml`. The command line arguments for oai-cu-up is provided in `config.useAdditionalOptions`. You can find [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF) different sample configuration files for different bandwidths and frequencies. The binary of oai-gnb is called as `nr-softmodem`. To know more about its functioning and command line parameters you can visit this [page](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/RUNMODEM.md) @@ -95,7 +94,7 @@ If you want to use only one interface then you have to configure some parameters ``` local_s_if_name = "e1"; - local_s_address = "{{ .Values.multus.e1Interface.IPadd }}"; + local_s_address = "{{ .Values.multus.e1Interface.ipAdd }}"; remote_s_address = "{{ .Values.config.f1duIpAddress }}"; local_s_portc = 501; local_s_portd = 2153; @@ -106,10 +105,8 @@ If you want to use only one interface then you have to configure some parameters ``` NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "e1"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "{{ .Values.multus.e1Interface.IPadd }}"; - GNB_INTERFACE_NAME_FOR_NGU = "e1"; - GNB_IPV4_ADDRESS_FOR_NGU = "{{ .Values.multus.e1Interface.IPadd }}"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "{{ .Values.multus.e1Interface.ipAdd }}"; + GNB_IPV4_ADDRESS_FOR_NGU = "{{ .Values.multus.e1Interface.ipAdd }}"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; ``` @@ -180,4 +177,4 @@ ping -I oaitun_ue1 8.8.8.8 ## Note -1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. \ No newline at end of file +1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. diff --git a/charts/oai-5g-ran/oai-cu-up/templates/configmap.yaml b/charts/oai-5g-ran/oai-cu-up/templates/configmap.yaml index 3e2022741fbfd81d5d55d5b7fd39d106edcddf75..a1dbe651a825e9784c46bab6596366fb90aacdf9 100644 --- a/charts/oai-5g-ran/oai-cu-up/templates/configmap.yaml +++ b/charts/oai-5g-ran/oai-cu-up/templates/configmap.yaml @@ -22,8 +22,11 @@ data: // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = {{ .Values.config.tac}}; + {{- if .Values.config.sd }} + plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}}; sd = {{ .Values.config.sd}} }) }); + {{- else}} plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}} }) }); - + {{- end}} tr_s_preference = "f1"; @@ -54,9 +57,7 @@ data: NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "{{ .Values.config.n2IfName}}"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "@N2_IP_ADDRESS@"; - GNB_INTERFACE_NAME_FOR_NGU = "{{ .Values.config.n3IfName}}"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "@N3_IP_ADDRESS@"; GNB_IPV4_ADDRESS_FOR_NGU = "@N3_IP_ADDRESS@"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/charts/oai-5g-ran/oai-cu-up/templates/deployment.yaml b/charts/oai-5g-ran/oai-cu-up/templates/deployment.yaml index 6086acf9bbb94ad32111bdcab012b69b8dbe932c..f98a5648c64be4f02e223dc638c23eaad5fab406 100644 --- a/charts/oai-5g-ran/oai-cu-up/templates/deployment.yaml +++ b/charts/oai-5g-ran/oai-cu-up/templates/deployment.yaml @@ -20,22 +20,31 @@ spec: annotations: k8s.v1.cni.cncf.io/networks: >- [{ - "name": "{{ .Chart.Name }}-e1", - "interface": "e1" + "name": "{{ .Chart.Name }}-{{ .Values.multus.e1Interface.name }}", + "interface": "{{ .Values.multus.e1Interface.name }}" {{- if .Values.multus.defaultGateway }} ,"default-route": ["{{ .Values.multus.defaultGateway }}"] {{- end }} + {{- if .Values.multus.e1Interface.gateway }} + ,"gateway": "{{ .Values.multus.e1Interface.gateway }}" + {{- end }} } {{- if .Values.multus.n3Interface.create }} ,{ - "name": "{{ .Chart.Name }}-n3", - "interface": "n3" + "name": "{{ .Chart.Name }}-{{ .Values.multus.n3Interface.name }}", + "interface": "{{ .Values.multus.n3Interface.name }}" + {{- if .Values.multus.n3Interface.gateway }} + ,"gateway": "{{ .Values.multus.n3Interface.gateway }}" + {{- end }} } {{- end }} {{- if .Values.multus.f1uInterface.create }} ,{ - "name": "{{ .Chart.Name }}-f1u", - "interface": "f1" + "name": "{{ .Chart.Name }}-{{ .Values.multus.f1uInterface.name }}", + "interface": "{{ .Values.multus.f1uInterface.name }}" + {{- if .Values.multus.f1uInterface.gateway }} + ,"gateway": "{{ .Values.multus.f1uInterface.gateway }}" + {{- end }} } {{- end }} ] @@ -47,9 +56,26 @@ spec: imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} + initContainers: + - name: init + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - until ncat -zv {{ .Values.config.cuCpHost }} 38462 --sctp ; do echo waiting for cucp to start; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m containers: - - name: gnbcuup + - name: oaicuup image: "{{ .Values.nfimage.repository }}:{{ .Values.nfimage.version }}" + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} volumeMounts: - mountPath: /opt/oai-gnb/etc/ name: configuration @@ -62,8 +88,6 @@ spec: memory: {{ .Values.resources.limits.nf.memory | quote }} cpu: {{ .Values.resources.limits.nf.cpu | quote }} {{- end}} - securityContext: - privileged: true ports: - containerPort: 2152 name: n3 @@ -74,16 +98,12 @@ spec: - containerPort: {{ .Values.config.f1cuPort}} name: f1u protocol: UDP - {{- if .Values.start.gnbcuup}} + {{- if .Values.start.oaicuup}} command: [ "/bin/bash", "-c" ] args: - - {{- if eq .Values.kubernetesType "Vanilla" }} - apt update && apt install iproute2 -y; - {{- end }} - CU_CP_IP_ADDRESS=$(getent hosts $CU_CP_HOST | awk '{print $1}'); + - CU_CP_IP_ADDRESS=$(getent hosts $CU_CP_HOST | awk '{print $1}'); CU_CP_IP_ADDRESS=$(if [[ $CU_CP_IP_ADDRESS ]]; then echo $CU_CP_IP_ADDRESS; else echo $CU_CP_HOST;fi) CU_UP_IP_ADDRESS=$(ip -f inet addr show $E1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"); - N2_IP_ADDRESS=$(ip -f inet addr show $N2_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"); N3_IP_ADDRESS=$(ip -f inet addr show $N3_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"); F1_IP_ADDRESS=$(ip -f inet addr show $F1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"); sed -e s/@N2_IP_ADDRESS@/$N2_IP_ADDRESS/g @@ -106,8 +126,6 @@ spec: value: {{ .Values.config.useAdditionalOptions }} - name: CU_CP_HOST value: {{ .Values.config.cuCpHost }} - - name: N2_IF_NAME - value: {{ .Values.config.n2IfName }} - name: N3_IF_NAME value: {{ .Values.config.n3IfName }} - name: F1_IF_NAME @@ -128,17 +146,17 @@ spec: cpu: {{ .Values.resources.limits.tcpdump.cpu | quote }} {{- end}} securityContext: - privileged: true capabilities: add: - NET_ADMIN + - NET_RAW drop: - ALL {{- if .Values.start.tcpdump}} command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep diff --git a/charts/oai-5g-ran/oai-cu-up/templates/multus.yaml b/charts/oai-5g-ran/oai-cu-up/templates/multus.yaml index 6881f0de3ab4a9cdb0eca1bf1a4e3762c31c4e63..d62cd3368609a1b38a94e552c2bfdcea71e25762 100644 --- a/charts/oai-5g-ran/oai-cu-up/templates/multus.yaml +++ b/charts/oai-5g-ran/oai-cu-up/templates/multus.yaml @@ -14,9 +14,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.e1Interface.IPadd "/" .Values.multus.e1Interface.Netmask | nospace | quote }} - {{- if .Values.multus.e1Interface.Gateway }} - ,"gateway": {{- cat .Values.multus.e1Interface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.e1Interface.ipAdd "/" .Values.multus.e1Interface.netmask | nospace | quote }} + {{- if .Values.multus.e1Interface.gateway }} + ,"gateway": {{- cat .Values.multus.e1Interface.gateway | nospace | quote }} {{- end }} } ] @@ -42,9 +42,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n3Interface.IPadd "/" .Values.multus.n3Interface.Netmask | nospace | quote }} - {{- if .Values.multus.n3Interface.Gateway }} - ,"gateway": {{- cat .Values.multus.n3Interface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.n3Interface.ipAdd "/" .Values.multus.n3Interface.netmask | nospace | quote }} + {{- if .Values.multus.n3Interface.gateway }} + ,"gateway": {{- cat .Values.multus.n3Interface.gateway | nospace | quote }} {{- end }} } ] @@ -70,9 +70,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.f1uInterface.IPadd "/" .Values.multus.f1uInterface.Netmask | nospace | quote }} - {{- if .Values.multus.f1uInterface.Gateway }} - ,"gateway": {{- cat .Values.multus.f1uInterface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.f1uInterface.ipAdd "/" .Values.multus.f1uInterface.netmask | nospace | quote }} + {{- if .Values.multus.f1uInterface.gateway }} + ,"gateway": {{- cat .Values.multus.f1uInterface.gateway | nospace | quote }} {{- end }} } ] @@ -81,4 +81,4 @@ spec: {{- end }} } }' -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/oai-5g-ran/oai-cu-up/templates/rbac.yaml b/charts/oai-5g-ran/oai-cu-up/templates/rbac.yaml index aed4d16a89647719ce3fc71eea05ca8fdde0e2ac..3293eb305c81d5a8a6da778e2774029b97f1474b 100644 --- a/charts/oai-5g-ran/oai-cu-up/templates/rbac.yaml +++ b/charts/oai-5g-ran/oai-cu-up/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/charts/oai-5g-ran/oai-cu-up/values.yaml b/charts/oai-5g-ran/oai-cu-up/values.yaml index 213a65f3514a363121d90a56a448343b036086b8..e9c75ccc546e80b751fc3a24f223ea2491821d0b 100644 --- a/charts/oai-5g-ran/oai-cu-up/values.yaml +++ b/charts/oai-5g-ran/oai-cu-up/values.yaml @@ -1,10 +1,10 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-nr-cuup ## dockerhub oaisoftwarealliance/oai-gnb - version: 2023.w49 # image tag or develop + version: 2024.w32 # image tag or develop # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent @@ -21,40 +21,40 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "oai-cu-up-sa" -## CU-UP can work with 1 virtual ip-address here we are using three different virtual interfaces. -## In case you are using 1 ip-address for all 3 logical interfaces then please change it template/configmap.yaml -## Change these ip-addresses according to your environment +# oai-cu-up can be configured with multiple interface which may correspond to 3GPP logical interfaces. There can be one to one or one to many. +# In case of one to one mapping e1,f1u,n3 all can have separate virtual interfaces. +# In one to many mapping e1,f1u and n3 all can be mapped to one virtual interface. +# Interface mapping is strictly based on your networking environment +## Change these ip-addresses according to your environment + multus: - #if defaultGateway is empty then it will be removed + # to remove the default gateway change it with "" defaultGateway: "" - e1Interface: + e1Interface: # use this interface if using one interface for all 3GPP interfaces create: false - IPadd: "192.168.18.13" - Netmask: "24" - # #name inside the pod is hardcoded right now - # name: "e1" + ipAdd: "192.168.18.13" + netmask: "24" + name: "e1" # if gatway is empty then it will be removed - #Gateway: "" + #gateway: "" #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled n3Interface: create: false - IPadd: "172.21.8.97" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "n3" + ipAdd: "172.21.8.97" + netmask: "22" + name: "n3" # if gatway is empty then it will be removed - #Gateway: "" + #gateway: "" #routes: [] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled f1uInterface: create: false - IPadd: "172.21.16.93" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "f1u" + ipAdd: "172.21.16.93" + netmask: "22" + name: "f1u" # if gatway is empty then it will be removed - #Gateway: "" + #gateway: "" #routes: [] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled @@ -69,10 +69,9 @@ config: tac: "1" # check the information with AMF sst: "1" #currently only 4 standard values are allowed 1,2,3,4 cuCpHost: "oai-cu" # - n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 - n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 - f1IfName: "eth0" #if multus.f1uInterface.create is true then use f1 - e1IfName: "eth0" #if multus.e1Interface.create is true then use e1 + n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n3 or eth0 + f1IfName: "eth0" #if multus.f1uInterface.create is true then use f1 or you can only use 1 interface n3 or eth0 + e1IfName: "eth0" #if multus.e1Interface.create is true then use e1 or you can only use 1 interface n3 or eth0 f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different @@ -81,18 +80,20 @@ podSecurityContext: runAsUser: 0 runAsGroup: 0 +securityContext: + privileged: false + start: - gnbcuup: true #If false the network function container will run in sleep mode for manually testing + oaicuup: true #If false the network function container will run in sleep mode for manually testing tcpdump: false includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent ## NF is the network function and tcpdump is the tcpdump container. ## To know more about request and limit it is better to understand that how Kubernetes QoS works. diff --git a/charts/oai-5g-ran/oai-cu/Chart.yaml b/charts/oai-5g-ran/oai-cu/Chart.yaml index d2bb3ec1bfa5bb06772294ba085413200af5f298..686e9f0fdb64aa615bca65801c82e05d56a01e75 100644 --- a/charts/oai-5g-ran/oai-cu/Chart.yaml +++ b/charts/oai-5g-ran/oai-cu/Chart.yaml @@ -37,7 +37,7 @@ icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_fin # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.0 +version: 2.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/oai-5g-ran/oai-cu/README.md b/charts/oai-5g-ran/oai-cu/README.md index e6b3da3c68c466b8c18bff21ce760c119fd1daa6..bd09605b1cc951f9c6767ea007a9703ca937f24e 100644 --- a/charts/oai-5g-ran/oai-cu/README.md +++ b/charts/oai-5g-ran/oai-cu/README.md @@ -2,7 +2,7 @@ Before using these helm-charts we recommend you read about OAI codebase and its working from the documents listed on [OAI gitlab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/doc). Here you can find a dedicated document on [F1 design](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/F1-design.md). -**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12 and 4.13. It requires minimum 1CPU and 1Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin if you want to configure multiple interfaces for the CU pod. +**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. It requires minimum 1CPU and 1Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin if you want to configure multiple interfaces for the CU pod. ## Introduction @@ -14,7 +14,7 @@ The [codebase](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop) 1. `oaisoftwarealliance/oai-gnb` for monolithic gNB, DU, CU, CU-CP 2. `oaisoftwarealliance/oai-nr-cuup` for CU-UP. -Each image has develop tag and a dedicated week tag for example `2023.w18`. We only publish Ubuntu 20.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +Each image has develop tag and a dedicated week tag for example `2024.w32`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-CU creates multiples Kubernetes resources, @@ -23,7 +23,7 @@ The helm chart of OAI-CU creates multiples Kubernetes resources, 3. Deployment 4. Configmap 5. Service account -6. Network-attachment-defination (Optional only when multus is used) +6. Network-attachment-definition (Optional only when multus is used) The directory structure @@ -47,39 +47,41 @@ The directory structure [Values.yaml](./values.yaml) contains all the configurable parameters. Below table defines the configurable parameters. You can use the same interface for N2,N3 and F1. If you want you can create dedicated interface for N2, N3 and F1. -|Parameter |Allowed Values |Remark | -|--------------------------------|-------------------------------|--------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | -|nfimage.repository |Image Name | | -|nfimage.version |Image tag | | -|nfimage.pullPolicy |IfNotPresent or Never or Always| | -|imagePullSecrets.name |String |Good to use for docker hub | -|serviceAccount.create |true/false | | -|serviceAccount.annotations |String | | -|serviceAccount.name |String | | -|podSecurityContext.runAsUser |Integer (0,65534) | | -|podSecurityContext.runAsGroup |Integer (0,65534) | | -|multus.defaultGateway |Ip-Address |default route in the pod | -|multus.n2Interface.create |true/false | | -|multus.n2Interface.IPadd |Ip-Address | | -|multus.n2Interface.Netmask |Netmask | | -|multus.n2Interface.Gateway |Ip-Address | | -|multus.n2Interface.routes |Json |Routes you want to add in the pod | -|multus.n2Interface.hostInterface|host interface |Host machine interface name | -|multus.n3Interface.create |true/false | | -|multus.n3Interface.IPadd |Ip-Address | | -|multus.n3Interface.Netmask |Netmask | | -|multus.n3Interface.Gateway |Ip-Address | | -|multus.n3Interface.routes |Json |Routes you want to add in the pod | -|multus.n3Interface.hostInterface|host interface |Host machine interface name | -|multus.f1Interface.create |true/false | | -|multus.f1Interface.IPadd |Ip-Address | | -|multus.f1Interface.Netmask |Netmask | | -|multus.f1Interface.Gateway |Ip-Address | | -|multus.f1Interface.hostInterface|host interface |Host machine interface name | - - -The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters of oai-gnb-cu. If you want to use your own configuration file for oai-gnb-cu. It is recommended to copy it in `templates/configmap.yaml` and set `config.mountConfig` as `true`. The command line for gnb is provided in `config.useAdditionalOptions`. +|Parameter |Allowed Values |Remark | +|------------------------------------|-------------------------------|-----------------------------------------| +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|nfimage.repository |Image Name | | +|nfimage.version |Image tag | | +|nfimage.pullPolicy |IfNotPresent or Never or Always| | +|imagePullSecrets.name |String |Good to use for docker hub | +|serviceAccount.create |true/false | | +|serviceAccount.annotations |String | | +|serviceAccount.name |String | | +|podSecurityContext.runAsUser |Integer (0,65534) | | +|podSecurityContext.runAsGroup |Integer (0,65534) | | +|multus.n3Interface.create |true/false |default false | +|multus.n3Interface.ipAdd |IPV4 |NA | +|multus.n3Interface.netmask |netmask |NA | +|multus.n3Interface.gateway(optional)|netmask |NA | +|multus.n3Interface.name (optional) |Interface name inside container|NA | +|multus.n3Interface.routes (optional)|Routes |NA | +|multus.n2Interface.create |true/false |default false | +|multus.n2Interface.ipAdd |IPV4 |NA | +|multus.n2Interface.netmask |netmask |NA | +|multus.n2Interface.gateway(optional)|netmask |NA | +|multus.n2Interface.name (optional) |Interface name inside container|NA | +|multus.n2Interface.routes (optional)|Routes |NA | +|multus.f1Interface.create |true/false |default false | +|multus.f1Interface.ipAdd |IPV4 |NA | +|multus.f1Interface.netmask |netmask |NA | +|multus.f1Interface.gateway(optional)|netmask |NA | +|multus.f1Interface.name (optional) |Interface name inside container|NA | +|multus.f1Interface.routes (optional)|Routes |NA | +|multus.defaultGateway |IPV4 |Default route inside container (optional)| +|multus.hostInterface |HostInterface Name |NA | + + +The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters of oai-cu. If you want to use your own configuration file for oai-cu. It is recommended to copy it in `templates/configmap.yaml`. The command line for gnb is provided in `config.useAdditionalOptions`. The charts are configured to be used with primary CNI of Kubernetes. When you will mount the configuration file you have to define static ip-addresses for N2, N3 and F1. Most of the primary CNIs do not allow static ip-address allocation. To overcome this we are using multus-cni with static ip-address allocation. @@ -121,14 +123,13 @@ Only needed if you are doing advanced debugging - [OAI 5G Core Basic](../../oai-5g-basic/README.md) - [OAI 5G Core Mini](../../oai-5g-mini/README.md) 1. Configure the `parent` interface for `f1` based on your Kubernetes cluster worker nodes. - -2. If you want to mount your configuration file then you set can `config.mountConfig`. The configuration file should be added in `templates/configmap.yaml`. Once the CU is configured. +2. The configuration file should be added in `templates/configmap.yaml`. Once the CU is configured. ```bash helm install oai-gnb-cu . ``` -2. Configure and install the DU, in case you want to mount the configuration file you set can `config.mountConfig`. The configuration file should be added in `templates/configmap.yaml`. Once the DU is configured. +2. Configure and install the DU, the configuration file should be added in `templates/configmap.yaml`. Once the DU is configured. ```bash helm install oai-gnb-du ../oai-gnb-du @@ -152,4 +153,4 @@ ping -I oaitun_ue1 8.8.8.8 ## Note -1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. \ No newline at end of file +1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. diff --git a/charts/oai-5g-ran/oai-cu/templates/NOTES.txt b/charts/oai-5g-ran/oai-cu/templates/NOTES.txt index 0b794394541174e20fecda9685311995a5e5ece2..340d724ac286f3087b96323035fe98ce995a1497 100644 --- a/charts/oai-5g-ran/oai-cu/templates/NOTES.txt +++ b/charts/oai-5g-ran/oai-cu/templates/NOTES.txt @@ -2,4 +2,4 @@ export GNB__CU_POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-cu.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") export GNB_CU_eth0_IP=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-cu.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[*].status.podIP}") 2. Dockerhub images of OpenAirInterface requires avx2 capabilities in the cpu and they are built for x86 architecture, tested on UBUNTU OS only. -3. If you want to configure for a particular band then copy the configuration file in templates/configmap.yaml from here https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF \ No newline at end of file +3. If you want to configure for a particular band then copy the configuration file in templates/configmap.yaml from here https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF diff --git a/charts/oai-5g-ran/oai-cu/templates/configmap.yaml b/charts/oai-5g-ran/oai-cu/templates/configmap.yaml index 042f65b55b5931f9cc5e18f491d8cda4cec5cebe..2d93356636e5ebd99f6d8d5e82d638d8554a7e82 100644 --- a/charts/oai-5g-ran/oai-cu/templates/configmap.yaml +++ b/charts/oai-5g-ran/oai-cu/templates/configmap.yaml @@ -23,7 +23,11 @@ data: // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = {{ .Values.config.tac}}; + {{- if .Values.config.sd }} + plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}}; sd = {{ .Values.config.sd}} }) }); + {{- else}} plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}} }) }); + {{- end}} nr_cellid = 12345678L; @@ -48,7 +52,6 @@ data: ////////// AMF parameters: amf_ip_address = ( { ipv4 = "@AMF_IP_ADDRESS@"; - ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; } diff --git a/charts/oai-5g-ran/oai-cu/templates/deployment.yaml b/charts/oai-5g-ran/oai-cu/templates/deployment.yaml index 257a4712d44fe538254c32f9ffc2b4bb097902b7..4656dde5fecfe50589920ef5bfebdcecc9511cd2 100644 --- a/charts/oai-5g-ran/oai-cu/templates/deployment.yaml +++ b/charts/oai-5g-ran/oai-cu/templates/deployment.yaml @@ -20,22 +20,31 @@ spec: annotations: k8s.v1.cni.cncf.io/networks: >- [{ - "name": "{{ .Chart.Name }}-f1", - "interface": "f1" + "name": "{{ .Chart.Name }}-{{ .Values.multus.f1Interface.name }}", + "interface": "{{ .Values.multus.f1Interface.name }}" {{- if .Values.multus.defaultGateway }} ,"default-route": ["{{ .Values.multus.defaultGateway }}"] {{- end }} + {{- if .Values.multus.f1Interface.gateway }} + ,"gateway": "{{ .Values.multus.f1Interface.gateway }}" + {{- end }} } {{- if .Values.multus.n3Interface.create }} ,{ - "name": "{{ .Chart.Name }}-n3", - "interface": "n3" + "name": "{{ .Chart.Name }}-{{ .Values.multus.n3Interface.name }}", + "interface": "{{ .Values.multus.n3Interface.name }}" + {{- if .Values.multus.n3Interface.gateway }} + ,"gateway": "{{ .Values.multus.n3Interface.gateway }}" + {{- end }} } {{- end }} {{- if .Values.multus.n2Interface.create }} ,{ - "name": "{{ .Chart.Name }}-n2", - "interface": "n2" + "name": "{{ .Chart.Name }}-{{ .Values.multus.n3Interface.name }}", + "interface": "{{ .Values.multus.n3Interface.name }}" + {{- if .Values.multus.n2Interface.gateway }} + ,"gateway": "{{ .Values.multus.n2Interface.gateway }}" + {{- end }} } {{- end }} ] @@ -47,9 +56,28 @@ spec: imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} + {{- if .Values.global }}{{ if .Values.global.waitForAMF }} + initContainers: + - name: init + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - until ncat -zv {{ .Values.config.amfhost }} 38412 --sctp ; do echo waiting for oai-amf to start; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m + {{- end }}{{ end }} containers: - - name: gnbcu + - name: oai-cu image: "{{ .Values.nfimage.repository }}:{{ .Values.nfimage.version }}" + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} volumeMounts: - mountPath: /opt/oai-gnb/etc name: configuration @@ -62,8 +90,6 @@ spec: memory: {{ .Values.resources.limits.nf.memory | quote }} cpu: {{ .Values.resources.limits.nf.cpu | quote }} {{- end}} - securityContext: - privileged: true ports: - containerPort: 2152 name: n3 @@ -74,7 +100,7 @@ spec: - containerPort: {{ .Values.config.f1cuPort }} name: f1 protocol: UDP - {{- if .Values.start.gnbcu}} + {{- if .Values.start.oaiCu}} command: [ "/bin/bash", "-c" ] args: - AMF_IP_ADDRESS=$(getent hosts $AMF_HOST | awk '{print $1}'); @@ -122,17 +148,17 @@ spec: cpu: {{ .Values.resources.limits.tcpdump.cpu | quote }} {{- end}} securityContext: - privileged: true capabilities: add: - NET_ADMIN + - NET_RAW drop: - ALL {{- if .Values.start.tcpdump}} command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep diff --git a/charts/oai-5g-ran/oai-cu/templates/multus.yaml b/charts/oai-5g-ran/oai-cu/templates/multus.yaml index dd2f58f16432113fe53835c42ca320a26b46948f..56bf1a926c7be28d8f14e44d5d902f34db31f9e9 100644 --- a/charts/oai-5g-ran/oai-cu/templates/multus.yaml +++ b/charts/oai-5g-ran/oai-cu/templates/multus.yaml @@ -14,9 +14,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n2Interface.IPadd "/" .Values.multus.n2Interface.Netmask | nospace | quote }} - {{- if .Values.multus.n2Interface.Gateway }} - ,"gateway": {{- cat .Values.multus.n2Interface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.n2Interface.ipAdd "/" .Values.multus.n2Interface.netmask | nospace | quote }} + {{- if .Values.multus.n2Interface.gateway }} + ,"gateway": {{- cat .Values.multus.n2Interface.gateway | nospace | quote }} {{- end }} } ] @@ -42,9 +42,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n3Interface.IPadd "/" .Values.multus.n3Interface.Netmask | nospace | quote }} - {{- if .Values.multus.n3Interface.Gateway }} - ,"gateway": {{- cat .Values.multus.n3Interface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.n3Interface.ipAdd "/" .Values.multus.n3Interface.netmask | nospace | quote }} + {{- if .Values.multus.n3Interface.gateway }} + ,"gateway": {{- cat .Values.multus.n3Interface.gateway | nospace | quote }} {{- end }} } ] @@ -70,9 +70,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.f1Interface.IPadd "/" .Values.multus.f1Interface.Netmask | nospace | quote }} - {{- if .Values.multus.f1Interface.Gateway }} - ,"gateway": {{- cat .Values.multus.f1Interface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.f1Interface.ipAdd "/" .Values.multus.f1Interface.netmask | nospace | quote }} + {{- if .Values.multus.f1Interface.gateway }} + ,"gateway": {{- cat .Values.multus.f1Interface.gateway | nospace | quote }} {{- end }} } ] @@ -81,4 +81,4 @@ spec: {{- end }} } }' -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/oai-5g-ran/oai-cu/templates/rbac.yaml b/charts/oai-5g-ran/oai-cu/templates/rbac.yaml index aed4d16a89647719ce3fc71eea05ca8fdde0e2ac..3293eb305c81d5a8a6da778e2774029b97f1474b 100644 --- a/charts/oai-5g-ran/oai-cu/templates/rbac.yaml +++ b/charts/oai-5g-ran/oai-cu/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/charts/oai-5g-ran/oai-cu/values.yaml b/charts/oai-5g-ran/oai-cu/values.yaml index e2c6a223615edfa075257d24f92d40c5617d9de9..528d9d931c56cb65cb105a0b55725a6453468ee4 100644 --- a/charts/oai-5g-ran/oai-cu/values.yaml +++ b/charts/oai-5g-ran/oai-cu/values.yaml @@ -1,10 +1,10 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-gnb ## dockerhub oaisoftwarealliance/oai-gnb - version: 2023.w49 # image tag or develop + version: 2024.w32 # image tag or develop # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent @@ -22,41 +22,38 @@ serviceAccount: name: "oai-cu-sa" # oai-cu can be configured with multiple interface which may correspond to 3GPP logical interfaces. There can be one to one or one to many. -# In case of one to one mapping f1, n2, n3 all can have seperate virtual interfaces. +# In case of one to one mapping f1, n2, n3 all can have separate virtual interfaces. # In one to many mapping f1,n2 and n3 all can be mapped to one virtual interface. # Interface mapping is strictly based on your networking environment ## Change these ip-addresses according to your environment multus: # if default gatway is empty then it will be removed defaultGateway: "" - f1Interface: + f1Interface: # use this interface if using one interface for all 3GPP interfaces create: false - IPadd: "172.21.16.92" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "f1" + ipAdd: "172.21.16.92" + netmask: "22" + name: "f1" # if gatway is commented then it will be removed - #Gateway: "172.21.19.254" + #gateway: "172.21.19.254" #routes: hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled n2Interface: create: false - IPadd: "172.21.6.90" - #name inside the pod is hardcoded right now - # name: "n2" - Netmask: "22" + ipAdd: "172.21.6.90" + name: "n2" + netmask: "22" # if gatway is empty then it will be removed - #Gateway: "172.21.7.254" + #gateway: "172.21.7.254" #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled n3Interface: create: false - IPadd: "172.21.8.91" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "n3" + ipAdd: "172.21.8.91" + netmask: "22" + name: "n3" # if gatway is commented then it will be removed - #Gateway: "172.21.11.254" + #gateway: "172.21.11.254" #routes: hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled @@ -64,7 +61,6 @@ multus: # in templates/configmap.yaml # Example config files --> https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF config: - mountConfig: false #If config file is mounted then please edit mount.conf in configmap.yaml properly timeZone: "Europe/Paris" useAdditionalOptions: "--sa --log_config.global_log_options level,nocolor,time" # If mounting the configuration file then below parameters are not used @@ -72,7 +68,7 @@ config: mcc: "001" # check the information with AMF, SMF, UPF mnc: "01" # check the information with AMF, SMF, UPF tac: "1" # check the information with AMF - sst: "1" #currently only 4 standard values are allowed 1,2,3,4 + sst: "1" amfhost: "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94 n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 @@ -85,18 +81,20 @@ podSecurityContext: runAsUser: 0 runAsGroup: 0 +securityContext: + privileged: false + start: - gnbcu: true #If false the network function container will run in sleep mode for manually testing + oaiCu: true #If false the network function container will run in sleep mode for manually testing tcpdump: false includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent ## NF is the network function and tcpdump is the tcpdump container. ## To know more about request and limit it is better to understand that how Kubernetes QoS works. diff --git a/charts/oai-5g-ran/oai-du/Chart.yaml b/charts/oai-5g-ran/oai-du/Chart.yaml index ac66b936f5150ff5900785f7ee7764b7c7623e11..7029638d3388104f027cd3f08140d7e24cd49dd5 100644 --- a/charts/oai-5g-ran/oai-du/Chart.yaml +++ b/charts/oai-5g-ran/oai-du/Chart.yaml @@ -37,7 +37,7 @@ icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_fin # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 1.0.0 +version: 2.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/oai-5g-ran/oai-du/README.md b/charts/oai-5g-ran/oai-du/README.md index 07b6b39f03da3cae87306ea05a7e98677a6661d8..e55dc63aba0b8234c10b82d5e748ef909e7a3883 100644 --- a/charts/oai-5g-ran/oai-du/README.md +++ b/charts/oai-5g-ran/oai-du/README.md @@ -1,12 +1,12 @@ # Helm Chart for OAI Distributed Unit (OAI-DU) -This helm-chart is only tested for [RF Simulated oai-du](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/radio/rfsimulator/README.md). Though it is designed to work with split 8 radio units or USRPs. In `template/deployment.yaml` there is a section to use it with USB based USRPs. The option to use RFSIM, USRPs or Radio Units is decided via configuration file. The container image always remains the same. +This helm-chart is only tested for [RF Simulated oai-du](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/radio/rfsimulator/README.md). -We are in the process of testing the helm-chart with different USRPs, Radio Units and extend it for O-RAN 7.2 interface. We have already implemented 7.2 interface in OAI codebase. +Though it is designed to work with split 8 radio units or USRPs. In `template/deployment.yaml` there is a section to use it with USB based USRPs. The option to use RFSIM, USRPs or Radio Units is decided via configuration file. The container image always remains the same. Before using this helm-chart we recommend you read about OAI codebase and its working from the documents listed on [OAI gitlab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/doc) -**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10 and 4.12. RFSIM requires minimum 2CPU and 2Gi RAM. +**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. RFSIM requires minimum 2CPU and 2Gi RAM. ## Introduction @@ -17,7 +17,7 @@ The [codebase](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop) 1. `oaisoftwarealliance/oai-gnb` for monolithic gNB, DU, CU, CU-CP 2. `oaisoftwarealliance/oai-nr-cuup` for CU-UP. -Each image has develop tag and a dedicated week tag for example `2023.w18`. We only publish Ubuntu 18.04/20.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +Each image has develop tag and a dedicated week tag for example `2024.w32`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-DU creates multiples Kubernetes resources, @@ -26,7 +26,7 @@ The helm chart of OAI-DU creates multiples Kubernetes resources, 3. Deployment 4. Configmap 5. Service account -6. Network-attachment-defination (Optional only when multus is used) +6. Network-attachment-definition (Optional only when multus is used) The directory structure @@ -49,11 +49,9 @@ The directory structure [Values.yaml](./values.yaml) contains all the configurable parameters. Below table defines the configurable parameters. You need a dedicated interface for Fronthaul. - - |Parameter |Allowed Values |Remark | |--------------------------------|-------------------------------|---------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -65,20 +63,20 @@ The directory structure |podSecurityContext.runAsGroup |Integer (0,65534) | | |multus.defaultGateway |Ip-Address |default route in the pod | |multus.f1Interface.create |true/false | | -|multus.f1Interface.IPadd |Ip-Address | | -|multus.f1Interface.Netmask |Netmask | | -|multus.f1Interface.Gateway |Ip-Address | | +|multus.f1Interface.ipAdd |Ip-Address | | +|multus.f1Interface.netmask |netmask | | +|multus.f1Interface.gateway |Ip-Address | | |multus.f1Interface.routes |Json |Routes you want to add in the pod| |multus.f1Interface.hostInterface|host interface |Host machine interface name | |multus.ruInterface.create |true/false | | -|multus.ruInterface.IPadd |Ip-Address | | -|multus.ruInterface.Netmask |Netmask | | -|multus.ruInterface.Gateway |Ip-Address | | +|multus.ruInterface.ipAdd |Ip-Address | | +|multus.ruInterface.netmask |netmask | | +|multus.ruInterface.gateway |Ip-Address | | |multus.ruInterface.hostInterface|host interface |Host machine interface name | |multus.ruInterface.mtu |Integer ||Range [0, Parent interface MTU] | -The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters of oai-gnb. If you want to use your own configuration file for oai-gnb-du. It is recommended to copy it in `templates/configmap.yaml` and set `config.mountConfig` as `true`. The command line for gnb is provided in `config.useAdditionalOptions`. +The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters for oai-du. If you want to use your own configuration file for oai-du. It is recommended to copy it in `templates/configmap.yaml`. The command line for gnb is provided in `config.useAdditionalOptions`. **NOTE**: The charts are configured to be used with primary CNI of Kubernetes. When you will mount the configuration file you have to define static ip-addresses for F1 and RU. Most of the primary CNIs do not allow static ip-address allocation. To overcome this we are using multus-cni with static ip-address allocation. If you are using DU in RF simulated mode then you need minimum one multus interface which you can use for F1 and RU. If you want to use DU with hardware RU then you need a dedicated interface for Fronthaul. @@ -157,4 +155,4 @@ ping -I oaitun_ue1 8.8.8.8 ## Note -1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. \ No newline at end of file +1. If you are using multus then make sure it is properly configured and if you don't have a gateway for your multus interface then avoid using gateway and defaultGateway parameter. Either comment them or leave them empty. Wrong gateway configuration can create issues with pod networking and pod will not be able to resolve service names. diff --git a/charts/oai-5g-ran/oai-du/templates/deployment.yaml b/charts/oai-5g-ran/oai-du/templates/deployment.yaml index 5bf413e96edfa17c9e138b7e5d7a5a0675fa97b7..4e2f95bcc90f9b187b8947e69995d887f09acda8 100644 --- a/charts/oai-5g-ran/oai-du/templates/deployment.yaml +++ b/charts/oai-5g-ran/oai-du/templates/deployment.yaml @@ -20,16 +20,19 @@ spec: annotations: k8s.v1.cni.cncf.io/networks: >- [{ - "name": "{{ .Chart.Name }}-f1", - "interface": "f1" + "name": "{{ .Chart.Name }}-{{ .Values.multus.f1Interface.name }}", + "interface": "{{ .Values.multus.f1Interface.name }}" {{- if .Values.multus.defaultGateway }} ,"default-route": ["{{ .Values.multus.defaultGateway }}"] {{- end }} + {{- if .Values.multus.f1Interface.gateway }} + ,"gateway": "{{ .Values.multus.f1Interface.gateway }}" + {{- end }} } {{- if .Values.multus.ruInterface.create }} ,{ - "name": "{{ .Chart.Name }}-ru", - "interface": "ru" + "name": "{{ .Chart.Name }}-{{ .Values.multus.ruInterface.name }}", + "interface": "{{ .Values.multus.ruInterface.name }}" } {{- end }} ] @@ -41,6 +44,21 @@ spec: imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} + initContainers: + - name: init + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - until ncat -zv {{ .Values.config.cuHost }} 38472 --sctp ; do echo waiting for cu or cucp to start; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m containers: - name: gnbdu image: "{{ .Values.nfimage.repository }}:{{ .Values.nfimage.version }}" @@ -56,8 +74,6 @@ spec: memory: {{ .Values.resources.limits.nf.memory | quote }} cpu: {{ .Values.resources.limits.nf.cpu | quote }} {{- end}} - securityContext: - privileged: true ports: - containerPort: 38472 name: f1c @@ -110,17 +126,17 @@ spec: cpu: {{ .Values.resources.limits.tcpdump.cpu | quote }} {{- end}} securityContext: - privileged: true capabilities: add: - NET_ADMIN + - NET_RAW drop: - ALL {{- if .Values.start.tcpdump}} command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep diff --git a/charts/oai-5g-ran/oai-du/templates/multus.yaml b/charts/oai-5g-ran/oai-du/templates/multus.yaml index 07bde8fdf950dab72cbdd79cc015ba027845eb18..f1ab87327dcd3358ccb27e37043acdde65bedd6f 100644 --- a/charts/oai-5g-ran/oai-du/templates/multus.yaml +++ b/charts/oai-5g-ran/oai-du/templates/multus.yaml @@ -14,9 +14,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.f1Interface.IPadd "/" .Values.multus.f1Interface.Netmask | nospace | quote }} - {{- if .Values.multus.f1Interface.Gateway }} - ,"gateway": {{- cat .Values.multus.f1Interface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.f1Interface.ipAdd "/" .Values.multus.f1Interface.netmask | nospace | quote }} + {{- if .Values.multus.f1Interface.gateway }} + ,"gateway": {{- cat .Values.multus.f1Interface.gateway | nospace | quote }} {{- end }} } ] @@ -45,9 +45,9 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.ruInterface.IPadd "/" .Values.multus.ruInterface.Netmask | nospace | quote }} - {{- if .Values.multus.ruInterface.Gateway }} - ,"gateway": {{- cat .Values.multus.ruInterface.Gateway | nospace | quote }} + "address": {{- cat .Values.multus.ruInterface.ipAdd "/" .Values.multus.ruInterface.netmask | nospace | quote }} + {{- if .Values.multus.ruInterface.gateway }} + ,"gateway": {{- cat .Values.multus.ruInterface.gateway | nospace | quote }} {{- end }} } ] diff --git a/charts/oai-5g-ran/oai-du/templates/rbac.yaml b/charts/oai-5g-ran/oai-du/templates/rbac.yaml index aed4d16a89647719ce3fc71eea05ca8fdde0e2ac..3293eb305c81d5a8a6da778e2774029b97f1474b 100644 --- a/charts/oai-5g-ran/oai-du/templates/rbac.yaml +++ b/charts/oai-5g-ran/oai-du/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/charts/oai-5g-ran/oai-du/values.yaml b/charts/oai-5g-ran/oai-du/values.yaml index 98881a6908c79a0721798ec6a5b5276e49039cf6..c82db4b3bfef59afdef8f3baef160e7f5359fb29 100644 --- a/charts/oai-5g-ran/oai-du/values.yaml +++ b/charts/oai-5g-ran/oai-du/values.yaml @@ -1,10 +1,10 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-gnb ## dockerhub oaisoftwarealliance/oai-gnb - version: 2023.w49 # image tag or develop + version: 2024.w32 # image tag or develop # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent @@ -27,26 +27,24 @@ serviceAccount: ## Change these ip-addresses according to your environment multus: - # if default gatway is left blank then it will be removed + # if default gateway is left blank then it will be removed defaultGateway: "" - f1Interface: + f1Interface: # use this interface if using one interface for all 3GPP interfaces create: false - IPadd: "172.21.16.100" - Netmask: "22" - # #name inside the pod is hardcoded right now - # name: "f1" + ipAdd: "172.21.16.100" + netmask: "22" + name: "f1" # if gatway is empty then it will be removed - #Gateway: "172.21.7.254" + #gateway: "172.21.7.254" #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled ruInterface: #Only needed if using a ethernet based RU/USRP create: false - IPadd: "192.168.80.90" - Netmask: "24" - # #name inside the pod is hardcoded right now - # name: "ru" + ipAdd: "192.168.80.90" + netmask: "24" + name: "ru" # if gatway is commented then it will be remove - #Gateway: "192.168.80.1" #In case you don't have a gateway remove it from here + #gateway: "192.168.80.1" #In case you don't have a gateway remove it from here ## The value must be [0, master's MTU]. If commented it will masters MTU #mtu: 9000 hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled @@ -55,7 +53,6 @@ multus: # in templates/configmap.yaml # Example config files --> https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF config: - mountConfig: false #If config file is mounted then please edit mount.conf in templates/configmap.yaml properly timeZone: "Europe/Paris" useAdditionalOptions: "--sa --rfsim --log_config.global_log_options level,nocolor,time" duName: "oai-du-rfsim" @@ -74,18 +71,20 @@ podSecurityContext: runAsUser: 0 runAsGroup: 0 +securityContext: + privileged: false + start: gnbdu: true #If false the network function container will run in sleep mode for manually testing tcpdump: false includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent ## NF is the network function and tcpdump is the tcpdump container. ## To know more about request and limit it is better to understand that how Kubernetes QoS works. @@ -118,4 +117,4 @@ terminationGracePeriodSeconds: 5 nodeSelector: {} -nodeName: \ No newline at end of file +nodeName: diff --git a/charts/oai-5g-ran/oai-gnb/Chart.yaml b/charts/oai-5g-ran/oai-gnb/Chart.yaml index 3665d518e9ccfba69fba30ec90fa8e083f880da6..642d631b78033e65711f1c152135beb60aa6a024 100644 --- a/charts/oai-5g-ran/oai-gnb/Chart.yaml +++ b/charts/oai-5g-ran/oai-gnb/Chart.yaml @@ -37,7 +37,7 @@ icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_fin # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.0 +version: 2.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/oai-5g-ran/oai-gnb/README.md b/charts/oai-5g-ran/oai-gnb/README.md index f188c3e44566a5c2a1afb8524a5e0c73e5050cdf..ca3bd794fb26d91d3c269f7e794d74fad573d7e5 100644 --- a/charts/oai-5g-ran/oai-gnb/README.md +++ b/charts/oai-5g-ran/oai-gnb/README.md @@ -2,18 +2,18 @@ This helm-chart is tested with - [RF Simulated oai-gnb](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/radio/rfsimulator/README.md). -- USRP B2XX -- USRP N3XX +- They are designed to be used with: + - USRP B2XX + - USRP N3XX + - USRP X3XX You can define dedicated interfaces for fronthaul, N2 and N3. In `template/deployment.yaml` there is a section to use it with USB based USRPs. The option to use RFSIM, USRPs or Radio Units is decided via configuration file. The container image always remains the same. -**NOTE**: We are in the process of testing the helm-chart with O-RAN 7.2 interface. We have already implemented 7.2 interface in OAI codebase. - Before using this helm-chart we recommend you read about OAI codebase and its working from the documents listed on [OAI gitlab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/doc) -**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12 and 4.13. RFSIM-GNB requires minimum 2CPU and 2Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin for multiple interfaces if they are used. +**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. RFSIM-GNB requires minimum 2CPU and 2Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin for multiple interfaces if they are used. -All the extra interfaces/multus interfaces created inside the pod are using `macvlan` mode. If your environment does not allow using `macvlan` then you need to change the multus definations. +All the extra interfaces/multus interfaces created inside the pod are using `macvlan` mode. If your environment does not allow using `macvlan` then you need to change the multus definitions. ## Introduction @@ -24,7 +24,7 @@ The [codebase](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop) 1. `oaisoftwarealliance/oai-gnb` for monolithic gNB, DU, CU, CU-CP 2. `oaisoftwarealliance/oai-nr-cuup` for CU-UP. -Each image has develop tag and a dedicated week tag for example `2023.w18`. We only publish Ubuntu 20.04/22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +Each image has develop tag and a dedicated week tag for example `2024.w32`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-GNB creates multiples Kubernetes resources, @@ -33,7 +33,7 @@ The helm chart of OAI-GNB creates multiples Kubernetes resources, 3. Deployment 4. Configmap 5. Service account -6. Network-attachment-defination (Optional only when multus is used) +6. Network-attachment-definition (Optional only when multus is used) The directory structure @@ -60,7 +60,7 @@ The directory structure |Parameter |Allowed Values |Remark | |--------------------------------|-------------------------------|------------------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -70,25 +70,25 @@ The directory structure |serviceAccount.name |String | | |podSecurityContext.runAsUser |Integer (0,65534) | | |podSecurityContext.runAsGroup |Integer (0,65534) | | -|multus.defaultGateway |Ip-Address |default route in the pod | -|multus.n2Interface.create |true/false | | -|multus.n2Interface.IPadd |Ip-Address | | -|multus.n2Interface.Netmask |Netmask | | -|multus.n2Interface.Gateway |Ip-Address | | -|multus.n2Interface.hostInterface|host interface |Host interface of the machine where pod will run| -|multus.n2Interface.routes |Json |Routes you want to add in the pod | -|multus.n3Interface.create |true/false | | -|multus.n3Interface.IPadd |Ip-Address) | | -|multus.n3Interface.Netmask |Netmask | | -|multus.n3Interface.Gateway |Ip-Address | | -|multus.n3Interface.hostInterface|host interface |Host interface of the machine where pod will run| -|multus.n3Interface.routes |Json |Routes you want to add in the pod | -|multus.ruInterface.create |true/false | | -|multus.ruInterface.IPadd |Ip-Address | | -|multus.ruInterface.Netmask |Netmask | | -|multus.ruInterface.Gateway |Ip-Address | | -|multus.ruInterface.hostInterface|host interface |Host interface of the machine where pod will run| -|multus.ruInterface.mtu |Integer |Range [0, Parent interface MTU] | +|multus.n2Interface.ipAdd |IPV4 |NA | +|multus.n2Interface.netmask |netmask |NA | +|multus.n2Interface.gateway(optional)|netmask |NA | +|multus.n2Interface.name (optional) |Interface name inside container|NA | +|multus.n2Interface.routes (optional)|Routes |NA | +|multus.n3Interface.create |true/false |default false | +|multus.n3Interface.ipAdd |IPV4 |NA | +|multus.n3Interface.netmask |netmask |NA | +|multus.n3Interface.gateway(optional)|netmask |NA | +|multus.n3Interface.name (optional) |Interface name inside container|NA | +|multus.n3Interface.routes (optional)|Routes |NA | +|multus.ruInterface.create |true/false |default false | +|multus.ruInterface.ipAdd |IPV4 |NA | +|multus.ruInterface.netmask |netmask |NA | +|multus.ruInterface.gateway(optional)|netmask |NA | +|multus.ruInterface.name (optional) |Interface name inside container|NA | +|multus.ruInterface.routes (optional)|Routes |NA | +|multus.defaultGateway |IPV4 |Default route inside container (optional)| +|multus.hostInterface |HostInterface Name | The config parameters mentioned in `config` block of `values.yaml` are limited on purpose to maintain simplicity. They do not allow changing a lot of parameters of oai-gnb. If you want to use your own configuration file for oai-gnb. It is recommended to copy it in `templates/configmap.yaml`. The command line for gnb is provided in `config.useAdditionalOptions`. diff --git a/charts/oai-5g-ran/oai-gnb/templates/configmap.yaml b/charts/oai-5g-ran/oai-gnb/templates/configmap.yaml index c41e294b7f6275801547768888023cd683a5cc88..21cb629e844dd7756d06b7c3bf86e5a83358dedf 100644 --- a/charts/oai-5g-ran/oai-gnb/templates/configmap.yaml +++ b/charts/oai-5g-ran/oai-gnb/templates/configmap.yaml @@ -17,7 +17,11 @@ data: gNB_name = "{{ .Values.config.gnbName}}"; // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = {{ .Values.config.tac}} ; - plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}} }) }); + {{- if .Values.config.sd }} + plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}}; sd = {{ .Values.config.sd}} }) }); + {{- else}} + plmn_list = ({ mcc = {{ .Values.config.mcc}}; mnc = {{ .Values.config.mnc}}; mnc_length = 2; snssaiList = ({ sst = {{ .Values.config.sst}} }) }); + {{- end}} nr_cellid = 12345678L @@ -164,19 +168,12 @@ data: }; ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "@AMF_IP_ADDRESS@"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + amf_ip_address = ( { ipv4 = "@AMF_IP_ADDRESS@";}); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "{{ .Values.config.n2IfName}}"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "@N2_IP_ADDRESS@"; - GNB_INTERFACE_NAME_FOR_NGU = "{{ .Values.config.n3IfName}}"; GNB_IPV4_ADDRESS_FOR_NGU = "@N3_IP_ADDRESS@"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/charts/oai-5g-ran/oai-gnb/templates/deployment.yaml b/charts/oai-5g-ran/oai-gnb/templates/deployment.yaml index 6cd5fb59670fd3356ad91b09896cc5c65b707bf3..d0725912a43b828080ad6023d0bfab4ae6931da2 100644 --- a/charts/oai-5g-ran/oai-gnb/templates/deployment.yaml +++ b/charts/oai-5g-ran/oai-gnb/templates/deployment.yaml @@ -20,28 +20,25 @@ spec: annotations: k8s.v1.cni.cncf.io/networks: >- [{ - "name": "{{ .Chart.Name }}-n2", - "interface": "n2" + "name": "{{ .Chart.Name }}-{{ .Values.multus.n2Interface.name }}", + "interface": "{{ .Values.multus.n2Interface.name }}" {{- if .Values.multus.defaultGateway }} ,"default-route": ["{{ .Values.multus.defaultGateway }}"] {{- end }} } {{- if .Values.multus.n3Interface.create }} ,{ - "name": "{{ .Chart.Name }}-n3", - "interface": "n3" - {{- if .Values.multus.n3Interface.Gateway }} - ,"gateway": {{ .Values.multus.n3Interface.Gateway }} + "name": "{{ .Chart.Name }}-{{ .Values.multus.n3Interface.name }}", + "interface": "{{ .Values.multus.n3Interface.name }}" + {{- if .Values.multus.n3Interface.gateway }} + ,"gateway": {{ .Values.multus.n3Interface.gateway }} {{- end }} } {{- end }} {{- if .Values.multus.ruInterface.create }} ,{ - "name": "{{ .Chart.Name }}-ru", - "interface": "ru" - {{- if .Values.multus.ruInterface.Gateway }} - ,"gateway": {{ .Values.multus.ruInterface.Gateway }} - {{- end }} + "name": "{{ .Chart.Name }}-{{ .Values.multus.ruInterface.name }}", + "interface": "{{ .Values.multus.ruInterface.name }}" } {{- end }} ] @@ -53,10 +50,29 @@ spec: imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} + {{- if .Values.global }}{{ if .Values.global.waitForAMF }} + initContainers: + - name: init + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - until ncat -zv {{ .Values.config.amfhost }} 38412 --sctp ; do echo waiting for oai-amf to start; sleep 1; done + resources: + requests: + memory: 50Mi + cpu: 1m + limits: + memory: 50Mi + cpu: 1m + {{- end }}{{ end }} containers: - name: gnb image: "{{ .Values.nfimage.repository }}:{{ .Values.nfimage.version }}" imagePullPolicy: {{ .Values.nfimage.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} volumeMounts: - mountPath: /opt/oai-gnb/etc name: configuration @@ -75,13 +91,6 @@ spec: memory: {{ .Values.resources.limits.nf.memory | quote }} cpu: {{ .Values.resources.limits.nf.cpu | quote }} {{- end}} - securityContext: - privileged: true - # capabilities: - # add: - # - NET_ADMIN - # drop: - # - ALL ports: - containerPort: 2152 name: n3 @@ -138,17 +147,17 @@ spec: cpu: {{ .Values.resources.limits.tcpdump.cpu | quote }} {{- end}} securityContext: - privileged: true capabilities: add: - NET_ADMIN + - NET_RAW drop: - ALL {{- if .Values.start.tcpdump}} command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep diff --git a/charts/oai-5g-ran/oai-gnb/templates/multus.yaml b/charts/oai-5g-ran/oai-gnb/templates/multus.yaml index 9de4bd3b7f60782ab6bea0b5c6bcab642d125c24..1a96c030e4b6e3fad139865bcd3efd0d0871796a 100644 --- a/charts/oai-5g-ran/oai-gnb/templates/multus.yaml +++ b/charts/oai-5g-ran/oai-gnb/templates/multus.yaml @@ -14,7 +14,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n2Interface.IPadd "/" .Values.multus.n2Interface.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.n2Interface.ipAdd "/" .Values.multus.n2Interface.netmask | nospace | quote }} } ] {{- if .Values.multus.n2Interface.routes }} @@ -39,7 +39,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.n3Interface.IPadd "/" .Values.multus.n3Interface.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.n3Interface.ipAdd "/" .Values.multus.n3Interface.netmask | nospace | quote }} } ] {{- if .Values.multus.n3Interface.routes }} @@ -67,7 +67,7 @@ spec: "type": "static", "addresses": [ { - "address": {{- cat .Values.multus.ruInterface.IPadd "/" .Values.multus.ruInterface.Netmask | nospace | quote }} + "address": {{- cat .Values.multus.ruInterface.ipAdd "/" .Values.multus.ruInterface.netmask | nospace | quote }} } ] } diff --git a/charts/oai-5g-ran/oai-gnb/templates/rbac.yaml b/charts/oai-5g-ran/oai-gnb/templates/rbac.yaml index aed4d16a89647719ce3fc71eea05ca8fdde0e2ac..3293eb305c81d5a8a6da778e2774029b97f1474b 100644 --- a/charts/oai-5g-ran/oai-gnb/templates/rbac.yaml +++ b/charts/oai-5g-ran/oai-gnb/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/charts/oai-5g-ran/oai-gnb/values.yaml b/charts/oai-5g-ran/oai-gnb/values.yaml index c00e55f7d3b375d0ae1fc79611c5939be06d0c44..01be4518f3fb716b25cabafa6dadd497e93cd271 100644 --- a/charts/oai-5g-ran/oai-gnb/values.yaml +++ b/charts/oai-5g-ran/oai-gnb/values.yaml @@ -1,10 +1,10 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: # image name either locally present or in a public/private repository repository: docker.io/oaisoftwarealliance/oai-gnb - version: 2023.w49 # image tag or develop + version: 2024.w32 # image tag or develop # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent @@ -38,32 +38,29 @@ multus: defaultGateway: "" n2Interface: create: false - # #name inside the pod is hardcoded right now - # name: "n2" - IPadd: "172.21.6.90" - Netmask: "22" + name: "n2" + ipAdd: "172.21.6.90" + netmask: "22" # if gatway is empty then it will be removed - #Gateway: "172.21.7.254" + #gateway: "172.21.7.254" #routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}, {'dst': '10.9.0.0/24','gw': '172.21.7.254'}] hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled n3Interface: create: false - IPadd: "172.21.8.91" - # #name inside the pod is hardcoded right now - # name: "n3" - Netmask: "22" + ipAdd: "172.21.8.91" + name: "n3" + netmask: "22" # if gatway is empty then it will be removed - #Gateway: "172.21.11.254" + #gateway: "172.21.11.254" #routes: hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled ruInterface: #Only needed if using a ethernet based RU/USRP create: false - IPadd: "192.168.80.90" - # #name inside the pod is hardcoded right now - # name: "ru" - Netmask: "24" + ipAdd: "192.168.80.90" + name: "ru" + netmask: "24" # if gatway is commented then it will be removed - Gateway: "192.168.80.1" #In case you don't have a gateway remove it from here + gateway: "192.168.80.1" #In case you don't have a gateway remove it from here ## The value must be [0, master's MTU]. If commented it will masters MTU #mtu: 1500 hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled @@ -95,12 +92,14 @@ podSecurityContext: runAsUser: 0 runAsGroup: 0 -## For openshift you can use rhel8/support-tools:8.7-13 +securityContext: + privileged: false + tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent ## NF is the network function and tcpdump is the tcpdump container. ## To know more about request and limit it is better to understand that how Kubernetes QoS works. diff --git a/charts/oai-5g-ran/oai-nr-ue/Chart.yaml b/charts/oai-5g-ran/oai-nr-ue/Chart.yaml index 67c7021f6e8d643564772d8a01dc9103e787a600..2ffc2407efd7c77513ba3e37a4bad6bd67cf21ad 100644 --- a/charts/oai-5g-ran/oai-nr-ue/Chart.yaml +++ b/charts/oai-5g-ran/oai-nr-ue/Chart.yaml @@ -37,7 +37,7 @@ icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_fin # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.0 +version: 2.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/oai-5g-ran/oai-nr-ue/README.md b/charts/oai-5g-ran/oai-nr-ue/README.md index e46cef432e22bbe3783d8d986889fe8c1451e3e1..edef7d684be6206a3740ae14a1e0acef377b9a5e 100644 --- a/charts/oai-5g-ran/oai-nr-ue/README.md +++ b/charts/oai-5g-ran/oai-nr-ue/README.md @@ -1,11 +1,13 @@ # Helm Chart for OAI New Radio User Equipment (OAI-NR-UE) -This helm-chart is only tested for [RF Simulated oai-nr-ue](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/radio/rfsimulator/README.md). You can read about the design of [oai-nr-ue](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/nr-ue-design.md). You can use these charts with: -- USRP B2XX -- USRP N3XX -- USRP X3XX - -**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10, 4.12, 4.13 RFSIM requires minimum 2CPU and 2Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin in case gNB is not in the same cluster. +This helm-chart is tested with +- [RF Simulated oai-gnb](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/radio/rfsimulator/README.md). +- They are designed to be used with: + - USRP B2XX + - USRP N3XX + - USRP X3XX + +**Note**: This chart is tested on [Minikube](https://minikube.sigs.k8s.io/docs/) and [Red Hat Openshift](https://www.redhat.com/fr/technologies/cloud-computing/openshift) 4.10-4.16. RFSIM requires minimum 2CPU and 2Gi RAM and [multus-cni](https://github.com/k8snetworkplumbingwg/multus-cni) plugin in case gNB is not in the same cluster. ## Introduction @@ -13,7 +15,7 @@ To know more about the feature set of OpenAirInterface you can check it [here](h The [codebase](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop) for NR-UE is same as gNB, CU, DU, CU-CP/CU-UP. Everyweek on [docker-hub](https://hub.docker.com/r/oaisoftwarealliance/oai-gnb) our [Jenkins Platform](https://jenkins-oai.eurecom.fr/view/RAN/) publishes docker-images for `oaisoftwarealliance/oai-nr-ue` -Each image has develop tag and a dedicated week tag for example `2023.w18`. We only publish Ubuntu 18.04/20.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. +Each image has develop tag and a dedicated week tag for example `2024.w32`. We only publish Ubuntu 22.04 images. We do not publish RedHat/UBI images. These images you have to build from the source code on your RedHat systems or Openshift Platform. You can follow this [tutorial](../../../openshift/README.md) for that. The helm chart of OAI-NR-UE creates multiples Kubernetes resources, @@ -22,7 +24,7 @@ The helm chart of OAI-NR-UE creates multiples Kubernetes resources, 3. Deployment 4. Configmap 5. Service account -6. Network-attachment-defination (Optional only when multus is used) +6. Network-attachment-definition (Optional only when multus is used) The directory structure @@ -48,7 +50,7 @@ The directory structure |Parameter |Allowed Values |Remark | |--------------------------------|-------------------------------|-------------------------------------| -|kubernetesType |Vanilla/Openshift |Vanilla Kubernetes or Openshift | +|kubernetesDistribution |Vanilla/Openshift |Vanilla Kubernetes or Openshift | |nfimage.repository |Image Name | | |nfimage.version |Image tag | | |nfimage.pullPolicy |IfNotPresent or Never or Always| | @@ -60,8 +62,8 @@ The directory structure |podSecurityContext.runAsGroup |Integer (0,65534) | | |multus.n2Interface.create |true/false | | |multus.n2Interface.Ipadd |Ip-Address | | -|multus.n2Interface.Netmask |Netmask | | -|multus.n2Interface.Gateway |Ip-Address | | +|multus.n2Interface.netmask |netmask | | +|multus.n2Interface.gateway |Ip-Address | | |multus.n2Interface.routes |Json |Routes if you want to add in your pod| |multus.n2Interface.hostInterface|host interface |Host interface on which pod will run | |multus.defaultGateway |Ip-Address |Default route inside pod | diff --git a/charts/oai-5g-ran/oai-nr-ue/templates/configmap.yaml b/charts/oai-5g-ran/oai-nr-ue/templates/configmap.yaml index 18086212ee32fa45aa0350b417f8b77695901831..43680ad4daff013709eb93eea75e724d993310ff 100644 --- a/charts/oai-5g-ran/oai-nr-ue/templates/configmap.yaml +++ b/charts/oai-5g-ran/oai-nr-ue/templates/configmap.yaml @@ -4,7 +4,7 @@ kind: ConfigMap metadata: name: {{ .Chart.Name }}-configmap data: - nr-ue.conf: | + nr-ue.conf: uicc0 = { imsi = "{{ .Values.config.fullImsi }}"; key = "{{ .Values.config.fullKey }}"; @@ -12,4 +12,4 @@ data: dnn= "{{ .Values.config.dnn }}"; nssai_sst="{{ .Values.config.sst }}"; nssai_sd="{{ .Values.config.sd }}"; - } \ No newline at end of file + } diff --git a/charts/oai-5g-ran/oai-nr-ue/templates/deployment.yaml b/charts/oai-5g-ran/oai-nr-ue/templates/deployment.yaml index 6c590758a08b8ca55faa2d6413cc4bccad6799d1..379925b6316ae43ee94bb132e6289e0e83497985 100644 --- a/charts/oai-5g-ran/oai-nr-ue/templates/deployment.yaml +++ b/charts/oai-5g-ran/oai-nr-ue/templates/deployment.yaml @@ -16,16 +16,6 @@ spec: labels: {{- include "oai-nr-ue.selectorLabels" . | nindent 8 }} app: oai-nr-ue - annotations: - {{- if .Values.multus.create }} - k8s.v1.cni.cncf.io/networks: >- - [{ - "name": "{{ .Chart.Name }}-net1" - {{- if .Values.multus.defaultGateway }} - ,"default-route": ["{{ .Values.multus.defaultGateway }}"] - {{- end }} - }] - {{- end }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -33,13 +23,26 @@ spec: imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} + {{- if .Values.global }}{{ if .Values.global.waitForRadio }} + initContainers: + - name: init + image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - until ping -c 1 {{ .Values.config.rfSimServer }}; do echo waiting for oai-du to start; sleep 1; done + {{- end }}{{ end }} containers: - name: nr-ue image: "{{ .Values.nfimage.repository }}:{{ .Values.nfimage.version }}" + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} volumeMounts: - mountPath: /opt/oai-nr-ue/etc name: configuration - # subPath: gnb.conf + - name: dev-net-tun + mountPath: /dev/net/tun # USRP B210/B200 Mini {{- if eq .Values.config.usrp "b2xx"}} - mountPath: /dev/bus/usb/ @@ -54,8 +57,6 @@ spec: memory: {{ .Values.resources.limits.nf.memory | quote }} cpu: {{ .Values.resources.limits.nf.cpu | quote }} {{- end}} - securityContext: - privileged: true {{- if .Values.start.nrue}} command: [ "/bin/bash", "-c" ] args: @@ -99,17 +100,17 @@ spec: cpu: {{ .Values.resources.limits.tcpdump.cpu | quote }} {{- end}} securityContext: - privileged: true capabilities: add: - NET_ADMIN + - NET_RAW drop: - ALL {{- if .Values.start.tcpdump}} command: - /bin/sh - -c - - /usr/sbin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap + - /usr/bin/tcpdump -i any -w /tmp/pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap {{- else}} command: - /bin/sleep @@ -120,6 +121,9 @@ spec: - configMap: name: {{ .Chart.Name }}-configmap name: configuration + - name: dev-net-tun + hostPath: + path: /dev/net/tun dnsPolicy: ClusterFirst restartPolicy: Always serviceAccountName: {{ .Values.serviceAccount.name }} diff --git a/charts/oai-5g-ran/oai-nr-ue/templates/multus.yaml b/charts/oai-5g-ran/oai-nr-ue/templates/multus.yaml deleted file mode 100644 index 8deea1a439e50ee3ae69d0ae5bc424e4d7249719..0000000000000000000000000000000000000000 --- a/charts/oai-5g-ran/oai-nr-ue/templates/multus.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -{{- if .Values.multus.create }} -apiVersion: "k8s.cni.cncf.io/v1" -kind: NetworkAttachmentDefinition -metadata: - name: {{ .Chart.Name }}-net1 -spec: - config: '{ - "cniVersion": "0.3.1", - "type": "macvlan", - "master": {{- cat .Values.multus.hostInterface | nospace | quote }}, - "mode": "bridge", - "ipam": { - "type": "static", - "addresses": [ - { - "address": {{- cat .Values.multus.ipadd "/" .Values.multus.netmask | nospace | quote }} - } - ] - } - }' -{{- end }} diff --git a/charts/oai-5g-ran/oai-nr-ue/templates/rbac.yaml b/charts/oai-5g-ran/oai-nr-ue/templates/rbac.yaml index aed4d16a89647719ce3fc71eea05ca8fdde0e2ac..3293eb305c81d5a8a6da778e2774029b97f1474b 100644 --- a/charts/oai-5g-ran/oai-nr-ue/templates/rbac.yaml +++ b/charts/oai-5g-ran/oai-nr-ue/templates/rbac.yaml @@ -1,5 +1,5 @@ --- -{{- if eq .Values.kubernetesType "Openshift" }} +{{- if eq .Values.kubernetesDistribution "Openshift" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/charts/oai-5g-ran/oai-nr-ue/values.yaml b/charts/oai-5g-ran/oai-nr-ue/values.yaml index 7322c16c94e2a6ad440ff504b18b6301680f929d..a4204aa5f79cef183fa19806a73d855eb36dc649 100644 --- a/charts/oai-5g-ran/oai-nr-ue/values.yaml +++ b/charts/oai-5g-ran/oai-nr-ue/values.yaml @@ -1,10 +1,10 @@ -kubernetesType: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift +kubernetesDistribution: Vanilla #Vanilla for community kubernetes distribution else Openshift for Openshift ## In case of using these charts on Openshift then please use UBI images ## To know more about them follow this tutorial https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/openshift nfimage: repository: docker.io/oaisoftwarealliance/oai-nr-ue # dockehub oaisoftwarealliance/oai-nr-ue - version: 2023.w49 # image tag or develop + version: 2024.w32 # image tag or develop # pullPolicy: IfNotPresent or Never or Always pullPolicy: IfNotPresent @@ -21,43 +21,41 @@ serviceAccount: imagePullSecrets: - name: "regcred" -## Change these ip-addresses according to your environment -multus: - create: false - ipadd: "172.21.6.27" # subnet should be able to reach the gNB - netmask: "22" - # if default route is not needed then leave the field empty - defaultGateway: "172.21.7.254" - hostInterface: "bond0" - config: timeZone: "Europe/Paris" rfSimServer: "oai-ran" # ip-address of rfsim or service name oai-gnb or oai-du fullImsi: "001010000000100" # make sure all the below entries are present in the subscriber database - fullKey: "fec86ba6eb707ed08905757b1bb44b8f" + fullKey: "fec86ba6eb707ed08905757b1bb44b8f" opc: "C42449363BBAD02B66D16BC975D77CC1" dnn: "oai" sst: "1" # configure according to gnb and amf, smf and upf sd: "16777215" usrp: "rfsim" # allowed rfsim, b2xx, n3xx, x3xx - useAdditionalOptions: "--sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time" + useAdditionalOptions: "--sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time" podSecurityContext: runAsUser: 0 runAsGroup: 0 +securityContext: + capabilities: + add: + - NET_ADMIN + - NET_RAW + - SYS_NICE + drop: + - ALL start: nrue: true tcpdump: false # if false then started in sleep mode else it will start capturing packets, nr ue will have a lot of packets per sec better avoid this or add a filter in the deployment.yaml includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging -## For openshift you can use rhel8/support-tools:8.7-13 tcpdumpimage: - repository: docker.io/corfr/tcpdump - version: latest - #pullPolicy: IfNotPresent or Never or Always - pullPolicy: IfNotPresent + repository: docker.io/oaisoftwarealliance/oai-tcpdump-init + version: alpine-3.20 + #pullPolicy: IfNotPresent or Never or Always + pullPolicy: IfNotPresent ## NF is the network function and tcpdump is the tcpdump container. ## To know more about request and limit it is better to understand that how Kubernetes QoS works. diff --git a/openshift/oai-spgwu-tiny-build-config.yml b/ci-scripts/Dockerfile.init.alpine similarity index 56% rename from openshift/oai-spgwu-tiny-build-config.yml rename to ci-scripts/Dockerfile.init.alpine index 474f8de7a2470856aefd27d44cbea6faf0ead28a..78292d1bac3e74fabaf0b94a1a58dd1e5c6dc455 100644 --- a/openshift/oai-spgwu-tiny-build-config.yml +++ b/ci-scripts/Dockerfile.init.alpine @@ -20,39 +20,32 @@ # */ #--------------------------------------------------------------------- # -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - name: oai-spgwu-tiny -spec: - lookupPolicy: - local: true ---- -apiVersion: build.openshift.io/v1 -kind: BuildConfig -metadata: - name: "oai-spgwu-tiny" -spec: - runPolicy: "Serial" - source: - git: - uri: "https://github.com/OPENAIRINTERFACE/openair-spgwu-tiny.git" - ref: "v1.5.1" - secrets: - - secret: - name: etc-pki-entitlement - destinationDir: etc-pki-entitlement - configMaps: - - configMap: - name: rhsm-conf - destinationDir: rhsm-conf - - configMap: - name: rhsm-ca - destinationDir: rhsm-ca - strategy: - dockerStrategy: - dockerfilePath: "docker/Dockerfile.rhel8" - output: - to: - kind: "ImageStreamTag" - name: "oai-spgwu-tiny:v1.5.1" \ No newline at end of file +# Dockerfile for the Open-Air-Interface Tcpdump/Init Container +# Valid for Alpine-3.20 +# +#--------------------------------------------------------------------- + +#--------------------------------------------------------------------- +# TARGET IMAGE +#--------------------------------------------------------------------- +ARG BASE_IMAGE=docker.io/alpine:3.20 +FROM $BASE_IMAGE AS tcpdump-init +ENV TZ=Europe/Paris +LABEL org.openairinterface.image.authors="contact@openairinterface.org" +# We install some debug tools for the moment in addition of mandatory libraries +RUN apk update && \ + apk add --no-cache\ + curl \ + wget \ + psmisc \ + net-tools \ + ethtool \ + tzdata \ + iperf \ + nmap-ncat \ + iproute2 \ + iputils-ping \ + iptables \ + traceroute \ + tcpdump \ + iperf3 \ diff --git a/docs/DEPLOY_SA5G_HC.md b/docs/DEPLOY_SA5G_HC.md index 9edec6c49ead1499a8fb679c5e9ca0c4cfe7f2d9..d8e2e0dc632c4b9efef7178ca4c182b43edb5443 100644 --- a/docs/DEPLOY_SA5G_HC.md +++ b/docs/DEPLOY_SA5G_HC.md @@ -21,6 +21,8 @@ OAI 5G core network have different network functions which can be used invidiual **Tutorial replication time**: ~40mins +**NOTE**: This tutorial will move in Orchestration repository starting next release. + **TABLE OF CONTENTS** [[_TOC_]] @@ -43,22 +45,50 @@ The helm charts can be used on any production grade kubernetes cluster or even v | Software | Version | |:--------------------------------|:----------------------------------------| -| Openshift Client Version | 4.13.X | +| Openshift Client Version | 4.10-4.16 | | Kubernetes Version | Kubernetes Version: v1.27.4 | | helm | v3.11.2 | -| Base images of Network functions| Ubuntu 20.04/22.04/UBI 8/9(RHEL 8/9) | +| Base images of Network functions| Ubuntu 22.04/UBI 9(RHEL 9) | -Each NF has its independent helm-chart and apart from that there are parent helm-charts for below scenarions: +Each NF has its independent helm-chart and apart from that there are parent helm-charts for below scenarios: 1. Minimalist deployment: MYSQL (Subscriber Database), AMF, SMF, UPF, NRF -2. Basic deployment: MYSQL (Subscriber Database), UDR, UDM, AUSF, AMF, SMF, UPF, NRF +2. Basic deployment: MYSQL (Subscriber Database), UDR, UDM, AUSF, AMF, SMF, UPF, NRF, LMF 3. Advance deployment: MYSQL (Subscriber Database), NSSF, UDR, UDM, AUSF, AMF, SMF, UPF, NRF -In this tutorial we will deploy a basic setting of OAI 5g core network and will deploy oai-gNB and oai-nr-ue in rf-simulator mode to perform some traffic testing. You can also deploy the core network in other two settings, it all depends on your use case and testbed. +End to End testing scenario: +1. Case 1: Monolithic RAN: OAI-gNB (RFSimulated), OAI-NR-UE (RFSimulated) +2. Case 2: F1 Split: OAI-CU, OAI-DU (RFSimulated), OAI-NR-UE (RFSimulated) +3. Case 3: E1-F1 Split: OAI-CU-CP, OAI-CU-UP, OAI-DU (RFSimulated), OAI-NR-UE (RFSimulated) + +[To know more about RFSimulator](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/RUNMODEM.md#rfsimulator) + +Before you move forward lets create a namespace to host all the resources + +```shell +kubectl apply -f - <<EOF +apiVersion: v1 +kind: Namespace +metadata: + name: oai-tutorial + labels: + pod-security.kubernetes.io/warn: "privileged" + pod-security.kubernetes.io/audit: "privileged" + pod-security.kubernetes.io/enforce: "privileged" +EOF +``` + +For Openshift you need to create a new project instead + +```shell +oc new-project oai-tutorial +``` + +And later add the labels to allow creating `privileged` pods. ## 2. Fetching Network Function Images -Ubuntu base images can be pulled from [docker-hub](https://hub.docker.com/u/oaisoftwarealliance) but if you want to make some changes in the code then you should build your own images. If you will use Ubuntu images then skip this part and in section `3.1` there is a detailed procedure. In case of RHEL based worker node you have to build your own images, to download packages from RHEL repository you need a developer or enterprise account. +Ubuntu base images can be pulled from [docker-hub](https://hub.docker.com/u/oaisoftwarealliance). In case you want to do some changes in the code then you should build your own images. If you will use Ubuntu images then skip this part and in section `3.1` there is a detailed procedure. In case of RHEL based worker node you can build your own UBI images, to download packages from RHEL repository you need a developer or enterprise account. 1. To learn how to build UBI 9.X images follow this [tutorial](./openshift/README.md) 2. To learn how to build Ubuntu images follow this [tutorial](./BUILD_IMAGES.md) @@ -71,14 +101,14 @@ cd oai-cn5g-fed ls charts/ oai-5g-core oai-5g-ran ls charts/oai-5g-core/ -mysql oai-5g-advance oai-5g-basic oai-5g-mini oai-amf oai-ausf oai-nrf oai-nssf oai-smf oai-traffic-server oai-udm oai-udr oai-upf +mysql oai-5g-advance oai-5g-basic oai-5g-mini oai-amf oai-ausf oai-lmf oai-nrf oai-nssf oai-smf oai-traffic-server oai-udm oai-udr oai-upf ls charts/oai-5g-ran/ oai-cu oai-cu-cp oai-cu-up oai-du oai-gnb oai-nr-ue ``` All the OAI core network charts are present in `oai-5g-core` folder, there you can find charts of individual network functions and for the above described three different deployment settings. -1. Folder `oai-5g-mini` is for [minimilist deployment](../charts/oai-5g-core/oai-5g-mini/README.md) +1. Folder `oai-5g-mini` is for [minimalist deployment](../charts/oai-5g-core/oai-5g-mini/README.md) 2. Folder `oai-5g-basic` is for [basic deployment](../charts/oai-5g-core/oai-5g-basic/README.md) 3. Folder `oai-5g-advance` is for [advance deployment](../charts/oai-5g-core/oai-5g-advance/README.md) @@ -92,7 +122,14 @@ oai-5g-basic/ ├── config.yaml ├── README.md ├── templates -│  └── configmap.yaml +│  ├── configmap.yaml +│  ├── deployment.yaml +│  ├── _helpers.tpl +│  ├── multus.yaml (Only in AMF, SMF and UPF) +│  ├── NOTES.txt +│  ├── rbac.yaml +│  ├── serviceaccount.yaml +│  └── service.yaml └── values.yaml 1 directory, 5 files @@ -127,31 +164,21 @@ All the configurable parameters for a particular commit/release are mentioned in **NOTE**: If there is a need to edit a specific configuration parameter that is not configurable via the helm-chart `config.yaml` file then it has to be changed at the time of building images. -Create a namespace where the helm-charts will be deployed, in our environment we deploy them in `oai-tutorial` namespace. To create a namespace use the below command on your cluster, - - -```console -# needs a user which has the right to create namespaces -kubectl create ns oai-tutorial -#or -oc new-project oai-tutorial -``` - -**NOTE**: Any changes done in the parent chart (Mini, basic, advance scenario helm charts) will overwrite the sub charts. +**NOTE**: Any changes done in the parent chart (Mini, basic, advance, case1, case2 or case3 scenario helm charts) will overwrite the sub charts. ### 3.1 Networking related information -Network function discovers each-other using NRF and instead of using the ip-address of network functions we rely on using their FQDN, **Kubernetes service concept**. To communicate with each other whether we deploy them in reference point architecture or service based architecture. +Core Network functions discovers each-other using NRF and instead of using the ip-address of network functions we rely on using their FQDN, **Kubernetes service concept**. To communicate with each other whether we deploy them in reference point architecture or service based architecture. *For example: AMF registers with NRF using NRF FQDN (`oai-nrf.oai-tutorial.svc.cluster.local`). This way we can get rid of any static ip-address configuration.* #### 3.1.1 Configure Multiple Interfaces -- Here the network functions will use different virtual ethernet interfaces to bind their different logical interface. Example AMF communicates with gNB using N2 and with SMF and NRF using Namf, the Service Base Interface (SBI). -- This type of configuration is also used when gNB is outside of the cluster or UPF is outside of the cluster. -- To make the above seperation we are using multus to provide multiple ethernet interfaces to network functions which have multiple communication interfaces. -- Only AMF, SMF and UPF have the possiblity to use multus. Other network functions can also use multus but then it needs to be configured. -- To configure multus for AMF, SMF or UPF, in `values.yaml` of each network function edit the multus section. +- Here the network functions will use different virtual Ethernet interfaces to bind their different logical interface. Example AMF communicates with gNB/CU/CU-CP using N2 and with SMF and NRF using Namf, the Service Base Interface (SBI). +- This type of configuration is also used when gNB/CU/CU-CP is outside of the cluster or UPF is outside of the cluster. +- To make the above separation we are using multus to provide multiple Ethernet interfaces to network functions which have multiple communication interfaces. +- Only AMF, SMF, UPF and RAN network functions have the possibility to use multus. Other network functions can also use multus but then it needs to be configured. +- To configure multus for AMF, SMF, UPF or RAN network functions in `values.yaml` of each network function edit the multus section. ``` ## Example from oai-amf/values.yaml @@ -160,18 +187,19 @@ multus: defaultGateway: "172.21.7.254" n2Interface: create: false - Ipadd: "172.21.6.94" - Netmask: "22" + ipAdd: "172.21.6.94" + netmask: "22" ## If you do not have a gateway leave the field empty - Gateway: + gateway: ## If you do not want to add any routes in your pod then leave this field empty routes: [{'dst': '10.8.0.0/24','gw': '172.21.7.254'}] + name: 'n2' hostInterface: "bond0" # Interface of the host machine on which this pod will be scheduled ``` #### 3.1.2 Use Single Interface -- No need to configure multus for any network function. For different communication interfaces network functions will use same ethernet interface. Example AMF will use `eth0` interface to communicate with gNB, SMF and NRF. +- No need to configure multus for any network function. For different communication interfaces network functions will use same Ethernet interface. Example AMF will use `eth0` interface to communicate with gNB, SMF and NRF. - In `values.yaml` of AMF, SMF and UPF in multus section do multus.create `false` like below, ``` @@ -183,22 +211,21 @@ multus: #### 3.1.3 Capturing Packets (Optional) -Every network function has an extra TCP dump container to take the TCP dump. But by default this container is not used. If enabled it will capture dumps on `all interfaces` and will store inside the container locally or in a persistant volume if enabled. +Every network function has an extra TCP dump container to take the TCP dump. But by default this container is not used. If enabled it will capture dumps on `all interfaces` and will store inside the container locally or in a persistent volume if enabled. -To enable the persistant volume in the `values.yaml` of every network function make the below change, +To enable the persistent volume in the `values.yaml` of every network function make the below change, ``` ## amf start: amf: true #If false the network function container will run in sleep mode for manually testing - tcpdump: false + tcpdump: true -includeTcpDumpContainer: false #If true it will add a tcpdump container inside network function pod for debugging +includeTcpDumpContainer: true #If true it will add a tcpdump container inside network function pod for debugging #To store PCAP of NF in a sharedVolume so it can be easily fetched (PVC is created with NRF charts so make sure in NRF it is true) persistent: - sharedvolume: false - + sharedvolume: true ``` ### 3.2 Network function Images @@ -221,7 +248,7 @@ imagePullSecrets: - name: "regcred" ``` -When pulling images from docker hub you have several choices either to use images with develop tag (based on latest develop branch somtimes might not be stable), latest (built from current master branch) and release tags. +When pulling images from docker hub you have several choices either to use images with develop tag (based on latest develop branch sometimes might not be stable), latest (built from current master branch) and release tags. ### 3.3 Configuring Helm Chart Parameters @@ -247,29 +274,28 @@ INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singl ('208990100001125', '20899', '{\"sst\": 1, \"sd\": \"10203\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"100Mbps\", \"downlink\":\"100Mbps\"}}}'); ``` -In the config file `smf.use_local_subscription_info` should be `yes` to use the user DNN subscription information from the database. Else it will be used as defined in the configuration file. +In the config file `smf.use_local_subscription_info` should be `no` to use the user DNN subscription information from the database. Else it will be used from the configuration file. Once the charts are configured perform helm dependency update inside the chart repository ``` shell -cd charts/oai-5g-core/oai-5g-basic -helm dependency update +cd charts/oai-5g-core +helm dependency update oai-5g-basic ``` **NOTE**: Whenever you will make any change in the network function helm-chart or mysql helm chart you need to perform a dependency update to inform parent chart about the sub-charts update. ## 4. Deploying Helm Charts -Helm charts have an order of deployment for the proper configuration of core network. - Once the configuration is finished the charts can be deployed with a user who has the rights to 1. Create RBAC (Optional only if Openshift is used) 2. Run pod (only UPF needs that) with privileged and anyuid scc (optional only required if you have scc configure in your cluster) 3. Create multus binds (optional only if multus is used) +4. Create namespace/project ``` shell -helm install basic oai-5g-basic/ +helm install basic oai-5g-basic/ -n oai-tutorial ``` <details> @@ -277,19 +303,17 @@ helm install basic oai-5g-basic/ ```console NAME: basic -LAST DEPLOYED: Tue Dec 12 10:04:40 2023 -NAMESPACE: default +NAMESPACE: oai-tutorial STATUS: deployed REVISION: 1 TEST SUITE: None ``` </details> - -This command can take around 3-5 mins depending on your network speed and cluster configuration (computational capacity). You can use the wait command to see if the core network functions are running or not +This command can take around ~3 mins depending on your network speed and cluster configuration (computational capacity). You can use the wait command to see if the core network functions are running or not ```shell -kubectl wait --for=condition=ready pod -l app.kubernetes.io/instance=basic --timeout=3m +kubectl wait -n oai-tutorial --for=condition=ready pod -l app.kubernetes.io/instance=basic --timeout=3m ``` ## 4.1 How to check if the Core network is properly configured? @@ -304,25 +328,25 @@ If the value is more than 1 for both then it will verify that `smf` and `upf` ha ## 5 Use Case 1: Testing with Monolithic RAN -The images which are used in the tutorial are already present in docker-hub like the other images of OAI 5g core network functions. The charts of all the network functions are preconfigured to work with OAI-gnB and OAI-NR-UE end to end installation. +The images which are used in the tutorial are already present in docker-hub like the other images of OAI 5g core network functions. The charts of all the network functions are pre-configured to work with OAI-gnB and OAI-NR-UE end to end installation. ### 5.1 Images OAI-gNB and OAI-NR-UE -For ubuntu based worker nodes the images can be pulled directly from docker-hub. To build images manually follow this [link](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/docker). In case you have an Openshift cluster then follow this [link](../openshift/README.md) +For Ubuntu based worker nodes the images can be pulled directly from docker-hub. To build images manually follow this [link](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/docker). In case you have an Openshift cluster then follow this [link](../openshift/README.md) ### 5.2 Configuring OAI-gNB RFSimulator and OAI-NR-UE -**Very Important** To access internet in NR-UE the N6/SGI interface of UPF should be able access the internet. +**Very Important** To access internet in NR-UE the N6 interface of UPF should be able access the internet. GNB requires the ip-address or service name of AMF. In case in AMF multus is used and N1/N2 interface is bind to multus interface, then please provide AMF ip-address. -For this tutorial we are not using multus here for similicity, generally there should be two interfaces of gNB(for N2 and N3). +For this tutorial we are not using multus here for simplicity, generally there should be two interfaces of gNB(for N2 and N3). ``` ## oai-gNB configuration from values.yaml config: timeZone: "Europe/Paris" - useAdditionalOptions: "--sa -E --rfsim --log_config.global_log_options level,nocolor,time" + useAdditionalOptions: "--sa --rfsim --log_config.global_log_options level,nocolor,time" gnbName: "oai-gnb-rfsim" mcc: "001" # check the information with AMF, SMF, UPF mnc: "01" # check the information with AMF, SMF, UPF @@ -331,7 +355,7 @@ config: usrp: rfsim #allowed values rfsim, b2xx, n3xx or x3xx amfhost: "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94 n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 - n3IfName: "eth0" + n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 ``` ### 5.3 Deploy OAI-gNB RFSimulator @@ -339,7 +363,7 @@ config: To deploy the oai-gnb in rf simulator mode follow the below steps ``` shell -cd ../../oai-5g-ran/ +cd ../oai-5g-ran/ helm install gnb oai-gnb --namespace oai-tutorial ``` <details> @@ -347,8 +371,7 @@ helm install gnb oai-gnb --namespace oai-tutorial ```console NAME: gnb -LAST DEPLOYED: Tue Dec 12 10:46:53 2023 -NAMESPACE: default +NAMESPACE: oai-tutorial STATUS: deployed REVISION: 1 TEST SUITE: None @@ -392,15 +415,15 @@ Defaulted container "amf" out of: amf, init (init) ``` config: timeZone: "Europe/Paris" - rfSimServer: "oai-du" # ip-address of rfsim or service name oai-gnb in case of du change it with oai-du if multus is true then provide ip-address of oai-gnb + rfSimServer: "oai-ran" # ip-address of rfsim or service name oai-gnb or oai-du fullImsi: "001010000000100" # make sure all the below entries are present in the subscriber database - fullKey: "fec86ba6eb707ed08905757b1bb44b8f" + fullKey: "fec86ba6eb707ed08905757b1bb44b8f" opc: "C42449363BBAD02B66D16BC975D77CC1" dnn: "oai" sst: "1" # configure according to gnb and amf, smf and upf sd: "16777215" usrp: "rfsim" # allowed rfsim, b2xx, n3xx, x3xx - useAdditionalOptions: "--sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time" + useAdditionalOptions: "--sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time" ``` ### 5.5 Deploy OAI-NR-UE RFSimulator @@ -416,8 +439,7 @@ helm install nrue oai-nr-ue/ --namespace oai-tutorial ```console NAME: nrue -LAST DEPLOYED: Tue Dec 12 10:56:16 2023 -NAMESPACE: default +NAMESPACE: oai-tutorial STATUS: deployed REVISION: 1 TEST SUITE: None @@ -473,22 +495,28 @@ rtt min/avg/max/mdev = 22.375/24.072/27.031/1.833 ms ## incase above doesn't work try with 8.8.8.8 instead of dns. If that works then probably you have't configure dns properly in SMF. ``` +**NOTE**: You can also deploy the Core and RAN network functions directly via the parent [helm-chart](../charts/e2e_scenarios/case1) + +```bash +helm dependency update charts/e2e_scenarios/case1 +helm install case1 charts/e2e_scenarios/case1 -n oai-tutorial +``` + ## 6 Use Case 2: Testing with F1 Split RAN The images used for OAI-CU and OAI-DU are the same images used for OAI-gNB. ## 6.1 Configuration of OAI-CU and OAI-DU -**Very Important** To access internet in NR-UE the N6/SGI interface of UPF should be able access the internet. +**Very Important** To access internet in NR-UE the N6 interface of UPF should be able access the internet. OAI-CU requires the ip-address or service name of AMF. In case in AMF multus is used and N1/N2 interface is bind to multus interface, then please provide AMF ip-address. -For this tutorial we are not using multus here for similicity, generally there should be three interfaces of CU(for F1,N2, and N3). +For this tutorial we are not using multus here for simplicity, generally there should be three interfaces of CU(for F1,N2, and N3). ``` ## oai-cu configuration from values.yaml config: - mountConfig: false #If config file is mounted then please edit mount.conf in configmap.yaml properly timeZone: "Europe/Paris" useAdditionalOptions: "--sa --log_config.global_log_options level,nocolor,time" # If mounting the configuration file then below parameters are not used @@ -496,7 +524,7 @@ config: mcc: "001" # check the information with AMF, SMF, UPF mnc: "01" # check the information with AMF, SMF, UPF tac: "1" # check the information with AMF - sst: "1" #currently only 4 standard values are allowed 1,2,3,4 + sst: "1" amfhost: "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94 n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 @@ -508,7 +536,6 @@ config: ``` ## oai-du configuration from values.yaml config: - mountConfig: false #If config file is mounted then please edit mount.conf in templates/configmap.yaml properly timeZone: "Europe/Paris" useAdditionalOptions: "--sa --rfsim --log_config.global_log_options level,nocolor,time" duName: "oai-du-rfsim" @@ -533,8 +560,7 @@ helm install cu oai-cu --namespace oai-tutorial ```console NAME: cu -LAST DEPLOYED: Tue Dec 12 11:49:40 2023 -NAMESPACE: default +NAMESPACE: oai-tutorial STATUS: deployed REVISION: 1 TEST SUITE: None @@ -563,8 +589,7 @@ helm install du oai-du --namespace oai-tutorial ```console NAME: du -LAST DEPLOYED: Tue Dec 12 11:53:20 2023 -NAMESPACE: default +NAMESPACE: oai-tutorial STATUS: deployed REVISION: 1 TEST SUITE: None @@ -621,6 +646,12 @@ Defaulted container "amf" out of: amf, init (init) After this follow the same procedure to start oai-nr-ue and ping to see if the UE is connected. +**NOTE**: You can also deploy the Core and RAN network functions directly via the parent [helm-chart](../charts/e2e_scenarios/case2) + +```bash +helm dependency update charts/e2e_scenarios/case2 +helm install case2 charts/e2e_scenarios/case2 -n oai-tutorial +``` ## 7 Use Case 3: Testing with E1 and F1 Split RAN @@ -628,14 +659,13 @@ The images used for OAI-CU-CP and OAI-DU are the same images used for OAI-gNB. O ## 6.1 Configuration of OAI-CU and OAI-DU -**Very Important** To access internet in NR-UE the N6/SGI interface of UPF should be able access the internet. +**Very Important** To access internet in NR-UE the N6 interface of UPF should be able access the internet. OAI-CU-CP requires the ip-address or service name of AMF. In case in AMF multus is used and N1/N2 interface is bind to multus interface, then please provide AMF ip-address. -For this tutorial we are not using multus here for similicity, generally there should be three interfaces of CU-CP(for F1,N2 and E1). +For this tutorial we are not using multus here for simplicity, generally there should be three interfaces of CU-CP(for F1,N2 and E1). ``` -## oai-cu-cp configuration from values.yaml config: timeZone: "Europe/Paris" useAdditionalOptions: "--sa --log_config.global_log_options level,nocolor,time" @@ -646,11 +676,10 @@ config: sst: "1" #currently only 4 standard values are allowed 1,2,3,4 amfhost: "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94 n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 - n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 - f1IfName: "eth0" #if multus.f1Interface.create is true then use multus.f1Interface.Ipadd - e1IfName: "eth0" #if multus.f1Interface.create is true then use multus.f1Interface.Ipadd - f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different - f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different + f1IfName: "eth0" #if multus.f1Interface.create is true then use f1 + e1IfName: "eth0" #if multus.f1Interface.create is true then use e1 + f1cuPort: "2153" #2153 if using same interface for f1 and n2 else standard port 2152 should be use if f1 and n3 interface are different + f1duPort: "2153" #2153 if using same interface for f1 and n2 else standard port 2152 should be use if f1 and n3 interface are different ``` ``` @@ -659,15 +688,14 @@ config: timeZone: "Europe/Paris" useAdditionalOptions: "--sa" cuupName: "oai-cuup" - mcc: "001" # check the information with AMF, SMF, UPF/SPGWU - mnc: "01" # check the information with AMF, SMF, UPF/SPGWU + mcc: "001" # check the information with AMF, SMF, UPF + mnc: "01" # check the information with AMF, SMF, UPF tac: "1" # check the information with AMF sst: "1" #currently only 4 standard values are allowed 1,2,3,4 cuCpHost: "oai-cu" # - n2IfName: "eth0" # if multus.n2Interface.create is true then use n2 - n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0 - f1IfName: "eth0" #if multus.f1uInterface.create is true then use multus.f1uInterface.Ipadd - e1IfName: "eth0" #if multus.e1Interface.create is true then use multus.e1Interface.Ipadd + n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n3 or eth0 + f1IfName: "eth0" #if multus.f1uInterface.create is true then use f1 or you can only use 1 interface n3 or eth0 + e1IfName: "eth0" #if multus.e1Interface.create is true then use e1 or you can only use 1 interface n3 or eth0 f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different ``` @@ -675,7 +703,6 @@ config: ``` ## oai-du configuration from values.yaml config: - mountConfig: false #If config file is mounted then please edit mount.conf in templates/configmap.yaml properly timeZone: "Europe/Paris" useAdditionalOptions: "--sa --rfsim --log_config.global_log_options level,nocolor,time" duName: "oai-du-rfsim" @@ -699,16 +726,14 @@ helm install cucp oai-cu-cp --namespace oai-tutorial <summary>The output is similar to:</summary> ```console -NAME: cu -LAST DEPLOYED: Tue Dec 12 11:49:40 2023 -NAMESPACE: default +NAME: cucp +NAMESPACE: oai-tutorial STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: 1. Get the application name by running these commands: - export GNB__CU_POD_NAME=$(kubectl get pods --namespace oai-tutorial -l "app.kubernetes.io/name=oai-cu,app.kubernetes.io/instance=cu" -o jsonpath="{.items[0].metadata.name}") - export GNB_CU_eth0_IP=$(kubectl get pods --namespace oai-tutorial -l "app.kubernetes.io/name=oai-cu,app.kubernetes.io/instance=cu" -o jsonpath="{.items[*].status.podIP}") + export GNB__CU_CP_POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=oai-cu-cp,app.kubernetes.io/instance=cucp" -o jsonpath="{.items[0].metadata.name}") 2. Dockerhub images of OpenAirInterface requires avx2 capabilities in the cpu and they are built for x86 architecture, tested on UBUNTU OS only. 3. If you want to configure for a particular band then copy the configuration file in templates/configmap.yaml from here https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF ``` @@ -730,14 +755,13 @@ helm install cuup oai-cu-up --namespace oai-tutorial ```console NAME: cuup -LAST DEPLOYED: Tue Dec 12 12:13:43 2023 -NAMESPACE: default +NAMESPACE: oai-tutorial STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: 1. Get the application name by running these commands: - export GNB__CU_POD_NAME=$(kubectl get pods --namespace oai-tutorial -l "app.kubernetes.io/name=oai-cu-up,app.kubernetes.io/instance=cuup" -o jsonpath="{.items[0].metadata.name}") + export GNB__CU_POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=oai-cu-up,app.kubernetes.io/instance=cuup" -o jsonpath="{.items[0].metadata.name}") 2. Dockerhub images of OpenAirInterface requires avx2 capabilities in the cpu and they are built for x86 architecture, tested on UBUNTU OS only. 3. If you want to configure for a particular band then copy the configuration file in templates/configmap.yaml from here https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF 4. For good performance make sure your underlying kernel is realtime and CPU sleep states are off @@ -774,8 +798,7 @@ helm install du oai-du --namespace oai-tutorial ```console NAME: du -LAST DEPLOYED: Tue Dec 12 11:53:20 2023 -NAMESPACE: default +NAMESPACE: oai-tutorial STATUS: deployed REVISION: 1 TEST SUITE: None @@ -832,6 +855,13 @@ Defaulted container "amf" out of: amf, init (init) After this follow the same procedure to start oai-nr-ue and ping to see if the UE is connected. +**NOTE**: You can also deploy the Core and RAN network functions directly via the parent [helm-chart](../charts/e2e_scenarios/case3) + +```bash +helm dependency update charts/e2e_scenarios/case3 +helm install case3 charts/e2e_scenarios/case3 -n oai-tutorial +``` + ### 8 Uninstall the helm charts You can remove them one by one or you can use this command @@ -844,7 +874,7 @@ helm uninstall -n oai-tutorial $(helm list -aq -n oai-tutorial) ### 9.1 How to capture pcaps inside a network function? -We have specially provided a sperate container to capture pcap for each network function you can get inside this container and use tcpdump command +We have specially provided a separate container to capture pcap for each network function you can get inside this container and use tcpdump command ```console kubectl exec -it -c tcpdump $AMF_POD_NAME -- /bin/sh @@ -858,52 +888,52 @@ Below resource consumption is observered using Kubernetes metrics server while N **Use case 1** ```console -kubectl top pods -n oai-tutorial -NAME CPU(cores) MEMORY(bytes) -basic-mysql-7c87d8cfbf-c6psl 3m 336Mi -oai-amf-757f8dfb64-59k76 14m 5Mi -oai-ausf-6dcc8cc79d-vlxmb 29m 2Mi -oai-gnb-6d48896787-vl5sr 2253m 1348Mi -oai-nr-ue-85b79b968f-x85px 1242m 622Mi -oai-nrf-6ddd875c45-dt7hz 31m 3Mi -oai-smf-5bf8b96d74-cg7s4 13m 5Mi -oai-udm-5994fc6847-tpzgw 30m 3Mi -oai-udr-754d6cd48-f6n7n 29m 4Mi -oai-upf-6576bc8496-jnpxl 11m 97Mi +case1-mysql-58f56f8f9b-ns5dj 15m 449Mi +oai-amf-7c4ccf64f9-dgrgb 33m 5Mi +oai-ausf-6fb7bb6b97-p9q9t 66m 3Mi +oai-gnb-6d67985d99-zw5dx 1846m 1077Mi +oai-nr-ue-697d6d8984-b5d2z 1378m 295Mi +oai-nrf-9dffd9fc7-5k7nm 71m 3Mi +oai-smf-6787fc5b9-qr82p 30m 5Mi +oai-traffic-server-55db59f75d-kmzmw 5m 2Mi +oai-udm-58c5879c5b-rz7jk 69m 3Mi +oai-udr-98c5f7dd7-rkldg 65m 4Mi +oai-upf-57c9b544ff-pst8j 25m 4Mi ``` **Use case 2** ```console -kubectl top pods -NAME CPU(cores) MEMORY(bytes) -basic-mysql-7c87d8cfbf-c6psl 3m 336Mi -oai-amf-757f8dfb64-59k76 13m 5Mi -oai-ausf-6dcc8cc79d-vlxmb 28m 2Mi -oai-cu-76fb9cbb4f-8pg7l 2m 116Mi -oai-du-7d7b665f6f-sb55f 1868m 1338Mi -oai-nr-ue-85b79b968f-46xvq 1288m 562Mi -oai-nrf-6ddd875c45-dt7hz 30m 3Mi -oai-smf-5bf8b96d74-cg7s4 13m 6Mi -oai-udm-5994fc6847-tpzgw 29m 3Mi -oai-udr-754d6cd48-f6n7n 28m 4Mi -oai-upf-6576bc8496-jnpxl 11m 144Mi +kubectl get pods +case2-mysql-546985bd6d-whg7x 15m 449Mi +oai-amf-7775d6f48d-dzp7x 31m 5Mi +oai-ausf-7f7fc9b766-llvr4 63m 3Mi +oai-cu-67558c5bd5-9sdld 1m 11Mi +oai-du-67d7f5766c-wdpn8 1827m 1074Mi +oai-nr-ue-6dfb85f6df-mq88v 1355m 296Mi +oai-nrf-7d6d4b4648-qzpf8 73m 3Mi +oai-smf-d7bf796d6-z7r9g 28m 5Mi +oai-traffic-server-55db59f75d-kfgpf 7m 2Mi +oai-udm-86b4bdf7c7-bdcbc 66m 3Mi +oai-udr-589758546b-7k8rq 69m 4Mi +oai-upf-5594b9cc84-smjbq 27m 4Mi ``` **Use case 3** ```console kubectl top pods -NAME CPU(cores) MEMORY(bytes) -basic-mysql-7c87d8cfbf-c6psl 3m 336Mi -oai-amf-757f8dfb64-59k76 13m 5Mi -oai-ausf-6dcc8cc79d-vlxmb 28m 2Mi -oai-cu-cp-86bf5df746-sf5jl 2m 116Mi -oai-cu-up-54c8d9b97f-tfvmz 1m 55Mi -oai-du-7d7b665f6f-9x7zq 1777m 1338Mi -oai-nr-ue-85b79b968f-w499m 1182m 532Mi -oai-nrf-6ddd875c45-dt7hz 29m 3Mi -oai-smf-5bf8b96d74-cg7s4 12m 6Mi -oai-udm-5994fc6847-tpzgw 29m 3Mi -oai-udr-754d6cd48-f6n7n 28m 4Mi -oai-upf-6576bc8496-jnpxl 11m 130Mi -``` \ No newline at end of file +NAME CPU(cores) MEMORY(bytes) +case3-mysql-66db7fdcc6-q5rml 17m 450Mi +oai-amf-574569c967-6dqnl 33m 5Mi +oai-ausf-69b6444bff-qqvdr 70m 3Mi +oai-cu-cp-8598c595-q42kh 1m 120Mi +oai-cu-up-7988bb7f7c-pfnb4 1m 3Mi +oai-du-56576c49d8-zdj5n 1827m 1074Mi +oai-nr-ue-5fcb5cf474-x289m 1375m 300Mi +oai-nrf-97b95548c-7tfkd 77m 3Mi +oai-smf-d59bcb6c9-zkc89 26m 5Mi +oai-traffic-server-55db59f75d-zjnnq 5m 2Mi +oai-udm-ddf6dbc46-zhtn2 72m 3Mi +oai-udr-67cf97b677-nk8gg 66m 4Mi +oai-upf-5557c66469-79bqr 26m 4Mi +``` diff --git a/openshift/README.md b/openshift/README.md index 205aa71571343e0296adb13e40f7c1208aa91892..7671cd6bc1868cef6129c2987589cfe571faa76f 100644 --- a/openshift/README.md +++ b/openshift/README.md @@ -23,7 +23,7 @@ We assume that there is already a project name `oai-tutorial` in case there is no project like that then create a new project `oc new-project oai-tutorial`. -Also you need to create configmaps and secrets because that is needed for creating the images of the network functions. In the future we will try to avoid using the entitlements. Run below commands from a RHEL8 host machine which have access to openshift cluster, +Also you need to create configmaps and secrets because that is needed for creating the images of the network functions. In the future we will try to avoid using the entitlements. Run below commands from a RHEL8 host machine which have access to Openshift cluster, ```bash oc create configmap rhsm-conf --from-file /etc/rhsm/rhsm.conf @@ -31,8 +31,7 @@ oc create configmap rhsm-ca --from-file /etc/rhsm/ca/redhat-uep.pem oc create secret generic etc-pki-entitlement --from-file /etc/pki/entitlement/<pem>.pem --from-file /etc/pki/entitlement/<key>-key.pem ``` -*NOTE*: The entitlements have to be renewed every month - +*NOTE*: The entitlements have to be renewed every month. We will remove import of entitlements and configmaps starting next release. ## 1. How to Build UBI Images of Core Network Functions? @@ -44,18 +43,18 @@ oc create -f oai-ausf-build-config.yaml oc create -f oai-udr-build-config.yaml oc create -f oai-udm-build-config.yaml oc create -f oai-smf-build-config.yaml -oc create -f oai-spgwu-tiny-build-config.yaml +oc create -f oai-upf-build-config.yaml oc create -f oai-nrf-build-config.yaml ``` -You can do `oc get bc` to see all the build configs in `oai5g` project. Once all the build config definations are there, you can start building the network function images parallel or one by one its a choice, +You can do `oc get bc` to see all the build configs in `oai-tutorial` project. Once all the build config definations are there, you can start building the network function images parallel or one by one its a choice, ``` bash oc start-bc oai-amf oc start-bc oai-smf oc start-bc oai-ausf oc start-bc oai-nrf -oc start-bc oai-spgwu-tiny +oc start-bc oai-upf oc start-bc oai-udm oc start-bc oai-udr ``` @@ -64,81 +63,11 @@ For the moment the dockerfiles used in these build configs are based on v1.4.0 r ## 2. How to Build UBI Images of gNB and UE? -For the moment CU and DU are using the same image with different configuration parameters so you just need to build one monolythic gNB image. Also CU and DU are running fine in simulated mode but not with RRU, there is a problem which we will fix soon. +For the moment CU and DU are using the same image with different configuration parameters so you just need to build one monolithic gNB image. The gNB image is build in three steps - Base image - Builder image - Final/Target image -Every image has its own build config. For the moment you will see inside the build config embedded dockerfiles but this change in sometime and there will only one build config which will fetch dockerfile directly from the gitlab repository. - -#### 2.1 Start with building the base image - -Develop branch is mostly stable and there is a new merge every week. First start with creating base image - -```bash -oc create -f oai-ran-base-build-config.yaml -oc start-build oai-ran-base -``` - -Once done you need to build builder image - -#### 2.2 Creating builder image - -```bash -oc create -f ran-build/ran-build.yaml -oc start-build ran-build -``` - -#### 2.3 Creating target image for oai-gNB - -This target image is used by oai-gnb, oai-cu, oai-cu-cp and oai-du. But for oai-cu-up there is another target image. - -If you are using another project than `oai-tutorial` then you need to make a small change in the [build config file](./oai-gnb-build-config.yaml). Change the YOUR_PROJECT_NAME variable with your project name (oc project) - -``` -$: sed -i 's/oai-tutorial/$YOUR_PROJECT_NAME/g' oai-gnb-build-config.yaml -``` - -If you are using the project name as `oai-tutorial` then you can directly start building the target image. - -```bash -oc create -f oai-gnb-build-config.yaml -oc start-build oai-gnb -``` - -#### 2.4 Creating target image for oai-cu-up - -This target image is only for oai-cu-up - -If you are using another project than `oai-tutorial` then you need to make a small change in the [build config file](./oai-gnb-build-config.yaml). Change the YOUR_PROJECT_NAME variable with your project name (oc project) - -``` -$: sed -i 's/oai-tutorial/$YOUR_PROJECT_NAME/g' oai-cu-up-build-config.yaml -``` - -If you are using the project name as `oai-tutorial` then you can directly start building the target image. - -```bash -oc create -f oai-cu-up-build-config.yaml -oc start-build oai-cu-up -``` - -#### 2.5 Creating NR-UE image - -If you are using another project than `oai-tutorial` then you need to make a small change in the [build config file](./oai-nr-ue-build-config.yaml). Change the YOUR_PROJECT_NAME variable with your project name (oc project) - -``` -$: sed -i 's/oai-tutorial/$YOUR_PROJECT_NAME/g' oai-nr-ue-build-config.yaml -``` - -If you are using the project name as `oai-tutorial` then you can directly start building the target image. - - -``` bash -oc create -f oai-nr-ue-build-config.yaml -oc start-build oai-nr-ue -``` - -You can follow [our tutorial](../docs/DEPLOY_SA5G_HC.md) on how to deploy OAI5g Core, gNB and NR-UE via [helm-charts](../charts) and helm-spray. \ No newline at end of file +You can follow [this tutorial](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/openshift/README.md?ref_type=heads) to build RAN network function images. diff --git a/openshift/oai-amf-build-config.yml b/openshift/oai-amf-build-config.yml index 8c09c35168e2ef2332cd76a1e80c52b48a57a529..f6aa2d33c06a1d2fac0eb540efbcbc3db1a36cfc 100644 --- a/openshift/oai-amf-build-config.yml +++ b/openshift/oai-amf-build-config.yml @@ -37,7 +37,7 @@ spec: source: git: uri: "https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf.git" - ref: "v1.5.1" + ref: "develop" secrets: - secret: name: etc-pki-entitlement @@ -51,8 +51,8 @@ spec: destinationDir: rhsm-ca strategy: dockerStrategy: - dockerfilePath: "docker/Dockerfile.amf.rhel8" + dockerfilePath: "docker/Dockerfile.amf.rhel9" output: to: kind: "ImageStreamTag" - name: "oai-amf:v1.5.1" + name: "oai-amf:develop" diff --git a/openshift/oai-ausf-build-config.yml b/openshift/oai-ausf-build-config.yml index f61a21398bc54985b0d05c3bc91d5a71dbcc4f7e..e10f9cb6cbf73b274b8944125cab4c93245e9dfa 100644 --- a/openshift/oai-ausf-build-config.yml +++ b/openshift/oai-ausf-build-config.yml @@ -37,7 +37,7 @@ spec: source: git: uri: "https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-ausf.git" - ref: "v1.5.1" + ref: "develop" secrets: - secret: name: etc-pki-entitlement @@ -51,8 +51,8 @@ spec: destinationDir: rhsm-ca strategy: dockerStrategy: - dockerfilePath: "docker/Dockerfile.ausf.rhel8" + dockerfilePath: "docker/Dockerfile.ausf.rhel9" output: to: kind: "ImageStreamTag" - name: "oai-ausf:v1.5.1" \ No newline at end of file + name: "oai-ausf:develop" diff --git a/openshift/oai-cu-up-build-config.yaml b/openshift/oai-cu-up-build-config.yaml deleted file mode 100644 index 12ea15102bb9a7fd5b040cd95afb4290d5f9a21e..0000000000000000000000000000000000000000 --- a/openshift/oai-cu-up-build-config.yaml +++ /dev/null @@ -1,97 +0,0 @@ -#/* -# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# * contributor license agreements. See the NOTICE file distributed with -# * this work for additional information regarding copyright ownership. -# * The OpenAirInterface Software Alliance licenses this file to You under -# * the OAI Public License, Version 1.1 (the "License"); you may not use this file -# * except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.openairinterface.org/?page_id=698 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# *------------------------------------------------------------------------------- -# * For more information about the OpenAirInterface (OAI) Software Alliance: -# * contact@openairinterface.org -# */ -#--------------------------------------------------------------------- -# -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - name: oai-cu-up -spec: - lookupPolicy: - local: true ---- -apiVersion: build.openshift.io/v1 -kind: BuildConfig -metadata: - name: oai-cu-up -spec: - output: - to: - kind: ImageStreamTag - name: "oai-cu-up:develop" - runPolicy: Serial - strategy: - type: Docker - source: - dockerfile: | - FROM image-registry.openshift-image-registry.svc:5000/oai-tutorial/oai-ran-base:develop AS gnb-base - - FROM image-registry.openshift-image-registry.svc:5000/oai-tutorial/oai-ran-build:develop AS gnb-build - - RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh - - #start from scratch for target executable - #start from scratch for target executable - FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-cuup - ENV TZ=Europe/Paris - - RUN dnf update -y && \ - dnf install -y \ - procps-ng \ - lksctp-tools \ - tzdata \ - atlas \ - net-tools \ - iputils && \ - echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ - echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf - - WORKDIR /opt/oai-gnb/bin - COPY --from=gnb-build \ - /oai-ran/cmake_targets/ran_build/build/nr-cuup \ - /oai-ran/docker/scripts/entrypoint.sh \ - ./ - - COPY --from=gnb-build \ - /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ - /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ - /oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \ - /usr/local/lib/ - - COPY --from=gnb-base \ - /lib64/libconfig.so.9 \ - /lib64/libblas.so.3 \ - /lib64/liblapack.so.3 \ - /lib64/liblapacke.so.3 \ - /lib64/ - - RUN ldconfig && \ - echo "ldd on nr-cuup" && ldd /opt/oai-gnb/bin/nr-cuup && \ - echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \ - echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \ - echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so - - WORKDIR /opt/oai-gnb/etc - - WORKDIR /opt/oai-gnb - - ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"] - CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"] \ No newline at end of file diff --git a/openshift/oai-gnb-build-config.yaml b/openshift/oai-gnb-build-config.yaml deleted file mode 100644 index 85f9ad43a3e880523b8409b694d314cef032c335..0000000000000000000000000000000000000000 --- a/openshift/oai-gnb-build-config.yaml +++ /dev/null @@ -1,142 +0,0 @@ -#/* -# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# * contributor license agreements. See the NOTICE file distributed with -# * this work for additional information regarding copyright ownership. -# * The OpenAirInterface Software Alliance licenses this file to You under -# * the OAI Public License, Version 1.1 (the "License"); you may not use this file -# * except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.openairinterface.org/?page_id=698 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# *------------------------------------------------------------------------------- -# * For more information about the OpenAirInterface (OAI) Software Alliance: -# * contact@openairinterface.org -# */ -#--------------------------------------------------------------------- -# -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - name: oai-gnb -spec: - lookupPolicy: - local: true ---- -apiVersion: build.openshift.io/v1 -kind: BuildConfig -metadata: - name: oai-gnb -spec: - output: - to: - kind: ImageStreamTag - name: "oai-gnb:develop" - runPolicy: Serial - strategy: - type: Docker - source: - dockerfile: | - FROM image-registry.openshift-image-registry.svc:5000/oai-tutorial/oai-ran-base:develop AS gnb-base - - FROM image-registry.openshift-image-registry.svc:5000/oai-tutorial/oai-ran-build:develop AS gnb-build - - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \ - cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh - - #start from scratch for target executable - FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb - ENV TZ=Europe/Paris - - RUN yum repolist --disablerepo=* && \ - yum update -y && \ - yum install -y --enablerepo="ubi-8-codeready-builder" \ - procps-ng \ - libXpm \ - libX11 \ - atlas \ - lksctp-tools \ - tzdata \ - gdb \ - python3 \ - python3-pip \ - net-tools \ - iputils && \ - pip3 install six && \ - pip3 install requests && \ - echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ - echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf - - WORKDIR /opt/oai-gnb/bin - COPY --from=gnb-build \ - /oai-ran/cmake_targets/ran_build/build/nr-softmodem \ - /oai-ran/docker/scripts/entrypoint.sh \ - ./ - - COPY --from=gnb-build \ - /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ - /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ - /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ - /oai-ran/cmake_targets/ran_build/build/libcoding.so \ - /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ - /oai-ran/cmake_targets/ran_build/build/libdfts.so \ - /oai-ran/cmake_targets/ran_build/build/libldpc.so \ - /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ - /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ - /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - /oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \ - /oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \ - /usr/local/lib/ - - COPY --from=gnb-base \ - /lib64/libconfig.so.9 \ - /lib64/libforms.so.2 \ - /lib64/libblas.so.3 \ - /lib64/liblapack.so.3 \ - /lib64/liblapacke.so.3 \ - /lib64/libboost_chrono.so.1.66.0 \ - /lib64/libboost_date_time.so.1.66.0 \ - /lib64/libboost_filesystem.so.1.66.0 \ - /lib64/libboost_program_options.so.1.66.0 \ - /lib64/libboost_serialization.so.1.66.0 \ - /lib64/libboost_thread.so.1.66.0 \ - /lib64/libboost_system.so.1.66.0 \ - /lib64/libboost_unit_test_framework.so.1.66.0 \ - /lib64/libboost_atomic.so.1.66.0 \ - /lib64/libboost_timer.so.1.66.0 \ - /lib64/libboost_regex.so.1.66.0 \ - /lib64/libicudata.so.60 \ - /lib64/libicui18n.so.60 \ - /lib64/libicuuc.so.60 \ - /lib64/ - - # Now we are copying from builder-image the UHD files. - COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin - COPY --from=gnb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64 - COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin - - WORKDIR /usr/local/share/uhd/rfnoc - COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ . - - RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ - ldconfig - - # Copy the relevant configuration files for gNB - WORKDIR /opt/oai-gnb/etc - COPY --from=gnb-build /oai-ran/docker/etc . - - WORKDIR /opt/oai-gnb - #EXPOSE 2152/udp # S1U, GTP/UDP - #EXPOSE 22100/tcp # ? - #EXPOSE 36412/udp # S1C, SCTP/UDP - #EXPOSE 36422/udp # X2C, SCTP/UDP - #EXPOSE 50000/udp # IF5 / ORI (control) - #EXPOSE 50001/udp # IF5 / ECPRI (data) - - ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"] - CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"] \ No newline at end of file diff --git a/openshift/oai-nrf-build-config.yml b/openshift/oai-nrf-build-config.yml index d3b16ab85602a9c0751462d32ad10ea94bae41e2..c787c4f9ef2acc6b0b1939a67c54faa9f7801c4c 100644 --- a/openshift/oai-nrf-build-config.yml +++ b/openshift/oai-nrf-build-config.yml @@ -37,7 +37,7 @@ spec: source: git: uri: "https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf.git" - ref: "v1.5.1" + ref: "develop" secrets: - secret: name: etc-pki-entitlement @@ -51,8 +51,8 @@ spec: destinationDir: rhsm-ca strategy: dockerStrategy: - dockerfilePath: "docker/Dockerfile.nrf.rhel8" + dockerfilePath: "docker/Dockerfile.nrf.rhel9" output: to: kind: "ImageStreamTag" - name: "oai-nrf:v1.5.1" + name: "oai-nrf:develop" diff --git a/openshift/oai-ran-builder-build-config.yaml b/openshift/oai-ran-builder-build-config.yaml deleted file mode 100644 index 49a7283dd16597e6f20f817fffaa03b911e6f404..0000000000000000000000000000000000000000 --- a/openshift/oai-ran-builder-build-config.yaml +++ /dev/null @@ -1,63 +0,0 @@ -#/* -# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# * contributor license agreements. See the NOTICE file distributed with -# * this work for additional information regarding copyright ownership. -# * The OpenAirInterface Software Alliance licenses this file to You under -# * the OAI Public License, Version 1.1 (the "License"); you may not use this file -# * except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.openairinterface.org/?page_id=698 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# *------------------------------------------------------------------------------- -# * For more information about the OpenAirInterface (OAI) Software Alliance: -# * contact@openairinterface.org -# */ -#--------------------------------------------------------------------- -# -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - name: oai-ran-build -spec: - lookupPolicy: - local: true ---- -apiVersion: build.openshift.io/v1 -kind: BuildConfig -metadata: - name: oai-ran-build -spec: - runPolicy: "Serial" - source: - git: - uri: "https://gitlab.eurecom.fr/oai/openairinterface5g.git" - ref: "develop" - secrets: - - secret: - name: etc-pki-entitlement - destinationDir: etc-pki-entitlement - configMaps: - - configMap: - name: rhsm-conf - destinationDir: rhsm-conf - - configMap: - name: rhsm-ca - destinationDir: rhsm-ca - strategy: - type: Docker - dockerStrategy: - dockerfilePath: "docker/Dockerfile.build.rhel8.2" - from: - kind: ImageStreamTag - namespace: oai-tutorial - name: oai-ran-base:develop - output: - to: - kind: "ImageStreamTag" - name: "oai-ran-build:develop" \ No newline at end of file diff --git a/openshift/oai-smf-build-config.yml b/openshift/oai-smf-build-config.yml index 53985816e95cd0f0a558e3ee5dfa7f582e585b46..7a1fbce7877f4dcb7d5a53771c51eb6c9fa90885 100644 --- a/openshift/oai-smf-build-config.yml +++ b/openshift/oai-smf-build-config.yml @@ -37,7 +37,7 @@ spec: source: git: uri: "https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-smf.git" - ref: "v1.5.1" + ref: "develop" secrets: - secret: name: etc-pki-entitlement @@ -51,8 +51,8 @@ spec: destinationDir: rhsm-ca strategy: dockerStrategy: - dockerfilePath: "docker/Dockerfile.smf.rhel8" + dockerfilePath: "docker/Dockerfile.smf.rhel9" output: to: kind: "ImageStreamTag" - name: "oai-smf:v1.5.1" + name: "oai-smf:develop" diff --git a/openshift/oai-udm-build-config.yml b/openshift/oai-udm-build-config.yml index 2314bd3d65a710fa717cd7c9cec942a3eca5e36c..03ab9b11028ff8e7daa862ae7157a2beba712273 100644 --- a/openshift/oai-udm-build-config.yml +++ b/openshift/oai-udm-build-config.yml @@ -37,7 +37,7 @@ spec: source: git: uri: "https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udm.git" - ref: "v1.5.1" + ref: "develop" secrets: - secret: name: etc-pki-entitlement @@ -51,8 +51,8 @@ spec: destinationDir: rhsm-ca strategy: dockerStrategy: - dockerfilePath: "docker/Dockerfile.udm.rhel8" + dockerfilePath: "docker/Dockerfile.udm.rhel9" output: to: kind: "ImageStreamTag" - name: "oai-udm:v1.5.1" \ No newline at end of file + name: "oai-udm:develop" diff --git a/openshift/oai-udr-build-config.yml b/openshift/oai-udr-build-config.yml index fbbf70fb730859bf3b66d3ea01797930425d1990..f2ad334b79baca27eb76f6f20fa2848b5f74b94d 100644 --- a/openshift/oai-udr-build-config.yml +++ b/openshift/oai-udr-build-config.yml @@ -37,7 +37,7 @@ spec: source: git: uri: "https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udr.git" - ref: "v1.5.1" + ref: "develop" secrets: - secret: name: etc-pki-entitlement @@ -51,8 +51,8 @@ spec: destinationDir: rhsm-ca strategy: dockerStrategy: - dockerfilePath: "docker/Dockerfile.udr.rhel8" + dockerfilePath: "docker/Dockerfile.udr.rhel9" output: to: kind: "ImageStreamTag" - name: "oai-udr:v1.5.1" \ No newline at end of file + name: "oai-udr:develop" diff --git a/openshift/oai-ran-base-build-config.yaml b/openshift/oai-upf-build-config.yml similarity index 88% rename from openshift/oai-ran-base-build-config.yaml rename to openshift/oai-upf-build-config.yml index 7536c7548f19cc30aecfc04e2052f5436b9cc80e..b0e9f00d2498073c0c2630c338ef372445c58c16 100644 --- a/openshift/oai-ran-base-build-config.yaml +++ b/openshift/oai-upf-build-config.yml @@ -23,20 +23,20 @@ apiVersion: image.openshift.io/v1 kind: ImageStream metadata: - name: oai-ran-base + name: oai-upf spec: lookupPolicy: local: true ---- +--- apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: - name: "oai-ran-base" + name: "oai-upf" spec: runPolicy: "Serial" source: git: - uri: "https://gitlab.eurecom.fr/oai/openairinterface5g.git" + uri: "https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf.git" ref: "develop" secrets: - secret: @@ -51,8 +51,8 @@ spec: destinationDir: rhsm-ca strategy: dockerStrategy: - dockerfilePath: "docker/Dockerfile.base.rhel8.2" + dockerfilePath: "docker/Dockerfile.upf.rhel9" output: to: kind: "ImageStreamTag" - name: "oai-ran-base:develop" \ No newline at end of file + name: "oai-upf:develop"