Commit 1099208f authored by Yann Garcia's avatar Yann Garcia
Browse files

Remove demo5. Retrieve it fron STF625_TASK4 branch

parent 6f23effc
Loading
Loading
Loading
Loading

examples/demo5/README.md

deleted100644 → 0
+0 −99
Original line number Diff line number Diff line
# Demo5
Demo5 scenario showcases the _Edge Platform Application Enablement_ and _VIS V2X message distribution_ edge services.

For more details, check out the [Demo5 Documentation](https://interdigitalinc.github.io/AdvantEDGE/docs/usage/usage-demo5/)

Demo5 scenario showcases the _Edge Platform Application Enablement_ and _VIS V2X message distribution_ edge services.

Demo5 application does not provide a dashboard GUI, tools such as cUrl or Postman can be used (see clause [demo5](#demo5))

## Demo5 Scenario Overview

The Demo5 scenario consists of one instances of a MEC application running on MEC platform. 
MEC-030 Service APIs provide the capability to implement V2X message distribution application. .

### demo5

The MEC application demo5 provide a simply HHTP REST APIs for MEC-030 in order to validate quickly MEC-030 support.

#### Check that the demo5 is up

The requets `GET /info/application` provides a description of the demo5 application.
```sh
$ curl "http://mec-platform.etsi.org:31111/info/application" -H "accept: application/json"
{"config":"app_instance.yaml","ip":"http://demo5-ue1:80","id":"ce454f4c-16f8-4542-83d8-c8afd45bcfea","mecReady":true,"subscriptions":{"AppTerminationSubscription":{"subId":"sub-LzNr62ED50GbZL_S"},"SerAvailabilitySubscription:":{"subId":"sub-Ec2tT-tKAe_qLxI7"}},"offeredService":{"serName":"demo5","id":"2ad0e566-2054-4550-ba97-1fe1f100fff0","state":"ACTIVE","scopeOfLocality":"MEC_SYSTEM","consumedLocalOnly":true},"discoveredServices":[{"serName":"meep-dai","serInstanceId":"70bb83a5-7ec7-4ab4-b889-ca7033a5be2b","consumedLocalOnly":true,"link":"http://mec-platform.etsi.org/usersb/dev_app/v1/","version":"2.0"},{"serName":"meep-rnis","serInstanceId":"3e72aa67-ff20-4e7e-bf21-aea928a1743b","consumedLocalOnly":true,"link":"http://mec-platform.etsi.org/usersb/rni/v2/","version":"2.0"},{"serName":"meep-ams","serInstanceId":"99e8a85d-5f87-48ed-be5e-1302c18e4664","consumedLocalOnly":true,"link":"http://mec-platform.etsi.org/usersb/amsi/v1/","version":"2.0"},{"serName":"meep-loc-serv","serInstanceId":"85ddf74d-d5e7-4d6f-beb5-25e97f8b57c9","consumedLocalOnly":true,"link":"http://mec-platform.etsi.org/usersb/location/v2/","version":"2.0"},{"serName":"meep-vis","serInstanceId":"3e23a210-8b1a-4a01-bc0c-1df7d1ad6be3","consumedLocalOnly":true,"link":"http://mec-platform.etsi.org/usersb/vis/v2/","version":"2.0"},{"serName":"meep-wais","serInstanceId":"a22f614e-a5c1-4902-84d3-4361ac9e3425","consumedLocalOnly":true,"link":"http://mec-platform.etsi.org/usersb/wai/v2/","version":"2.0"}]}
```

The requets `GET /info/logs` provides some executon logs for the demo5 application.
```sh
$ curl "http://mec-platform.etsi.org:31111/info/logs" -H "accept: application/json"
["5. demo5DaiAppListGET: applicationList succeed, len= 1","4. daiClient instance created","3. Subscribe to service-availability notification [201]","2. Subscribe to app-termination notification [201]","1. === Register Demo5 MEC Application [200]","0. Send confirm ready [204]"]
```

## Using Demo5


### Using Demo5 with AdvantEDGE

To use Demo5 as an AdvantEDGE scenario container:

- Build & dockerize Demo5 server & frontend
- Import the provided scenario demo5-scenario.yaml
- Create a sandbox & deploy Demo5 scenario
- Start Demo5 application frontend in browser

#### Build from source
To build demo5 & onboarded-demo5 from source code:
```sh
$ cd ~/AdvantEDGE/examples/demo5 
$ ./build-demo5.sh
```

NOTE: Binary files are created in ./bin/ folder

#### Dockerize demo applications
Demo Application binaries must be dockerized (containerized) as container images in the Docker registry. This step is necessary every time the demo binaries are updated.

NOTE: Make sure you have deployed the AdvantEDGE dependencies (e.g. docker registry) before dockerizing the demo binaries.

To generate docker images from demo binary files:

```sh
$ cd ~/AdvantEDGE/examples/demo5
$ ./dockerize.sh
```

### Using Demo5 with ETSI MEC Sandbox

To use Demo5 as an external application that interacts with the ETSI MEC Sandbox

- Build Demo5 server & frontend
- Log in to the [ETSI MEC Sandbox](https://try-mec.etsi.org)
- Deploy either of the dual-mep scenarios
- Configure Demo5 application instances
- Start Demo5 application instances
- Demo5 does not have prior knowledge or configuration information of the MEC services offered by the MEC platform.

Therefore, the following steps need to be done prior to running Demo5 application instances.

#### Obtain demo binaries
Use the same procedure described above for Demo5 with AdvantEDGE.

#### Create work directory for demo5 instance
Create a work directory of your choice on the system (e.g. ~/tmp/demo5) and copy the files ~/AdvantEDGE/examples/demo5/src/demo-server/demo5-config.yaml and ~/AdvantEDGE/examples/demo5/bin/demo-server/demo-server.

The structure should look like this:

```
~/tmp/demo5
     |
     \____ demo5-config.yaml
     |
     \____ demo-server
```

Update the configuration file demo5-config.yaml accordingly and launcg the demo application:

```sh
$ ./demo-server ./demo5-config.yaml
```

examples/demo5/build-demo5.sh

deleted100755 → 0
+0 −25
Original line number Diff line number Diff line
#!/bin/bash

# Get full path to script directory
SCRIPT=$(readlink -f "$0")
BASEDIR=$(dirname "$SCRIPT")

#echo ""
#echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
#echo ">>> Building Demo Service Frontend"
#echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
#echo ""
#$BASEDIR/src/client/build.sh
#$BASEDIR/src/frontend/build.sh

DEMOBIN=$BASEDIR/bin/demo-server

echo ""
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ">>> Building Demo 5 Go Server"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ""
$BASEDIR/src/backend/build.sh $DEMOBIN

echo ""
echo ">>> Demo Service build completed"

examples/demo5/demo5-config.yaml

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
# This file defines the configuration of Demo5 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
mode: 'sandbox'
# Set url of mec platform. Example field format: http://{MEC_IP_ADDRESS}/{SANDBOX_NAME}/{MEP_NAME}/ 
sandbox: 'http://'
# Set if sandbox url uses https. Expected fields: true | false 
https: false 
# Set the mec platform name demo-5 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-5. 
localurl: 'http://'
# Set host port number of demo-5. Example field: '8093'
port: '8093'
+0 −292
Original line number Diff line number Diff line
version: 1.9.0
name: demo5
deployment:
    netChar:
        latency: 50
        latencyVariation: 10
        latencyDistribution: Normal
        throughputDl: 1000
        throughputUl: 1000
    connectivity:
        model: OPEN
    d2d:
        d2dMaxDistance: 100
    domains:
        -
            id: PUBLIC
            name: PUBLIC
            type: PUBLIC
            netChar:
                latency: 6
                latencyVariation: 2
                throughputDl: 1000
                throughputUl: 1000
            zones:
                -
                    id: PUBLIC-COMMON
                    name: PUBLIC-COMMON
                    type: COMMON
                    netChar:
                        latency: 5
                        latencyVariation: 1
                        throughputDl: 1000
                        throughputUl: 1000
                    networkLocations:
                        -
                            id: PUBLIC-COMMON-DEFAULT
                            name: PUBLIC-COMMON-DEFAULT
                            type: DEFAULT
                            netChar:
                                latency: 1
                                latencyVariation: 1
                                throughputDl: 1000
                                throughputUl: 1000
        -
            id: d97497c9-6544-459a-a7b9-43c591e9a35d
            name: operator-cell1
            type: OPERATOR-CELLULAR
            netChar:
                latency: 6
                latencyVariation: 2
                throughputDl: 1000
                throughputUl: 1000
                packetLoss: 0
            zones:
                -
                    id: operator-cell1-COMMON
                    name: operator-cell1-COMMON
                    type: COMMON
                    netChar:
                        latency: 5
                        latencyVariation: 1
                        throughputDl: 1000
                        throughputUl: 1000
                        packetLoss: 0
                    networkLocations:
                        -
                            id: operator-cell1-COMMON-DEFAULT
                            name: operator-cell1-COMMON-DEFAULT
                            type: DEFAULT
                            netChar:
                                latency: 1
                                latencyVariation: 1
                                throughputDl: 1000
                                throughputUl: 1000
                                packetLoss: 0
                            geoData: null
                            physicalLocations: []
                -
                    id: 85a5fd79-da6a-4465-8e01-78205dad4ac3
                    name: zone1
                    type: ZONE
                    netChar:
                        latency: 5
                        latencyVariation: 1
                        throughputDl: 1000
                        throughputUl: 1000
                        packetLoss: 0
                    networkLocations:
                        -
                            id: zone1-DEFAULT
                            name: zone1-DEFAULT
                            type: DEFAULT
                            netChar:
                                latency: 1
                                latencyVariation: 1
                                throughputDl: 1000
                                throughputUl: 1000
                                packetLoss: 0
                            geoData: null
                            physicalLocations:
                                -
                                    id: bacfc3ff-72c7-43cd-b34c-1b0b8f6bf11f
                                    name: edge1
                                    type: EDGE
                                    isExternal: false
                                    connected: true
                                    wireless: false
                                    wirelessType: ""
                                    netChar:
                                        latency: 0
                                        latencyVariation: 0
                                        throughputDl: 1000
                                        throughputUl: 1000
                                        packetLoss: 0
                                    dataNetwork:
                                        dnn: edn
                                        ladn: false
                                        ecsp: ""
                                    geoData:
                                        location:
                                            type: Point
                                            coordinates:
                                                - 7.421096
                                                - 43.73408
                                    macId: ""
                                    processes:
                                        -
                                            id: abfc981e-9be2-4350-a56c-bec1f0e32a4d
                                            name: demo5-edge1
                                            type: EDGE-APP
                                            isExternal: false
                                            userChartLocation: null
                                            userChartAlternateValues: null
                                            userChartGroup: null
                                            image: 'meep-docker-registry:30001/demo5'
                                            environment: ""
                                            commandArguments: ""
                                            commandExe: ""
                                            serviceConfig:
                                                name: demo5-edge1
                                                meSvcName: demo5
                                                ports:
                                                    -
                                                        protocol: TCP
                                                        port: 81
                                                        externalPort: 31112
                                            gpuConfig: null
                                            cpuConfig: null
                                            memoryConfig: null
                                            externalConfig: null
                                            netChar:
                                                latency: 0
                                                latencyVariation: 0
                                                throughputDl: 1000
                                                throughputUl: 1000
                                                packetLoss: 0
                                            placementId: ""
                        -
                            id: 74d1660e-4673-4779-9968-6eb1dc436893
                            name: poa-5g1
                            type: POA-5G
                            netChar:
                                latency: 1
                                latencyVariation: 1
                                throughputDl: 1000
                                throughputUl: 1000
                                packetLoss: 0
                            physicalLocations:
                                -
                                    id: 2f433ac8-0723-439b-bdab-7a4b684b1d4d
                                    name: 10.10.20.01
                                    type: UE
                                    isExternal: false
                                    connected: true
                                    wireless: true
                                    wirelessType: 'wifi,5g,4g,other'
                                    netChar:
                                        latency: 0
                                        latencyVariation: 0
                                        throughputDl: 1000
                                        throughputUl: 1000
                                        packetLoss: 0
                                    dataNetwork:
                                        dnn: ""
                                        ladn: false
                                        ecsp: ""
                                    geoData:
                                        location:
                                            type: Point
                                            coordinates:
                                                - 7.420433
                                                - 43.729942
                                        path:
                                            type: LineString
                                            coordinates:
                                                -
                                                    - 7.420433
                                                    - 43.729942
                                                -
                                                    - 7.420659
                                                    - 43.73036
                                                -
                                                    - 7.420621
                                                    - 43.731045
                                                -
                                                    - 7.420922
                                                    - 43.73129
                                                -
                                                    - 7.421345
                                                    - 43.731373
                                                -
                                                    - 7.42135
                                                    - 43.73168
                                                -
                                                    - 7.421148
                                                    - 43.73173
                                                -
                                                    - 7.420616
                                                    - 43.731964
                                                -
                                                    - 7.419779
                                                    - 43.732197
                                                -
                                                    - 7.419111
                                                    - 43.732353
                                                -
                                                    - 7.418931
                                                    - 43.732315
                                                -
                                                    - 7.418345
                                                    - 43.731964
                                                -
                                                    - 7.418319
                                                    - 43.73186
                                                -
                                                    - 7.418024
                                                    - 43.73179
                                                -
                                                    - 7.41796
                                                    - 43.731728
                                                -
                                                    - 7.417729
                                                    - 43.731743
                                                -
                                                    - 7.417463
                                                    - 43.731632
                                                -
                                                    - 7.417507
                                                    - 43.73148
                                                -
                                                    - 7.417428
                                                    - 43.731407
                                                -
                                                    - 7.417343
                                                    - 43.731396
                                                -
                                                    - 7.417334
                                                    - 43.731133
                                                -
                                                    - 7.417317
                                                    - 43.73053
                                                -
                                                    - 7.417164
                                                    - 43.7304
                                                -
                                                    - 7.417164
                                                    - 43.72998
                                                -
                                                    - 7.417319
                                                    - 43.729916
                                                -
                                                    - 7.419065
                                                    - 43.730103
                                        eopMode: REVERSE
                                        velocity: 30
                                    macId: DEADBEEF0001
                                    processes: []
                            poa5GConfig:
                                cellId: '1010101'
                            geoData:
                                location:
                                    type: Point
                                    coordinates:
                                        - 7.416715
                                        - 43.733616
                                radius: 400
                    meta:
                        display.map.color: '#6612EC'
            cellularDomainConfig:
                mcc: '001'
                mnc: '002'
                defaultCellId: CAFEDEC

examples/demo5/dockerize.sh

deleted100755 → 0
+0 −33
Original line number Diff line number Diff line
#!/bin/bash

#set -vx

# Get full path to script directory
SCRIPT=$(readlink -f "$0")
BASEDIR=$(dirname "$SCRIPT")

echo ""
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ">>> Dockerizing demo5 Server"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ""

DEMOBIN=$BASEDIR/bin/demo-server

# Copy frontend to static folder
#echo ">>> Copying Demo Server"
#cp -Rf $BASEDIR/bin/demo-frontend/* $DEMOBIN/static

# Copy Dockerfile & config to bin folder
cp $BASEDIR/src/backend/Dockerfile $DEMOBIN
# cp $BASEDIR/src/backend/app_instance.yaml $DEMOBIN
cp $BASEDIR/entrypoint.sh $DEMOBIN

echo ">>> Dockerizing"
cd $DEMOBIN
docker build --no-cache --rm -t meep-docker-registry:30001/demo5 .
docker push meep-docker-registry:30001/demo5
cd $BASEDIR

echo ""
echo ">>> Done"
Loading