Commit 4567be25 authored by Yann Garcia's avatar Yann Garcia
Browse files

Add configuration file for ETSI LEWIS platform

parent dcd3762b
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -50,6 +50,7 @@ RUN echo "docker-STF-dev" > /etc/hostname \
      ntp \
      ntp \
      oracle-java14-installer \
      oracle-java14-installer \
      oracle-java14-set-default \
      oracle-java14-set-default \
      openssh-server \
      pkg-config \
      pkg-config \
      python3-dev \
      python3-dev \
      python3-pip \
      python3-pip \
@@ -84,9 +85,17 @@ RUN echo "docker-STF-dev" > /etc/hostname \
    && echo 'cd ${HOME}' >> /etc/profile \
    && echo 'cd ${HOME}' >> /etc/profile \
    && echo ". ./devenv.bash" >> /etc/profile \
    && echo ". ./devenv.bash" >> /etc/profile \
    && cd /home/etsi \
    && 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 *
    && chown -R etsi:etsi *


EXPOSE 22

CMD ["/bin/bash"]
CMD ["/bin/bash"]


# That's all Floks
# That's all Floks
+8 −16
Original line number Original line Diff line number Diff line
@@ -36,7 +36,7 @@ There are several build stages:
6. Build ASN.1 recoder library
6. Build ASN.1 recoder library
7. Build certificate generation tool
7. Build certificate generation tool


## Import and build ITS project
## Import and build MEC project


### Run Docker image
### Run Docker image


@@ -52,7 +52,7 @@ inet6:localhost


Execute ```run.cmd``` or launch a command line window and run the command
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'.
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
```sh
docker run -it --net=host -e DISPLAY=$DISPLAY \
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
### 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:
   - eclipse not found: check the PATH environment variable. It shall contain $HOME/bin path. Otherwise add it:
     ```export PATH=$HOME/bin:$PATH```
     ```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.
   This can take a time, be patient.
   **Do not run build in eclipse**, we don't have enough time.
   **Do not run build in eclipse**, we don't have enough time.
@@ -94,14 +94,6 @@ Possible problems:
### Execute tests
### Execute tests
1. Launch eclipse: ```eclipse -data ~/dev/Workspace```
1. Launch eclipse: ```eclipse -data ~/dev/Workspace```
2. Select configuration from the /etc/folder:
2. Select configuration from the /etc/folder:
 - AtsCAM/AtsCAM.cfg                     - CAM test suite.
 - AtsMec.cfg                     - Default MEC 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
3. Right-click on the configuration file and select **Run As -> TITAN Parallel launcher**
3. Right-click on the configuration file and select **Run As -> TITAN Parallel launcher**
+1 −1
Original line number Original line Diff line number Diff line
#!/bin/bash
#!/bin/bash
# Copyright ETSI 2018
# Copyright ETSI 2018-2020
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt


set -e
set -e
+5 −6
Original line number Original line Diff line number Diff line
@@ -4,14 +4,15 @@
set -vx
set -vx


echo -e "*****************************\n* Install titan\n*****************************\n"
echo -e "*****************************\n* Install titan\n*****************************\n"
SRC_DIR=${HOME}/src/titan
SRC_DIR=${HOME}/frameworks/titan/titan.core
export TTCN3_DIR=$HOME/frameworks/titan
export TTCN3_DIR=$HOME/frameworks/titan/Install

[ -f /usr/bin/java ] &&  export JAVA_HOME=`readlink -f /usr/bin/java | sed "s:bin/java::"`
[ -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`
TITAN_REPO=`cat ${HOME}/etc/titan_repos.txt | grep 'titan\.core\.git' | head -n 1`
export PATH=$PATH:$TTCN3_DIR/bin
export PATH=$PATH:$TTCN3_DIR/bin


mkdir -p "$SRC_DIR"
mkdir -p "$SRC_DIR"
cd "$SRC_DIR" || exit 1
cd "$SRC_DIR/.." || exit 1


echo "export TTCN3_DIR=$TTCN3_DIR" >> $HOME/.bashrc
echo "export TTCN3_DIR=$TTCN3_DIR" >> $HOME/.bashrc
echo "export PATH=\$PATH:\$TTCN3_DIR/bin" >> $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
# Install titan core
git clone --progress "$TITAN_REPO" || exit 1
git clone --progress "$TITAN_REPO" || exit 1


mkdir -p "$TTCN3_DIR"
cd titan.core || exit 1
cd titan.core || exit 1
cat >Makefile.personal <<EOF
cat >Makefile.personal <<EOF
TTCN3_DIR=$TTCN3_DIR
TTCN3_DIR=$TTCN3_DIR
@@ -33,8 +33,7 @@ EOF
make && make install || exit 1
make && make install || exit 1


# Install other repos
# Install other repos
mkdir -p $TTCN3_DIR/../titan-modules
cd $SRC_DIR/.. || exit 1
cd $TTCN3_DIR/../titan-modules || exit 1
cat ${HOME}/etc/titan_repos.txt | grep -v -e '^\s*#' -e 'titan\.core' | while read REPO; do
cat ${HOME}/etc/titan_repos.txt | grep -v -e '^\s*#' -e 'titan\.core' | while read REPO; do
  [ -z $ $REPO ] && continue
  [ -z $ $REPO ] && continue
  WS=`echo $REPO | sed -e 's|.*/||g' -e 's|\.git||g'`
  WS=`echo $REPO | sed -e 's|.*/||g' -e 's|\.git||g'`
+1 −1
Original line number Original line Diff line number Diff line
@@ -5,7 +5,7 @@
#set -e
#set -e
set -vx
set -vx


docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --cap-add=NET_RAW --cap-add=NET_ADMIN  stf569_mec:latest
docker run --interactive --tty --rm --publish 2222:22 --env DISPLAY=$DISPLAY --volume /tmp/.X11-unix:/tmp/.X11-unix --cap-add=NET_RAW --cap-add=NET_ADMIN stf569_mec:latest


# That's all Floks
# That's all Floks
exit 0
exit 0
Loading