Commit b2f639e8 authored by Kevin Di Lallo's avatar Kevin Di Lallo Committed by GitHub Enterprise
Browse files

Update README.md

parent bd85f4e5
Loading
Loading
Loading
Loading
+110 −24
Original line number Original line Diff line number Diff line
# ETSI MEC Sandbox Frontend
# ETSI MEC Sandbox


>_NOTE: This repository contains the MEC Sandbox Frontend; the backend portion of the MEC Sandbox is realized using the open source project [AdvantEDGE](https://github.com/InterDigitalInc/AdvantEDGE)_
>_**NOTE: This repository contains the MEC Sandbox Frontend; the backend portion of the MEC Sandbox is realized using the open source project [AdvantEDGE](https://github.com/InterDigitalInc/AdvantEDGE)**_


MEC Sandbox is an interactive environment that enables users to learn & experiment with ETSI MEC Service APIs.
MEC Sandbox is an interactive environment that enables users to learn & experiment with ETSI MEC Service APIs.
These standardised RESTful APIs are targeted towards MEC application developers to expose the value added services
These standardised RESTful APIs are targeted towards MEC application developers to expose the value added services
@@ -11,8 +11,9 @@ presented via OpenAPI compliant descriptions.


MEC Sandbox provides the user with a choice of scenarios combining different network technologies (4G, 5G, Wi-Fi) and
MEC Sandbox provides the user with a choice of scenarios combining different network technologies (4G, 5G, Wi-Fi) and
terminal types. Combining these assets in a geolocated environment, a user can gain hands-on experience on the behaviour
terminal types. Combining these assets in a geolocated environment, a user can gain hands-on experience on the behaviour
and capabilities of the Location (MEC013), Radio Network Information (MEC012) and WLAN Information (MEC028) service APIs.
and capabilities of the Location (MEC013), Radio Network Information (MEC012), WLAN Information (MEC028), Edge Platform
Such contextual information can offer significant differential performance for edge based MEC applications.
Application Enablement (MEC011) and Application Mobility (MEC021) service APIs. Such contextual information can offer
significant differential performance for edge based MEC applications.


MEC Sandbox deploys the [AdvantEDGE edge emulation platform](https://github.com/InterDigitalInc/AdvantEDGE) to provide
MEC Sandbox deploys the [AdvantEDGE edge emulation platform](https://github.com/InterDigitalInc/AdvantEDGE) to provide
real-time access to ETSI MEC service implementations.
real-time access to ETSI MEC service implementations.
@@ -28,9 +29,10 @@ To use the MEC Sandbox, check out the [live deployment](https://try-mec.etsi.org


To learn more about the MEC Sandbox, have a look at the [wiki page](https://mecwiki.etsi.org/index.php?title=MEC_Sandbox_Help).
To learn more about the MEC Sandbox, have a look at the [wiki page](https://mecwiki.etsi.org/index.php?title=MEC_Sandbox_Help).


To install the MEC Sandbox, follow the installation instructions below.
To install or upgrade the MEC Sandbox, follow the instructions below.


## Install MEC Sandbox
## Install MEC Sandbox
The following procedure should be used to install a new MEC Sandbox deployment.


### Prerequisites
### Prerequisites
MEC Sandbox has the following prerequisites:
MEC Sandbox has the following prerequisites:
@@ -72,13 +74,13 @@ MEC Sandbox has the following prerequisites:
1. Configure Long-term Storage:
1. Configure Long-term Storage:
   - Configure object store:
   - Configure object store:
     - `vi ~/AdvantEDGE/config/secrets.yaml`
     - `vi ~/AdvantEDGE/config/secrets.yaml`
       - Set minio accessKey to object store access key value (minimum 3 chars)
       - Set minio _accessKey_ to object store access key value (minimum 3 chars)
       - Set minio secretKey to object store secret key value (minimum 8 chars)
       - Set minio _secretKey_ to object store secret key value (minimum 8 chars)
     - `vi ~/AdvantEDGE/config/objstore-thanos.yaml`
     - `vi ~/AdvantEDGE/config/objstore-thanos.yaml`
       - Set endpoint to VM FQDN
       - Set _endpoint_ to VM FQDN
         - **NOTE:** Make sure _/etc/hosts_ file contains entry for VM FQDN that points to VM private IP address
         - **NOTE:** Make sure _/etc/hosts_ file contains entry for VM FQDN that points to VM private IP address
       - Set access_key to object store access key value 
       - Set _access\_key_ to object store access key value 
       - Set secret_key to object store secret key value
       - Set _secret\_key_ to object store secret key value
   - Configure deployment:
   - Configure deployment:
     - `vi ~/AdvantEDGE/config/long-term-storage-repocfg.yaml`
     - `vi ~/AdvantEDGE/config/long-term-storage-repocfg.yaml`
       - Set uid & gid
       - Set uid & gid
@@ -86,6 +88,12 @@ MEC Sandbox has the following prerequisites:
       - Set Thanos compactor retention times
       - Set Thanos compactor retention times
     - Overwrite repocfg file with provided long-term storage repocfg:
     - Overwrite repocfg file with provided long-term storage repocfg:
       - `cp ~/AdvantEDGE/config/long-term-storage-repocfg.yaml ~/AdvantEDGE/.meepctl-repocfg.yaml`
       - `cp ~/AdvantEDGE/config/long-term-storage-repocfg.yaml ~/AdvantEDGE/.meepctl-repocfg.yaml`
   - Configure MinIO helm chart:
     - `vi ~/AdvantEDGE/charts/minio/values.yaml`
       - _securityContext_:
         - Set _runAsUser_ to uid
         - Set _runAsGroup_ to gid
         - Set _fsGroup_ to groups
1. Create MinIO & Thanos Secrets:
1. Create MinIO & Thanos Secrets:
   - MinIO:
   - MinIO:
     - Install Python2:
     - Install Python2:
@@ -102,9 +110,10 @@ MEC Sandbox has the following prerequisites:
     - `~/AdvantEDGE/config/configure-objstore-secrets.sh`
     - `~/AdvantEDGE/config/configure-objstore-secrets.sh`
   - **NOTE:** Once the kubernetes secrets have been created, it is recommended to remove the config files containing the clear-text secrets
   - **NOTE:** Once the kubernetes secrets have been created, it is recommended to remove the config files containing the clear-text secrets
1. Deploy MinIO & Thanos Compactor:
1. Deploy MinIO & Thanos Compactor:
   - Build meepctl:
   - Build & Configure meepctl:
     - `~/AdvantEDGE/go-apps/meepctl/install.sh`
     - `~/AdvantEDGE/go-apps/meepctl/install.sh`
     - **NOTE:** On first install the IP address & gitdir must be configured
     - `meepctl config ip <VM private IP address>`
     - `meepctl config gitdir <full path to ~/AdvantEDGE>`
   - Deploy dependency pods:
   - Deploy dependency pods:
     - `meepctl deploy dep`
     - `meepctl deploy dep`
   - Deploy Core pods:
   - Deploy Core pods:
@@ -120,18 +129,6 @@ MEC Sandbox has the following prerequisites:


### Build & Deploy MEC Sandbox (AdvantEDGE + MEC Sandbox Frontend)
### Build & Deploy MEC Sandbox (AdvantEDGE + MEC Sandbox Frontend)


1. Stop AdvantEDGE (if running)
   - Delete user sandboxes
     - Using AdvantEDGE frontend:
       - Login as admin @ https://try-mec.etsi.org
       - Open AdvantEDGE frontend @ https://try-mec.etsi.org/alt
       - Go to Exec Page and delete user sandboxes
     - Manually:
       - `helm ls -A --short | grep <sandbox-name> | xargs -L1 helm delete`
   - Delete core & dependency microservices:
     - `meepctl delete core`
     - `meepctl delete dep`
     - **NOTE:** This will clear all sessions in Redis DB
1. Clone MEC Sandbox & AdvantEDGE repositories:
1. Clone MEC Sandbox & AdvantEDGE repositories:
   - Fetch required MEC Sandbox baseline:
   - Fetch required MEC Sandbox baseline:
     - Clone this repo to the MEC Sandbox deployment VM
     - Clone this repo to the MEC Sandbox deployment VM
@@ -228,6 +225,95 @@ If necessary, configure the MEC Sandbox scenarios as follows:
   - In the AdvantEDGE Configuration view, import the required scenario _yaml_ file
   - In the AdvantEDGE Configuration view, import the required scenario _yaml_ file
   - Save the imported scenario to the AdvantEDGE backend to make it available in the MEC Sandbox
   - Save the imported scenario to the AdvantEDGE backend to make it available in the MEC Sandbox


## Upgrade MEC Sandbox
The following procedure should be used to upgrade a running MEC Sandbox deployment.

1. Stop AdvantEDGE (if running)
   - Delete user sandboxes
     - Using AdvantEDGE frontend:
       - Login as admin @ https://try-mec.etsi.org
       - Open AdvantEDGE frontend @ https://try-mec.etsi.org/alt
       - Go to Exec Page and delete user sandboxes
     - Manually:
       - `helm ls -A --short | grep <sandbox-name> | xargs -L1 helm delete`
   - Delete core & dependency microservices:
     - `meepctl delete core`
     - `meepctl delete dep`
     - **NOTE:** This will clear all sessions in Redis DB
1. Clone MEC Sandbox & AdvantEDGE repositories:
   - Fetch required MEC Sandbox baseline:
     - Clone this repo to the MEC Sandbox deployment VM
     - Place repo in home folder
   - Fetch required AdvantEDGE baseline:
     - Clone AdvantEDGE repo to the MEC Sandbox deployment VM
     - Place repo in home folder
     - Checkout the required AdvantEDGE version tag
1. Configure MEC Sandbox:
   - Configure object store:
     - `vi ~/mec-sandbox/config/objstore-thanos.yaml` and `vi ~/mec-sandbox/config/objstore-thanos-archive.yaml`
       - Set endpoint to long-term storage VM FQDN
         - **NOTE:** Make sure _/etc/hosts_ file contains entry for VM FQDN that points to VM private IP address (if on same local network)
       - Set access_key to object store access key value 
       - Set secret_key to object store secret key value
     - `vi ~/mec-sandbox/config/objstore-influx.cfg`
       - Set aws_access_key_id to object store access key value 
       - Set aws_secret_access_key to object store secret key value
   - Configure session & OAuth secrets:
     - `vi ~/mec-sandbox/config/secrets.yaml`
       - Set a unique session encryption key
       - Set the OAuth provider client ID & secrets using the values from the OAuth Applications
   - Configure deployment:
     - `vi ~/mec-sandbox/config/.meepctl-repocfg.yaml`
       - Set Prometheus external labels
         - **NOTE:** This uniquely identifies Prometheus data sources in the long-term storage data buckets
   - Configure Alert Manager slack channel webhook:
     - Create incoming webhook:
       - Create target slack channel in slack workspace
       - Go to `Manage Apps` in workspace settings
       - Search for `Incoming Webhooks` app
       - Click `Add to Slack`
         - **NOTE:** The webhook url can be found by looking at the app configuration
       - Choose a slack channel to post messages to
       - Click `Add Incoming WebHooks integration`
       - Copy the `Webhook URL`
       - **NOTE:** There should be a message in the selected slack channel indicating that an incoming webhook has be added 
     - Set webhook url in Prometheus values override:
       - `vi ~/mec-sandbox/config/values/meep-prometheus.yaml`
       - Set `slack_api_url` to your slack channel webhook url
       - Set `channel` to your slack channel
1. Build & Deploy STF Frontend:
   - SSH to MEC Sandbox deployment VM
   - Build STF Frontend:
     - `cd ~/mec-sandbox`
     - `./build.sh`
   - Deploy STF Frontend & Configuration files:
     - `./deploy.sh`
     - **NOTE:** This updates the `~/.meep/user/` folder with the user frontend, sandbox swagger UI, and user chart values.yaml overrides
     - **NOTE:** This also copies the AdvantEDGE configuration files to their respective locations in your local AdvantEDGE clone `~/AdvantEDGE/`. Running `git status` in your AdvantEDGE clone will list the updated (or new) files.
1. Create Secrets:
   - Session & OAuth:
     - Install Python2: `sudo apt install python-minimal`
     - Install Python-pip: `sudo apt install python-pip`
     - Install Pyyaml: `pip install pyyaml`
     - Create secrets:
       - `python ~/AdvantEDGE/config/configure-secrets.py set ~/AdvantEDGE/config/secrets.yaml`
   - Object Store (Thanos & Influx):
     - `~/AdvantEDGE/config/configure-objstore-secrets.sh`
   - **NOTE:** Once the kuberentes secrets have been created, it is recommended to remove the config files containing the clear-text secrets
1. Build & Deploy AdvantEDGE:
   - Build meepctl:
     - `~/AdvantEDGE/go-apps/meepctl/install.sh`
   - Deploy dependency pods:
     - `meepctl deploy dep`
   - Build & Dockerize:
     - `meepctl build all`
     - `meepctl dockerize all`
   - Prune old docker images:
     - `docker image prune`
   - Deploy Core pods:
     - `meepctl deploy core`
     - **NOTE:** Wait for dep pods to be successfully deployed before deploying core

## Licensing
## Licensing
MEC Sandbox is a private repo with all rights reserved to ETSI.
MEC Sandbox is a private repo with all rights reserved to ETSI.
```
```