Skip to content

Commit 9083972

Browse files
authored
Improve developer documentation (#103)
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
1 parent 03b8c27 commit 9083972

File tree

4 files changed

+124
-117
lines changed

4 files changed

+124
-117
lines changed

developer/auto-scaling-5g-nfs.rst

Lines changed: 119 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
Auto scaling 5G NFs
99
===================
1010

11+
.. warning::
12+
**This feature is deprecated.** Autoscaling using KEDA was supported in the legacy
13+
Aether-in-a-Box (AIAB) deployment method, which has been replaced by
14+
`Aether OnRamp <https://github.com/opennetworkinglab/aether-onramp>`_.
15+
Aether OnRamp does not currently support autoscaling. This documentation is
16+
preserved for historical reference only.
17+
1118
Autoscaling cloud native network functions is a critical capability for modern cloud infrastructure.
1219
It enables dynamic scaling of network functions to handle increased traffic or workload demands,
1320
ensuring optimal performance and cost-effectiveness.
@@ -21,10 +28,10 @@ minimize costs.
2128

2229
We can enable autoscaling based on memory usage, CPU usage, and custom metrics.
2330

24-
Illustration
25-
------------
31+
Illustration (Legacy AIAB)
32+
--------------------------
2633

27-
Let's explore the steps on how to set up autoscaling in AIAB.
34+
The following steps were used to set up autoscaling in the legacy AIAB deployment.
2835

2936
In this example, we are setting up KEDA to scale the smf pod up for every 50 N4 messages received by SMF
3037

@@ -44,125 +51,125 @@ Run the following steps in aether-in-a-box folder:
4451

4552
Create file aiab.diff with following content
4653

47-
.. code-block::
48-
49-
diff --git a/Makefile b/Makefile
50-
index bd54a7a..df85e0a 100644
51-
--- a/Makefile
52-
+++ b/Makefile
53-
@@ -26,9 +26,10 @@ GET_HELM = get_helm.sh
54-
KUBESPRAY_VERSION ?= release-2.17
55-
DOCKER_VERSION ?= '20.10'
56-
HELM_VERSION ?= v3.10.3
57-
-KUBECTL_VERSION ?= v1.23.15
58-
+KUBECTL_VERSION ?= v1.24.11
59-
60-
-RKE2_K8S_VERSION ?= v1.23.15+rke2r1
61-
+RKE2_K8S_VERSION ?= v1.24.11+rke2r1
62-
+#RKE2_K8S_VERSION ?= v1.23.15+rke2r1
63-
K8S_VERSION ?= v1.21.6
64-
65-
OAISIM_UE_IMAGE ?= andybavier/lte-uesoftmodem:1.1.0-$(shell uname -r)
66-
@@ -65,6 +66,8 @@ ROUTER_HOST_NETCONF := /etc/systemd/network/10-aiab-access.netdev /etc/systemd
67-
UE_NAT_CONF := /etc/systemd/system/aiab-ue-nat.service
68-
69-
# monitoring
70-
+AUTOSCALE_CHART := kedacore/keda
71-
+AUTOSCALE_VALUES ?= $(MAKEDIR)/autoscale.yaml
72-
RANCHER_MONITORING_CRD_CHART := rancher/rancher-monitoring-crd
73-
RANCHER_MONITORING_CHART := rancher/rancher-monitoring
74-
MONITORING_VALUES ?= $(MAKEDIR)/monitoring.yaml
75-
@@ -675,6 +678,26 @@ test: | 4g-core $(M)/oaisim
76-
fi
77-
@grep -q "Simulation Result: PASS\|Profile Status: PASS" /tmp/gnbsim.out
78-
79-
+autoscale: $(M)/autoscale
80-
+$(M)/autoscale: $(M)/helm-ready
81-
+ helm repo add kedacore https://kedacore.github.io/charts
82-
+ helm upgrade --install --wait $(HELM_GLOBAL_ARGS) \
83-
+ --namespace=autoscale \
84-
+ --create-namespace \
85-
+ --values=$(AUTOSCALE_VALUES) \
86-
+ keda-aiab \
87-
+ $(AUTOSCALE_CHART)
88-
+ touch $(M)/autoscale
89-
+
90-
+autoscale-aiab: $(M)/autoscale
91-
+ kubectl apply -f resources/keda.yaml
92-
+
93-
+autoscale-clean:
94-
+ kubectl delete -f resources/keda.yaml
95-
+ helm -n autoscale delete keda-aiab || true
96-
+ kubectl delete namespace autoscale || true
97-
+ rm $(M)/autoscale
98-
+
99-
reset-test: | oaisim-clean omec-clean router-clean
100-
@cd $(M); rm -f omec oaisim 5g-core
101-
102-
diff --git a/resources/5g-monitoring/kustomization.yaml b/resources/5g-monitoring/kustomization.yaml
103-
index 96bc72b..0b757e9 100644
104-
--- a/resources/5g-monitoring/kustomization.yaml
105-
+++ b/resources/5g-monitoring/kustomization.yaml
106-
@@ -5,6 +5,7 @@
107-
resources:
108-
- ./metricfunc-monitor.yaml
109-
- ./upf-monitor.yaml
110-
+ - ./smf-monitor.yaml
111-
112-
configMapGenerator:
113-
- name: grafana-ops-dashboards
54+
.. code-block:: diff
55+
56+
diff --git a/Makefile b/Makefile
57+
index bd54a7a..df85e0a 100644
58+
--- a/Makefile
59+
+++ b/Makefile
60+
@@ -26,9 +26,10 @@ GET_HELM = get_helm.sh
61+
KUBESPRAY_VERSION ?= release-2.17
62+
DOCKER_VERSION ?= '20.10'
63+
HELM_VERSION ?= v3.10.3
64+
-KUBECTL_VERSION ?= v1.23.15
65+
+KUBECTL_VERSION ?= v1.24.11
66+
67+
-RKE2_K8S_VERSION ?= v1.23.15+rke2r1
68+
+RKE2_K8S_VERSION ?= v1.24.11+rke2r1
69+
+#RKE2_K8S_VERSION ?= v1.23.15+rke2r1
70+
K8S_VERSION ?= v1.21.6
71+
72+
OAISIM_UE_IMAGE ?= andybavier/lte-uesoftmodem:1.1.0-$(shell uname -r)
73+
@@ -65,6 +66,8 @@ ROUTER_HOST_NETCONF := /etc/systemd/network/10-aiab-access.netdev /etc/systemd
74+
UE_NAT_CONF := /etc/systemd/system/aiab-ue-nat.service
75+
76+
# monitoring
77+
+AUTOSCALE_CHART := kedacore/keda
78+
+AUTOSCALE_VALUES ?= $(MAKEDIR)/autoscale.yaml
79+
RANCHER_MONITORING_CRD_CHART := rancher/rancher-monitoring-crd
80+
RANCHER_MONITORING_CHART := rancher/rancher-monitoring
81+
MONITORING_VALUES ?= $(MAKEDIR)/monitoring.yaml
82+
@@ -675,6 +678,26 @@ test: | 4g-core $(M)/oaisim
83+
fi
84+
@grep -q "Simulation Result: PASS\|Profile Status: PASS" /tmp/gnbsim.out
85+
86+
+autoscale: $(M)/autoscale
87+
+$(M)/autoscale: $(M)/helm-ready
88+
+ helm repo add kedacore https://kedacore.github.io/charts
89+
+ helm upgrade --install --wait $(HELM_GLOBAL_ARGS) \
90+
+ --namespace=autoscale \
91+
+ --create-namespace \
92+
+ --values=$(AUTOSCALE_VALUES) \
93+
+ keda-aiab \
94+
+ $(AUTOSCALE_CHART)
95+
+ touch $(M)/autoscale
96+
+
97+
+autoscale-aiab: $(M)/autoscale
98+
+ kubectl apply -f resources/keda.yaml
99+
+
100+
+autoscale-clean:
101+
+ kubectl delete -f resources/keda.yaml
102+
+ helm -n autoscale delete keda-aiab || true
103+
+ kubectl delete namespace autoscale || true
104+
+ rm $(M)/autoscale
105+
+
106+
reset-test: | oaisim-clean omec-clean router-clean
107+
@cd $(M); rm -f omec oaisim 5g-core
108+
109+
diff --git a/resources/5g-monitoring/kustomization.yaml b/resources/5g-monitoring/kustomization.yaml
110+
index 96bc72b..0b757e9 100644
111+
--- a/resources/5g-monitoring/kustomization.yaml
112+
+++ b/resources/5g-monitoring/kustomization.yaml
113+
@@ -5,6 +5,7 @@
114+
resources:
115+
- ./metricfunc-monitor.yaml
116+
- ./upf-monitor.yaml
117+
+ - ./smf-monitor.yaml
118+
119+
configMapGenerator:
120+
- name: grafana-ops-dashboards
114121
115122
116123
Create a file resources/keda.yaml with the following content
117124

118-
.. code-block::
119-
120-
---
121-
apiVersion: keda.sh/v1alpha1
122-
kind: ScaledObject
123-
metadata:
124-
name: smf-scale
125-
namespace: omec
126-
spec:
127-
scaleTargetRef:
128-
kind: Deployment
129-
name: smf
130-
minReplicaCount: 1
131-
maxReplicaCount: 5
132-
cooldownPeriod: 30
133-
pollingInterval: 1
134-
triggers:
135-
- type: prometheus
136-
metadata:
137-
serverAddress: http://rancher-monitoring-prometheus.cattle-monitoring-system.svc:9090
138-
metricName: n4_messages_total
139-
query: |
140-
sum(n4_messages_total{job="smf"})
125+
.. code-block:: yaml
126+
127+
---
128+
apiVersion: keda.sh/v1alpha1
129+
kind: ScaledObject
130+
metadata:
131+
name: smf-scale
132+
namespace: omec
133+
spec:
134+
scaleTargetRef:
135+
kind: Deployment
136+
name: smf
137+
minReplicaCount: 1
138+
maxReplicaCount: 5
139+
cooldownPeriod: 30
140+
pollingInterval: 1
141+
triggers:
142+
- type: prometheus
143+
metadata:
144+
serverAddress: http://rancher-monitoring-prometheus.cattle-monitoring-system.svc:9090
145+
metricName: n4_messages_total
146+
query: |
147+
sum(n4_messages_total{job="smf"})
141148
threshold: "50"
142149
143150
Create file resources/5g-monitoring/smf-monitor.yaml with following content
144151

145-
.. code-block::
146-
147-
apiVersion: monitoring.coreos.com/v1
148-
kind: ServiceMonitor
149-
metadata:
150-
name: smf
151-
namespace: omec
152-
spec:
153-
endpoints:
154-
- path: /metrics
155-
port: prometheus-exporter
156-
namespaceSelector:
157-
matchNames:
158-
- omec
159-
selector:
160-
matchLabels:
161-
app: smf
152+
.. code-block:: yaml
153+
154+
apiVersion: monitoring.coreos.com/v1
155+
kind: ServiceMonitor
156+
metadata:
157+
name: smf
158+
namespace: omec
159+
spec:
160+
endpoints:
161+
- path: /metrics
162+
port: prometheus-exporter
163+
namespaceSelector:
164+
matchNames:
165+
- omec
166+
selector:
167+
matchLabels:
168+
app: smf
162169
163170
Add an empty autoscale.yaml in aiab folder. This file can be used to add override values for keda helm chart.
164171

165-
.. code-block::
172+
.. code-block:: bash
166173
167-
touch autoscale.yaml
174+
touch autoscale.yaml
168175

developer/rogue-subscriber.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Dynamic Subscription revoking provision
1111
This feature enables 5G network to revoke subscription of specific UE.
1212
It is required that user identifies the IP-Address of specific UE to be disabled.
1313
The custom user application can make available the IP-Address of specific UE to 5G
14-
core network via Metric-Function API. The 5G network shall revoke the specific UEs
14+
core network via Metric-Function API. The 5G network shall revoke the specific UE's
1515
subscription based on UE IP-Addresses received.
1616

1717
Following diagram show one such use case of identifying malicious UE and then revoking its subscription from 5G core.
@@ -32,7 +32,7 @@ Following diagram show one such use case of identifying malicious UE and then re
3232

3333
The Metric-Function configuration to poll the user application
3434

35-
.. code-block::
35+
.. code-block:: yaml
3636
3737
userAppApiServer:
3838
addr: "userapp.omec.svc"

release/1.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ add/update/remove user subscription from the Core Network. Simapp uses this inte
5151
manage subscribers in SD-Core. When used with Aether, the latter uses an Operations portal
5252
to manage multiple Aether components including SD-Core. In this release, support for a
5353
subscriber proxy is added in Simapp, which is then used by the operations portal to learn
54-
about subscribers provisioned in Core Network by Simapp. This change helps SD-Cores seamless
54+
about subscribers provisioned in Core Network by Simapp. This change helps SD-Core's seamless
5555
integration in Aether.
5656

5757
**5G gNB simulator**: The gNB simulator simulates 5G UEs & gNodeBs. It is capable of supporting

release/1.3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The Metric Function acts as both metrics aggregator and processor towards metric
3333
API Server or Prometheus Server.
3434

3535
The 5G Metric dashboard shows whether the gNodeB and UPF are connected to the core, how many active UEs are connected,
36-
including UEs IMSI and Slice information, and the uplink (Tx Bitrate) and downlink (Rx Bitrate) throughput at the UPF.
36+
including UE's IMSI and Slice information, and the uplink (Tx Bitrate) and downlink (Rx Bitrate) throughput at the UPF.
3737
Metrics work can be extended to show various metrics from 5G core network.
3838

3939
**NRF Cache and Notification**: As part of NF Discovery Service, Each NF discovers Target NF for its profiles from NRF
@@ -52,7 +52,7 @@ available via configuration of SUPI to IP-address mapping under SMF specific sec
5252
**Dynamic Subscription revoking provision**: This feature enables 5G network to revoke subscription of specific UE.
5353
It is required that user identifies the IP-Address of specific UE to be disabled. The custom user application can
5454
make available the IP-Address of specific UE to 5G core network via Metric-Function API. The 5G network shall revoke
55-
the specific UEs subscription based on UE IP-Addresses received.
55+
the specific UE's subscription based on UE IP-Addresses received.
5656

5757
**Multiple gNBs Support in gNBSim**: This enhancement allows deploying multiple gNBSim instances. This would extend
5858
gNBSim capabilities towards XN and N2 handover procedures.

0 commit comments

Comments
 (0)