@@ -34,14 +34,14 @@ The steps for integrating a new MEC service into the AdvantEDGE backend can be s
After having restructured the client & server stubs and developing minimal server-side & client-side logic for the new feature using the [development guide](./development-guide.md), move the code files into AdvantEDGE repository or its fork using the following guidelines:
-[Server side](./development-guide.md#server-side) code contained in a separate folder named `meep-<MEC-Identifier>` will go under `AdvantEDGE/go-apps/` directory
-[Client side](./development-guide.md#client-side) code contained in a folder named `meep-<MEC-Identifier>-client` will be placed under `AdvantEDGE/go-packages/` directory
-**TODO** _Info about test files to be added later_
-[Server side](./development-guide.md#server-side) code contained in a separate folder named `meep-<mec-identifier>` will go under `AdvantEDGE/go-apps/` directory
-[Client side](./development-guide.md#client-side) code contained in a folder named `meep-<mec-identifier>-client` will be placed under `AdvantEDGE/go-packages/` directory
-[Testing](./development-guide.md#unit-tests-for-the-new-micro-service) code... (**TODO** _Info about test files to be added later._)
> **NOTE:** `<MEC-Identifier>` is a unique name for the new microservice and should be chosen appropriately. This name must be used consistently during configurations. For example, `meep-loc-serv` is the name for MEC013 Location Service and `meep-wais` is the microservice name emulating the MEC028 WLAN Access Information Service. Similarly, `meep-vis` could be a potential name for MEC030 V2X Information Service.
> **NOTE:** `<mec-identifier>` is a unique name for the new microservice and should be chosen appropriately. This name must be used consistently during configurations. For example, `meep-loc-serv` is the name for MEC013 Location Service and `meep-wais` is the microservice name emulating the MEC028 WLAN Access Information Service. Similarly, `meep-vis` could be a potential name for MEC030 V2X Information Service.
## _meepctl_ configuration for AdvantEDGE
This is the main configuration file of the AdvantEDGE platform. It is located in the main folder with the name `.meepctl-repocfg.yaml`.
This is the main configuration file for AdvantEDGE. It is located in the main folder with the name `.meepctl-repocfg.yaml`.
This file contains the whole configuration of the AdvantEDGE platform, including the micro-services description and packaging.
@@ -52,9 +52,9 @@ The changes that need to be made to `.meepctl-repocfg.yaml` file are:
- To allow the `meep-virt-engine` service to deploy the new service's pod, the service should be added to the following sections:
>**NOTE:** These settings will enable the `meep-virt-engine` to deploy the new service by default upon each user sandbox creation. For configuring the new service to only get deployed upon selection of a certain network scenrio, see [Network Scenarios](./network-scenarios.md).
- Add client for the new service in `repo.packages.go-packages` section if one is available/required
- Add information for the new service in the monitoring engine `repo.sandbox.go-apps.meep-mon-engine.sandbox-pods`
>**NOTE:** These settings will enable the `meep-virt-engine` to deploy the new service by default upon each user sandbox creation. For configuring the new service to only get deployed upon selection of a certain network scenrio, see [Network Scenarios](./network-scenarios.md#adding-a-new-service-in-an-existing-network-scenario).
- Add client for the new service in `repo.packages.go-packages` section (if one is available/required)
- Add information for the new service in the monitoring engine section `repo.sandbox.go-apps.meep-mon-engine.sandbox-pods`
> **Note:** `.meepctl-repocfg.yaml` is a hidden file.
@@ -77,14 +77,14 @@ The Sandbox is deployed using the configurations mentioned in the `mec-sandbox/c
The same changes need to be added in this file that were made for AdvantEDGE [here](#changes-in-advantedge-meepctl-repocfgyaml).
#### **Swagger UI Generation**
#### Swagger UI Generation
Additionally for making the Swagger UI available in the Sandbox frontend for the new service, these steps need to be taken:
1. Copy the Swagger or OpenAPI specifications of the new MEC Service from backend (available under `mec-sandbox/go-apps/meep-<MEC-Identifier>/api/swagger.yaml`) to `mec-sandbox/config/api/` folder and rename the file from `swagger.yaml` to `<MEC-Identifier>-api.yaml`. Additionally
1. Copy the Swagger or OpenAPI specifications of the new MEC Service from backend (available under `mec-sandbox/go-apps/meep-<mec-identifier>/api/swagger.yaml`) to `mec-sandbox/config/api/` folder and rename the file from `swagger.yaml` to `<mec-identifier>-api.yaml`. Additionally
- Customize the YAML to hide unnecessary endpoints in the UI
- Add necessary license description in the `info` section
2. Add this location of OAS yaml in the `repo.sandbox.go-apps.<MEC-identifier>.user-api` section of `.meepctl-repocfg.yaml` file
2. Add this location of OAS yaml in the `repo.sandbox.go-apps.<mec-identifier>.user-api` section of `.meepctl-repocfg.yaml` file
In addition to `.meepctl-repocfg.yaml` file, the following files will need to be updated when creating a new micro-service:
@@ -94,7 +94,7 @@ In addition to `.meepctl-repocfg.yaml` file, the following files will need to be
## Helm Charts Configuration
All the Helm charts for multiple services are available under the `AdvantEDGE/charts` folder. Once a new service is added, its Helm chart needs to be added in this folder under the name `meep-<MEC-identifier>`.
All the Helm charts for multiple services are available under the `AdvantEDGE/charts` folder. Once a new service is added, its Helm chart needs to be added in this folder under the name `meep-<mec-identifier>`.
The template for the Helm chart for the new service can be obtained from any other micro-service like `meep-rnis`, `meep-wais` etc. The service name in each of the files for the template will need to be changed to reflect the name of the new service.
@@ -108,14 +108,14 @@ After making all the necessary changes in the AdvantEDGE code and MEC Sandbox co
## Validation Checks
These basic steps can be performed to see if the new service has successfully been integrated with the AdvantEDGE backend. There are three main aspects that can verify if the new microservice is up and running in the backend.
These basic steps can be performed to see if the new service has successfully been integrated with the AdvantEDGE backend. Mentioned below are the main aspects that can verify if the new microservice is up and running in the backend.
After the MEC Sandbox has been redeployed using the upgrade steps mentioned above, follow these steps to verify the new service:
### 1. Pods creation
- Log into the MEC Sandbox at [try-mec.etsi.org](https://try-mec.etsi.org) or at the IP address of the VM in case of local MEC Sandbox deployment. This will initialize a new user sandbox and a pod for the service should start in user sandbox namespace.
**NOTE:** In [AdvantEDGE configurations](#meepctl-configuration-for-advantedge), we have enabled `meep-virt-engine` to automatically start the new service upon sandbox creation. Otherwise, the new service will be deployed upon selection of a specific network scenario for which the service has been configured to run.
**NOTE:** In our [AdvantEDGE configurations](#meepctl-configuration-for-advantedge), we have enabled `meep-virt-engine` to automatically start the new service upon sandbox creation. Otherwise, the new service will be deployed upon selection of a specific network scenario for which the service has been configured to run.
- On the Sandbox VM console/terminal, check if the pod for the new service is in _Running_ state for the new sandbox instance after it is instantiated.
@@ -123,10 +123,10 @@ After the MEC Sandbox has been redeployed using the upgrade steps mentioned abov
After the correct network scenario is selected in the MEC Sandbox UI, make sure that the new MEC service is not being shown in the [box](../Sandbox-User-Interface/README.md#sbox04) under _MEC App. Instance IDs_.
### 3. Communication with the common message bus
Check the logs of the container running the microservice and see it is sending and receving messages on the common message bus. If there is no logic for sending messages through SBI, at least the service should be receiving periodic "SCENARIO-UPDATE" messages for different events related to UE mobility etc.
Check the logs of the container running the microservice and see if it is sending and receving messages on the common message bus. If there is no logic for sending messages through SBI, at least the service should be receiving periodic "SCENARIO-UPDATE" messages for different events related to UE mobility etc.
### 4. Successful responses from the service API
Send a request to the exposed endpoints of the new service using _curl_, _Postman_ or any other tool to verify that the service is returning valid responses through its NBI accroding to the developed emulation logic.
Send a request to one of the exposed endpoints of the new service using _curl_, _Postman_ or any other tool to verify that the service is returning valid responses through its NBI accroding to the developed emulation logic.
### 5. Swagger UI for the new service
Follow these steps to validate successful Swagger UI generation for the new service:
@@ -135,4 +135,4 @@ Follow these steps to validate successful Swagger UI generation for the new serv
- The new service should be displayed in the _"Select a definition"_ dropdown list as `mep1 - <New-Service-Name> REST API`
- Upon selection, the browser page will display Swagger UI for the new service containing all the endpoints and HTTP methods that were listed in the OAS YAML configured during [Swagger UI Generation](#swagger-ui-generation).
In order to integrate Swagger UI for the new service in the MEC Sandbox frontend, there are some enhancements need to be made in the frontend in terms of a adding a drop down option. [Frontend Enhancements guide](./frontend-enhancements.md) covers all the steps that need to be taken in order to make the new service accessible through the UI.
In order to integrate Swagger UI for the new service in the MEC Sandbox frontend, there are some enhancements need to be made in the frontend in terms of a adding a drop down option. [Frontend Enhancements guide](./frontend-enhancements.md) covers all the steps that need to be taken in order to make the new service accessible through the MEC Sandbox UI.
-[Grafana dashboard for monitoring service-related metrics](#grafana-dashboard-for-monitoring-service-related-metrics)
-[1. Add a new variable for the service in Grafana Dashboard](#1-add-a-new-variable-for-the-service-in-grafana-dashboard)
-[1. Add a new variable for the service in Grafana dashboard](#1-add-a-new-variable-for-the-service-in-grafana-dashboard)
-[2. Add row and panels in the dashboard for the new service](#2--add-row-and-panels-in-the-dashboard-for-the-new-service)
This guide contains all frontend-related aspects that need to be enhanced for integrating a new service in the MEC Sandbox. These include:
@@ -14,13 +14,15 @@ This guide contains all frontend-related aspects that need to be enhanced for in
1. Swagger UI integration
1. Grafana dashboard for monitoring service-related metrics
**NOTE**: These enhancements are applicable for adding a MEC service in the Sandbox as a new feature. Usually, slight changes in the UI are required for seamlessly integrating the new service in the MEC Sandbox. However, there may be some MEC services that require some more complicated enhancements. This guide will be modified accordingly to cater for such scenarios.
## Pull downs for the new service in the frontend
For adding the new service in the [MEC API dropdown](../Sandbox-User-Interface/README.md#sbox05a), the following file in the [MEC Sandbox repository](https://forge.etsi.org/rep/mec/mec-sandbox) needs to be modified.
- In the `parseEdgeApps()` function, add an `else if` block for the new service and assign the variables such as _path_, _url_, _dropDownName_ etc. with appropriate values<br>**NOTE:** _See the information for existing MEC services in the if-else blocks for reference._
This will show the new service in the dropdown if that service is supported by the selected network scenario upon next MEC Sandbox upgrade.
This will display the new MEC service in the dropdown list if that service is supported by the selected network scenario upon next Sandbox upgrade.
To properly integrate the new service with the MEC Sandbox frontend, e.g. to make the service appear in the [API console](../Sandbox-User-Interface/README.md#sbox05b), following changes in [MEC Sandbox repository](https://forge.etsi.org/rep/mec/mec-sandbox) will need to be made:
@@ -45,10 +47,10 @@ In order to display metrics related to the new service in the dashboard, the JSO
> **NOTE:** Grafana will be able to fetch required metrics from Prometheus only if metrics collection is enabled for the new service. See how to enable metrics collection [here](./development-guide.md#server-side).
### 1. Add a new variable for the service in Grafana Dashboard
### 1. Add a new variable for the service in Grafana dashboard
As a first step, add a variable for the new service that will be used in the JSON file for making target promQL queries by Grafana. This will be done by adding another array item in `templating.list`.
This variable should be assigned the same value as the 'constant' `serviceName` in `<mec-identifier>.go` file. For example, Grafana variable `mec030` for MEC030 V2X Information Service will have a value of _V2XI Service_ as is defined in`serviceName`variable in the `vis.go` file for the MEC030 service:
This dashboard variable should be assigned the same value as the `serviceName`constant in `<mec-identifier>.go` file which was created during [development of server-side emulation logic](./development-guide.md#server-side). For example, Grafana variable `mec030` for MEC030 V2X Information Service will have a value of _V2XI Service_ as is defined by the`serviceName`constant in the `vis.go` file for the MEC030 service:
-[Uploading an Existing Network Scenario](#uploading-an-existing-network-scenario)
-[Adding a new service in an existing network scenario](#adding-a-new-service-in-an-existing-network-scenario)
This guide contains step-by-step procedure for configuring existing network scenarios or adding a new scenario in the MEC Sandbox.
Before creating, uploading or editing a network scenario, a GitHub username will need to be provisioned as admin. This can be done using the steps mentioned [here](./learning-guide.md#user-provisioning).
## Creating a New Network Scenario
@@ -15,7 +17,7 @@ After logging into the AdvantEDGE dashboard, follow the steps mentioned [here](h
## Exporting a Saved Network Scenario
To export a network scenario saved on the AdvantEDGE (backend of MEC Sandbox), follow the following steps:
The following steps can be used to export a network scenario which is already saved in the AdvantEDGE.
| Navigate to the AdvantEDGE dashboard, then to the `Configure` tab and open the scenario in which the new service is to be added. | _**Click image to enlarge**_<br> |
| Click on `New` and create a new `Edge Application`.<br>Name the application the same as the MEC service specification number e.g. for RNIS, it will be `mec028`. Also, add `meep-docker-registry:30001/meep-<mec-identifier>` as _Container Image Name_.<br>Make sure that the _Parent Node_ is the required MEC Platform.<br>The environment variables should also be the same as other services. | _**Click image to enlarge**_<br> |
| Apply the changes and the new service will be shown under the selected MEC Platform in the Network view on the left.. | _**Click image to enlarge**_<br> |
| Save the network scenario with the same name as the one which was edited. | _**Click image to enlarge**_<br> |
| Apply your changes and the new service will be shown under the selected MEC Platform in the Network view on the left. | _**Click image to enlarge**_<br> |
| Save the network scenario with its original name. | _**Click image to enlarge**_<br> |
> **NOTE:** A custom network scenario can also be created for the new MEC service by following the steps mentioned [here](https://interdigitalinc.github.io/AdvantEDGE/docs/usage/usage-first-scenario/).