Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.4.0 #63

Merged
merged 34 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ea6493b
fix(ci): more flexible report name from child test pipelines in order…
rdefosse Feb 24, 2022
d547576
fix(ci): only on test_results HTML files
rdefosse Feb 24, 2022
6439e36
Fix configurable number of DL threads for data path
lionelgo Mar 9, 2022
0f3db00
Merge pull request #52 from OPENAIRINTERFACE/fix-sgi-threads
rdefosse Mar 11, 2022
6a1f7bc
fix(ci): only on test_results HTML files
rdefosse Feb 24, 2022
963853c
gtpu offset fix seq number
orion-belt Apr 7, 2022
cf66d92
feat(ci): adding a script to test flattening image
rdefosse Apr 12, 2022
1de1ccc
fix(ci): no more proxy required in the new Eurecom infra
rdefosse Apr 19, 2022
6e4becd
fix(clang-format): git setup to be done in CI case
rdefosse Apr 20, 2022
9bb6ac9
feat(ci): flatten image to one layer to reduce image to the max
rdefosse Apr 13, 2022
985f284
Merge pull request #55 from OPENAIRINTERFACE/try-flattening-image
rdefosse Apr 20, 2022
85d4d91
defined constants for flags
orion-belt Apr 27, 2022
e670418
fix(ci): changing the Docker Hub account to push to
rdefosse Apr 28, 2022
4014a94
Merge branch 'develop' of https://github.com/OPENAIRINTERFACE/openair…
orion-belt Apr 29, 2022
ab33f40
code rearrange
orion-belt May 3, 2022
46fe3d0
Merge pull request #50 from OPENAIRINTERFACE/gtpu_offset_fix
arora-sagar May 4, 2022
fdea280
set GTPV1U socket option to REUSE_PORT
lionelgo May 5, 2022
cc15b9e
Merge pull request #57 from OPENAIRINTERFACE/reuse-port
arora-sagar May 10, 2022
d10e019
[CI] Cmake3 package issue
arora-sagar May 10, 2022
fe24289
[CI] Bump up the version of UBI8 to 8.6
arora-sagar May 11, 2022
69c7edf
[CI] Clean up of centos naming
arora-sagar May 11, 2022
3827d5d
Remove duplicated lines of cmake
arora-sagar May 11, 2022
0dc23ed
Re-trigger the pipeline
arora-sagar May 11, 2022
a450b73
Merge pull request #59 from OPENAIRINTERFACE/cmake3
arora-sagar May 11, 2022
2875423
Display slice info
orion-belt Jun 14, 2022
34cf4c1
Display SD field optionally
orion-belt Jun 14, 2022
134eba2
Support for multiple slice in config
orion-belt Jun 16, 2022
d2bb374
code clean
orion-belt Jun 17, 2022
10d6dfa
Do not display SD_NO_VALUE
orion-belt Jun 28, 2022
dcc0168
Merge pull request #60 from OPENAIRINTERFACE/conf_display_fix
arora-sagar Jun 29, 2022
abcc53b
SD info is included back in profile irrespective of SST
orion-belt Jun 30, 2022
a75bb1b
Merge pull request #61 from OPENAIRINTERFACE/slice_info_in_profile
arora-sagar Jul 4, 2022
12f4a82
Release v1.4.0
arora-sagar Jul 7, 2022
16bd4d8
Merge pull request #62 from OPENAIRINTERFACE/release-v1.4.0
arora-sagar Jul 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# RELEASE NOTES: #

## v1.4.0 -- July 2022 ##

* Fix for handling S-NSSAI
* Add support for multiple slices via config file
* Allowed reusing GTPv1-U socket
* Fix GTPU offset sequence number
* Fix configurable number of DL threads for data path
* Official images produced by CI are pushed to `oaisoftwarealliance` Docker-Hub Team account
* Reduce image size
* Skipping release tag v1.3.0 to be in sync with OAI CN 5G network functions

## v1.2.0 -- February 2022 ##

