Commit 708276dd authored by arora's avatar arora 🎤
Browse files

- Changed the order of NF instantiation in docker-compose

- Changed a paragraph in the tutorial
- Made a correction in core-network.sh for no-nrf scenario
parent ef380cf1
......@@ -45,7 +45,8 @@ start:
nrf: true
tcpdump: false #start tcpdump collection to analyse but beware it will take a lot of space in the container/persistent volume
# create multus interface in case the NRF wants to use a separate interface than kubernetes general CNI or it needs to be accessed from outside cluster network using ip-address.
# create multus interface in case the NRF wants to use a separate interface
# than kubernetes general CNI or it needs to be accessed from outside cluster network using ip-address.
multus:
create: false
......@@ -55,7 +56,7 @@ multus:
config:
instance: "0"
pidDirectory: "/var/run"
nrfInterfaceNameForSBI: "eth0"
nrfInterfaceNameForSBI: "eth0" # net1 if multus.create is set true
nrfInterfacePortForSBI: "80"
nrfInterfaceHttp2PortForSBI: "9090"
nrfApiVersion: "v1"
......
......@@ -61,11 +61,11 @@ if [[ $1 == 'start' ]]; then
echo -e "\n${GREEN}All components are healthy${NC}..."
STATUS=0
break
elif [[ $2 != 'nrf' && $3 == 'spgwu' ]]; then
elif [[ $2 != 'no-nrf' && $3 == 'spgwu' ]]; then
echo -ne "mysql : $mysql_health, oai-amf : $amf_health, oai-smf : $smf_health, oai-spgwu : $spgwu_health\033[0K\r"
STATUS=1
sleep 2
elif [[ $2 != 'nrf' && $3 == 'vpp-upf' ]]; then
elif [[ $2 != 'no-nrf' && $3 == 'vpp-upf' ]]; then
echo -ne "mysql : $mysql_health, oai-amf : $amf_health, oai-smf : $smf_health, vpp-upf : $vpp_upf_health\033[0K\r"
STATUS=1
sleep 2
......@@ -90,7 +90,7 @@ if [[ $1 == 'start' ]]; then
fi
else
echo -e "${BLUE}Checking if SMF is able to connect with UPF${NC}"
if [[ $3 == 'vpp-upf' ]];then
if [[ $2 == 'no-nrf' ]];then
upf_logs=$(docker logs oai-smf | grep 'handle_receive(16 bytes)')
else
upf_logs=$(docker logs oai-spgwu | grep 'Received SX HEARTBEAT RESPONSE')
......@@ -116,7 +116,7 @@ elif [[ $1 == 'stop' ]]; then
echo -e "${RED}Stopping service $2 ${NC}..."
if [[ $2 == 'nrf' && $3 == 'spgwu' ]]; then
docker-compose -f docker-compose.yaml -p 5gcn down
elif [[ $2 != 'nrf' && $3 == 'vpp-upf' ]]; then
elif [[ $2 != 'no-nrf' && $3 == 'vpp-upf' ]]; then
docker-compose -f docker-compose-vpp-upf.yaml -p 5gcn down
elif [[ $2 = 'no-nrf' && $3 == 'spgwu' ]]; then
docker-compose -f docker-compose-no-nrf.yaml -p 5gcn down
......@@ -134,7 +134,9 @@ ${RED}vpp-upf${NC}: vpp-upf should be used (only works without nrf, no-nrf optio
${RED}spgwu${NC} : spgwu should be used as upf (works with or without nrf, nrf or no-nrf option1)\n\n\
Example 1 : ./core-network.sh start nrf spgwu\n\
Example 2: ./core-network.sh start no-nrf vpp-upf\n\
Example 3: ./core-network.sh start no-nrf vpp-upf\n
Example 1 : ./core-network.sh stop nrf spgwu\n\
Example 2: ./core-network.sh stop no-nrf vpp-upf"
Example 2: ./core-network.sh stop no-nrf vpp-upf
Example 3: ./core-network.sh stop no-nrf spgwu"
fi
......@@ -117,7 +117,7 @@ services:
- USE_FQDN_DNS=no
- DISCOVER_UPF=no
depends_on:
- oai-spgwu
- oai-amf
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-amf
- oai-smf
cap_add:
- NET_ADMIN
- SYS_ADMIN
......@@ -200,4 +200,4 @@ networks:
config:
- subnet: 192.168.70.128/26
driver_opts:
com.docker.network.bridge.name: "demo-oai"
com.docker.network.bridge.name: "demo-oai"
\ No newline at end of file
......@@ -32,8 +32,6 @@ 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
......@@ -139,7 +137,7 @@ services:
- DISCOVER_UPF=yes
- USE_FQDN_DNS=yes
depends_on:
- oai-spgwu
- oai-nrf
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
......@@ -181,7 +179,7 @@ services:
- NSSAI_SD_0=123
- DNN_0=default
depends_on:
- oai-amf
- oai-nrf
cap_add:
- NET_ADMIN
- SYS_ADMIN
......
......@@ -32,8 +32,6 @@ 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
......@@ -139,7 +137,7 @@ services:
- DISCOVER_UPF=yes
- USE_FQDN_DNS=yes
depends_on:
- oai-spgwu
- oai-nrf
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
......@@ -181,7 +179,7 @@ services:
- NSSAI_SD_0=123
- DNN_0=default
depends_on:
- oai-amf
- oai-nrf
cap_add:
- NET_ADMIN
- SYS_ADMIN
......@@ -207,7 +205,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-smf
- oai-spgwu
networks:
public_net:
ipv4_address: 192.168.70.135
......
......@@ -98,9 +98,24 @@ $ oc new-project oai
### 3.1 Networking related information
Network functions communicate based on *kubernetes service concept*, the network functions are using FQDN of other network functions to use their service. For example AMF registers with NRF using NRF ip-address. This way we can get rid of any static ip-address configuration. Except for the interfaces which are supposed to be reached from outside the cluster environment. GNB will not be included in the cluster. Thus N1/N2/NGAP and N3/GTP-U interface are provided using multus CNI to AMF and UPF pod.
Network functions communicate based on **kubernetes service concept**, the network functions are using FQDN of other network functions to use their service.
*For example: AMF registers with NRF using NRF FQDN (`oai-nrf-svc.oai.svc.cluster.local`). This way we can get rid of any static ip-address configuration. Though we are still keeping the fields where we are mentioning ip-addresses for example `nrfIpv4Addr` in amf values.yaml but that is not being used if `USE_FQDN_DNS` is set to `true`*
In our environment to reduce complexity and reduce static ip-address allocation we are providing only one interface to each pod (default Kubernetes CNI) except AMF and UPF where we provide two interfaces because gNB or gNB emulator is not running in the cluster environment. N1/N2/NGAP and N3/GTP-U interface are provided using multus CNI to AMF and UPF pod.
**Note**: Each network function can be configured with multiple interfaces using multus CNI if needed. In the `values.yaml` of each network function there are appropriate comments. There is a section `multus` in every value.yaml
```
## Example from ../charts/oai-amf/values.yaml
multus:
create: false
n4IPadd: "192.168.18.178"
n4Netmask: "24"
n4Gw: "192.168.18.129"
```
In our environment to reduce complexity and reduce static ip-address allocation we are providing only one interface to each pod (default Kubernetes CNI) except AMF and UPF where we provide two interfaces because gNB or gNB emulator is not running in the cluster environment. For example SMF can have different interfaces/ip-addresses for N4, Nsmf but in our case we are providing only one interface/ip-address to take benifit of *Kubernetes service concept*. But using multus there can be multiple interfaces of SMF too.
### 3.2 Configuring AMF
......@@ -273,7 +288,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 --> upf(spgwu) --> smf`
`mysql --> nrf --> amf --> smf --> upf(spgwu)`
Once the configuration is finished the charts can be deployed with a user who has the rights to
......
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