Commit 3d358dd2 authored by Rohan's avatar Rohan

Update dockercompose

parent bd7faec2
...@@ -79,6 +79,7 @@ RUN apt-get update && \ ...@@ -79,6 +79,7 @@ RUN apt-get update && \
openssl \ openssl \
libhyperscan-dev \ libhyperscan-dev \
iproute2 \ iproute2 \
iputils-ping \
vim \ vim \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
# */ # */
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# #
# Dockerfile for the Open-Air-Interface AMF service # Dockerfile for the VPP-UPG service
# Valid for RHEL 8.2 # Valid for RHEL 8.2
# #
#--------------------------------------------------------------------- #---------------------------------------------------------------------
...@@ -28,10 +28,15 @@ ...@@ -28,10 +28,15 @@
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# BUILDER IMAGE # BUILDER IMAGE
#--------------------------------------------------------------------- #---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi8/ubi:latest AS oai-upf-builder FROM registry.access.redhat.com/ubi7/ubi:latest AS vpp-upg-builder
ARG NEEDED_GIT_PROXY ARG NEEDED_GIT_PROXY
#Build inside cluster
#COPY ./etc-pki-entitlement /etc/pki/entitlement
#COPY ./rhsm-conf /etc/rhsm
#COPY ./rhsm-ca /etc/rhsm/ca
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca
COPY tmp/entitlement/*.pem /etc/pki/entitlement COPY tmp/entitlement/*.pem /etc/pki/entitlement
...@@ -40,82 +45,89 @@ COPY tmp/entitlement/*.pem /etc/pki/entitlement ...@@ -40,82 +45,89 @@ COPY tmp/entitlement/*.pem /etc/pki/entitlement
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone #RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN rm -f /etc/rhsm-host && \ RUN rm -f /etc/rhsm-host && \
yum repolist --disablerepo=* && \ #yum repolist --disablerepo=* && \
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms && \ subscription-manager repos --enable rhel-server-rhscl-7-rpms && \
subscription-manager repos --enable rhel-7-server-optional-rpms && \
yum update -y && \ yum update -y && \
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm &&\
yum install -y \ yum install -y \
psmisc \ psmisc \
git \ git \
make \ make \
patch \ patch \
sudo \ sudo \
python3 \ wget && \
yum-utils \
wget &&\
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
RUN yum groupinstall -y 'Development Tools'
# Some GIT configuration command quite useful # Some GIT configuration command 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
RUN wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/h/hyperscan-5.3.0-5.el8.x86_64.rpm RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el7.x86_64.rpm \
RUN rpm -i *.rpm http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \
&& rpm -i *.rpm
# Installing and configuring vpp
RUN git clone -b downstream https://github.com/travelping/vpp.git upf WORKDIR /vpp-upg
# WORKDIR /upf COPY scripts/ /vpp-upg/scripts
COPY docker/patches patches/
RUN patch -p1 -d upf < patches/werror_disable.patch # Applying vpp patches
RUN git clone https://github.com/travelping/upg-vpp.git RUN git clone -b stable/2101 https://github.com/fdio/vpp.git && \
RUN mv upg-vpp/upf/ upf/src/plugins/ git clone https://github.com/travelping/upg-vpp.git && \
RUN patch -p1 -d upf < patches/0008-Follow-symlinks-while-checking-timestamps-during-bui.patch # For the moment let us fix a given commit
RUN patch -p1 -d upf < patches/0008-vlib-decrement-counters.patch cd upg-vpp && \
RUN patch -p1 -d upf < patches/0009-sparse-vector-fix-leak.patch git checkout -f 4d32e1721c1e9a1bd7ea861658f502a64f9b4073 && \
cd .. && \
#RUN yum-config-manager --enable rhel-server-rhscl-8-rpms mv upg-vpp/upf/ vpp/src/plugins/ && \
#RUN rm *.deb -r upg-vpp/ mv upg-vpp/vpp-patches/* scripts/patches/ && \
mv upg-vpp/vpp.spec / && \
#RUN make install-dep build -C upf/ ./scripts/apply_vpp_patches.sh
#RUN make install-ext-dep build -C upf/
RUN make install-dep build-release -C vpp/
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# TARGET IMAGE # TARGET IMAGE
#--------------------------------------------------------------------- #---------------------------------------------------------------------
#FROM FROM registry.access.redhat.com/ubi8/ubi:latest as oai-upf FROM registry.access.redhat.com/ubi7/ubi:latest as vpp-upg
# We install some debug tools for the moment in addition of mandatory libraries # We install some debug tools for the moment in addition of mandatory libraries
#RUN yum update -y && \ RUN yum repolist --disablerepo=* && \
# yum install -y --enablerepo="ubi-8-codeready-builder" \ yum update -y && \
# psmisc \ #yum install -y --enablerepo="ubi-7-codeready-builder" \
# net-tools \ yum install -y \
# tshark \ net-tools \
# openssl \ iputils \
# iproute2 \ tshark \
# && rm -rf /var/lib/apt/lists/* iproute \
wget \
#RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm && rm -rf /var/lib/apt/lists/*
#RUN rpm -i hyperscan-5.3.0-1.of.el7.x86_64.rpm
# RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el7.x86_64.rpm \
#WORKDIR /openair-upf/bin/ http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \
#COPY --from=vpp-upf-builder /upf/build-root/install-vpp_debug-native/vpp/bin/vpp . && rpm -i *.rpm && rm *.rpm && yum remove -y wget
#COPY --from=vpp-upf-builder /upf/build-root/install-vpp_debug-native/vpp/bin/vppctl .
#COPY docker/configs . WORKDIR /openair-upg/bin/
COPY --from=vpp-upg-builder /vpp-upg/scripts/entrypoint.sh /openair-upg/bin/entrypoint.sh
COPY --from=vpp-upg-builder /vpp-upg/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 .
WORKDIR /openair-upg/etc
COPY --from=vpp-upg-builder /vpp-upg/scripts/upg_conf/init.conf /openair-upg/etc/init.conf
COPY --from=vpp-upg-builder /vpp-upg/scripts/upg_conf/startup_debug.conf /openair-upg/etc/startup_debug.conf
WORKDIR /usr/lib64
COPY --from=vpp-upg-builder /vpp-upg/vpp/build-root/install-vpp-native/vpp/lib/ .
#WORKDIR /openair-upf/scripts RUN ldconfig
#COPY docker/scripts .
#WORKDIR /usr/lib/x86_64-linux-gnu/ RUN groupadd vpp
#COPY --from=vpp-upf-builder /upf/build-root/install-vpp_debug-native/vpp/lib/ .
#RUN ldconfig WORKDIR /vpp-upg/
COPY --from=vpp-upg-builder /vpp-upg/scripts/run.sh /openair-upg/run.sh
#RUN groupadd vpp #expose
EXPOSE 8085/udp 2152/udp
#WORKDIR /openair-upf/bin ENTRYPOINT ["/openair-upg/bin/entrypoint.sh"]
#ENTRYPOINT ["/openair-upf/bin/entrypoint.sh"] CMD ["/openair-upg/run.sh"]
...@@ -19,13 +19,15 @@ Here in our network configuration, we need to pass the "GIT PROXY" configuration ...@@ -19,13 +19,15 @@ 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:latest \ $ docker build --target vpp-upf --tag vpp-upf: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" .
``` ```
## 3.2 On a CentOS 8 Host ## ## 3.2 On a RHEL 7 Host ##
``` ```bash
To Do $ docker build --target vpp-upg --tag vpp-upf:develop \
--file docker/Dockerfile.vppupf.rhel7 \
--build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" .
``` ```
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
UPF sould have at least three interfaces viz. access, core and sgi (or N3, N4 and N6/N9 respectively).<br/> UPF sould have at least three interfaces viz. access, core and sgi (or N3, N4 and N6/N9 respectively).<br/>
Here I have three interfaces to docker container. We rename them just for sec of simplicity. There is <br/> Here I have three interfaces to docker container. We rename them just for sec of simplicity. There is <br/>
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/>
```bash ```bash
ip link set eth0 down ip link set eth0 down
ip link set eth0 name access ip link set eth0 name access
ip link set access up ip link set access up
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<br/> <br/>
<br/> <br/>
Below is sample vpp-upf configuration. We use at lease three veth-pairs as UPF interfaces (e.g. N3, N4, N6/N9 etc). <br/> Below is sample vpp-upf configuration. We use at lease three veth-pairs as UPF interfaces (e.g. N3, N4, N6/N9 etc). <br/>
<br/>
<br/>
```bash ```bash
ip table add 1 ip table add 1
......
...@@ -2,7 +2,7 @@ version: '3.8' ...@@ -2,7 +2,7 @@ version: '3.8'
services: services:
mysql: mysql:
container_name: vpptest-mysql container_name: mysql
image: mysql:5.7 image: mysql:5.7
volumes: volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
...@@ -24,7 +24,8 @@ services: ...@@ -24,7 +24,8 @@ services:
oai-smf: oai-smf:
image: oai-smf:vpp-upf image: oai-smf:vpp-upf
container_name: vpptest-oai-smf depends_on: [oai-vpp]
container_name: oai-smf
privileged: true privileged: true
networks: networks:
public_net: public_net:
...@@ -60,10 +61,12 @@ services: ...@@ -60,10 +61,12 @@ 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
container_name: vpptest-oai-amf depends_on: [oai-smf, mysql]
container_name: oai-amf
privileged: true privileged: true
networks: networks:
public_net: public_net:
...@@ -112,7 +115,7 @@ services: ...@@ -112,7 +115,7 @@ services:
OPERATOR_KEY: '63bfa50ee6523365ff14c1f45f88737d' OPERATOR_KEY: '63bfa50ee6523365ff14c1f45f88737d'
NF_REGISTRATION: 'no' NF_REGISTRATION: 'no'
healthcheck: healthcheck:
test: /bin/bash -c "pgrep oai_smf" test: /bin/bash -c "pgrep oai_amf"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
...@@ -120,7 +123,7 @@ services: ...@@ -120,7 +123,7 @@ services:
oai-vpp: oai-vpp:
image: vpp-upg:latest image: vpp-upg:latest
privileged: true privileged: true
container_name: vpptest-oai-vpp-upf container_name: vpp-upf
networks: networks:
public_net_access: public_net_access:
ipv4_address: 192.168.75.197 ipv4_address: 192.168.75.197
...@@ -146,7 +149,14 @@ services: ...@@ -146,7 +149,14 @@ services:
N6_IPV4_ADDRESS_LOCAL : "192.168.76.202" N6_IPV4_ADDRESS_LOCAL : "192.168.76.202"
VPP_MAIN_CORE : 0 VPP_MAIN_CORE : 0
VPP_CORE_WORKER: 1 VPP_CORE_WORKER: 1
# VPP_PLUGIN_PATH: "/usr/lib64/vpp_plugins/" # RHEL7
VPP_PLUGIN_PATH: "/usr/lib/x86_64-linux-gnu/vpp_plugins/" # Ubntu18.04
healthcheck:
test: /bin/bash -c "pgrep vpp"
interval: 10s
timeout: 5s
retries: 5
oai-spgwu: oai-spgwu:
image: oai-spgwu-tiny:gtp_ext_header image: oai-spgwu-tiny:gtp_ext_header
privileged: true privileged: true
...@@ -182,7 +192,7 @@ services: ...@@ -182,7 +192,7 @@ services:
oai-nat: oai-nat:
image: ubuntu:bionic image: ubuntu:bionic
privileged: true privileged: true
container_name: vpptest-oai-nat container_name: oai-nat
networks: networks:
public_net: public_net:
ipv4_address: 192.168.74.205 ipv4_address: 192.168.74.205
...@@ -196,8 +206,9 @@ services: ...@@ -196,8 +206,9 @@ services:
gnbsim: gnbsim:
image: gnbsim:latest image: gnbsim:latest
depends_on: [oai-amf]
privileged: true privileged: true
container_name: vpptest-gnbsim container_name: gnbsim
environment: environment:
MCC: 208 MCC: 208
MNC: 95 MNC: 95
...@@ -225,8 +236,11 @@ services: ...@@ -225,8 +236,11 @@ services:
ipv4_address: 192.168.74.198 ipv4_address: 192.168.74.198
public_net_access: public_net_access:
ipv4_address: 192.168.75.198 ipv4_address: 192.168.75.198
volumes: healthcheck:
- ./lib/modules/4.15.0-76-generic/kernel/drivers/net/gtp.ko:/lib/modules/5.8.0-43-generic/kernel/drivers/net/gtp.ko test: /bin/bash -c "ifconfig gtp-gnb"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
...@@ -244,4 +258,3 @@ networks: ...@@ -244,4 +258,3 @@ networks:
ipam: ipam:
config: config:
- subnet: 192.168.76.0/24 - subnet: 192.168.76.0/24
...@@ -12,17 +12,17 @@ api-trace { ...@@ -12,17 +12,17 @@ api-trace {
on on
} }
#cpu { cpu {
# main-core @VPP_MAIN_CORE@ main-core @VPP_MAIN_CORE@
# corelist-workers @VPP_CORE_WORKER@ corelist-workers @VPP_CORE_WORKER@
#} }
api-segment { api-segment {
gid vpp gid vpp
} }
plugins { plugins {
path /usr/lib/x86_64-linux-gnu/vpp_plugins/ path @VPP_PLUGIN_PATH@
plugin dpdk_plugin.so { disable } plugin dpdk_plugin.so { disable }
plugin gtpu_plugin.so { disable } plugin gtpu_plugin.so { disable }
plugin upf_plugin.so { enable } plugin upf_plugin.so { enable }
......
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