* Obsolescence of Legacy OAI-MME
Expand Down
8 changes: 4 additions & 4 deletions build/scripts/build_helper
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# author Laurent Thomas, Lionel GAUTHIER
#
#######################################
SUPPORTED_DISTRO="Ubuntu 18.04, CentOS 8, RHEL 8"
SUPPORTED_DISTRO="Ubuntu 18.04, RHEL 8, UBI8-8.6"
if [ ! -f /etc/os-release ]; then
echo_fatal "No /etc/os-release file found. You're likely on an unsupported distro."
fi
Expand All @@ -33,7 +33,6 @@ OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "
case "$OS_DISTRO" in
fedora) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
centos) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
debian) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
esac
Expand Down Expand Up @@ -132,7 +131,8 @@ check_supported_distribution() {
"rhel8.3") return 0 ;;
"rhel8.4") return 0 ;;
"rhel8.5") return 0 ;;
"centos8") return 0 ;;
"rhel8.6") return 0 ;;

esac
return 1
}
Expand Down Expand Up @@ -284,7 +284,7 @@ update_package_db() {
check_enable_epel_repos() {
# on Enterprise Linuxes, ensure EPEL repos are installed
# (provides: libidn2-devel, vconfig, iperf, phpMyAdmin, dkms, ...)
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] ; then
if rpm -q epel-release > /dev/null; then
echo "EPEL repos already present. Good."
else
Expand Down
10 changes: 3 additions & 7 deletions build/scripts/build_helper.spgw
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ install_fmt() {
git clone https://github.com/fmtlib/fmt.git
ret=$?;[[ $ret -ne 0 ]] && return $ret
cd fmt
cmake .
$CMAKE .
ret=$?;[[ $ret -ne 0 ]] && return $ret
make -j `nproc`
ret=$?;[[ $ret -ne 0 ]] && return $ret
Expand Down Expand Up @@ -139,11 +139,7 @@ install_nlohmann_from_git() {
cd json && git checkout -f v3.10.3
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
mkdir _build && cd _build
if [[ "$OS_BASEDISTRO" == "fedora" ]]; then
cmake3 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DJSON_BuildTests=OFF ..
else
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DJSON_BuildTests=OFF ..
fi
$CMAKE -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DJSON_BuildTests=OFF ..
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
make
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
Expand Down Expand Up @@ -195,7 +191,7 @@ check_install_spgwu_deps() {
automake \
bison \
build-essential \
cmake \
$CMAKE \
doxygen \
flex \
gdb \
Expand Down
25 changes: 16 additions & 9 deletions ci-scripts/Jenkinsfile-GitHub-Docker
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def rem_rhel8_resource = params.PodmanContainers
def spgwu_tag = 'develop'
def spgwu_branch = 'develop'

// Docker Hub account to push to
def DH_Account = "oaisoftwarealliance"

//-------------------------------------------------------------------------------
// Pipeline start
pipeline {
Expand Down Expand Up @@ -107,7 +110,6 @@ pipeline {
echo "PR ID is ${env.ghprbPullId}"
echo "PR LINK is ${env.ghprbPullLink}"
echo "PR TITLE is ${env.ghprbPullTitle}"
sh "git fetch --prune --unshallow"
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" ' + env.ghprbActualCommit
shortenShaOne = shortenShaOne.trim()
sh "./ci-scripts/doGitHubPullRequestTempMerge.sh --src-branch ${env.ghprbSourceBranch} --src-commit ${env.ghprbActualCommit} --target-branch ${env.ghprbTargetBranch} --target-commit ${GIT_COMMIT}"
Expand Down Expand Up @@ -152,7 +154,10 @@ pipeline {
myShCmd('docker image rm oai-spgwu-tiny:' + spgwu_tag + ' || true', rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
}
myShCmd('docker image prune --force', rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd('docker build --no-cache --target oai-spgwu-tiny --tag oai-spgwu-tiny:' + spgwu_tag + ' --file docker/Dockerfile.ubuntu18.04 --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" . > archives/spgwu_docker_image_build.log 2>&1', rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd('docker build --no-cache --target oai-spgwu-tiny --tag oai-spgwu-tiny:' + spgwu_tag + ' --file docker/Dockerfile.ubuntu18.04 . > archives/spgwu_docker_image_build.log 2>&1', rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
// Putting a place holder to try out on the flattening of image.
// If not satisfactory, we can remove it.
myShCmd('python3 ./ci-scripts/flatten_image.py --tag oai-spgwu-tiny:' + spgwu_tag, rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd('docker image ls >> archives/spgwu_docker_image_build.log', rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
// We will keep also the TMP image in U18 case.
if (env.ghprbPullId != null) {
Expand Down Expand Up @@ -193,7 +198,10 @@ pipeline {
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-spgwu-tiny --tag oai-spgwu-tiny:' + spgwu_tag + ' --file docker/Dockerfile.rhel8 --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" . > archives/spgwu_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-spgwu-tiny --tag oai-spgwu-tiny:' + spgwu_tag + ' --file docker/Dockerfile.rhel8 . > archives/spgwu_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
// Putting a place holder to try out on the flattening of image.
// If not satisfactory, we can remove it.
myShCmd('python3 ./ci-scripts/flatten_image.py --tag oai-spgwu-tiny:' + spgwu_tag, rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image ls >> archives/spgwu_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
if (env.ghprbPullId != null) {
myShCmd('sudo podman image tag oai-spgwu-tiny:' + spgwu_tag + ' oai-spgwu-tiny:' + rhel_spgwu_tag, rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
Expand Down Expand Up @@ -408,7 +416,7 @@ pipeline {
always {
script {
copyArtifacts(projectName: params.CN_EPC_FED_PipelineName,
filter: 'test_results_oai_epc.html',
filter: 'test_results*.html',
selector: lastCompleted())
}
}
Expand Down Expand Up @@ -437,7 +445,7 @@ pipeline {
always {
script {
copyArtifacts(projectName: params.RHEL8_SanityCheck_PipelineName,
filter: 'test_results_magma_epc_rhel8.html',
filter: 'test_results*.html',
selector: lastCompleted())
}
}
Expand Down Expand Up @@ -541,9 +549,9 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.DockerHubCredentials}", usernameVariable: 'DH_Username', passwordVariable: 'DH_Password']
]) {
myShCmd("echo ${DH_Password} | docker login --username ${DH_Username} --password-stdin", rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd("docker image tag oai-spgwu-tiny:develop ${DH_Username}/oai-spgwu-tiny:develop", rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd("docker push ${DH_Username}/oai-spgwu-tiny:develop", rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd("docker rmi ${DH_Username}/oai-spgwu-tiny:develop", rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd("docker image tag oai-spgwu-tiny:develop ${DH_Account}/oai-spgwu-tiny:develop", rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd("docker push ${DH_Account}/oai-spgwu-tiny:develop", rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd("docker rmi ${DH_Account}/oai-spgwu-tiny:develop", rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd("docker logout", rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
}
}
Expand Down Expand Up @@ -641,7 +649,6 @@ pipeline {
sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' ${htmlFile}"
archiveArtifacts artifacts: htmlFile
}

// Sending an email to the last committer. Maybe not the Pull Request's author.
if (params.sendToCommitterEmail != null) {
if (params.sendToCommitterEmail) {
Expand Down
10 changes: 10 additions & 0 deletions ci-scripts/checkCodingFormattingRules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ then
exit 1
fi

# When running in a container, in /home folder
IS_CONTAINER=`egrep -c "docker|kubepods|podman|buildah|libpod" /proc/self/cgroup || true`
if [ $IS_CONTAINER -ne 0 ]
then
if [ $PWD = "/home/src" ]
then
git config --global --add safe.directory /home
fi
fi

# Merge request scenario

MERGE_COMMMIT=`git log -n1 --pretty=format:%H`
Expand Down
95 changes: 95 additions & 0 deletions ci-scripts/flatten_image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
"""
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at

http://www.openairinterface.org/?page_id=698

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-------------------------------------------------------------------------------
For more information about the OpenAirInterface (OAI) Software Alliance:
[email protected]
"""

import argparse
import re
import subprocess
import sys

def main() -> None:
args = _parse_args()
status = perform_flattening(args.tag)
sys.exit(status)

def _parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description='Flattening Image')

parser.add_argument(
'--tag', '-t',
action='store',
required=True,
help='Image Tag in image-name:image tag format',
)
return parser.parse_args()

def perform_flattening(tag):
# First detect which docker/podman command to use
cli = ''
image_prefix = ''
cmd = 'which podman || true'
podman_check = subprocess.check_output(cmd, shell=True, universal_newlines=True)
if re.search('podman', podman_check.strip()):
cli = 'sudo podman'
image_prefix = 'localhost/'
if cli == '':
cmd = 'which docker || true'
docker_check = subprocess.check_output(cmd, shell=True, universal_newlines=True)
if re.search('docker', docker_check.strip()):
cli = 'docker'
image_prefix = ''
if cli == '':
print ('No docker / podman installed: quitting')
return -1
print (f'Flattening {tag}')
# Creating a container
cmd = cli + ' run --name test-flatten --entrypoint /bin/true -d ' + tag
print (cmd)
subprocess.check_output(cmd, shell=True, universal_newlines=True)

# Export / Import trick
cmd = cli + ' export test-flatten | ' + cli + ' import '
# Bizarro syntax issue with podman
if cli == 'docker':
cmd += ' --change "ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" '
else:
cmd += ' --change "ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" '
cmd += ' --change "WORKDIR /openair-spgwu-tiny" '
cmd += ' --change "EXPOSE 2152/udp" '
cmd += ' --change "EXPOSE 8805/udp" '
cmd += ' --change "LABEL support-multi-sgwu-instances=\\"true\\"" '
cmd += ' --change "LABEL support-nrf-fdqn=\\"true\\"" '
cmd += ' --change "CMD [\\"/openair-spgwu-tiny/bin/oai_spgwu\\", \\"-c\\", \\"/openair-spgwu-tiny/etc/spgw_u.conf\\", \\"-o\\"]" '
cmd += ' --change "ENTRYPOINT [\\"/bin/bash\\", \\"/openair-spgwu-tiny/bin/entrypoint.sh\\"]" '
cmd += ' - ' + image_prefix + tag
print (cmd)
subprocess.check_output(cmd, shell=True, universal_newlines=True)

# Remove container
cmd = cli + ' rm -f test-flatten'
print (cmd)
subprocess.check_output(cmd, shell=True, universal_newlines=True)

# At this point the original image is a dangling image.
# CI pipeline will clean up (`image prune --force`)
return 0

if __name__ == '__main__':
main()
35 changes: 17 additions & 18 deletions ci-scripts/generateHtmlReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# */
#---------------------------------------------------------------------

import glob
import os
import re
import sys
Expand Down Expand Up @@ -163,23 +164,21 @@ def generateHeader(self):
self.file.write(buildSummary)

cwd = os.getcwd()
test_reports = ['test_results_oai_epc', 'test_results_magma_epc_rhel8', \
'test_results_oai_cn5g_basic', 'test_results_oai_cn5g_mini', \
'test_results_oai_cn5g_oc', 'test_results_oai_cn5g_tutorials']
for test in test_reports:
if os.path.isfile(cwd + '/' + test + '.html'):
newEpcReport = open(cwd + '/' + test + '_new.html', 'w')
buildSummaryDone = True
with open(cwd + '/' + test + '.html', 'r') as originalEpcReport:
for line in originalEpcReport:
result = re.search('Deployment Summary', line)
if (result is not None) and buildSummaryDone:
newEpcReport.write(buildSummary)
buildSummaryDone = False
newEpcReport.write(line)
originalEpcReport.close()
newEpcReport.close()
os.rename(cwd + '/' + test + '_new.html', cwd + '/' + test + '.html')
for reportFile in glob.glob('./test_results_*.html'):
if reportFile == './test_results_oai_spgwu.html':
continue
newEpcReport = open(cwd + '/' + str(reportFile) + '.new', 'w')
buildSummaryDone = True
with open(cwd + '/' + str(reportFile), 'r') as originalEpcReport:
for line in originalEpcReport:
result = re.search('Deployment Summary', line)
if (result is not None) and buildSummaryDone:
newEpcReport.write(buildSummary)
buildSummaryDone = False
newEpcReport.write(line)
originalEpcReport.close()
newEpcReport.close()
os.rename(cwd + '/' + str(reportFile) + '.new', cwd + '/' + str(reportFile))

def generateFooter(self):
self.file.write(' <div class="well well-lg">End of Build Report -- Copyright <span class="glyphicon glyphicon-copyright-mark"></span> 2020 <a href="http://www.openairinterface.org/">OpenAirInterface</a>. All Rights Reserved.</div>\n')
Expand Down Expand Up @@ -748,7 +747,7 @@ def analyze_image_size_log(self, nfType):
result = re.search('oai-spgwu-tiny *ci-temp', line)
else:
result = re.search('oai-spgwu-tiny *develop', line)
if result is not None:
if result is not None and not status:
result = re.search('ago *([0-9 A-Z]+)', line)
if result is not None:
size = result.group(1)
Expand Down
Loading