Skip to content

Commit 49d73ee

Browse files
committed
Release v1.0.0
1 parent b279da5 commit 49d73ee

Some content is hidden

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

48 files changed

+1301
-2539
lines changed

5G_Core_Network/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
The 5G Core Network operates as a standalone network based on the 3GPP specifications TS 23.501 [[1]][ts3144-3gpp] and TS 23.502 [[2]][ts3145-3gpp], implemented using the Open5GS software [[3]][open5gs-open5gs]. The 5G Core Network consists of the MME, SGWC, SMF, AMF, SGWU, UPF, HSS, PCRF, NRF, SCP, SEPP 1, SEPP 2, AUSF, UDM, PCF, NSSF, BSF, and UDR.
44

55
## Usage
6+
67
- **Compile**: Use `./full_install.sh` to build the 5G Core.
78
- **Generate Configurations**: Use `./generate_configurations.sh` to create configuration files.
89
- Configuration files can be accessed and modified in the `configs` directory.
@@ -13,7 +14,9 @@ The 5G Core Network operates as a standalone network based on the 3GPP specifica
1314
- **Logs**: Access logs by navigating to the `logs` directory.
1415

1516
### Custom PLMN and TAC Identifiers
17+
1618
Modify the `5G_Core_Network/options.yaml` for different PLMN and TAC IDs, then apply changes with the following.
19+
1720
```console
1821
./generate_configurations.sh
1922
./stop.sh
@@ -24,9 +27,11 @@ cd ../5G_Core_Network
2427
```
2528

2629
## Accessing Subscriber Data
30+
2731
The WebUI hosts a web interface to access subscriber data. To access the WebUI, navigate to `http://localhost:9999` in a web browser, or run `start_webui.sh` to open it in Chrome or Firefox automatically.
2832

2933
Alternatively, to create subscriber entries from command line, use the following.
34+
3035
```console
3136
./install_scripts/register_subscriber.sh --imsi 001010123456780 --key 00112233445566778899AABBCCDDEEFF --opc 63BFA50EE6523365FF14C1F45F88737D --apn srsapn
3237
```
@@ -69,7 +74,7 @@ By default, the configuration process automatically creates subscriber entries f
6974
<td>ue2</td>
7075
<td>ue3</td>
7176
</tr>
72-
<tr>
77+
<!-- <tr>
7378
<td>TX Port</td>
7479
<td>2101</td>
7580
<td>2201</td>
@@ -80,13 +85,14 @@ By default, the configuration process automatically creates subscriber entries f
8085
<td>2100</td>
8186
<td>2200</td>
8287
<td>2300</td>
83-
</tr>
88+
</tr> -->
8489
</tbody>
8590
</table>
8691

8792
For more information on the subscriber data, refer to the blueprint [[4]][nist-tn] and the User_Eqiupment README document.
8893

