Application Mobility Service (AMS) API and Edge Application Enablement Service APIs
Demo 3 demonstrates how to use AdvantEDGE mec services showcasing Application Mobility Service (AMS) and Edge Application Enablement Service API.
## Introduction
Demo 3 compose a user MEC application that can be integrated with AdvantEDGE scenarios or MEC Sandbox.
Edge Application Enablement Service APIs (MEC011) allow MEC applications to:
1. Discover & offer MEC platform services
2. Subscribe for application lifecycle and MEC platform service availability notifications
### Use-cases
MEC Applications should use the Application Mobility Service (AMS) API to perform MEC-assisted application context transfers.
Using the AMS API, MEC Applications can register for simulated terminal device Mobility Procedure notifications to trigger user application context transfers across MEC Applications
A user can deploy demo 3 as a scenario onto AdvantEDGE or as an external application to use MEC Services APIs from a MEC application
## Getting Started
There are two ways to run Demo3:
1. Running Demo3 as an external MEC Application with requirement to configure details of appInstanceId that has to be generated from the MEC Sandbox frontend along with MEC Service base path. A scenario needs to be deployed on MEC Sandbox prior to running Demo3
2. Use a pre-defined demo 3 scenario to deploy Demo3 application that runs on AdvantEdge as a container within a kubernetes environment
Demo3 provides a GUI to interact with MEC Service APIs such as:
## Running Demo 3 as an external application with MEC Platform
1. Edge Platform Application Enablement allow MEC Applications to interact with the MEC System allowing Demo 3 to perform the following:
- MEC Application registration/deregistration
- MEC Service discovery & offering
- Monitor event notifications about service and application availability
2. Application Mobility Service provides support for relocation of user context and/or application instance between MEC hosts enabling:
- AMS to trigger and assists the context transfer
- Demo3 user-context is transferred from one instance to another user-based target mec application
## Getting Started:
Demo 3 can be started on MEC Sandbox or AdvantEDGE
### Sandbox Procedure
- Demo 3 does not have any prior knowledge or configuration information of the MEC services offered by the MEC platform
The following steps need to be done prior to running demo 3
@@ -26,24 +37,35 @@ The following steps need to be done prior to running demo 3
| --------- | ------ |
| 1. Login via the MEC Sandbox frontend | |
| 2. Select a network to deploy in the user sandbox | |
| 3a. Pre-configure `mep1.yaml` or `mep2.yaml` located in Demo 3 backend directory refer to - [File Structure](#file-structure) | Add configuration fields <br>`mode:`"sandbox" |
| 3b. Configure `mep1.yaml` sandbox field with MEC Service base path | Base path format `https://<my-mec-url>/<my-sandbox-key>/mep1` mep1 is an indicator to refer to an edge application running on mep1. MEC Application will learn MEC services availability via mep1 interface
| 3c. Configure `mep1.yaml` mecplatform field with which platform the demo 3 application will be running on | If demo3 will be running on mep1, it would make sense to use `mep1.yaml` as your demo3 configuration file<br>`mecplatform: 'mep1' `|
| 3d. Obtain an application instance ID using the MEC application startup procedure and configure `mep1.yaml` appid field with application instance ID running on mep1 | `appid: '<app-instance-id>'` |
| 3e. Pre-configure `localurl` with your I.P address and `port` to indicate port number that demo3 server will run at | `localurl: 'http://<my-ip-address>'`<br>`port: ':<my-port-number>'`
| 4. Optional: If running a dual mep scenario on MEC sandbox. The above steps needs to be repeated to run a seperate instance of demo 3 application by applying configurations into `mep2.yaml` | |
configuration will look like this at the end:
| 3a. Pre-configure MEC Application named `demo3-config.yaml` under Demo 3 backend directory refer to - [File Structure](#file-structure) | Fill configuration fields <br>`mode: 'sandbox' `|
| 3b. Pre-configure MEC Application `sandbox` with Application Enablement service endpoints | Example: <br>`sandbox: 'https://try-mec.etsi.org/<my-sandbox-key>/<mep-host>'`<br> MEC Application will learn MEC services availability via mep host interface
| 3c. Pre-configure MEC Application `https` if sandbox url is using https and `mepplatform` with mec platform name demo-3 will run on | Example: <br>`https: 'false'`<br>`mecplatform: 'mep1' `|
| 3d. Pre-configure MEC Application `appid` with an Application Instance ID (e.g. appInstanceId) |
| 3e. Pre-configure MEC Application `localurl` with your I.P address and `port` to indicate port number that demo3 server will run at | `localurl: 'http://<my-ip-address>'`<br>`port: '<my-port-number>'`
| 4. Optional: If running a dual mep scenario on MEC sandbox. The above steps needs to be repeated to run a seperate instance of demo 3 application by applying configurations into `demo3-config-instance-two.yaml` | |
How configuration is expected :
```sh .env
# This file defines the configuration of Demo3 edge application. All fields are required to run demo-3 on MEC Sandbox
# Set where mec application is running either on MEC Sandbox or AdvantEDGE. Expected fields: sandbox | advantedge
# Set if sandbox url uses https. Expected fields: true | false
https: false
# Set the mec platform name demo-3 will run on. Example field: mep1
mecplatform: ''
# Set user-application ID that is generated on MEC Sandbox frontend. Example field format: 7930ba6d-4581-444c-b966-3312517f3a51
appid: ''
# Set host address of demo-3.
localurl: 'http://{local-url}/'
# Set host port number of demo-3. Example field: '8093'
port: '8093'
```
### To Build Demo 3 Server
### Build Demo 3 Server
```shell
# Build demo 3 backend binary
@@ -52,7 +74,7 @@ go build -o demo-server .
go run demo-server mep1.yaml
```
### To Build Demo 3 Frontend
### Build Demo 3 Frontend
1. Change directories to demo 3 frontend
```
cd ~/AdvantEDGE/examples/demo3/src/frontend
@@ -80,13 +102,13 @@ npm run build:dev
npm run build
```
## Running Demo 3 scenario on AdvantEdge
## Demo 3 AdvantEdge Procedure
#### Demo server & Demo frontend
### Demo server & Demo frontend
Demo server is a web server that will run internally in AdvantEdge as the backend of demo 3 application. The frontend is a dashboard to provide information on the MEC application instance in the scenario. One capability When the external UE moves in the network and transitions from one edge instance to another, the "UE state" (e.g. the counter value) is transferred using the application state transfer. On the demo server, it maintains a state of external UE as a counter that will continue incrementing (e.g. not reset to zero) when the UE moves in the network.
## Using the scenario
The following steps need to be done prior to using this scenario
@@ -114,7 +136,9 @@ cd ~/AdvantEDGE/examples/demo3/
./dockerize.sh
```
#### Open demo 3 scenario in the AdvantEdge configure tab & save
#### Using the scenario & deploy
Import `demo3-scenario.yaml` under demo3 directory into AdvantEDGE as a scenario process then deploy
#### Start demo 3 frontend
@@ -148,7 +172,7 @@ A quick look at the top-level relevant files and directories in demo 3 project.
3.**`./backend/util`**: This directory will contain configurations for an external demo 3 application running on MEC sandbox
4.**`./backend/util.mep1.yaml`**: This file will configurations for an external demo 3 application running on mep1
4.**`./backend/util.demo3-config.yaml`**: This file will configurations for an external demo 3 application running on mep1
5.**`./backend/main.go`**: This file is the entry for launching demo 3 backend