Skip to content
Snippets Groups Projects
Commit 8b5e8609 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

test(ci): adding an entrypoint to ext-dn to programmatically do configuration

parent 5f2c7c4c
No related branches found
No related tags found
2 merge requests!147chore(ci): testing in host-mode the eBPF and adding traffic test to tutorial,!139chore(ci): merging UPF-based tutorials and documentations to develop
......@@ -52,4 +52,8 @@ RUN apt-get update && \
WORKDIR /tmp
COPY trfgen_entrypoint.sh .
ENTRYPOINT ["/bin/bash","/tmp/trfgen_entrypoint.sh"]
CMD ["sleep", "infinity"]
#!/usr/bin/env bash
EBPF_GW_SETUP=${EBPF_GW_SETUP:-no}
EBPF_GW_MTU=${EBPF_GW_MTU:-1460}
if [[ ${EBPF_GW_SETUP} == "yes" ]];then
echo -e "Trying to disable TCP checksum and to setup MTU on N6 interface"
N6_IF_NAME=(`ifconfig | grep -B1 "inet $EBPF_GW_N6_IP_ADDR" | awk '$1!="inet" && $1!="--" {print $1}' | sed -e "s@:@@"`)
echo -e "N6 interface is $N6_IF_NAME"
ethtool -K $N6_IF_NAME tx off
ifconfig $N6_IF_NAME mtu $EBPF_GW_MTU
ifconfig $N6_IF_NAME
echo -e "Adding UE IP routing to the N6 interface of UPF"
ip route add $UE_IP_ADDRESS_POOL via $N6_UPF_IP_ADDR dev $N6_IF_NAME
ip route
fi
echo "Done setting the configuration"
exec "$@"
......@@ -145,10 +145,11 @@ services:
init: true
container_name: oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \
"ethtool -K eth0 tx off;"\
"ip route add 12.1.1.0/24 via 192.168.72.129 dev eth1; ip route; sleep infinity"
command: ["/bin/bash", "-c", "trap : SIGTERM SIGINT; sleep infinity & wait"]
environment:
- EBPF_GW_SETUP=yes
- EBPF_GW_N6_IP_ADDR=192.168.72.135
- UE_IP_ADDRESS_POOL=12.1.1.0/24
- N6_UPF_IP_ADDR=192.168.72.129
healthcheck:
test: /bin/bash -c "ip r | grep 12.1.1"
interval: 10s
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment