Skip to content
Snippets Groups Projects
Commit 3d6b9a3e authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

Merge branch 'ci-unsupport-u18' into 'develop'

chore(ci): un-support Ubuntu-18 and support Rocky-Linux-8

See merge request !31
parents 0c7d28af ce7adad9
No related branches found
No related tags found
1 merge request!31chore(ci): un-support Ubuntu-18 and support Rocky-Linux-8
Pipeline #37879 passed
Subproject commit 9b8f4c4ae83e46454875d469511d9d37cf66f0f8
Subproject commit ba305ed369af79558564e003a30f7ed792453223
......@@ -99,15 +99,6 @@ check_install_pcf_deps() {
# Libraries
if [[ $OS_DISTRO == "ubuntu" ]]; then
case "$(get_distribution_release)" in
"ubuntu18.04")
# Currently Ubuntu18.04 has boost 1.65 as the latest
# We need at least 1.66
# PPA has 1.67
$SUDO $INSTALLER install $OPTION software-properties-common
$SUDO add-apt-repository ppa:mhier/libboost-latest --yes
$SUDO $INSTALLER update
specific_packages="libasio-dev libboost-all-dev libasan4"
;;
"ubuntu20.04")
specific_packages="libasio-dev libboost-all-dev libasan5"
;;
......@@ -156,18 +147,6 @@ check_install_pcf_deps() {
fi
echo "Install distro libs"
$SUDO $INSTALLER install $OPTION $PACKAGE_LIST
# fix issue with libboost in U18 for a bare metal deployment
if [[ $OS_DISTRO == "ubuntu" ]]; then
case "$(get_distribution_release)" in
"ubuntu18.04")
$SUDO $INSTALLER remove $OPTION libboost1.65-dev || true
$SUDO $INSTALLER autoremove $OPTION || true
$SUDO $INSTALLER install $OPTION libboost1.67-dev
;;
esac
fi
ret=$?;[[ $ret -ne 0 ]] && return $ret
echo "distro libs installation complete"
......@@ -190,10 +169,6 @@ check_install_pcf_deps() {
# To be sure, let's install from source all the time for the moment
if [[ $OS_DISTRO == "ubuntu" ]]; then
case "$(get_distribution_release)" in
"ubuntu18.04")
install_libyaml_cpp_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
;;
"ubuntu20.04")
# definitely, 0.6.2 as PPA installed is not enough
install_libyaml_cpp_from_git $1 $2
......
Subproject commit b9ca1e67d3e4b4fee5075d90e98015698ab1f0a1
Subproject commit 92a6d16525a1500143fb60f24262e9856056a0ca
......@@ -43,6 +43,7 @@ RUN rm -f /etc/rhsm-host && \
yum repolist --disablerepo=* && \
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms && \
yum update -y && \
cat /etc/os-release && \
yum install -y \
psmisc \
git \
......
#/*
# * 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:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface PCF service
# Valid for Rocky Linux 8.7+
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# BUILDER IMAGE
#---------------------------------------------------------------------
FROM docker.io/rockylinux:8 AS oai-pcf-builder
ENV IS_DOCKERFILE=1
RUN dnf install 'dnf-command(config-manager)' -y && \
dnf config-manager --set-enabled powertools && \
dnf install epel-release -y && crb enable && \
dnf update -y && \
# here just to display the current version
cat /etc/os-release && \
dnf install -y \
psmisc \
git \
diffutils \
libasan \
wget \
file && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
# Some GIT configuration command quite useful
RUN git config --global https.postBuffer 123289600 && \
git config --global http.sslverify false
# Copying source code
WORKDIR /openair-pcf
COPY . /openair-pcf
# Installing and Building PCF
WORKDIR /openair-pcf/build/scripts
RUN ./build_pcf --install-deps --force
RUN ldconfig && \
./build_pcf --clean --Verbose --build-type Release --jobs && \
ldd /openair-pcf/build/pcf/build/pcf && \
mv /openair-pcf/build/pcf/build/pcf /openair-pcf/build/pcf/build/oai_pcf && \
# Adapting the entrypoint to PCF NF
sed -i -e "s@openair-nf-root-folder@openair-pcf@g" \
-e "s@nf-config-file@pcf.yaml@g" \
../common-build/docker-scripts/entrypoint.py
#---------------------------------------------------------------------
# TARGET IMAGE
#---------------------------------------------------------------------
FROM docker.io/rockylinux:8-minimal as oai-pcf
ENV TZ=Europe/Paris
# We install some debug tools for the moment in addition of mandatory libraries
RUN microdnf update -y && \
microdnf install -y \
python3 \
python3-pip \
tzdata \
# libasan \
procps-ng \
psmisc \
net-tools \
libicu \
boost \
libevent \
findutils && \
pip3 install jinja2 && \
microdnf clean all -y && \
rm -rf /var/cache/yum /var/cache/dnf
# Copying executable and generated libraries
WORKDIR /openair-pcf/bin
COPY --from=oai-pcf-builder \
/openair-pcf/build/pcf/build/oai_pcf \
/openair-pcf/build/common-build/docker-scripts/entrypoint.py \
/openair-pcf/scripts/healthcheck.sh \
./
COPY --from=oai-pcf-builder \
# Copying only the packages built from source
/usr/local/lib64/libpistache.so.0 \
/usr/local/lib/libnghttp2_asio.so \
/usr/local/lib/libnghttp2_asio.so.1 \
/usr/local/lib64/libspdlog.so \
/usr/local/lib64/libfmt.so \
/usr/local/lib64/libyaml-cpp.so.0.* \
/usr/lib64/
RUN ldconfig && \
ldd /openair-pcf/bin/oai_pcf
# Copying template configuration files
# The configuration folder will be flat
WORKDIR /openair-pcf/etc
COPY --from=oai-pcf-builder \
/openair-pcf/etc/pcf.yaml \
./
WORKDIR /openair-pcf
# expose ports
EXPOSE 80/tcp 8080/tcp
# healthcheck
HEALTHCHECK --interval=10s \
--timeout=15s \
--retries=6 \
CMD /openair-pcf/bin/healthcheck.sh
ENTRYPOINT ["python3", "/openair-pcf/bin/entrypoint.py"]
CMD ["/openair-pcf/bin/oai_pcf", "-c", "/openair-pcf/etc/pcf.yaml", "-o"]
......@@ -21,9 +21,9 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface PCF service
# Valid for Ubuntu-18.04 (bionic),
# Ubuntu-20.04 (focal),
# Valid for Ubuntu-20.04 (focal),
# Ubuntu-22.04 (jammy)
#
# The port exposed by container are 8080/tcp , 8080/tcp change it according to your setup
#
#---------------------------------------------------------------------
......@@ -93,20 +93,16 @@ RUN apt-get update && \
tzdata \
bc \
openssl \
# Ubuntu 18 --> libasan4
# Ubuntu 20 --> libasan5
# Ubuntu 22 --> libasan6
# libasan? \
# Ubuntu 18 --> boost62/65 -> will remove both
# Ubuntu 20 --> boost67/71 -> will remove 67
# Ubuntu 20 --> boost71
# Ubuntu 22 --> boost74
libboost-filesystem1.??.0 \
libboost-filesystem1.7?.0 \
libcurl?-gnutls \
librtmp1 \
libpsl5 \
&& rm -rf /var/lib/apt/lists/* \
/lib/x86_64-linux-gnu/libboost_system.so.1.6*.0 \
/lib/x86_64-linux-gnu/ibboost_filesystem.so.1.6*.0
&& rm -rf /var/lib/apt/lists/*
# Copying executable and generated libraries
WORKDIR /openair-pcf/bin
......@@ -125,9 +121,6 @@ COPY --from=oai-pcf-builder \
/usr/local/lib/libyaml-cpp.so.0.? \
/usr/local/lib/libspdlog.so \
/usr/local/lib/libfmt.so \
# Ubuntu 18 --> boost 67 will be copied
/usr/lib/libboost_system.so.1.* \
/usr/lib/libboost_filesystem.so.1.* \
./
RUN ldconfig && \
......
......@@ -139,7 +139,12 @@ endif()
Message("Architecture is ${CMAKE_SYSTEM_PROCESSOR}")
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
set(C_FLAGS_PROCESSOR "-gdwarf-2 -mfloat-abi=hard -mfpu=neon -lgcc -lrt")
else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
# Tested on aarch64 system in Little Endian
# Model ARM-Neoverse-N1
# flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
set(C_FLAGS_PROCESSOR "-gdwarf-2 -lgcc -lrt")
else ()
set(C_FLAGS_PROCESSOR "-msse4.2")
endif()
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment