Skip to content

Commit 32338bc

Browse files
authored
Tag v1.7.0
* srsRAN_Project migration to OCUDU * Tag v1.7.0
1 parent ffa3cff commit 32338bc

215 files changed

Lines changed: 6880 additions & 2405 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5G_Core_Network/Additional_Cores_5GDeploy/full_install.sh

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ if [ ! -d "5gdeploy" ]; then
113113
"$PARENT_DIR/./install_scripts/git_clone.sh" https://github.com/usnistgov/5gdeploy.git
114114
fi
115115

116-
cd $SCRIPT_DIR/5gdeploy
116+
cd "$SCRIPT_DIR/5gdeploy"
117117
echo "Patching netdef/helpers.ts to generate NR Cell ID starting at hex 0xE000 (aligning with OAI gNB) instead of 0x10"
118118
sed -i '0,/^[[:space:]]*nci[[:space:]]*=.*$/s// nci = hexPad(((3584 + i) << (36 - gnbIdLength)) | 0xF, 9),/' netdef/helpers.ts
119119

120-
cd $SCRIPT_DIR
120+
cd "$SCRIPT_DIR"
121121

122122
# Install dependencies
123123
mkdir -p logs
@@ -182,15 +182,26 @@ cd "$SCRIPT_DIR/5gdeploy"
182182

183183
# Install 5gdeploy. For more information, see the 5gdeploy documentation: https://github.com/usnistgov/5gdeploy/blob/main/docs/INSTALL.md
184184
echo "Starting installation of 5G Core Deployment Helper (5gdeploy)..."
185+
186+
# # Downgrade to debian:bullseye for compatibility with older Docker versions
187+
# echo "Patching Dockerfiles to use debian:bullseye for compatibility..."
188+
# sed -i 's/buildpack-deps:bookworm/buildpack-deps:bullseye/g' docker/sockperf/Dockerfile
189+
# sed -i 's/debian:bookworm/debian:bullseye/g' docker/sockperf/Dockerfile
190+
# sed -i 's/bookworm-apt-cache/bullseye-apt-cache/g' docker/sockperf/Dockerfile
191+
# sed -i 's/debian:bookworm/debian:bullseye/g' docker/virt/Dockerfile
192+
# sed -i 's/bookworm-apt-cache/bullseye-apt-cache/g' docker/virt/Dockerfile
193+
# sed -i 's/debian:trixie-slim/debian:bullseye-slim/g' docker/iperf2/Dockerfile
194+
# sed -i 's/trixie-apt-cache/bullseye-apt-cache/g' docker/iperf2/Dockerfile
195+
185196
./install.sh \
186197
--build-network host \
187198
--dpdk-version v24.11 \
188199
--eupf-version 54ed069c6cdf1da18b09bd78cb166bc4e4dd1ceb \
189-
--free5gc-version v4.0.1 \
190-
--free5gc-webconsole-version v1.4.1 \
200+
--free5gc-version v4.2.1 \
201+
--free5gc-webconsole-version v1.4.4 \
191202
--gnbsim-version d3fce7e35a69b9f5d670242a93b7d1bee8842ecf \
192-
--gtp5g-version v0.9.13 \
193-
--oai-fed-version 2024.w45 \
203+
--gtp5g-version v0.9.16 \
204+
--oai-fed-version v2.2.0 \
194205
--oai-nwdaf-version 6a1408c9be6f5cf0ddb6c1f1b527a04e36205471 \
195206
--open5gs-dbctl-version v2.7.6 \
196207
--open5gs-version 2.7.6 \

5G_Core_Network/Additional_Cores_5GDeploy/full_uninstall.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ echo "Stopping all 5G Core Deployment Helper (5gdeploy) containers..."
4646

4747
./install_scripts/uninstall_lazydocker.sh
4848

49-
cd $SCRIPT_DIR/5gdeploy
49+
cd "$SCRIPT_DIR/5gdeploy"
5050

5151
echo "Removing system packages (httpie, jq, python3-libconf, wireshark-common, nodejs, npm)..."
5252
sudo apt-get remove --purge -y httpie jq python3-libconf wireshark-common nodejs npm
@@ -76,7 +76,7 @@ sudo rm -f /etc/apt/keyrings/nodesource.gpg
7676
echo "Removing yq snap..."
7777
sudo snap remove yq
7878

79-
cd $SCRIPT_DIR
79+
cd "$SCRIPT_DIR"
8080

8181
echo "Removing Docker and cleaning config..."
8282
./install_scripts/uninstall_docker.sh

