From 4567be257e7456a3e15e9c02f24b7eda2912d947 Mon Sep 17 00:00:00 2001 From: garciay Date: Sun, 19 Apr 2020 10:01:41 +0200 Subject: [PATCH] Add configuration file for ETSI LEWIS platform --- docker/Dockerfile.stfubuntu | 11 +- docker/README.md | 24 ++--- docker/build.sh | 2 +- docker/home/etc/init.d/10-titan.sh | 11 +- docker/run.sh | 2 +- etc/AtsMec/AtsMec_AdvantEDGE.cf_ | 8 +- etc/AtsMec/AtsMec_Lewis.cf_ | 155 +++++++++++++++++++++++++++++ 7 files changed, 184 insertions(+), 29 deletions(-) create mode 100644 etc/AtsMec/AtsMec_Lewis.cf_ diff --git a/docker/Dockerfile.stfubuntu b/docker/Dockerfile.stfubuntu index f53176f..74ca510 100644 --- a/docker/Dockerfile.stfubuntu +++ b/docker/Dockerfile.stfubuntu @@ -50,6 +50,7 @@ RUN echo "docker-STF-dev" > /etc/hostname \ ntp \ oracle-java14-installer \ oracle-java14-set-default \ + openssh-server \ pkg-config \ python3-dev \ python3-pip \ @@ -84,9 +85,17 @@ RUN echo "docker-STF-dev" > /etc/hostname \ && echo 'cd ${HOME}' >> /etc/profile \ && echo ". ./devenv.bash" >> /etc/profile \ && cd /home/etsi \ - && mkdir -p bin lib include tmp frameworks docs man dev src \ + && echo "" >> ./.profile \ + && echo 'export HOME=/home/etsi' >> ./.profile \ + && echo 'export LD_LIBRARY_PATH=${HOME}/lib:$LD_LIBRARY_PATH' >> ./.profile \ + && echo 'export PATH=${HOME}/bin:$PATH' >> ./.profile \ + && echo 'cd ${HOME}' >> ./.profile \ + && echo ". ./devenv.bash" >> ./.profile \ + && mkdir -p bin lib include tmp frameworks docs man dev \ && chown -R etsi:etsi * +EXPOSE 22 + CMD ["/bin/bash"] # That's all Floks diff --git a/docker/README.md b/docker/README.md index 25d2f47..9277651 100644 --- a/docker/README.md +++ b/docker/README.md @@ -36,7 +36,7 @@ There are several build stages: 6. Build ASN.1 recoder library 7. Build certificate generation tool -## Import and build ITS project +## Import and build MEC project ### Run Docker image @@ -45,14 +45,14 @@ There are several build stages: 1. Authorize Docker container to interact with the XServer: Go to the X Server installation directory and add the Docker container ip address to the file ```X0.hosts```: ``` -localhost -inet6:localhost -192.168.99.100 +localhost +inet6:localhost +192.168.99.100 ``` Execute ```run.cmd``` or launch a command line window and run the command -```docker run -it --net=host -e DISPLAY=192.168.99.1:0 stf569_its:latest``` +```docker run -it --net=host -e DISPLAY=192.168.99.1:0 stf569_mec:latest``` NOTE: Modify the IP address in the command for the address of 'VirtualBox Hot-Only Network'. @@ -62,7 +62,7 @@ Execute ```run.sh``` or launch a command line window and run the command ```sh docker run -it --net=host -e DISPLAY=$DISPLAY \ --v /tmp/.X11-unix:/tmp/.X11-unix stf569_its:latest +-v /tmp/.X11-unix:/tmp/.X11-unix stf569_mec:latest ``` ### Import eclipse project @@ -76,7 +76,7 @@ docker run -it --net=host -e DISPLAY=$DISPLAY \ - eclipse not found: check the PATH environment variable. It shall contain $HOME/bin path. Otherwise add it: ```export PATH=$HOME/bin:$PATH``` -2. Run "File -> Import" and import the ```~/dev/STF569_Its/STF569.tpd``` file. +2. Run "File -> Import" and import the ```~/dev/STF569_Mec/STF569.tpd``` file. This can take a time, be patient. **Do not run build in eclipse**, we don't have enough time. @@ -94,14 +94,6 @@ Possible problems: ### Execute tests 1. Launch eclipse: ```eclipse -data ~/dev/Workspace``` 2. Select configuration from the /etc/folder: - - AtsCAM/AtsCAM.cfg - CAM test suite. - - AtsDENM/AtsDENM.cfg - DENM test suite. - - AtsGenCert/AtsGenCert.cfg - Certificate generator - - AtsGeoNetworking/AtsGeoNetworking.cfg - GeoNetworking test suite - - AtsIVIM/AtsIVIM.cfg - - AtsMapemSpatem/AtsMapemSpatem.cfg - - AtsRSUsSimulator/AtsRSUSimulator.cfg - - AtsSecurity/AtsSecurity.cfg - - AtsSremSsem/AtsSremSsem.cfg + - AtsMec.cfg - Default MEC test suite. 3. Right-click on the configuration file and select **Run As -> TITAN Parallel launcher** diff --git a/docker/build.sh b/docker/build.sh index d911ee3..cd64dbe 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright ETSI 2018 +# Copyright ETSI 2018-2020 # See: https://forge.etsi.org/etsi-forge-copyright-statement.txt set -e diff --git a/docker/home/etc/init.d/10-titan.sh b/docker/home/etc/init.d/10-titan.sh index 6c59653..51d5c0a 100755 --- a/docker/home/etc/init.d/10-titan.sh +++ b/docker/home/etc/init.d/10-titan.sh @@ -4,14 +4,15 @@ set -vx echo -e "*****************************\n* Install titan\n*****************************\n" -SRC_DIR=${HOME}/src/titan -export TTCN3_DIR=$HOME/frameworks/titan +SRC_DIR=${HOME}/frameworks/titan/titan.core +export TTCN3_DIR=$HOME/frameworks/titan/Install + [ -f /usr/bin/java ] && export JAVA_HOME=`readlink -f /usr/bin/java | sed "s:bin/java::"` TITAN_REPO=`cat ${HOME}/etc/titan_repos.txt | grep 'titan\.core\.git' | head -n 1` export PATH=$PATH:$TTCN3_DIR/bin mkdir -p "$SRC_DIR" -cd "$SRC_DIR" || exit 1 +cd "$SRC_DIR/.." || exit 1 echo "export TTCN3_DIR=$TTCN3_DIR" >> $HOME/.bashrc echo "export PATH=\$PATH:\$TTCN3_DIR/bin" >> $HOME/.bashrc @@ -19,7 +20,6 @@ echo "export PATH=\$PATH:\$TTCN3_DIR/bin" >> $HOME/.bashrc # Install titan core git clone --progress "$TITAN_REPO" || exit 1 -mkdir -p "$TTCN3_DIR" cd titan.core || exit 1 cat >Makefile.personal <