Commit 06cab41e authored by kharade's avatar kharade

Merge branch 'develop' of https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp...

Merge branch 'develop' of https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp into build_time_optimise
parents a8f5d9d3 d698c093
# RELEASE NOTES: # # RELEASE NOTES: #
## v1.2.0 -- October 2021 ## ## v1.3.0 -- January 2022 ##
* Upgrade to UPG plugin stable/1.2
* Build fixes
* Deployment fixes (wait launch of NRF Client until VPP is getting ready)
## v1.2.1 -- October 2021 ##
* Initial Public Release * Initial Public Release
* Full support for Ubuntu18 and RHEL7 * Full support for Ubuntu18 and RHEL7
* CI Build support * CI Build support
* Tutorial validated
## v1.0.0 -- January 2021 ## ## v1.0.0 -- January 2021 ##
......
...@@ -167,7 +167,7 @@ compilations() { ...@@ -167,7 +167,7 @@ compilations() {
cd $OPENAIRCN_DIR/$1/ cd $OPENAIRCN_DIR/$1/
{ {
make build make build
if grep -q "@@ Installing vpp @@" "/home/rohan/gitrepo/oai-cn5g-upf-vpp/build/log/vpp.txt" ; then if grep -q "@@ Installing vpp @@" "$dlog/$2.txt" ; then
echo_success "##### VPP Compiled Successfully #####" echo_success "##### VPP Compiled Successfully #####"
else else
echo_error "##### VPP not compiled #####" echo_error "##### VPP not compiled #####"
......
...@@ -108,7 +108,7 @@ install_dep(){ ...@@ -108,7 +108,7 @@ install_dep(){
git clone -b $GIT_BRANCH $GIT_URL git clone -b $GIT_BRANCH $GIT_URL
# echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes # echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes
# echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes # echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes
cd vpp && make install-ext-dep cd vpp && make install-dep
return 0 return 0
} }
...@@ -124,6 +124,7 @@ add_Travelping_upf_plugin(){ ...@@ -124,6 +124,7 @@ add_Travelping_upf_plugin(){
echo_info "Cloning Travelping UPG plugin" echo_info "Cloning Travelping UPG plugin"
pushd $OPENAIRCN_DIR/ pushd $OPENAIRCN_DIR/
git clone -b $GIT_BRANCH $GIT_URL git clone -b $GIT_BRANCH $GIT_URL
cd $OPENAIRCN_DIR/upg-vpp && git checkout -f 1f047425c5c99db44c2e599ad1dfd767d426cce8
mkdir -p -- $OPENAIRCN_DIR/vpp/patches mkdir -p -- $OPENAIRCN_DIR/vpp/patches
cp -rf $OPENAIRCN_DIR/upg-vpp/upf/ $OPENAIRCN_DIR/vpp/src/plugins/ cp -rf $OPENAIRCN_DIR/upg-vpp/upf/ $OPENAIRCN_DIR/vpp/src/plugins/
cp -rf $OPENAIRCN_DIR/upg-vpp/vpp-patches/* $OPENAIRCN_DIR/vpp/patches cp -rf $OPENAIRCN_DIR/upg-vpp/vpp-patches/* $OPENAIRCN_DIR/vpp/patches
......
...@@ -197,9 +197,10 @@ pipeline { ...@@ -197,9 +197,10 @@ pipeline {
myShCmd('sudo podman image rm oai-upf-vpp:' + upf_tag + ' || true', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman image rm oai-upf-vpp:' + upf_tag + ' || true', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman image prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
// Copy the RHEL Host certificates for building // Copy the RHEL Host certificates for building
myShCmd('mkdir -p tmp/ca tmp/entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('mkdir -p ./etc-pki-entitlement ./rhsm-conf ./rhsm-ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('cp /etc/pki/entitlement/*pem tmp/entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('cp /etc/pki/entitlement/*pem ./etc-pki-entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo cp /etc/rhsm/rhsm.conf ./rhsm-conf', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo cp /etc/rhsm/ca/*pem ./rhsm-ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman build --no-cache --target oai-upf-vpp --tag oai-upf-vpp:' + upf_tag + ' --file docker/Dockerfile.upf-vpp.rhel7 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > archives/upf_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman build --no-cache --target oai-upf-vpp --tag oai-upf-vpp:' + upf_tag + ' --file docker/Dockerfile.upf-vpp.rhel7 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > archives/upf_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image ls >> archives/upf_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman image ls >> archives/upf_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
...@@ -333,17 +334,18 @@ pipeline { ...@@ -333,17 +334,18 @@ pipeline {
// Generating the HTML report // Generating the HTML report
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
sh "python3 ci-scripts/generateHtmlReport.py --job_name=${JOB_NAME} --job_id=${BUILD_ID} --job_url=${BUILD_URL} --git_url=${GIT_URL} --git_src_branch=${env.gitlabSourceBranch} --git_src_commit=${env.gitlabMergeRequestLastCommit} --git_pull_request=True --git_target_branch=${env.gitlabTargetBranch} --git_target_commit=${GIT_COMMIT}" sh "python3 ci-scripts/generateHtmlReport.py --job_name=${JOB_NAME} --job_id=${BUILD_ID} --job_url=${BUILD_URL} --git_url=${GIT_URL} --git_src_branch=${env.gitlabSourceBranch} --git_src_commit=${env.gitlabMergeRequestLastCommit} --git_pull_request=True --git_target_branch=${env.gitlabTargetBranch} --git_target_commit=${GIT_COMMIT}"
if (fileExists('test_results_oai_upf.html')) {
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_LINK#${gitlabMergeRequestLink}#g' test_results_oai_upf.html"
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_TEMPLATE#${env.gitlabMergeRequestTitle}#' test_results_oai_upf.html"
}
} else { } else {
sh "python3 ci-scripts/generateHtmlReport.py --job_name=${JOB_NAME} --job_id=${BUILD_ID} --job_url=${BUILD_URL} --git_url=${GIT_URL} --git_src_branch=${GIT_BRANCH} --git_src_commit=${GIT_COMMIT}" sh "python3 ci-scripts/generateHtmlReport.py --job_name=${JOB_NAME} --job_id=${BUILD_ID} --job_url=${BUILD_URL} --git_url=${GIT_URL} --git_src_branch=${GIT_BRANCH} --git_src_commit=${GIT_COMMIT}"
} }
sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' test_results_oai_upf.html" listOfFiles = sh returnStdout: true, script: 'ls test_results*.html'
if (fileExists('test_results_oai_upf.html')) { String[] htmlFiles = listOfFiles.split("\\n")
sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' test_results_oai_upf.html" for (htmlFile in htmlFiles) {
archiveArtifacts artifacts: 'test_results_oai_upf.html' if ("MERGE".equals(env.gitlabActionType)) {
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_LINK#${gitlabMergeRequestLink}#g' ${htmlFile}"
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_TEMPLATE#${env.gitlabMergeRequestTitle}#' ${htmlFile}"
}
sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' ${htmlFile}"
archiveArtifacts artifacts: htmlFile
} }
// Sending email to commiter // Sending email to commiter
......
...@@ -32,8 +32,12 @@ FROM registry.access.redhat.com/ubi7/ubi:latest AS vpp-upf-builder ...@@ -32,8 +32,12 @@ FROM registry.access.redhat.com/ubi7/ubi:latest AS vpp-upf-builder
ARG NEEDED_GIT_PROXY ARG NEEDED_GIT_PROXY
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca # Copy the entitlements
COPY tmp/entitlement/*.pem /etc/pki/entitlement COPY ./etc-pki-entitlement /etc/pki/entitlement
# Copy the subscription manager configurations
COPY ./rhsm-conf /etc/rhsm
COPY ./rhsm-ca /etc/rhsm/ca
RUN rm -f /etc/rhsm-host && \ RUN rm -f /etc/rhsm-host && \
subscription-manager repos --enable rhel-server-rhscl-7-rpms && \ subscription-manager repos --enable rhel-server-rhscl-7-rpms && \
...@@ -64,10 +68,8 @@ COPY . . ...@@ -64,10 +68,8 @@ COPY . .
# 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 && \
git clone https://github.com/travelping/upg-vpp.git && \ git clone -b stable/1.2 https://github.com/travelping/upg-vpp.git && \
# For the moment let us fix a given commit
cd upg-vpp && \ cd upg-vpp && \
git checkout -f 1f047425c5c99db44c2e599ad1dfd767d426cce8 && \
cd .. && \ cd .. && \
mv upg-vpp/upf/ vpp/src/plugins/ && \ mv upg-vpp/upf/ vpp/src/plugins/ && \
mv upg-vpp/vpp-patches/* scripts/patches/ && \ mv upg-vpp/vpp-patches/* scripts/patches/ && \
...@@ -91,6 +93,7 @@ RUN yum repolist --disablerepo=* && \ ...@@ -91,6 +93,7 @@ RUN yum repolist --disablerepo=* && \
tshark \ tshark \
tzdata\ tzdata\
iproute \ iproute \
numactl-devel \
wget \ wget \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el7.x86_64.rpm \ wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el7.x86_64.rpm \
......
...@@ -57,10 +57,8 @@ COPY . . ...@@ -57,10 +57,8 @@ COPY . .
# 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 && \
git clone https://github.com/travelping/upg-vpp.git && \ git clone -b stable/1.2 https://github.com/travelping/upg-vpp.git && \
# For the moment let us fix a given commit
cd upg-vpp && \ cd upg-vpp && \
git checkout -f 1f047425c5c99db44c2e599ad1dfd767d426cce8 && \
cd .. && \ cd .. && \
mv upg-vpp/upf/ vpp/src/plugins/ && \ mv upg-vpp/upf/ vpp/src/plugins/ && \
mv upg-vpp/vpp-patches/* scripts/patches/ && \ mv upg-vpp/vpp-patches/* scripts/patches/ && \
...@@ -97,6 +95,7 @@ RUN apt-get update && \ ...@@ -97,6 +95,7 @@ RUN apt-get update && \
python-pip \ python-pip \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libssl-dev \ libssl-dev \
libnuma1 \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN pip install pycurl termcolor RUN pip install pycurl termcolor
......
# VPP-UPF Native Installation # VPP-UPF Native Installation
Tested and validated on Ubuntu Bionic arch amd64. Tested and validated on Ubuntu Bionic arch amd64.
...@@ -23,12 +22,28 @@ $ cd oai-cn5g-upf-vpp/ ...@@ -23,12 +22,28 @@ $ cd oai-cn5g-upf-vpp/
/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -I -f /oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -I -f
``` ```
After successful dependencies install,
```bash
==========================================================
make[1]: Leaving directory '/tmp/oai-cn5g-upf-vpp/vpp/build/external'
VPP UPF deps installation successful
VPP UPF not compiled, to compile it, re-run ./build_vpp_upf without -I option
```
### Build VPP-UPF ### Build VPP-UPF
```bash ```bash
/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -c -V /oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -c -V
``` ```
After successful dependencies install,
```bash
@@@@ Installing vpp @@@@
[0/1] Install the project...
-- Install configuration: "debug"
make[1]: Leaving directory '/home/rohan/oai-cn5g-upf-vpp/vpp/build-root'
##### VPP compiled #####
VPP UPG initializing
Installing VPP
```
### Wipe VPP source ### Wipe VPP source
```bash ```bash
/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -w /oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -w
......
...@@ -67,11 +67,22 @@ else ...@@ -67,11 +67,22 @@ else
exit 1 exit 1
fi fi
while :
do
echo "waiting for vpp-upf service"
RES=$(bin/vppctl sh upf specification release | awk {'print $3'})
echo $RES
if [[ $RES =~ 16 ]]; then
echo "vpp-upf service is running now"
break
fi
sleep 3
done
if [[ ${REGISTER_NRF} == "yes" ]];then if [[ ${REGISTER_NRF} == "yes" ]];then
sleep 5
NRF_APP="$base/bin/nrf_client.py" NRF_APP="$base/bin/nrf_client.py"
NRF_ARGS=" --nrf_ip="$NRF_IP_ADDR" --nrf_port="$NRF_PORT" --http_version="$HTTP_VERSION NRF_ARGS=" --nrf_ip="$NRF_IP_ADDR" --nrf_port="$NRF_PORT" --http_version="$HTTP_VERSION
python $NRF_APP $NRF_ARGS python $NRF_APP $NRF_ARGS
fi fi
sleep infinity
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