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

Enhance virtualization/docker procedure

parent 9453ef1e
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -85,17 +85,17 @@ Procedure on the host machine:
- Clone the ETSI CISE Test System

```sh
$ git clone --recurse-submodules --branch --branch stf637 https://forge.etsi.org/rep/cdm/cise-data-model ./cise-devel
$ cd /home/etsi/dev/cise-devel/titan-test-system-framework
$ git clone --recurse-submodules --branch stf637 https://forge.etsi.org/rep/cdm/cise-data-model ./cise-data-model
$ cd /home/etsi/dev/cise-data-model/titan-test-system-framework
$ git checkout devel
$ cd /home/etsi/dev/cise-devel/titan-test-system-framework/ttcn/LibHttp
$ cd /home/etsi/dev/cise-data-model/titan-test-system-framework/ttcn/LibHttp
$ ln -sf module_cise.mk module.mk
```

- Patch the LibCommon

```sh
$ cd /home/etsi/dev/cise-devel
$ cd /home/etsi/dev/cise-data-model
$ cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/
$ cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn
```
@@ -103,7 +103,7 @@ $ cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn
- From the ETSI CISE Test System root directory, build the Docker image executing the following commands:

```sh
$ cd /home/etsi/dev/cise-devel/virtualization/docker
$ cd /home/etsi/dev/cise-data-model/virtualization/docker
$ docker build --no-cache --tag alpine-cise -f Dockerfile --force-rm .
$ docker images
```
@@ -289,22 +289,22 @@ Procedure:
- Clone the ETSI CISE Test System into $HOME/dev folder

```sh
$ git clone --recurse-submodules --branch --branch stf637 https://forge.etsi.org/rep/cdm/cise-data-model ./cise-devel
$ cd /home/etsi/dev/cise-devel/titan-test-system-framework
$ git clone --recurse-submodules --branch --branch stf637 https://forge.etsi.org/rep/cdm/cise-data-model ./cise-data-model
$ cd /home/etsi/dev/cise-data-model/titan-test-system-framework
$ git checkout devel
$ cd /home/etsi/dev/cise-devel/titan-test-system-framework/ttcn/LibHttp
$ cd /home/etsi/dev/cise-data-model/titan-test-system-framework/ttcn/LibHttp
$ ln -sf module_cise.mk module.mk
```

- Apply patches

```sh
$ cd /home/etsi/dev/cise-devel
$ cd /home/etsi/dev/cise-data-model
$ cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/
$ cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn/
```

- Update your default environment with the content of the script $HOME/dev/cise-devel/scripts/devenv.bash.ubuntu
- Update your default environment with the content of the script $HOME/dev/cise-data-model/scripts/devenv.bash.ubuntu

- Switch to the next clause (Usage)

@@ -344,16 +344,16 @@ Procedure using Eclipse TITAN:
- Start eclipse using a new workspace, (e.g. with the name workspace_titan)
- Download and follow the steps to install Eclipse plugins for TITAN, accessible [here]{https://www.eclipse.org/downloads/download.php?file=/titan/Eclipse_installationguide.pdf}
- Open the workspace_titan
- Create a new TITAN project (e.g. cise-devel)
- Create a new TITAN project (e.g. cise-data-model)
<TODO>

Procedure in TITAN command line:
- Open several SSH session (PuTTY...)
- Change to the directory ~/dev/cise-devel/src/AtsCise/objs
- Change to the directory ~/dev/cise-data-model/src/AtsCise/objs
- Build the test suite AtsCise

```sh
$ cd ~/dev/cise-devel/ && export ATS=AtsCise
$ cd ~/dev/cise-data-model/ && export ATS=AtsCise
$ make
...
```
@@ -365,7 +365,7 @@ $ make
- To run the test suite, execute the following command:

```sh
$ cd ~/dev/cise-devel/scripts/
$ cd ~/dev/cise-data-model/scripts/
$ ./run-all.bash
...
```
+1 −1
Original line number Diff line number Diff line
TTCN3_COMPILER_OPTIONS := -b -d -e -f -g -l -L -M -O -R -U none -x
TTCN3_DIR      := /home/yann/frameworks/titan-8.1.0
#TTCN3_DIR      := /home/yann/frameworks/titan-8.1.0
#WPCAP_DLL_PATH := /cygdrive/c/windows/system32/npcap/wpcap.dll
#NPCAP_INCLUDE  := /cygdrive/c/PROGRA~1/Npcap/sdk/include
T3Q_PATH=./tools/t3q-v2.0.0b30
+5 −5
Original line number Diff line number Diff line
@@ -4,12 +4,12 @@ set -exo pipefail
cd "$(dirname ${BASH_SOURCE})"

docker run --rm -it \
        -w /home/yann/dev/cise \
        -e GEN_DIR=/home/yann/dev/cise \
        -w /home/$USER/dev/cise-data-model \
        -e GEN_DIR=/home/$USER/dev/cise-data-model \
        -u "$(id -u):$(id -g)" \
        -v "${PWD}/../..:/home/yann/dev/cise" \
        -v "${PWD}/../..:/home/$USER/dev/cise-data-model" \
        -p 0.0.0.0:30181:30181 \
        --mount type=bind,source=/home/yann/var,target=/home/etsi/var,readonly \
        --entrypoint /home/yann/dev/cise/virtualization/docker/docker-entrypoint.sh \
        --mount type=bind,source=/home/$USER/var,target=/home/etsi/var,readonly \
        --entrypoint /home/$USER/dev/cise-data-model/virtualization/docker/docker-entrypoint.sh \
        alpine-cise:latest "$@"