Commit 87aa9406 authored by Yann Garcia's avatar Yann Garcia
Browse files

Starting update of demo9 to reflect python tutorial; bug fixed in demo6

parent 4abc2a36
Loading
Loading
Loading
Loading
+6 −6
Changes for examples/demo6/golang/README.md: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -11,16 +11,16 @@ There is two ways to build demo6 application:

```sh
~$ docker pull golang
~$ cd ~/AdvantEDGE/examples/demo6 
~/AdvantEDGE/examples/demo6$ docker_build.sh
~$ cd ~/etsi-mec-sandbox/examples/demo6 
~/etsi-mec-sandbox/examples/demo6$ docker_build.sh
```

- Manually:

```sh
~$ docker pull golang
~$ cd ~/AdvantEDGE/examples/demo6 
~/AdvantEDGE/examples/demo6$ docker run --rm -it -v$PWD:/opt/local/etsi/demo6 golang
~$ cd ~/etsi-mec-sandbox/examples/demo6 
~/etsi-mec-sandbox/examples/demo6$ docker run --rm -it -v$PWD:/opt/local/etsi/demo6 golang
root@56c7b1ce74ca:/go# cd /opt/local/etsi/demo6
root@56c7b1ce74ca:/opt/local/etsi/demo6# go run ./main.go
```
@@ -30,8 +30,8 @@ root@56c7b1ce74ca:/opt/local/etsi/demo6# go run ./main.go
The demo6 application can be executed using the script run.sh:

```sh
~$ cd ~/AdvantEDGE/examples/demo6 
~/AdvantEDGE/examples/demo6$ docker_run.sh
~$ cd ~/etsi-mec-sandbox/examples/demo6 
~/etsi-mec-sandbox/examples/demo6$ docker_run.sh
```

# Menu description
+2 −1
Changes for examples/demo6/golang/docker_run.sh: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@ set -e
set +x

docker pull golang
docker run --rm --expose 80 --expose 443 --publish 80:80 --publish 443:443 -it -v$PWD:/opt/local/etsi/demo6  -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml"
#docker run --rm --expose 80 --expose 443 --publish 80:80 --publish 443:443 -it -v$PWD:/opt/local/etsi/demo6  -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml"
docker run --rm -it -v$PWD:/opt/local/etsi/demo6  -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml"

echo ""
echo ">>> Done"
+3 −1
Changes for examples/demo7/Dockerfile: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ FROM ubuntu:22.04
COPY ./fsmsggen /fsmsggen
COPY ./entrypoint.sh /entrypoint.sh

RUN apt-get update && apt-get install -y curl libjson-c-dev libgps-dev libpcap-dev libssl-dev && chmod +x /entrypoint.sh && chmod +x /fsmsggen
RUN apt-get update && apt-get install -y curl libjson-c-dev libgps-dev libpcap-dev libssl-dev mosquitto-clients && chmod +x /entrypoint.sh && chmod +x /fsmsggen

EXPOSE 1883

ENTRYPOINT ["/entrypoint.sh"]
+2 −0
Changes for examples/demo7/entrypoint.sh: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -21,5 +21,7 @@
set -e
set +vx

echo "Waiting for MEC plateform started and stable..."
sleep 30 # Wait for MEC plateform started and stable
echo "Starting '/fsmsggen ${COMM} ${GLOBAL} ${SEC_MODE} ${COMM_MODE} ${BEACON} ${CAM} ${DENM} ${VERBOSE}'"
/fsmsggen ${COMM} ${GLOBAL} ${SEC_MODE} ${BEACON} ${CAM} ${DENM} ${VERBOSE}
 No newline at end of file
+9 −14
Changes for examples/demo9/golang/README.md: 9 added lines, 14 removed lines.
Original line number Diff line number Diff line
Demo9 is a MEC application to illustrate the usage of the MEC Sandbox command line APIs.
Demo9 is a MEC application to illustrate the joint usage of the ETSI MEC platform and oneM2M platform.

# How to use it

## Building the demo9 application

go version 1.18+ is required to build demo 6
go version 1.18+ is required to build demo 9

There is two ways to build demo9 application:
- Using the docker_build.sh script

```sh
~$ docker pull golang
~$ cd ~/AdvantEDGE/examples/demo9 
~/AdvantEDGE/examples/demo9$ docker_build.sh
~$ cd ~/etsi-mec-sandbox/examples/demo9 
~/etsi-mec-sandbox/examples/demo9$ docker_build.sh
```

- Manually:

```sh
~$ docker pull golang
~$ cd ~/AdvantEDGE/examples/demo9 
~/AdvantEDGE/examples/demo9$ docker run --rm -it -v$PWD:/opt/local/etsi/demo9 golang
~$ cd ~/etsi-mec-sandbox/examples/demo9 
~/etsi-mec-sandbox/examples/demo9$ docker run --rm -it -v$PWD:/opt/local/etsi/demo9 golang
root@56c7b1ce74ca:/go# cd /opt/local/etsi/demo9
root@56c7b1ce74ca:/opt/local/etsi/demo9# go run ./main.go
```
@@ -30,8 +30,8 @@ root@56c7b1ce74ca:/opt/local/etsi/demo9# go run ./main.go
The demo9 application can be executed using the script run.sh:

```sh
~$ cd ~/AdvantEDGE/examples/demo9 
~/AdvantEDGE/examples/demo9$ docker_run.sh
~$ cd ~/etsi-mec-sandbox/examples/demo9 
~/etsi-mec-sandbox/examples/demo9$ docker_run.sh
```

# Menu description
@@ -40,13 +40,8 @@ Below is the menu proposed by the demo9 application:

```sh
Mandatory commands:
        l: Login, n: Get Namespace, L: Logout, s: Get scenarios list
        a <index>: Activate a scenario, A: Terminate a scenario
        l: Login, L: Logout
Optional commands:
        S <index>: Get scenario description
        m: Get MEC application services list
        i: Get application instances list, c: Create a new application instance, C: Delete a new application instance
        u: Get UEs, x <index>: Increase UE, X <index>: Decrease UE
        T: Current status:
MEC 011 App Support:
        y: Send ConfirmReady, r: Send Registration, R: Send Deregistration
Loading