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: #
## 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
* Full support for Ubuntu18 and RHEL7
* CI Build support
* Tutorial validated
## v1.0.0 -- January 2021 ##
......
......@@ -167,7 +167,7 @@ compilations() {
cd $OPENAIRCN_DIR/$1/
{
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 #####"
else
echo_error "##### VPP not compiled #####"
......
......@@ -108,7 +108,7 @@ install_dep(){
git clone -b $GIT_BRANCH $GIT_URL
# echo "APT::Get::Assume-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
}
......@@ -124,6 +124,7 @@ add_Travelping_upf_plugin(){
echo_info "Cloning Travelping UPG plugin"
pushd $OPENAIRCN_DIR/
git clone -b $GIT_BRANCH $GIT_URL
cd $OPENAIRCN_DIR/upg-vpp && git checkout -f 1f047425c5c99db44c2e599ad1dfd767d426cce8
mkdir -p -- $OPENAIRCN_DIR/vpp/patches
cp -rf $OPENAIRCN_DIR/upg-vpp/upf/ $OPENAIRCN_DIR/vpp/src/plugins/
cp -rf $OPENAIRCN_DIR/upg-vpp/vpp-patches/* $OPENAIRCN_DIR/vpp/patches
......
......@@ -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 prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
// 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('cp /etc/pki/entitlement/*pem tmp/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('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 ./etc-pki-entitlement', 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 image ls >> archives/upf_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
if ("MERGE".equals(env.gitlabActionType)) {
......@@ -333,17 +334,18 @@ pipeline {
// Generating the HTML report
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}"
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 {
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"
if (fileExists('test_results_oai_upf.html')) {
sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' test_results_oai_upf.html"
archiveArtifacts artifacts: 'test_results_oai_upf.html'
listOfFiles = sh returnStdout: true, script: 'ls test_results*.html'
String[] htmlFiles = listOfFiles.split("\\n")
for (htmlFile in htmlFiles) {
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
......
......@@ -32,8 +32,12 @@ FROM registry.access.redhat.com/ubi7/ubi:latest AS vpp-upf-builder
ARG NEEDED_GIT_PROXY
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca
COPY tmp/entitlement/*.pem /etc/pki/entitlement
# Copy the entitlements
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 && \
subscription-manager repos --enable rhel-server-rhscl-7-rpms && \
......@@ -64,10 +68,8 @@ COPY . .
# 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
git clone -b stable/1.2 https://github.com/travelping/upg-vpp.git && \
cd upg-vpp && \
git checkout -f 1f047425c5c99db44c2e599ad1dfd767d426cce8 && \
cd .. && \
mv upg-vpp/upf/ vpp/src/plugins/ && \
mv upg-vpp/vpp-patches/* scripts/patches/ && \
......@@ -91,6 +93,7 @@ RUN yum repolist --disablerepo=* && \
tshark \
tzdata\
iproute \
numactl-devel \
wget \
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 \
......
......@@ -57,10 +57,8 @@ COPY . .
# 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
git clone -b stable/1.2 https://github.com/travelping/upg-vpp.git && \
cd upg-vpp && \
git checkout -f 1f047425c5c99db44c2e599ad1dfd767d426cce8 && \
cd .. && \
mv upg-vpp/upf/ vpp/src/plugins/ && \
mv upg-vpp/vpp-patches/* scripts/patches/ && \
......@@ -97,6 +95,7 @@ RUN apt-get update && \
python-pip \
libcurl4-openssl-dev \
libssl-dev \
libnuma1 \
&& rm -rf /var/lib/apt/lists/*
RUN pip install pycurl termcolor
......
# VPP-UPF Native Installation
Tested and validated on Ubuntu Bionic arch amd64.
......@@ -23,12 +22,28 @@ $ cd oai-cn5g-upf-vpp/
/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
```bash
/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
```bash
/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -w
......
......@@ -67,11 +67,22 @@ else
exit 1
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
sleep 5
NRF_APP="$base/bin/nrf_client.py"
NRF_ARGS=" --nrf_ip="$NRF_IP_ADDR" --nrf_port="$NRF_PORT" --http_version="$HTTP_VERSION
python $NRF_APP $NRF_ARGS
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