Commit a43dbb7a authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance demo6

parent 3ed55fff
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -2,8 +2,21 @@ Demo 6 is a MEC application to illustrate the usage of the MEC Sandbox command l

# How to use it

## Building the demo6 application

go version 1.18+ is required to build demo 6

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

```sh
~$ docker pull golang
~$ cd ~/AdvantEDGE/examples/demo6 
~/AdvantEDGE/examples/demo6$ docker_build.sh
```

- Manually:

```sh
~$ docker pull golang
~$ cd ~/AdvantEDGE/examples/demo6 
@@ -12,6 +25,15 @@ root@56c7b1ce74ca:/go# cd /opt/local/etsi/demo6
root@56c7b1ce74ca:/opt/local/etsi/demo6# go run ./main.go
```

## Executing the demo6 application

The demo6 application can be executed using the script run.sh:

```sh
~$ cd ~/AdvantEDGE/examples/demo6 
~/AdvantEDGE/examples/demo6$ docker_run.sh
```

# Menu description

Below is the menu proposed by the demo6 application:
+16 −0
Original line number Diff line number Diff line
#!/bin/bash

set -e
set -x

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

DEMOBIN=$BASEDIR/bin/demo6

docker pull golang
docker run --rm -it -v$PWD:/opt/local/etsi/demo6 golang bash -c "cd /opt/local/etsi/demo6 && ./build-demo6.sh"

echo ""
echo ">>> Demo Service build completed"
+16 −0
Original line number Diff line number Diff line
#!/bin/bash

set -e
set -x

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

DEMOBIN=$BASEDIR/bin/demo6

docker pull golang
docker run --rm -it -v$PWD:/opt/local/etsi/demo6 golang bash -c "cd /opt/local/etsi/demo6 && ./build-demo6.sh"

echo ""
echo ">>> Demo Service build completed"
+10 −0
Original line number Diff line number Diff line
#!/bin/bash

set -e
set +x

docker pull golang
docker run --rm -it -v$PWD:/opt/local/etsi/demo6 golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6"

echo ""
echo ">>> Done"

examples/demo6/run.sh

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

set -e
set +x

docker run -it --rm meep-docker-registry:30001/demo6 /bin/bash

echo ""
echo ">>> Done"