Commit 55a7ed7f authored by Yann Garcia's avatar Yann Garcia
Browse files

Manually merge branch STF678_Task4 into STF678_Task_5_TTF_T043

parent 72c4755c
Loading
Loading
Loading
Loading
+59 −42
Original line number Diff line number Diff line
@@ -43,11 +43,11 @@ The following procedure should be used to install a new MEC Sandbox deployment.
### Prerequisites
MEC Sandbox has the following prerequisites:

1. MEC Sandbox (AdvantEDGE + MEC Sandbox frontend) VM:
1. MEC Sandbox (etsi-mec-sandbox + etsi-mec-sandbox-frontend) VM:
   - [Hardware requirements](https://interdigitalinc.github.io/AdvantEDGE/docs/setup/env-hw/)
1. Long-term Storage (MinIO + Thanos Compactor) VM:
   - [Hardware requirements](https://interdigitalinc.github.io/AdvantEDGE/docs/setup/env-hw/)
1. [AdvantEDGE](https://interdigitalinc.github.io/AdvantEDGE/) runtime & development environments on both VMs
1. [etsi-mec-sandbox](https://interdigitalinc.github.io/AdvantEDGE/) runtime & development environments on both VMs
   - Install [runtime environment](https://interdigitalinc.github.io/AdvantEDGE/docs/setup/env-runtime/)
   - Install [development environment](https://interdigitalinc.github.io/AdvantEDGE/docs/setup/env-dev/)
1. OAuth Applications using external providers
@@ -61,6 +61,7 @@ MEC Sandbox has the following prerequisites:
       - You can also add an application logo if you want users to see one during authentication
       - Once created, keep note of the OAuth App Client ID & Secret; this secret is only temporarily available on GitHub... keep a copy in a safe place!
       - If you need to generate a new secret the MEC Sandbox will have to be updated accordingly
       - Enable Device Flow to use API driven sandbox
   - **GitLab:**
     - gitlab.com User Account --> Settings --> Applications --> Add new application
     - _Name:_ ETSI MEC Sandbox
@@ -69,6 +70,7 @@ MEC Sandbox has the following prerequisites:
     - _Scopes:_ read_user
     - **NOTES:**
       - Once created, keep note of the OAuth App Client ID & Secret
       - Enable Device Flow to use API driven sandbox
1. Python Installation
   - Install Python2:
     - Ubuntu 18.04: `sudo apt install python-minimal`
@@ -119,30 +121,30 @@ $ showmount -e

### Deploy Long-term Storage (MinIO + Thanos Compactor)

1. Clone AdvantEDGE repository:
   - Fetch required AdvantEDGE baseline:
     - Clone AdvantEDGE repo to the Long-term Storage VM
1. Clone [etsi-mec-sandbox](https://labs.etsi.org/rep/mec/etsi-mec-sandbox) repository:
   - Fetch required etsi-mec-sandbox baseline:
     - Clone etsi-mec-sandbox repo to the Long-term Storage VM
     - Place repo in home folder
     - Checkout the required AdvantEDGE version tag
     - Checkout the required etsi-mec-sandbox version tag
1. Configure Long-term Storage:
   - Configure object store:
     - `vi ~/AdvantEDGE/config/secrets.yaml`
     - `vi ~/etsi-mec-sandbox/config/secrets.yaml`
       - Set minio _accessKey_ to object store access key value (minimum 3 chars)
       - Set minio _secretKey_ to object store secret key value (minimum 8 chars)
     - `vi ~/AdvantEDGE/config/objstore-thanos.yaml`
     - `vi ~/etsi-mec-sandbox/config/objstore-thanos.yaml`
       - Set _endpoint_ to VM FQDN
         - **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 _secret\_key_ to object store secret key value
   - Configure deployment:
     - `vi ~/AdvantEDGE/config/long-term-storage-repocfg.yaml`
     - `vi ~/etsi-mec-sandbox/config/long-term-storage-repocfg.yaml`
       - Set uid & gid
       - Set host name to FQDN
       - Set Thanos compactor retention times
     - Overwrite repocfg file with provided long-term storage repocfg:
       - `cp ~/AdvantEDGE/config/long-term-storage-repocfg.yaml ~/AdvantEDGE/.meepctl-repocfg.yaml`
       - `cp ~/etsi-mec-sandbox/config/long-term-storage-repocfg.yaml ~/etsi-mec-sandbox/.meepctl-repocfg.yaml`
   - Configure MinIO helm chart:
     - `vi ~/AdvantEDGE/charts/minio/values.yaml`
     - `vi ~/etsi-mec-sandbox/charts/minio/values.yaml`
       - _securityContext_:
         - Set _runAsUser_ to uid
         - Set _runAsGroup_ to gid
@@ -151,16 +153,16 @@ $ showmount -e
   - MinIO:
     - Install Python as described in the prerequisites
     - Create secrets:
       - Ubuntu 18.04: `python ~/AdvantEDGE/config/configure-secrets.py set ~/AdvantEDGE/config/secrets.yaml`
       - Ubuntu 20.04: `python3 ~/AdvantEDGE/config/configure-secrets.py set ~/AdvantEDGE/config/secrets.yaml`
       - Ubuntu 18.04: `python ~/etsi-mec-sandbox/config/configure-secrets.py set ~/etsi-mec-sandbox/config/secrets.yaml`
       - Ubuntu 20.04: `python3 ~/etsi-mec-sandbox/config/configure-secrets.py set ~/etsi-mec-sandbox/config/secrets.yaml`
   - Thanos:
     - `~/AdvantEDGE/config/configure-objstore-secrets.sh`
     - `~/etsi-mec-sandbox/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
1. Deploy MinIO & Thanos Compactor:
   - Build & Configure meepctl:
     - `~/AdvantEDGE/go-apps/meepctl/install.sh`
     - `~/etsi-mec-sandbox/go-apps/meepctl/install.sh`
     - `meepctl config ip <VM private IP address>`
     - `meepctl config gitdir <full path to ~/AdvantEDGE>`
     - `meepctl config gitdir <full path to ~/etsi-mec-sandbox>`
   - Deploy dependency pods:
     - `meepctl deploy dep`
   - Deploy Core pods:
@@ -174,32 +176,32 @@ $ showmount -e
     - thanos
     - thanos-archive

### Build & Deploy MEC Sandbox (AdvantEDGE + MEC Sandbox Frontend)
### Build & Deploy MEC Sandbox (etsi-mec-sandbox + etsi-mec-sandbox-frontend)

1. Clone MEC Sandbox & AdvantEDGE repositories:
   - Fetch required MEC Sandbox baseline:
1. Clone [etsi-mec-sandbox-frontend](https://labs.etsi.org/rep/mec/etsi-mec-sandbox-frontend) & [etsi-mec-sandbox](https://labs.etsi.org/rep/mec/etsi-mec-sandbox) repositories:
   - Fetch required etsi-mec-sandbox-frontend:
     - 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
   - Fetch required etsi-mec-sandbox baseline:
     - Clone etsi-mec-sandbox repo to the MEC Sandbox deployment VM
     - Place repo in home folder
     - Checkout the required AdvantEDGE version tag
     - Checkout the required etsi-mec-sandbox 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`
     - `vi ~/etsi-mec-sandbox-frontend/config/objstore-thanos.yaml` and `vi ~/etsi-mec-sandbox-frontend/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`
     - `vi ~/etsi-mec-sandbox-frontend/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`
     - `vi ~/etsi-mec-sandbox-frontend/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`
     - `vi ~/etsi-mec-sandbox-frontend/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:
@@ -214,33 +216,48 @@ $ showmount -e
       - 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`
       - `vi ~/etsi-mec-sandbox-frontend/config/values/meep-prometheus.yaml`
       - Set `slack_api_url` to your slack channel webhook url
       - Set `channel` to your slack channel
   - Configure MQTT broker e.g `Mosquitto MQTT`:
     - Install mosquitto.
        - `sudo apt update`
        - `sudo apt install -y mosquitto`
     - Create a config file for mosquitto.
        - `echo -e "listener 1883\nallow_anonymous    true" | sudo tee /etc/mosquitto/conf.d/listener.conf > /dev/null`
     - Restart mosquitto.
        - `sudo systemctl restart mosquitto`
   - Configure vis and federation api to use mqtt broker
     - Set the `MEEP_BROKER` variable with the server IP (where Mosquitto is running) and port 1883 in the following two files:
        - `~/etsi-mec-sandbox/charts/meep-federation/values-template.yaml`
        - `~/etsi-mec-sandbox/charts/meep-vis/values-template.yaml`
        - Example: `MEEP_BROKER: mqtt://192.168.x.x:1882`
1. Build & Deploy STF Frontend:
   - SSH to MEC Sandbox deployment VM
   - Build STF Frontend:
     - `cd ~/mec-sandbox`
     - `cd ~/etsi-mec-sandbox-frontend`
     - `./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.
     - **NOTE:** This also copies the etsi-mec-sandbox configuration files to their respective locations in your local etsi-mec-sandbox clone `~/etsi-mec-sandbox/`. Running `git status` in your etsi-mec-sandboxE clone will list the updated (or new) files.
1. Create Secrets:
   - Session & OAuth:
     - Install Python as described in the prerequisites
     - Create secrets:
       - Ubuntu 18.04: `python ~/AdvantEDGE/config/configure-secrets.py set ~/AdvantEDGE/config/secrets.yaml`
       - Ubuntu 20.04: `python3 ~/AdvantEDGE/config/configure-secrets.py set ~/AdvantEDGE/config/secrets.yaml`
       - Ubuntu 18.04: `python ~/etsi-mec-sandbox/config/configure-secrets.py set ~/etsi-mec-sandbox/config/secrets.yaml`
       - Ubuntu 20.04: `python3 ~/etsi-mec-sandbox/config/configure-secrets.py set ~/etsi-mec-sandbox/config/secrets.yaml`
   - Object Store (Thanos & Influx):
     - `~/AdvantEDGE/config/configure-objstore-secrets.sh`
     - `~/etsi-mec-sandbox/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
1. Build & Deploy AdvantEDGE:
1. Build & Deploy Sandbox:
   - For more details see [AdvantEDGE Deployment Workflow](https://interdigitalinc.github.io/AdvantEDGE/docs/platform-mgmt/mgmt-workflow/)
   - Build demo4
     - `~/etsi-mec-sandbox/examples/demo4-ue/build-demo4-ue.sh`
   - Build and Configure meepctl:
     - `~/AdvantEDGE/go-apps/meepctl/install.sh`
     - `~/etsi-mec-sandbox/go-apps/meepctl/install.sh`
     - `meepctl config ip <VM private IP address>`
     - `meepctl config gitdir <full path to ~/AdvantEDGE>`
     - `meepctl config gitdir <full path to ~/etsi-mec-sandbox>`
   - Deploy dependency pods:
     - `meepctl deploy dep`
   - Build & Dockerize:
@@ -280,7 +297,7 @@ If necessary, configure the MEC Sandbox scenarios as follows:
## Upgrade MEC Sandbox
The following procedure should be used to upgrade a running MEC Sandbox deployment.

1. Stop AdvantEDGE
1. Stop MEC Sandbox
   - Delete user sandboxes
     - Using AdvantEDGE frontend:
       - Login as admin @ https://try-mec.etsi.org
@@ -295,27 +312,27 @@ The following procedure should be used to upgrade a running MEC Sandbox deployme
1. Pull latest updates from MEC Sandbox & AdvantEDGE repositories
1. Configure MEC Sandbox deployment:
   - Configure deployment:
     - `vi ~/mec-sandbox/config/.meepctl-repocfg.yaml`
     - `vi ~/etsi-mec-sandbox-frontend/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:
     - Set webhook url in Prometheus values override:
       - `vi ~/mec-sandbox/config/values/meep-prometheus.yaml`
       - `vi ~/etsi-mec-sandbox-frontend/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`
     - `cd ~/etsi-mec-sandbox-frontend`
     - `./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. Build & Deploy AdvantEDGE:
     - **NOTE:** This also copies the etsi-mec-sandbox configuration files to their respective locations in your local AdvantEDGE clone `~/etsi-mec-sandbox/`. Running `git status` in your AdvantEDGE clone will list the updated (or new) files.
1. Build & Deploy MEC Sandbox:
   - For more details see [AdvantEDGE Deployment Workflow](https://interdigitalinc.github.io/AdvantEDGE/docs/platform-mgmt/mgmt-workflow/)
   - Build meepctl:
     - `~/AdvantEDGE/go-apps/meepctl/install.sh`
     - `~/etsi-mec-sandbox/go-apps/meepctl/install.sh`
   - Deploy dependency pods:
     - `meepctl deploy dep`
   - Build & Dockerize:
+5 −5
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ externalDocs:
  description: "ETSI GS MEC 040 Federation enablement API, v3.2.1"
  url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/040/03.02.01_60/gs_MEC040v030201p.pdf
servers:
- url: https://localhost/sandboxname/sandboxname/sandboxname/sandboxname/fed_enablement/v1
- url: https://localhost/sandboxname/fed_enablement/v1
tags:
- name: systemInfo
- name: subscription
@@ -119,7 +119,7 @@ paths:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/fed_resources_systems_body'
              $ref: '#/components/schemas/SystemInfo'
        required: true
      responses:
        "201":
@@ -293,7 +293,7 @@ paths:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/systems_systemId_body'
              $ref: '#/components/schemas/SystemInfoUpdate'
        required: true
      responses:
        "200":
@@ -1089,8 +1089,8 @@ components:
      description: The expiration time of the subscription determined by the MEC Federation
        Enablement Service.
      example:
        seconds: 0
        nanoSeconds: 6
        seconds: 100
        nanoSeconds: 1000000
    links:
      title: links
      required:
+1 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022 ETSI.  All rights reserved.
 * Copyright (c) 2022-2025 ETSI.  All rights reserved.
 */

// Version
+1 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022 ETSI.  All rights reserved.
 * Copyright (c) 2022-2025 ETSI.  All rights reserved.
 */

import _ from 'lodash';