5G_Core_Network/Additional_Cores_5GDeploy/install_scripts/install_docker.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ if ! command -v dockerd >/dev/null 2>&1 || ! command -v docker >/dev/null 2>&1;
146146
sudo env $APTVARS apt-get install -y $APTOPTS "docker-ce=$DOCKERVERSION"
147147
fi
148148
fi
149+
if ! command -v docker >/dev/null 2>&1 || [ ! -e /usr/bin/docker ]; then
150+
echo "Docker CLI not found. Attempting to reinstall..."
151+
if [ "$USE_DOCKER_CE" -eq 0 ]; then
152+
sudo env $APTVARS apt-get install --reinstall -y $APTOPTS "docker.io=$DOCKERVERSION"
153+
else
154+
sudo env $APTVARS apt-get install --reinstall -y $APTOPTS "docker-ce-cli=$DOCKERVERSION"
155+
fi
156+
fi
149157

150158
# Configure Docker daemon
151159
echo "Configuring Docker daemon..."
@@ -265,6 +273,7 @@ else
265273
sudo pkill -x containerd >/dev/null 2>&1 || true
266274
sudo rm -f /var/run/docker.pid /var/run/docker.sock
267275
sudo mkdir -p /run /var/run
276+
sudo -v # Ensure sudo session is active
268277
sudo sh -c 'setsid dockerd --config-file=/etc/docker/daemon.json >>'"${DOCKERD_LOG}"' 2>&1 </dev/null &'
269278
# Wait for Docker to be ready
270279
for ATTEMPT in $(seq 1 60); do
@@ -283,6 +292,7 @@ else
283292
if ! grep -q 'native.cgroupdriver' /etc/docker/daemon.json; then
284293
sudo jq '. + {"exec-opts": ["native.cgroupdriver=cgroupfs"]}' /etc/docker/daemon.json.bak | sudo tee /etc/docker/daemon.json >/dev/null
285294
fi
295+
sudo -v # Ensure sudo session is active
286296
sudo sh -c 'setsid dockerd --config-file=/etc/docker/daemon.json >>'"${DOCKERD_LOG}"' 2>&1 </dev/null &'
287297
for ATTEMPT in $(seq 1 60); do
288298
if sudo test -S /var/run/docker.sock && sudo docker version >/dev/null 2>&1; then

5G_Core_Network/Additional_Cores_5GDeploy/install_scripts/phoenix_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fi
4545
# cd phoenix-repo
4646

4747
# # The /opt directory is used by some scripts in phoenix
48-
# sudo chown --recursive "$USER" /opt
48+
# sudo chown --recursive "${SUDO_USER:-$USER}" /opt
4949
# mkdir -p /opt/$COMPANY_NAME/open5gcoreRelX
5050
# if [ ! -e /opt/$COMPANY_NAME/open5gcoreRelX/phoenix-src ]; then
5151
# ln -s /opt/$COMPANY_NAME/open5gcoreRelX/phoenix phoenix-src

5G_Core_Network/Additional_Cores_5GDeploy/install_scripts/start_sudo_refresh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
echo "# Script: $(realpath "$0")..."
3232

33-
sudo ls &>/dev/null
33+
sudo -v # Ensure sudo session is active
3434
SCRIPT_DIR=$(dirname "$(realpath "$0")")
3535
cd "$(dirname "$SCRIPT_DIR")"
3636

5G_Core_Network/Additional_Cores_5GDeploy/install_scripts/stop_sudo_refresh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
echo "# Script: $(realpath "$0")..."
3232

3333
# Attempt to kill the process
34-
pkill -f "sudo_stay_validated.sh" || echo "No process found to stop."
34+
pkill -f "[s]udo_stay_validated.sh" || echo "No process found to stop."
3535
echo "Sudo refresh process stopped or was not running."

5G_Core_Network/Additional_Cores_5GDeploy/install_scripts/sudo_stay_validated.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ echo "# Script: $(realpath "$0")..."
3232

3333
# Simple script to keep sudo active by refreshing it every minute
3434
while true; do
35-
sudo -v
35+
sudo -v # Ensure sudo session is active
3636
sleep 60
3737
done

5G_Core_Network/Additional_Cores_5GDeploy/install_scripts/uninstall_docker.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
# Exit immediately if a command fails
3232
set -e
3333

34-
# Echo every command as it is ran
35-
set -x
36-
3734
SCRIPT_DIR=$(dirname "$(realpath "$0")")
3835
BASE_DIR=$(realpath "$SCRIPT_DIR/../..")
3936
cd "$SCRIPT_DIR"

