5G-Monarch is a network slice monitoring architecture for cloud native 5G network deployments. This repository contains the source code and configuration files for setting up 5G-MonArch, in conjunction with a 5G network deployment.
The first step involves deploying a 5G network with support for network slicing. The open5gs-k8s repository contains the source code and configuration files for deploying a 5G network using Open5GS on Kubernetes. Please follow the instructions in the repository to deploy a 5G network.
Note 1: For metrics support, we will use the msd/overlays/open5gs-metrics overlay, during the deployment of the 5G network.
Note 2: We will use the ueransim-gnb
and ueransim-ue
directories inside the msd
folder to deploy the UERANSIM gNB and UE, respectively.
Note 2: Please ensure that the 5G network deployment with 2 network slices is successful by doing a ping test as shown the the open5gs-k8s README before proceeding further with Monarch deployment.
At this point, you should have a 5G network deployed with 2 network slices, and be able to ping through the UEs as shown below.
Note: The deployment instructions assume a working kubernetes cluster with open5gs-k8s deployed.
To deploy Monarch, follow the deployment steps below:
Deploy the Monarch external components (i.e., service_orchestrator and nfv_orchestrator, in that order). These are mock components that simulate the functionality of the actual orchestrators. These should be left running, e.g., by using screen or tmux. Monarch's request_translator and monitoring_manager components rely on these external components to be available. To deploy the service_orchestrator component, run the following commands (and similarly for nfv_orchestrator):
cd service_orchestrator
python3 run.py
Note: You may need to install the required python packages e.g., flask, requests, etc.
Deploy the data_store component. Most of the Monarch components include a install.sh
and uninstall.sh
script for easy deployment and removal. Please run the install.sh
script from the appropriate directory. For example, to deploy the data_store component, run the following commands:
cd data_store
./install.sh
Next, we need to create the access key and secret key for the Minio component of the data store, using the Minio GUI.
We can access the Minio GUI at http://localhost:30713 and use the default credentials of user: admin
and password: monarch-operator
.
Note: Note down the access key and secret key for use in the next step.
The third step is the nssdc deployment. First, we need to create a .env
file in the repository root to store environment variables such as the Minio access key and secret key.
~/5g-monarch$ touch .env
Populate the following environment variables in the .env
file:
MONARCH_MINIO_ENDPOINT="<node_ip>:30712" # Update with the node IP of the Kubernetes host
MONARCH_MINIO_ACCESS_KEY="" # Access key from Minio GUI
MONARCH_MINIO_SECRET_KEY="" # Secret key from Minio GUI
MONARCH_MONITORING_INTERVAL="1s"
Next, deploy the NSSDC using the install.sh
script:
cd nssdc
./install.sh
The next step is deploying the data_distribution component. First, we need to populate some environment variables in the .env
file:
MONARCH_THANOS_STORE_GRPC="<node_ip>:30905"
MONARCH_THANOS_STORE_HTTP="<node_ip>:30906"
Note: These ports are defined in the nssdc/values.yaml file.
After populating the environment variables, deploy the data_distribution component using the install.sh
script:
cd data_distribution
./install.sh
After successful deployment of the data_distribution component, we can access the Thanos GUI at http://localhost:31004, and verify that the nssdc sidecar has been successfully discovered.
The fifth step is deploying the data_visualization component, using the install.sh
script:
cd data_visualization
./install.sh
After successful deployment of the data_visualization component, we can access the Grafana GUI at http://localhost:32005, and login with the default credentials of admin:prom-operator
.
Step 6 is deploying the monitoring_manager component. First, we need to populate some environment variables in the .env
file:
NFV_ORCHESTRATOR_URI="http://<node_ip>:6001"
Note: Make sure that the NFV orchestrator is running at the specified URI (Step 1).
Next, deploy the monitoring_manager component using the install.sh
script:
cd monitoring_manager
./install.sh
Next, we deploy the request_translator component. First, we need to populate some environment variables in the .env
file:
SERVICE_ORCHESTRATOR_URI="http://<node_ip>:5001"
Note: Make sure that the service orchestrator is running at the specified URI (Step 1).
Next, deploy the request_translator component using the install.sh
script:
cd request_translator
./install.sh
Step 8 involves configuring datasources and adding dashboards to Grafana. We can do this using the Grafana GUI (Step 5).
First, we need to add the Monarch datadist (Thanos) datasource. Click on Home->Connections->Data Sources->Add new data source. Populate the following fields:
We can import a pre-configured dashboard for monitoring two network slices. Click on Home->Dashboards->New->Import. Use the monarch-dashboard.json file.
The final step involves submitting a slice monitoring request to the request translator. On successful submission, MDEs and KPI computation will be triggered, and the results will be displayed in the Grafana dashboard.
To submit a slice monitoring request, we can use the test_api.py
script in the request_translator directory.
We can see the creation of the metrics-service (MDE) and KPI computation components. Now all Monarch components are up and running.
If we send traffic through the UEs, we can see the KPIs being computed in the Grafana dashboard that we imported. The Grafana dashboard will be updated with the computed KPIs for the two network slices. .
Note: Use the uesimtun0
interface for the UEs to send traffic through the network slices.
The dashboard below shows Monarch being used to monitor network slices for a cloud-gaming use-case during a demo at the University of Waterloo.
If you use the code in this repository in your research work or project, please consider citing the following publication.
N. Saha, N. Shahriar, R. Boutaba and A. Saleh. (2023). MonArch: Network Slice Monitoring Architecture for Cloud Native 5G Deployments. In Proceedings of the IEEE/IFIP Network Operations and Management Symposium (NOMS). Miami, Florida, USA, 08 - 12 May, 2023.
Contributions, improvements to documentation, and bug-fixes are always welcome! See first-contributions.