8994
## References
95+
9096
1. 3GPP TS 23.501: System Architecture for the 5G System. [https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3144][ts3144-3gpp]
9197
2. 3GPP TS 23.502: Procedures for the 5G System. [https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3145][ts3145-3gpp]
9298
3. Open Source implementation for 5G Core and EPC. Open5GS. [https://open5gs.org/][open5gs-open5gs]

5G_Core_Network/full_install.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,16 @@ else
127127
echo "No conflicting MongoDB installations found."
128128
fi
129129

130-
# If GPG step fails, try clearing MongoDB GPG key before proceeding:
131-
# sudo apt-key del [KEY_ID]
132-
# sudo rm /etc/apt/sources.list.d/mongodb-org-4.4.list
133-
134130
# Step 2: Installing MongoDB 4.4
135131
echo "Updating package lists..."
136-
sudo apt-get update || {
137-
echo "Failed to update package lists"
138-
exit 1
139-
}
132+
if ! sudo apt-get update; then
133+
sudo "$SCRIPT_DIR/install_scripts/./remove_any_expired_apt_keys.sh"
134+
echo "Trying to update package lists again..."
135+
if ! sudo apt-get update; then
136+
echo "Failed to update package lists"
137+
exit 1
138+
fi
139+
fi
140140

141141
echo "Installing gnupg and curl if not already installed..."
142142
sudo apt-get install -y gnupg curl || {

5G_Core_Network/generate_configurations.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,9 @@ fi
3939
SCRIPT_DIR=$(dirname "$(realpath "$0")")
4040
cd "$SCRIPT_DIR"
4141

42+
# Check if the YAML editor is installed, and install it if not
4243
if ! command -v yq &>/dev/null; then
43-
echo "Installing yq..."
44-
YQ_PATH="https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64"
45-
sudo wget $YQ_PATH -O /usr/bin/yq
46-
sudo chmod +x /usr/bin/yq
47-
# Uninstall with: sudo rm -rf /usr/bin/yq
44+
sudo "$SCRIPT_DIR/install_scripts/./install_yq.sh"
4845
fi
4946

5047
echo "Parsing options.yaml..."
Lines changed: 61 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,74 @@
3030

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

33-
# If the disk-pressure taint is not present then skip
34-
if ! kubectl describe nodes | grep Taints | grep -q "disk-pressure"; then
35-
echo "No disk-pressure taint found on any nodes, skipping."
33+
# Uninstall yq with: sudo rm -rf /usr/bin/yq
34+
if command -v yq &>/dev/null; then
35+
echo "Already installed yq, skipping."
3636
exit 0
3737
fi
3838

39-
# Get a list of nodes with the disk-pressure taint
40-
AFFECTED_NODES=$(kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.taints[*].key}{"\t"}{.spec.taints[*].effect}{"\n"}' | grep "disk-pressure" | cut -f1)
41-
if [ -z "$AFFECTED_NODES" ]; then
42-
echo "No nodes with disk-pressure taint found, skipping."
43-
exit 0
44-
fi
39+
echo "Installing yq..."
4540

46-
# Remove the disk-pressure taint from each affected node
47-
for NODE in $AFFECTED_NODES; do
48-
echo "Removing taint disk-pressure from $NODE..."
49-
if ! kubectl taint nodes $NODE node.kubernetes.io/disk-pressure- --overwrite; then
50-
echo "Failed to remove taint from $NODE. Check your permissions or connectivity."
51-
fi
52-
done
41+
# Determine the processor architecture
42+
ARCH_SUFFIX=""
43+
case $(uname -m) in
44+
"x86_64")
45+
ARCH_SUFFIX="linux_amd64"
46+
;;
47+
"aarch64")
48+
ARCH_SUFFIX="linux_arm64"
49+
;;
50+
"armv7l" | "armv6l")
51+
ARCH_SUFFIX="linux_arm"
52+
;;
53+
"i386" | "i686")
54+
ARCH_SUFFIX="linux_386"
55+
;;
56+
"ppc64le")
57+
ARCH_SUFFIX="linux_ppc64le"
58+
;;
59+
"s390x")
60+
ARCH_SUFFIX="linux_s390x"
61+
;;
62+
"mips")
63+
ARCH_SUFFIX="linux_mips"
64+
;;
65+
"mips64")
66+
ARCH_SUFFIX="linux_mips64"
67+
;;
68+
"mips64el" | "mips64le")
69+
ARCH_SUFFIX="linux_mips64le"
70+
;;
71+
"mipsel" | "mipsle")
72+
ARCH_SUFFIX="linux_mipsle"
73+
;;
74+
*)
75+
echo "Unsupported architecture for yq: $(uname -m)"
76+
exit 1
77+
;;
78+
esac
79+
80+
YQ_URL="https://github.com/mikefarah/yq/releases/latest/download/yq_${ARCH_SUFFIX}.tar.gz"
5381

54-
sleep 1
82+
# Create a temporary directory for the download
83+
TEMP_DIR=$(mktemp -d)
84+
TEMP_PATH="$TEMP_DIR/yq.tar.gz"
5585

56-
# Check if the taint was successfully removed from each affected node
57-
TAINT_REMOVAL_FAILED=0
58-
for NODE in $AFFECTED_NODES; do
59-
if kubectl describe node $NODE | grep -q "node.kubernetes.io/disk-pressure"; then
60-
echo "Error: Taint disk-pressure is still present on $NODE."
61-
TAINT_REMOVAL_FAILED=1
86+
echo "Downloading yq from $YQ_URL..."
87+
HTTP_STATUS=$(curl -L -w "%{http_code}" -o "$TEMP_PATH" "$YQ_URL")
88+
if [ "$HTTP_STATUS" -eq 200 ]; then
89+
echo "Extracting yq..."
90+
tar -xzf "$TEMP_PATH" -C "$TEMP_DIR"
91+
if [ -f "$TEMP_DIR/./yq_$ARCH_SUFFIX" ]; then
92+
sudo mv "$TEMP_DIR/./yq_$ARCH_SUFFIX" /usr/local/bin/yq
93+
sudo chmod +x /usr/local/bin/yq
94+
echo "Successfully installed yq."
6295
else
63-
echo "Taint: disk-pressure was successfully removed from $NODE."
96+
echo "Failed to extract yq from the tar.gz."
97+
exit 1
6498
fi
65-
done
66-
67-
# If any taint removal failed
68-
if [ $TAINT_REMOVAL_FAILED -eq 1 ]; then
69-
echo "ERROR: Disk-pressure taint is active. Please ensure sufficient RAM and disk space is available."
99+
else
100+
sudo rm -rf "$TEMP_DIR"
101+
echo "Failed to download yq for the architecture: ${ARCH_SUFFIX}, HTTP status was $HTTP_STATUS."
70102
exit 1
71103
fi
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/bin/bash
2+
#
3+
# NIST-developed software is provided by NIST as a public service. You may use,
4+
# copy, and distribute copies of the software in any medium, provided that you
5+
# keep intact this entire notice. You may improve, modify, and create derivative
6+
# works of the software or any portion of the software, and you may copy and
7+
# distribute such modifications or works. Modified works should carry a notice
8+
# stating that you changed the software and should note the date and nature of
9+
# any such change. Please explicitly acknowledge the National Institute of
10+
# Standards and Technology as the source of the software.
11+
#
12+
# NIST-developed software is expressly provided "AS IS." NIST MAKES NO WARRANTY
13+
# OF ANY KIND, EXPRESS, IMPLIED, IN FACT, OR ARISING BY OPERATION OF LAW,
14+
# INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND DATA ACCURACY. NIST
16+
# NEITHER REPRESENTS NOR WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE
17+
# UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE CORRECTED. NIST DOES
18+
# NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE SOFTWARE OR
19+
# THE RESULTS THEREOF, INCLUDING BUT NOT LIMITED TO THE CORRECTNESS, ACCURACY,
20+
# RELIABILITY, OR USEFULNESS OF THE SOFTWARE.
21+
#
22+
# You are solely responsible for determining the appropriateness of using and
23+
# distributing the software and you assume all risks associated with its use,
24+
# including but not limited to the risks and costs of program errors, compliance
25+
# with applicable laws, damage to or loss of data, programs or equipment, and
26+
# the unavailability or interruption of operation. This software is not intended
27+
# to be used in any situation where a failure could cause risk of injury or
28+
# damage to property. The software developed by NIST employees is not subject to
29+
# copyright protection within the United States.
30+
31+
echo "# Script: $(realpath $0)..."
32+
33+
OUTPUT=$(sudo apt-get update 2>&1 | tee /dev/tty)
34+
35+
# Look for EXPKEYSIG errors in the output
36+
if echo "$OUTPUT" | grep -iq "EXPKEYSIG"; then
37+
# Extract the key IDs
38+
KEYS=$(echo "$OUTPUT" | grep -io "EXPKEYSIG [0-9A-F]*" | awk '{print $2}' | sort | uniq)
39+
40+
if [ -n "$KEYS" ]; then
41+
for KEY in $KEYS; do
42+
echo
43+
echo "Invalid key detected: $KEY"
44+
# Determine the keyring file to be modified
45+
KEYRING_PATH=""
46+
for file in /etc/apt/keyrings/*.gpg; do
47+
if sudo gpg --no-default-keyring --keyring "$file" --list-keys | grep -q "$KEY"; then
48+
KEYRING_PATH="$file"
49+
break
50+
fi
51+
done
52+
53+
if [ -n "$KEYRING_PATH" -a -f "$KEYRING_PATH" ]; then
54+
echo "Removing key $KEY from keyring $KEYRING_PATH..."
55+
sudo gpg --batch --yes --no-default-keyring --keyring "$KEYRING_PATH" --delete-keys "$KEY"
56+
else
57+
echo "No keyring file found for key: $KEY"
58+
fi
59+
60+
# Find the corresponding list file(s) and remove them
61+
FILES_LIST=""
62+
for FILE in /etc/apt/sources.list.d/*.list; do
63+
# Now we need to grep $KEY or grep $KEYRING_PATH exists in the file contents
64+
if grep -q "$KEY" "$FILE" || grep -q "$KEYRING_PATH" "$FILE"; then
65+
FILES_LIST="$FILES_LIST $FILE"
66+
fi
67+
done
68+
for FILE in $FILES_LIST; do
69+
if [ -n "$FILE" ]; then
70+
echo "Removing file: $FILE"
71+
sudo rm "$FILE"
72+
fi
73+
done
74+
75+
if [ -z "$FILES_LIST" ]; then
76+
echo "No corresponding .list files found to remove for key: $KEY"
77+
else
78+
echo "Successfully removed expired key $KEY and corresponding .list files."
79+
fi
80+
done
81+
else
82+
echo "No invalid keys found to remove."
83+
fi
84+
else
85+
echo "Successfully completed apt-get update with no EXPKEYSIG errors detected."
86+
fi

Additional_Scripts/download_dependency_repositories.sh.bat

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ REM copyright protection within the United States.
3030

3131
: '
3232
REM This Linux shell/Windows batch script will download the 5G_Core_Network, gNodeB, User_Equipment and RAN_Intelligent_Controllers repositories for analyzing the source code without requiring a full testbed build and installation.
33+
@echo off
3334
'
3435

3536
cd ..
@@ -38,14 +39,14 @@ cd 5G_Core_Network
3839
git clone https://github.com/open5gs/open5gs.git open5gs
3940
cd ..
4041

41-
cd Next_Generation_Node_B
42-
git clone https://github.com/srsran/srsRAN_Project.git
42+
cd User_Equipment
43+
git clone https://github.com/srsran/srsRAN_4G.git
4344
git clone https://github.com/zeromq/libzmq.git
4445
git clone https://github.com/zeromq/czmq.git
4546
cd ..
4647

47-
cd User_Equipment
48-
git clone https://github.com/srsran/srsRAN_4G.git
48+
cd Next_Generation_Node_B
49+
git clone https://github.com/srsran/srsRAN_Project.git
4950
cd ..
5051

5152
cd RAN_Intelligent_Controllers/Near-Real-Time-RIC
@@ -57,15 +58,8 @@ cd xApps
5758
git clone https://gerrit.o-ran-sc.org/r/ric-app/hw-go
5859
cd ..
5960
cd ..
61+
cd ..
6062

61-
cd RAN_Intelligent_Controllers/Non-Real-Time-RIC
62-
git clone https://gerrit.o-ran-sc.org/r/it/dep
63-
git clone https://gerrit.o-ran-sc.org/r/nonrtric/plt/ranpm -b j-release dep/ranpm
64-
git clone https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep -b j-release dep/ric-dep
65-
git clone https://github.com/onap/multicloud-k8s.git dep/smo-install/multicloud-k8s
66-
git clone https://gerrit.onap.org/r/oom dep/smo-install/onap_oom
67-
68-
git clone https://gerrit.o-ran-sc.org/r/portal/nonrtric-controlpanel
6963
echo "Repositories were cloned successfully."
7064

7165
: '

Additional_Scripts/increase_file_descriptor_limits.sh

100644100755
File mode changed.

Additional_Scripts/migrate_to_new_version.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ if [ -d 5G_Core/open5gs ] || [ -d gNodeB/srsRAN_Project ] || [ -d RAN_Intelligen
8484
sudo mv RAN_Intelligent_Controller/* RAN_Intelligent_Controllers/Near-Real-Time-RIC
8585
sudo rm -rf RAN_Intelligent_Controller
8686
fi
87+
88+
echo "Ensuring the apt keys are not expired..."
89+
sudo ./Additional_Scripts/remove_any_expired_apt_keys.sh
90+
91+
echo
8792
echo "The 5G Core needs to be reinstalled with ./5G_Core_Network/full_install.sh."
8893
echo "Successfully migrated from commit 310ca91b9f5f83a0d0b94affebfdc940005daf1a to the new version."
8994
echo

0 commit comments

Comments
 (0)