5G_Core_Network/Additional_Cores_5GDeploy/run.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,14 @@ fi
111111
# # Dynamic AMF IP support: Fetch the AMF IP, and it will be updated in the configuration file
112112
# # This code is optional since the AMF IP is fixed on configuration; dynamic IP is not needed
113113
# AMF_IP=$(docker inspect amf | jq -r '.[0].NetworkSettings.Networks["br-n2"].IPAddress')
114-
# AMF_IP_BIND=$(ip route get 1 | awk '{print $(NF-2); exit}') # Get the IP of the primary network interface
114+
# if [ -f "$PARENT_DIR/options.yaml" ]; then
115+
# EXPOSE_AMF=$(yq eval '.expose_amf_over_hostname' "$PARENT_DIR/options.yaml")
116+
# fi
117+
# if [ "$EXPOSE_AMF" = "true" ]; then
118+
# AMF_IP_BIND=$(ip route get 1 | awk '{print $(NF-2); exit}') # Get the IP of the primary network interface
119+
# else
120+
# AMF_IP_BIND="127.0.0.1"
121+
# fi
115122
# AMF_ADDRESSES_OUTPUT="configs/get_amf_address.txt"
116123
# echo "$AMF_IP" >$AMF_ADDRESSES_OUTPUT
117124
# echo "$AMF_IP_BIND" >>$AMF_ADDRESSES_OUTPUT

5G_Core_Network/full_install.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ if [ ! -f "options.yaml" ]; then
7979
echo "" >>"options.yaml"
8080
echo "# Configure the Single Network Slice Selection Assistance Information (S-NSSAI)" >>"options.yaml"
8181
echo "# NOTE: \"sst\" and \"sd\" are interpreted as hexadecimal values (no 0x prefix)." >>"options.yaml"
82-
echo "sst: 1" >>"options.yaml"
83-
echo "sd: 000001" >>"options.yaml"
82+
echo "slices:" >>"options.yaml"
83+
echo " - sst: 1" >>"options.yaml"
84+
echo " sd: FFFFFF" >>"options.yaml"
8485
echo "" >>"options.yaml"
85-
echo "# If core_to_use=open5gs, false means AMF will use the default 127.0.0.5, true means it will use the hostname IP" >>"options.yaml"
86+
echo "# If false, AMF will use a local IP, otherwise it will use the hostname IP" >>"options.yaml"
8687
echo "expose_amf_over_hostname: false" >>"options.yaml"
8788
echo "" >>"options.yaml"
8889
echo "# If core_to_use=open5gs, toggle whether or not to include the Security Edge Protection Proxies (SEPP1 and SEPP2)" >>"options.yaml"
@@ -177,7 +178,7 @@ if [ ! -d "open5gs" ]; then
177178
./install_scripts/git_clone.sh https://github.com/open5gs/open5gs.git
178179
fi
179180

180-
cd $SCRIPT_DIR/open5gs
181+
cd "$SCRIPT_DIR/open5gs"
181182

182183
echo
183184
echo
@@ -214,7 +215,8 @@ sudo usermod -a -G open5gs open5gs
214215
echo "Installing dependencies for building Open5GS..."
215216

216217
# Code from (https://open5gs.org/open5gs/docs/guide/02-building-open5gs-from-sources#building-open5gs):
217-
sudo env $APTVARS apt-get install -y python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git cmake libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libmongoc-dev libbson-dev libyaml-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev libtins-dev libtalloc-dev meson
218+
sudo env $APTVARS apt-get install -y python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git cmake libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libmongoc-dev libbson-dev libyaml-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev libtins-dev libtalloc-dev
219+
sudo -H pip3 install --upgrade meson # Ensure pip3 version overrides apt version to prevent segmentation faults
218220
if apt-cache show libidn-dev >/dev/null 2>&1; then
219221
sudo env $APTVARS apt-get install -y --no-install-recommends libidn-dev
220222
else
@@ -226,7 +228,7 @@ rm -rf build
226228
# Check if Open5GS has already been built and installed
227229
if [ ! -d "build" ]; then
228230
echo "Compiling Open5GS with Meson..."
229-
meson build --prefix="$(pwd)/install" # -Dc_args="-fPIC" -Dc_link_args=""
231+
meson build --prefix="$(pwd)/install" -Dc_args="-fPIC" -Dcpp_args="-fPIC" -Dc_link_args="-fPIC" -Dcpp_link_args="-fPIC"
230232
else
231233
echo "Open5GS build directory already exists."
232234
fi

0 commit comments

Comments
 (0)