@@ -13,19 +13,24 @@ print_error() {
13
13
echo -e " \e[1;31mERROR: $1 \e[0m"
14
14
}
15
15
16
+ print_subheader () {
17
+ echo -e " \e[1;36m--- $1 ---\e[0m"
18
+ }
19
+
16
20
# Set the namespace for Open5GS
17
21
NAMESPACE=" open5gs"
18
22
19
- # Check if the namespace exists and create it if not
20
- print_header " Checking if namespace '$NAMESPACE ' exists"
23
+ print_header " Preparing cluster for 5G network deployment"
24
+
25
+ print_subheader " Checking if namespace '$NAMESPACE ' exists"
21
26
kubectl get namespace $NAMESPACE 2> /dev/null || {
22
27
print_error " Namespace '$NAMESPACE ' not found. Creating it now..."
23
28
kubectl create namespace $NAMESPACE
24
29
print_success " Namespace '$NAMESPACE ' created."
25
30
}
26
31
27
- # Apply MongoDB configurations
28
- print_header " Applying MongoDB configurations"
32
+ print_header " Adding Persistent Storage (Core Deployment [1/4]) "
33
+ print_subheader " Applying MongoDB configurations"
29
34
kubectl apply -k mongodb -n $NAMESPACE
30
35
print_success " MongoDB configurations applied."
31
36
@@ -46,9 +51,10 @@ wait_for_pod_ready() {
46
51
wait_for_pod_ready " app.kubernetes.io/name" " mongodb"
47
52
48
53
# Apply 5G network configurations
49
- print_header " Applying 5G Network Configurations"
54
+ print_header " Applying 5G Network Configuration (Core Deployment [2/4])"
55
+ print_subheader " Applying OVS-CNI NADs"
50
56
kubectl apply -k networks5g -n $NAMESPACE
51
- print_success " 5G network configurations applied."
57
+ print_success " OVS-CNI NADs applied."
52
58
53
59
# Function to check Network Attachment Definition (NAD)
54
60
check_nad () {
@@ -63,40 +69,36 @@ check_nad() {
63
69
print_success " NAD '$network_name ' found in $NAMESPACE ."
64
70
}
65
71
66
- # Check all required NADs
67
- print_header " Checking required NADs"
72
+ print_subheader " Checking required NADs"
68
73
check_nad " n2network"
69
74
check_nad " n3network"
70
75
check_nad " n4network"
71
76
72
- # Apply Open5GS metrics
73
- print_header " Applying Open5GS Metrics Configurations "
77
+ print_header " Deploying Open5GS core (Core Deployment [3/4]) "
78
+ print_subheader " Applying Open5GS deployment option with support for Monarch "
74
79
kubectl apply -k msd/overlays/open5gs-metrics -n open5gs
75
- print_success " Open5GS metrics configurations applied ."
80
+ print_success " Open5GS deployed ."
76
81
77
- # Wait for network function pods to be ready
78
- print_header " Waiting for Network Function Pods"
82
+ print_subheader " Waiting for Core pods to be ready"
79
83
wait_for_pod_ready " nf" " nrf"
80
84
wait_for_pod_ready " nf" " scp"
81
85
wait_for_pod_ready " nf" " amf"
82
86
wait_for_pod_ready " nf" " udr"
83
87
wait_for_pod_ready " nf" " bsf"
88
+ print_success " Core pods ready."
84
89
85
- # Install Python dependencies
86
- print_header " Installing Python dependencies"
90
+ print_header " Preparing core for adding subscribers (Core Deployment [4/4]) "
91
+ print_subheader " Installing Python dependencies"
87
92
pip3 install -r requirements.txt
88
93
print_success " Python dependencies installed."
89
94
90
- # Apply Open5GS web UI
91
- print_header " Applying Open5GS Web UI Configurations"
92
- kubectl apply -k open5gs-webui -n open5gs
93
- print_success " Open5GS web UI configurations applied."
94
95
95
- # Wait for the web UI pod to be ready
96
+ print_subheader " Deploying Open5GS Web UI"
97
+ kubectl apply -k open5gs-webui -n open5gs
96
98
wait_for_pod_ready " nf" " webui"
99
+ print_success " Open5GS web UI deployed."
97
100
98
- # Set up admin account for MongoDB
99
- print_header " Setting Up MongoDB Admin Account"
101
+ print_subheader " Setting Up MongoDB Admin Account"
100
102
python3 mongo-tools/add-admin-account.py
101
103
print_success " MongoDB admin account created successfully."
102
104
0 commit comments