Commit e3d7e74c authored by arora's avatar arora 🎤
Browse files

Updated helm charts

parent e4275d67
......@@ -10,6 +10,6 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: health-cm
name: {{ .Chart.Name }}-health-cm
data:
{{ (.Files.Glob "scripts/live-ready.sh").AsConfig | indent 2 }}
\ No newline at end of file
......@@ -333,7 +333,7 @@ spec:
{{- end }}
- name: scripts
configMap:
name: health-cm
name: {{ .Chart.Name }}-health-cm
dnsPolicy: ClusterFirst
restartPolicy: Always
serviceAccountName: {{ .Values.serviceAccount.name }}
......
......@@ -10,6 +10,6 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: health-cm
name: {{ .Chart.Name }}-health-cm
data:
{{ (.Files.Glob "scripts/live-ready.sh").AsConfig | indent 2 }}
\ No newline at end of file
......@@ -120,7 +120,7 @@ spec:
{{- end }}
- name: scripts
configMap:
name: health-cm
name: {{ .Chart.Name }}-health-cm
dnsPolicy: ClusterFirst
restartPolicy: Always
serviceAccountName: {{ .Values.serviceAccount.name }}
......
......@@ -16,8 +16,8 @@ nfimage:
tcpdumpimage:
registry: local
repository: oai-nrf
version: v1.1.0
repository: corfr/tcpdump
version: latest
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
......
......@@ -10,6 +10,6 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: health-cm
name: {{ .Chart.Name }}-health-cm
data:
{{ (.Files.Glob "scripts/live-ready.sh").AsConfig | indent 2 }}
\ No newline at end of file
......@@ -226,7 +226,7 @@ spec:
{{- end }}
- name: scripts
configMap:
name: health-cm
name: {{ .Chart.Name }}-health-cm
dnsPolicy: ClusterFirst
restartPolicy: Always
serviceAccountName: {{ .Values.serviceAccount.name }}
......
......@@ -10,6 +10,6 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: health-cm
name: {{ .Chart.Name }}-health-cm
data:
{{ (.Files.Glob "scripts/live-ready.sh").AsConfig | indent 2 }}
\ No newline at end of file
......@@ -250,7 +250,7 @@ spec:
{{- end }}
- name: scripts
configMap:
name: health-cm
name: {{ .Chart.Name }}-health-cm
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
......
......@@ -117,7 +117,7 @@ services:
- USE_FQDN_DNS=no
- DISCOVER_UPF=no
depends_on:
- oai-amf
- oai-spgwu
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
......@@ -159,7 +159,7 @@ services:
- NSSAI_SD_0=123
- DNN_0=default
depends_on:
- oai-smf
- oai-amf
cap_add:
- NET_ADMIN
- SYS_ADMIN
......
version: '3.8'
services:
oai-nrf:
container_name: "oai-nrf"
image: oai-nrf:latest
environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks:
public_net:
ipv4_address: 192.168.70.130
volumes:
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql:
container_name: "mysql"
image: mysql:5.7
volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
environment:
- TZ=Europe/Paris
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
depends_on:
- oai-nrf
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.70.131
oai-amf:
container_name: "oai-amf"
image: oai-amf:latest
environment:
- TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208
- MNC=99
- REGION_ID=128
- AMF_SET_ID=1
- SERVED_GUAMI_MCC_0=208
- SERVED_GUAMI_MNC_0=99
- SERVED_GUAMI_REGION_ID_0=128
- SERVED_GUAMI_AMF_SET_ID_0=1
- SERVED_GUAMI_MCC_1=460
- SERVED_GUAMI_MNC_1=11
- SERVED_GUAMI_REGION_ID_1=10
- SERVED_GUAMI_AMF_SET_ID_1=1
- PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0xa000
- SST_0=222
- SD_0=123
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0
- SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true
- SMF_INSTANCE_ID_1=2
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.70.131
- MYSQL_USER=root
- MYSQL_PASS=linux
- MYSQL_DB=oai_db
- OPERATOR_KEY=63bfa50ee6523365ff14c1f45f88737d
- NRF_IPV4_ADDRESS=192.168.70.130
- NRF_PORT=80
- NF_REGISTRATION=yes
- SMF_SELECTION=yes
- USE_FQDN_DNS=yes
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- AUSF_IPV4_ADDRESS=127.0.0.1
- AUSF_PORT=80
- AUSF_API_VERSION=v1
depends_on:
- mysql
volumes:
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks:
public_net:
ipv4_address: 192.168.70.132
oai-smf:
container_name: "oai-smf"
image: oai-smf:latest
environment:
- TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129
- DEFAULT_DNS_SEC_IPV4_ADDRESS=192.168.18.129
- AMF_IPV4_ADDRESS=0.0.0.0
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.70.134
- UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.70.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- REGISTER_NRF=yes
- DISCOVER_UPF=yes
- USE_FQDN_DNS=yes
depends_on:
- oai-spgwu
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.70.133
oai-spgwu:
container_name: "oai-spgwu"
image: oai-spgwu-tiny:latest
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.70.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=95
- MNC03=095
- TAC=40960
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes
- USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.70.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- NSSAI_SST_0=222
- NSSAI_SD_0=123
- DNN_0=default
depends_on:
- oai-amf
cap_add:
- NET_ADMIN
- SYS_ADMIN
- NET_RAW
cap_drop:
- ALL
devices:
- /dev/net/tun:/dev/net/tun
sysctls:
- net.ipv4.conf.eth0.rp_filter=0
- net.ipv4.conf.all.forwarding=1
- net.ipv4.conf.all.send_redirects=0
- net.ipv4.conf.default.send_redirects=0
- net.ipv4.conf.all.accept_redirects=0
- net.ipv4.conf.default.accept_redirects=0
volumes:
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.70.134
oai-ext-dn:
image: ubuntu:bionic
privileged: true
container_name: oai-ext-dn
entrypoint: /bin/bash -c \
"apt update; apt install -y iptables iproute2 iperf3 iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.70.134 dev eth0; sleep infinity"
depends_on:
- oai-spgwu
networks:
public_net:
ipv4_address: 192.168.70.135
networks:
# public_net:
# external:
# name: demo-oai-public-net
public_net:
driver: bridge
name: demo-oai-public-net
ipam:
config:
- subnet: 192.168.70.128/26
driver_opts:
com.docker.network.bridge.name: "demo-oai"
\ No newline at end of file
......@@ -32,6 +32,8 @@ services:
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
depends_on:
- oai-nrf
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
......@@ -137,7 +139,7 @@ services:
- DISCOVER_UPF=yes
- USE_FQDN_DNS=yes
depends_on:
- oai-nrf
- oai-spgwu
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
......@@ -179,7 +181,7 @@ services:
- NSSAI_SD_0=123
- DNN_0=default
depends_on:
- oai-nrf
- oai-amf
cap_add:
- NET_ADMIN
- SYS_ADMIN
......@@ -205,7 +207,7 @@ services:
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.70.134 dev eth0; sleep infinity"
depends_on:
- oai-spgwu
- oai-smf
networks:
public_net:
ipv4_address: 192.168.70.135
......
......@@ -106,11 +106,21 @@ In our environment to reduce complexity and reduce static ip-address allocation
Open the [values.yaml](../charts/oai-amf/values.yaml) to configure the required parameters. There are many parameters which can be configured. Below are some important parameters,
```
namespace: "oai" # namespace where AMF will be deployed
namespace: "oai"
image:
repository: oai-amf # image name either locally present or in a public/private repository
nfimage:
registry: local
repository: rdefosseoai/oai-amf # image name either locally present or in a public/private repository
version: v1.1.0 # image tag
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
tcpdumpimage:
registry: local
repository: corfr/tcpdump
version: latest
#pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
# configure these values based on gNB/emulator configuration
config:
......@@ -157,9 +167,19 @@ Open [values.yaml](../charts/oai-smf/values.yaml) to configure SMF configuration
```
namespace: "oai" # namespace where SMF will be deployed
image:
repository: oai-smf # image name either locally present or in a public/private repository
version: v1.1.0 # image tag
nfimage:
registry: local
repository: rdefosseoai/oai-smf
version: v1.1.0
#pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
tcpdumpimage:
registry: local
repository: corfr/tcpdump
version: latest
#pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
config:
dnsIpv4Address: ""
......@@ -179,9 +199,19 @@ Open [values.yaml](../charts/oai-spgwu-tiny/values.yaml) to configure UPF/SPGWU
```
namespace: "oai" # namespace where SMF will be deployed
image:
repository: oai-spgwu-tiny # image name either locally present or in a public/private repository
version: v1.1.2 # image tag
nfimage:
registry: local
repository: rdefosseoai/oai-spgwu-tiny
version: v1.1.2
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
tcpdumpimage:
registry: local
repository: corfr/tcpdump
version: latest
#pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
config:
gwId: 1
......@@ -199,6 +229,25 @@ There are more parametes which can be configured like extra interfaces and resou
NRF configuration is straight forward, most of configurable parameters have comment infront of it for explaination. Refer the [values.yaml](../charts/oai-nrf/values.yaml)
```
namespace: "oai"
# NF image
nfimage:
registry: local
repository: rdefosseoai/oai-nrf
version: v1.1.0
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
tcpdumpimage:
registry: local
repository: corfr/tcpdump
version: latest
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
```
Configure `readinessProbe` and `livenessProbe` by default they are `true` to switch them off change the value with `false`
### 3.6 Configuring subscriber data in MYSQL
......@@ -224,7 +273,7 @@ In above statement change `imsi`, `imei`, `key` and `opc` with appropriate value
Helm charts have an order of deployment for the proper configuration of core network.
`mysql --> nrf --> amf --> smf --> upf(spgwu)`
`mysql --> nrf --> amf --> upf(spgwu) --> smf`
Once the configuration is finished the charts can be deployed with a user who has the rights to
......@@ -243,13 +292,33 @@ $ helm install smf oai-smf/
# wait for the pod to be ready
$ helm install upf oai-spgwu-tiny/
# wait for the pod to be ready
$ helm list
$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
mysql oai-5g-develop 1 2021-07-29 14:20:34.010881045 +0200 CEST deployed mysql-1.6.9 5.7.30
amf oai-5g-develop 1 2021-07-29 14:25:34.010881045 +0200 CEST deployed oai-amf-1.1.0 1.1.0
nrf oai-5g-develop 1 2021-07-29 14:16:11.530949242 +0200 CEST deployed oai-nrf-1.1.0 1.1.0
smf oai-5g-develop 1 2021-07-29 15:34:15.62785988 +0200 CEST deployed oai-smf-1.1.0 1.1.0
upf oai-5g-develop 1 2021-07-29 15:28:04.773480519 +0200 CEST deployed oai-spgwu-tiny-1.1.2 1.1.2
amf oai-5g-develop 1 2021-08-02 14:45:20.055915967 +0200 CEST deployed oai-amf-1.1.0 1.1.0
mysql oai-5g-develop 1 2021-08-02 13:19:21.141268411 +0200 CEST deployed mysql-1.6.9 5.7.30
nrf oai-5g-develop 1 2021-08-02 14:39:05.615418329 +0200 CEST deployed oai-nrf-1.1.0 1.1.0
smf oai-5g-develop 1 2021-08-02 14:52:53.573249685 +0200 CEST deployed oai-smf-1.1.0 1.1.0
upf oai-5g-develop 1 2021-08-02 14:49:48.741260605 +0200 CEST deployed oai-spgwu-tiny-1.1.2 1.1.2
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
mysql-5dd98b7d97-gh4bz 1/1 Running 0 20m
oai-amf-7bb898fc58-56pr5 2/2 Running 0 10m
oai-nrf-859b987c48-8v94s 2/2 Running 0 16m
oai-smf-678bbc965f-whdr6 2/2 Running 0 2m46s
oai-spgwu-tiny-6c4d68fd45-mpv5v 2/2 Running 0 5m51s
```
## 4.1 How to check if the Core network is properly configured?
Check the logs `smf` and `upf` to see that the PFCP session is properly configured,
```
$ kubectl oai-smf-678bbc965f-whdr6 smf | grep 'Received N4 ASSOCIATION SETUP RESPONSE from an UPF'
[2021-08-02T14:52:57.695110] [smf] [smf_n4 ] [info ] Received N4 ASSOCIATION SETUP RESPONSE from an UPF
$ kubectl logs oai-spgwu-tiny-6c4d68fd45-mpv5v spgwu | grep 'Received SX HEARTBEAT REQUEST' | wc -l
60 (should be more than 1)
```
This will verify that `smf` and `upf` have successfully registered to `nrf` and there is a PFCP session.
Now go ahead and use OAI-gNB/dsTest/gNBSIM or any other gNB or emulator to test the deployed core network.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment