Unverified Commit fd6ed460 authored by kharade's avatar kharade

code clean

parent 3d358dd2
...@@ -37,7 +37,7 @@ RUN apt update && \ ...@@ -37,7 +37,7 @@ RUN apt update && \
# Some GIT configuration commands quite useful # Some GIT configuration commands quite useful
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi" #RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
RUN git config --global https.postBuffer 123289600 RUN git config --global https.postBuffer 123289600
RUN git config --global http.sslverify false RUN git config --global http.sslverify false
...@@ -67,7 +67,7 @@ RUN make install-dep build-release -C vpp ...@@ -67,7 +67,7 @@ RUN make install-dep build-release -C vpp
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# TARGET IMAGE # TARGET IMAGE
#--------------------------------------------------------------------- #---------------------------------------------------------------------
FROM ubuntu:bionic as vpp-upf FROM ubuntu:bionic as vpp-upg
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris ENV TZ=Europe/Paris
RUN apt-get update && \ RUN apt-get update && \
......
...@@ -68,8 +68,8 @@ RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el ...@@ -68,8 +68,8 @@ RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el
http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \ http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \
&& rpm -i *.rpm && rpm -i *.rpm
WORKDIR /vpp-upg WORKDIR /vpp-upf
COPY scripts/ /vpp-upg/scripts COPY scripts/ /vpp-upf/scripts
# Applying vpp patches # Applying vpp patches
RUN git clone -b stable/2101 https://github.com/fdio/vpp.git && \ RUN git clone -b stable/2101 https://github.com/fdio/vpp.git && \
...@@ -105,29 +105,29 @@ RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el ...@@ -105,29 +105,29 @@ RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el
http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \ http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \
&& rpm -i *.rpm && rm *.rpm && yum remove -y wget && rpm -i *.rpm && rm *.rpm && yum remove -y wget
WORKDIR /openair-upg/bin/ WORKDIR /openair-upf/bin
COPY --from=vpp-upg-builder /vpp-upg/scripts/entrypoint.sh /openair-upg/bin/entrypoint.sh COPY --from=vpp-upg-builder /vpp-upf/scripts/entrypoint.sh .
COPY --from=vpp-upg-builder /vpp-upg/vpp/build-root/install-vpp-native/vpp/bin/vpp . COPY --from=vpp-upg-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vpp .
COPY --from=vpp-upg-builder /vpp-upg/vpp/build-root/install-vpp-native/vpp/bin/vppctl . COPY --from=vpp-upg-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vppctl .
WORKDIR /openair-upg/etc WORKDIR /openair-upf/etc
COPY --from=vpp-upg-builder /vpp-upg/scripts/upg_conf/init.conf /openair-upg/etc/init.conf COPY --from=vpp-upg-builder /vpp-upf/scripts/upg_conf/init.conf .
COPY --from=vpp-upg-builder /vpp-upg/scripts/upg_conf/startup_debug.conf /openair-upg/etc/startup_debug.conf COPY --from=vpp-upg-builder /vpp-upf/scripts/upg_conf/startup_debug.conf .
WORKDIR /usr/lib64 WORKDIR /usr/lib64
COPY --from=vpp-upg-builder /vpp-upg/vpp/build-root/install-vpp-native/vpp/lib/ . COPY --from=vpp-upg-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/ .
RUN ldconfig RUN ldconfig
RUN groupadd vpp RUN groupadd vpp
WORKDIR /vpp-upg/ WORKDIR /openair-upf
COPY --from=vpp-upg-builder /vpp-upg/scripts/run.sh /openair-upg/run.sh COPY --from=vpp-upg-builder /vpp-upg/scripts/run.sh .
#expose #expose
EXPOSE 8085/udp 2152/udp EXPOSE 8085/udp 2152/udp
ENTRYPOINT ["/openair-upg/bin/entrypoint.sh"] ENTRYPOINT ["/openair-upg/bin/entrypoint.sh"]
CMD ["/openair-upg/run.sh"] CMD ["/openair-upf/run.sh"]
...@@ -5,7 +5,7 @@ $ git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp.git ...@@ -5,7 +5,7 @@ $ git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp.git
$ cd oai-cn5g-upf-vpp $ cd oai-cn5g-upf-vpp
$ git checkout develop $ git checkout vpp-upf
``` ```
# 2. Generic Parameters # # 2. Generic Parameters #
...@@ -19,7 +19,7 @@ Here in our network configuration, we need to pass the "GIT PROXY" configuration ...@@ -19,7 +19,7 @@ Here in our network configuration, we need to pass the "GIT PROXY" configuration
## 3.1 On a Ubuntu 18.04 Host ## ## 3.1 On a Ubuntu 18.04 Host ##
```bash ```bash
$ docker build --target vpp-upf --tag vpp-upf:develop \ $ docker build --target vpp-upg --tag vpp-upg:develop \
--file docker/Dockerfile.ubuntu.18.04 \ --file docker/Dockerfile.ubuntu.18.04 \
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
``` ```
...@@ -27,7 +27,7 @@ $ docker build --target vpp-upf --tag vpp-upf:develop \ ...@@ -27,7 +27,7 @@ $ docker build --target vpp-upf --tag vpp-upf:develop \
## 3.2 On a RHEL 7 Host ## ## 3.2 On a RHEL 7 Host ##
```bash ```bash
$ docker build --target vpp-upg --tag vpp-upf:develop \ $ docker build --target vpp-upg --tag vpp-upg:develop \
--file docker/Dockerfile.vppupf.rhel7 \ --file docker/Dockerfile.vppupf.rhel7 \
--build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" . --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" .
``` ```
...@@ -19,4 +19,3 @@ ...@@ -19,4 +19,3 @@
3. [Building the Docker Image](./BUILD_IMAGE.md) 3. [Building the Docker Image](./BUILD_IMAGE.md)
4. [About network configuration](./VPP_NETWORKING.md) 4. [About network configuration](./VPP_NETWORKING.md)
5. [About VPP-UPF configuration](./VPP_UPF_CONFIG.md) 5. [About VPP-UPF configuration](./VPP_UPF_CONFIG.md)
6. [Development guidelines for VPP-UPF](./DEVELOPMENT_GUIDELINE.md)
...@@ -28,12 +28,3 @@ ubuntu@test-upf:~/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -I -f ...@@ -28,12 +28,3 @@ ubuntu@test-upf:~/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -I -f
```bash ```bash
ubuntu@test-upf:~/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -c -V -b Debug ubuntu@test-upf:~/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -c -V -b Debug
``` ```
### Configure VPP-UPF
Refer this page for [VPP-UPF configuration](./VPP_UPF_CONFIG.md)
### Launch VPP-UPF
```bash
ubuntu@test-upf:~$ cd oai-cn5g-upf-vpp/vpp
ubuntu@test-upf:~/oai-cn5g-upf-vpp/vpp$ ./run.sh
```
...@@ -8,6 +8,7 @@ Here I have three interfaces to docker container. We rename them just for sec of ...@@ -8,6 +8,7 @@ Here I have three interfaces to docker container. We rename them just for sec of
additional route added for UE traffic 10.10.10.0/24 network <br/> additional route added for UE traffic 10.10.10.0/24 network <br/>
<br/> <br/>
<br/> <br/>
```bash ```bash
ip link set eth0 down ip link set eth0 down
ip link set eth0 name access ip link set eth0 name access
......
...@@ -9,39 +9,41 @@ Below is sample vpp-upf configuration. We use at lease three veth-pairs as UPF i ...@@ -9,39 +9,41 @@ Below is sample vpp-upf configuration. We use at lease three veth-pairs as UPF i
ip table add 1 ip table add 1
ip table add 2 ip table add 2
####### Create N4 interface
create host-interface name core create host-interface name core
set interface mac address host-core 00:0c:29:46:1f:54
set interface mtu 1500 host-core
set interface ip table host-core 0 set interface ip table host-core 0
set interface ip address host-core 192.168.61.201/26 set interface ip address host-core 192.168.61.201/26
set interface state host-core up set interface state host-core up
####### Create N3 interface
create host-interface name access create host-interface name access
set interface mac address host-access 00:0c:29:46:1f:55
set interface mtu 1500 host-access
set interface ip table host-access 1 set interface ip table host-access 1
set interface ip address host-access 192.168.62.201/26 set interface ip address host-access 192.168.62.201/26
set interface state host-access up set interface state host-access up
####### Create N6 interface
create host-interface name sgi create host-interface name sgi
set interface mac address host-sgi 00:0c:29:46:1f:53
set interface mtu 1500 host-sgi
set interface ip table host-sgi 2 set interface ip table host-sgi 2
set interface ip address host-sgi 192.168.63.201/26 set interface ip address host-sgi 192.168.63.201/26
set interface state host-sgi up set interface state host-sgi up
####### Add ip routes
ip route add 0.0.0.0/0 table 0 via 192.168.61.196 host-core ip route add 0.0.0.0/0 table 0 via 192.168.61.196 host-core
ip route add 0.0.0.0/0 table 1 via 192.168.62.210 host-access ip route add 0.0.0.0/0 table 1 via 192.168.62.210 host-access
ip route add 0.0.0.0/0 table 2 via 192.168.63.194 host-sgi ip route add 0.0.0.0/0 table 2 via 192.168.63.194 host-sgi
####### Configure PFCP enpoint
upf pfcp endpoint ip 192.168.61.201 vrf 0 upf pfcp endpoint ip 192.168.61.201 vrf 0
####### Add network instance
upf nwi name core vrf 0 upf nwi name core vrf 0
upf nwi name access vrf 1 upf nwi name access vrf 1
upf nwi name sgi vrf 2 upf nwi name sgi vrf 2
####### Add fqdn
upf node-id fqdn gwu1.vpp.upg.node.epc.mnc095.mcc208.3gppnetwork.org upf node-id fqdn gwu1.vpp.upg.node.epc.mnc095.mcc208.3gppnetwork.org
####### Specify release for TS 3GPP 29.244 (15 or 16)
upf specification release 16 upf specification release 16
trace add af-packet-input 100 trace add af-packet-input 100
......
...@@ -44,24 +44,21 @@ done ...@@ -44,24 +44,21 @@ done
# Near future we will have multiple interfaces (e.g. two n6 interface for edge computing case) # Near future we will have multiple interfaces (e.g. two n6 interface for edge computing case)
# We define in this order in docker-compose -> it is alphabetical order # We define in this order in docker-compose -> it is alphabetical order
# #
SGI_IPV4=$(ifconfig $INTERFACE_SGI | grep "inet " | awk '{print $2}')
SGI_IPV4=$(ifconfig eth2 | grep "inet " | awk '{print $2}') ip link set $INTERFACE_ACCESS down
ip link set $INTERFACE_ACCESS name access
UE_DL_Gw=$SGI_IPV4
ip link set eth0 down
ip link set eth0 name access
ip link set access up ip link set access up
ip link set eth1 down ip link set $INTERFACE_CORE down
ip link set eth1 name core ip link set $INTERFACE_CORE name core
ip link set core up ip link set core up
ip link set eth2 down ip link set $INTERFACE_SGI down
ip link set eth2 name sgi ip link set $INTERFACE_SGI name sgi
ip link set sgi up ip link set sgi up
ip route add $NETWORK_UE_IP via $UE_DL_Gw dev sgi ip route add $NETWORK_UE_IP via $SGI_IPV4 dev sgi
echo "Done setting the configuration" echo "Done setting the configuration"
......
--- a/Makefile 2021-04-30 14:53:42.462488110 +0200
+++ b/Makefile 2021-04-30 14:50:53.189155910 +0200
@@ -279,9 +279,9 @@
else ifneq ("$(wildcard /etc/redhat-release)","")
ifeq ($(OS_ID),rhel)
@sudo -E yum-config-manager --enable rhel-server-rhscl-7-rpms
- @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
- @sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
- @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
+ @sudo -E yum groupinstall -y $(RPM_DEPENDS_GROUPS)
+ @sudo -E yum install -y $(RPM_DEPENDS)
+ @sudo -E debuginfo-install -y glibc openssl-libs mbedtls-devel zlib
else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
@sudo -E dnf install $(CONFIRM) dnf-plugins-core epel-release
@sudo -E dnf config-manager --set-enabled \
This diff is collapsed.
This diff is collapsed.
version: '3.8'
services:
mysql:
container_name: vpptest-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
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
macvlan_net:
ipv4_address: 192.168.74.200
oai-smf:
image: oai-smf:vpp-upf
container_name: vpptest-oai-smf
privileged: true
networks:
macvlan_net:
ipv4_address: 192.168.74.196
environment:
INSTANCE: 1
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: 8080
SMF_API_VERSION: v1
DEFAULT_DNS_IPV4_ADDRESS: 8.8.8.8
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
UE_IP_ADDRESS_POOL: '10.1.1.2 - 10.1.1.200'
AMF_IPV4_ADDRESS: 192.168.74.195
AMF_PORT: 80
AMF_API_VERSION: v1
UDM_IPV4_ADDRESS: 192.168.74.194
UDM_PORT: 80
UDM_API_VERSION: v1
UPF_IPV4_ADDRESS: 192.168.74.202
USE_NETWORK_INSTANCE: 'yes'
DISCOVER_UPF: 'no'
NRF_API_VERSION: 'v1'
NRF_IPV4_ADDRESS: '127.0.0.1'
NRF_PORT: '8080'
REGISTER_NRF: 'no'
healthcheck:
test: /bin/bash -c "pgrep oai_smf"
interval: 10s
timeout: 5s
retries: 5
extra_hosts:
- "gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org:192.168.74.202"
oai-amf:
image: oai-amf:develop
container_name: vpptest-oai-amf
privileged: true
networks:
macvlan_net:
ipv4_address: 192.168.74.195
environment:
INSTANCE: 1
PID_DIRECTORY: /var/run
MCC: '208'
MNC: '95'
REGION_ID: '128'
AMF_SET_ID: 1
SERVED_GUAMI_MCC_0: '208'
SERVED_GUAMI_MCC_1: '460'
SERVED_GUAMI_MNC_0: '95'
SERVED_GUAMI_MNC_1: '11'
SERVED_GUAMI_REGION_ID_0: '95'
SERVED_GUAMI_REGION_ID_1: '11'
SERVED_GUAMI_AMF_SET_ID_0: '1'
SERVED_GUAMI_AMF_SET_ID_1: '1'
PLMN_SUPPORT_MCC: '208'
PLMN_SUPPORT_MNC: '95'
PLMN_SUPPORT_TAC: '0xa000'
SST_0: '222'
SST_1: '1'
SD_0: '123'
SD_1: '12'
SMF_SELECTION: 'no'
SMF_INSTANCE_ID_0: 1
SMF_INSTANCE_ID_1: 2
SMF_IPV4_ADDR_0: 192.168.74.196
SMF_IPV4_ADDR_1: 127.0.0.1
SMF_HTTP_VERSION_0: v1
SMF_HTTP_VERSION_1: v1
AMF_INTERFACE_NAME_FOR_NGAP: eth0
AMF_INTERFACE_NAME_FOR_N11: eth0
AUSF_IPV4_ADDRESS: 192.168.74.205
AUSF_API_VERSION: 'v1'
AUSF_PORT: 80
NRF_IPV4_ADDRESS: 192.168.74.206
NRF_API_VERSION: 'v1'
NRF_PORT: 80
MYSQL_SERVER: 192.168.74.200
MYSQL_USER: 'root'
MYSQL_PASS: 'linux'
MYSQL_DB: 'oai_db'
OPERATOR_KEY: '63bfa50ee6523365ff14c1f45f88737d'
NF_REGISTRATION: 'no'
healthcheck:
test: /bin/bash -c "pgrep oai_smf"
interval: 10s
timeout: 5s
retries: 5
oai-vpp:
image: vpp-upg:latest
privileged: true
container_name: vpptest-oai-vpp-upf
networks:
macvlan_net:
ipv4_address: 192.168.75.197
macvlan_net:
ipv4_address: 192.168.74.197
macvlan_net:
ipv4_address: 192.168.76.197
environment:
NWI_CORE : "core.oai"
NWI_ACCESS : "access.oai"
NWI_SGI : "sgi.oai"
# NWI_SGI_SEC: "sgi.secondary.oai" # To Do - Traffic sterring or traffic redirection or I-UPF (N9)
GW_ID: "1"
MNC03: "95"
MCC : "208"
REALM: "3gppnetwork.org"
NETWORK_UE_IP: "12.1.1.0/24"
N3_IPV4_ADDRESS_REMOTE: "192.168.75.198"
N3_IPV4_ADDRESS_LOCAL : "192.168.75.202"
N4_IPV4_ADDRESS_REMOTE: "192.168.74.196"
N4_IPV4_ADDRESS_LOCAL : "192.168.74.202"
N6_IPV4_ADDRESS_REMOTE: "192.168.76.205"
N6_IPV4_ADDRESS_LOCAL : "192.168.76.202"
VPP_MAIN_CORE : 0
VPP_CORE_WORKER: 1
oai-spgwu:
image: oai-spgwu-tiny:gtp_ext_header
privileged: true
container_name: oai-spgwu
networks:
macvlan_net:
ipv4_address: 192.168.74.199
environment:
INSTANCE: 1
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"
SPGWC0_IP_ADDRESS: "192.168.74.196"
NETWORK_UE_IP: "10.1.1.0/24"
NETWORK_UE_NAT_OPTION: "yes"
NRF_IPV4_ADDRESS: "192.168.1.23"
NRF_PORT: "8080"
NRF_API_VERSION: "v1"
GW_ID: "1"
MNC03: "95"
MCC: "208"
REALM: "3gppnetwork.org"
THREAD_S1U_PRIO: "64"
S1U_THREADS: "16"
THREAD_SX_PRIO: "64"
SX_THREADS: "1"
THREAD_SGI_PRIO: "64"
SGI_THREADS: "16"
GTP_EXTENSION_HEADER_PRESENT: "no"
BYPASS_UL_PFCP_RULES: "no"
oai-nat:
image: ubuntu:bionic
privileged: true
container_name: vpptest-oai-nat
networks:
macvlan_net:
ipv4_address: 192.168.74.205
macvlan_net:
ipv4_address: 192.168.76.205
entrypoint: /bin/bash -c \
"apt update; apt install -y iptables iproute2 iputils-ping net-tools python iperf3;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 10.1.1.0/24 via 192.168.74.199 dev eth0;"\
"ip route add 12.1.1.0/24 via 192.168.76.201 dev eth1; sleep infinity"
gnbsim:
image: gnbsim:latest
privileged: true
container_name: vpptest-gnbsim
environment:
MCC: 208
MNC: 95
GNBID: 1
TAC: '0x00a000'
SST: '222'
SD: '010203'
SD_UE_PARAM: '00007b'
PagingDRX: 'v32'
RANUENGAPID: 0
IMEISV: '35609204079514'
MSIN: '0000000031'
RoutingIndicator: 1234
ProtectionScheme: 'null'
KEY: '0C0A34601D4F07677303652C0462535B'
OPc: '63bfa50ee6523365ff14c1f45f88737d'
DNN: 'default'
URL: 'http://192.168.76.205:8000'
NRCellID: 1
NGAPPeerAddr: '192.168.74.195'
GTPuLocalAddr: '192.168.75.198'
GTPuIFname: 'eth0'
networks:
macvlan_net:
ipv4_address: 192.168.74.198
macvlan_net:
ipv4_address: 192.168.75.198
volumes:
- ./lib/modules/4.15.0-76-generic/kernel/drivers/net/gtp.ko:/lib/modules/5.8.0-43-generic/kernel/drivers/net/gtp.ko
networks:
# public_net:
# name: oai-public-net
# ipam:
# config:
# - subnet: 192.168.74.0/24
# public_net_access:
# name: oai-public-access
# ipam:
# config:
# - subnet: 192.168.75.0/24
# public_net_sgi_lan:
# name: oai-public-sgi-lan
# ipam:
# config:
# - subnet: 192.168.76.0/24
macvlan_net:
external:
name: oairohan
#!/bin/bash
set -eo pipefail
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
exit 0
fi
host="$(hostname --ip-address || echo '127.0.0.1')"
user="${MYSQL_USER:-root}"
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
args=(
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
-h"$host"
-u"$user"
--silent
)
STATUS=0
if command -v mysqladmin &> /dev/null; then
if mysqladmin "${args[@]}" ping > /dev/null; then
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
else
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
fi
exit $STATUS
This diff is collapsed.
...@@ -21,7 +21,6 @@ services: ...@@ -21,7 +21,6 @@ services:
networks: networks:
public_net: public_net:
ipv4_address: 192.168.74.200 ipv4_address: 192.168.74.200
oai-smf: oai-smf:
image: oai-smf:vpp-upf image: oai-smf:vpp-upf
depends_on: [oai-vpp] depends_on: [oai-vpp]
...@@ -61,8 +60,6 @@ services: ...@@ -61,8 +60,6 @@ services:
retries: 5 retries: 5
extra_hosts: extra_hosts:
- "gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org:192.168.74.202" - "gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org:192.168.74.202"
- "gw1.spgw.node.epc.mnc95.mcc208.3gppnetwork.org:192.168.74.199"
oai-amf: oai-amf:
image: oai-amf:develop image: oai-amf:develop
depends_on: [oai-smf, mysql] depends_on: [oai-smf, mysql]
...@@ -119,9 +116,8 @@ services: ...@@ -119,9 +116,8 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-vpp: oai-vpp:
image: vpp-upg:latest image: vpp-upg:develop
privileged: true privileged: true
container_name: vpp-upf container_name: vpp-upf
networks: networks:
...@@ -135,7 +131,6 @@ services: ...@@ -135,7 +131,6 @@ services:
NWI_CORE : "core.oai" NWI_CORE : "core.oai"
NWI_ACCESS : "access.oai" NWI_ACCESS : "access.oai"
NWI_SGI : "sgi.oai" NWI_SGI : "sgi.oai"
# NWI_SGI_SEC: "sgi.secondary.oai" # To Do - Traffic sterring or traffic redirection or I-UPF (N9)
GW_ID: "1" GW_ID: "1"
MNC03: "95" MNC03: "95"
MCC : "208" MCC : "208"
...@@ -151,44 +146,14 @@ services: ...@@ -151,44 +146,14 @@ services:
VPP_CORE_WORKER: 1 VPP_CORE_WORKER: 1
# VPP_PLUGIN_PATH: "/usr/lib64/vpp_plugins/" # RHEL7 # VPP_PLUGIN_PATH: "/usr/lib64/vpp_plugins/" # RHEL7
VPP_PLUGIN_PATH: "/usr/lib/x86_64-linux-gnu/vpp_plugins/" # Ubntu18.04 VPP_PLUGIN_PATH: "/usr/lib/x86_64-linux-gnu/vpp_plugins/" # Ubntu18.04
INTERFACE_ACCESS: "eth0"
INTERFACE_CORE: "eth1"
INTERFACE_SGI: "eth2"
healthcheck: healthcheck:
test: /bin/bash -c "pgrep vpp" test: /bin/bash -c "pgrep vpp"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-spgwu:
image: oai-spgwu-tiny:gtp_ext_header
privileged: true
container_name: oai-spgwu
networks:
public_net:
ipv4_address: 192.168.74.199
environment:
INSTANCE: 1
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"
SPGWC0_IP_ADDRESS: "192.168.74.196"
NETWORK_UE_IP: "10.1.1.0/24"
NETWORK_UE_NAT_OPTION: "yes"
NRF_IPV4_ADDRESS: "192.168.1.23"
NRF_PORT: "8080"
NRF_API_VERSION: "v1"
GW_ID: "1"
MNC03: "95"
MCC: "208"
REALM: "3gppnetwork.org"
THREAD_S1U_PRIO: "64"
S1U_THREADS: "16"
THREAD_SX_PRIO: "64"
SX_THREADS: "1"
THREAD_SGI_PRIO: "64"
SGI_THREADS: "16"
GTP_EXTENSION_HEADER_PRESENT: "no"
BYPASS_UL_PFCP_RULES: "no"
oai-nat: oai-nat:
image: ubuntu:bionic image: ubuntu:bionic
privileged: true privileged: true
...@@ -201,9 +166,7 @@ services: ...@@ -201,9 +166,7 @@ services:
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y iptables iproute2 iputils-ping net-tools python iperf3;"\ "apt update; apt install -y iptables iproute2 iputils-ping net-tools python iperf3;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 10.1.1.0/24 via 192.168.74.199 dev eth0;"\ "ip route add 12.1.1.0/24 via 192.168.76.202 dev eth1; sleep infinity"
"ip route add 12.1.1.0/24 via 192.168.76.201 dev eth1; sleep infinity"
gnbsim: gnbsim:
image: gnbsim:latest image: gnbsim:latest
depends_on: [oai-amf] depends_on: [oai-amf]
...@@ -215,8 +178,7 @@ services: ...@@ -215,8 +178,7 @@ services:
GNBID: 1 GNBID: 1
TAC: '0x00a000' TAC: '0x00a000'
SST: '222' SST: '222'
SD: '010203' SD: '00007b'
SD_UE_PARAM: '00007b'
PagingDRX: 'v32' PagingDRX: 'v32'
RANUENGAPID: 0 RANUENGAPID: 0
IMEISV: '35609204079514' IMEISV: '35609204079514'
......
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