Commit 3d358dd2 authored by Rohan's avatar Rohan

Update dockercompose

parent bd7faec2
......@@ -79,6 +79,7 @@ RUN apt-get update && \
openssl \
libhyperscan-dev \
iproute2 \
iputils-ping \
vim \
&& rm -rf /var/lib/apt/lists/*
......
......@@ -20,7 +20,7 @@
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface AMF service
# Dockerfile for the VPP-UPG service
# Valid for RHEL 8.2
#
#---------------------------------------------------------------------
......@@ -28,10 +28,15 @@
#---------------------------------------------------------------------
# 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
#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/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 rm -f /etc/rhsm-host && \
yum repolist --disablerepo=* && \
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms && \
#yum repolist --disablerepo=* && \
subscription-manager repos --enable rhel-server-rhscl-7-rpms && \
subscription-manager repos --enable rhel-7-server-optional-rpms && \
yum update -y && \
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm &&\
yum install -y \
psmisc \
git \
make \
patch \
sudo \
python3 \
yum-utils \
wget &&\
wget && \
rm -rf /var/lib/apt/lists/*
RUN yum groupinstall -y 'Development Tools'
# 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 git config --global https.postBuffer 123289600
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 rpm -i *.rpm
# Installing and configuring vpp
RUN git clone -b downstream https://github.com/travelping/vpp.git upf
# WORKDIR /upf
COPY docker/patches patches/
RUN patch -p1 -d upf < patches/werror_disable.patch
RUN git clone https://github.com/travelping/upg-vpp.git
RUN mv upg-vpp/upf/ upf/src/plugins/
RUN patch -p1 -d upf < patches/0008-Follow-symlinks-while-checking-timestamps-during-bui.patch
RUN patch -p1 -d upf < patches/0008-vlib-decrement-counters.patch
RUN patch -p1 -d upf < patches/0009-sparse-vector-fix-leak.patch
#RUN yum-config-manager --enable rhel-server-rhscl-8-rpms
#RUN rm *.deb -r upg-vpp/
#RUN make install-dep build -C upf/
#RUN make install-ext-dep build -C upf/
RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-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
WORKDIR /vpp-upg
COPY scripts/ /vpp-upg/scripts
# Applying vpp patches
RUN git clone -b stable/2101 https://github.com/fdio/vpp.git && \
git clone https://github.com/travelping/upg-vpp.git && \
# For the moment let us fix a given commit
cd upg-vpp && \
git checkout -f 4d32e1721c1e9a1bd7ea861658f502a64f9b4073 && \
cd .. && \
mv upg-vpp/upf/ vpp/src/plugins/ && \
mv upg-vpp/vpp-patches/* scripts/patches/ && \
mv upg-vpp/vpp.spec / && \
./scripts/apply_vpp_patches.sh
RUN make install-dep build-release -C vpp/
#---------------------------------------------------------------------
# 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
#RUN yum update -y && \
# yum install -y --enablerepo="ubi-8-codeready-builder" \
# psmisc \
# net-tools \
# tshark \
# openssl \
# iproute2 \
# && rm -rf /var/lib/apt/lists/*
#RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm
#RUN rpm -i hyperscan-5.3.0-1.of.el7.x86_64.rpm
#
#WORKDIR /openair-upf/bin/
#COPY --from=vpp-upf-builder /upf/build-root/install-vpp_debug-native/vpp/bin/vpp .
#COPY --from=vpp-upf-builder /upf/build-root/install-vpp_debug-native/vpp/bin/vppctl .
#COPY docker/configs .
RUN yum repolist --disablerepo=* && \
yum update -y && \
#yum install -y --enablerepo="ubi-7-codeready-builder" \
yum install -y \
net-tools \
iputils \
tshark \
iproute \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-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
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
#COPY docker/scripts .
RUN ldconfig
#WORKDIR /usr/lib/x86_64-linux-gnu/
#COPY --from=vpp-upf-builder /upf/build-root/install-vpp_debug-native/vpp/lib/ .
RUN groupadd vpp
#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
## 3.1 On a Ubuntu 18.04 Host ##
```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 \
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
```
## 3.2 On a CentOS 8 Host ##
## 3.2 On a RHEL 7 Host ##
```
To Do
```bash
$ 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 @@
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/>
additional route added for UE traffic 10.10.10.0/24 network <br/>
<br/>
<br/>
```bash
ip link set eth0 down
ip link set eth0 name access
ip link set access up
......
......@@ -2,7 +2,8 @@
<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/>
<br/>
<br/>
```bash
ip table add 1
......
......@@ -2,7 +2,7 @@ version: '3.8'
services:
mysql:
container_name: vpptest-mysql
container_name: mysql
image: mysql:5.7
volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
......@@ -24,7 +24,8 @@ services:
oai-smf:
image: oai-smf:vpp-upf
container_name: vpptest-oai-smf
depends_on: [oai-vpp]
container_name: oai-smf
privileged: true
networks:
public_net:
......@@ -60,10 +61,12 @@ services:
retries: 5
extra_hosts:
- "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:
image: oai-amf:develop
container_name: vpptest-oai-amf
depends_on: [oai-smf, mysql]
container_name: oai-amf
privileged: true
networks:
public_net:
......@@ -112,7 +115,7 @@ services:
OPERATOR_KEY: '63bfa50ee6523365ff14c1f45f88737d'
NF_REGISTRATION: 'no'
healthcheck:
test: /bin/bash -c "pgrep oai_smf"
test: /bin/bash -c "pgrep oai_amf"
interval: 10s
timeout: 5s
retries: 5
......@@ -120,7 +123,7 @@ services:
oai-vpp:
image: vpp-upg:latest
privileged: true
container_name: vpptest-oai-vpp-upf
container_name: vpp-upf
networks:
public_net_access:
ipv4_address: 192.168.75.197
......@@ -146,7 +149,14 @@ services:
N6_IPV4_ADDRESS_LOCAL : "192.168.76.202"
VPP_MAIN_CORE : 0
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:
image: oai-spgwu-tiny:gtp_ext_header
privileged: true
......@@ -182,7 +192,7 @@ services:
oai-nat:
image: ubuntu:bionic
privileged: true
container_name: vpptest-oai-nat
container_name: oai-nat
networks:
public_net:
ipv4_address: 192.168.74.205
......@@ -196,8 +206,9 @@ services:
gnbsim:
image: gnbsim:latest
depends_on: [oai-amf]
privileged: true
container_name: vpptest-gnbsim
container_name: gnbsim
environment:
MCC: 208
MNC: 95
......@@ -225,8 +236,11 @@ services:
ipv4_address: 192.168.74.198
public_net_access:
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
healthcheck:
test: /bin/bash -c "ifconfig gtp-gnb"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
......@@ -244,4 +258,3 @@ networks:
ipam:
config:
- subnet: 192.168.76.0/24
......@@ -12,17 +12,17 @@ api-trace {
on
}
#cpu {
# main-core @VPP_MAIN_CORE@
# corelist-workers @VPP_CORE_WORKER@
#}
cpu {
main-core @VPP_MAIN_CORE@
corelist-workers @VPP_CORE_WORKER@
}
api-segment {
gid vpp
}
plugins {
path /usr/lib/x86_64-linux-gnu/vpp_plugins/
path @VPP_PLUGIN_PATH@
plugin dpdk_plugin.so { disable }
plugin gtpu_plugin.so { disable }
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