Commit 57566e62 authored by YannGarcia's avatar YannGarcia
Browse files

Enhance README file

parent 8a625752
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ $(outdir)/.generate: Makefile $(tt_sources)
	$(foreach F, $(wildcard ttcn/patch_sip_titan/*.ttcn), cp $(F) ttcn/LibSip/ttcn;)
	$(foreach F, $(wildcard ttcn/patch_lib_common_titan/*.ttcn), cp $(F) ttcn/LibCommon/ttcn;)
	$(foreach F, $(wildcard ttcn/patch_lib_http/*.ttcn), cp $(F) ttcn/LibIts/ttcn/Http;)
	$(TTCN3_DIR)/bin/compiler -d -e -f -g -l -L -M -O -R -U none -o $(outdir) $(tt_sources)
	$(TTCN3_DIR)/bin/compiler -b -d -e -f -g -l -L -M -O -R -U none -o $(outdir) $(tt_sources)
	touch $@

$(foreach S, $(ttcn_sources),  $(eval $(outdir)/$(notdir $(patsubst %.ttcn, %.cc,  $(S))): $(S)))
+108 −34
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ https://forge.etsi.org/legal-matters

NOTE All draft can be found in the 'IETF XML Registry', accessible [here](https://www.iana.org/assignments/xml-registry/xml-registry.xhtml)

## Installation
# Installation

The ETSI Emergency Communications project builds and tests regularly on the following platforms:

@@ -38,7 +38,7 @@ The ETSI Emergency Communications project builds and tests regularly on the foll

Note: The [OpenSSL](https://www.openssl.org) version > 1.1.x is also required.

### How to do it?
## How to do it?

They are two different methods:
- Using [Vagrant](https://www.vagrantup.com/)
@@ -49,63 +49,73 @@ How to choose one of these methods is depending of your host system.
NOTE: In all case, if you want to setup an continuous integration process (e.g. Jenkins), Docker is the best choice. 


#### The host system is Windows
### The host system is Windows
The both methods require a virtual machine. You can use either VirtualBox or WMware.
In this case, the easiest way is to use Vagrant.


#### The host system is Linux
### The host system is Linux
Vagrant requires a virtual machine. You can use either VirtualBox or WMware.
Docker does not need a virtual machine, so it is the more efficant way.


### Using Vagrant
## Using TITAN compiler on a Docker image

In this configuration, TITAN compiler is located on a Docker image and the sources and the outputs are located on the host.

Pre-requisites on your host machine:
- Install [Virtualbox](https://www.virtualbox.org/manual/ch01.html)
- Install [Vagrant](https://www.vagrantup.com/intro/getting-started/)
- Install Vagrant plugin vagrant-vbguest
- Credentials to access [ETSI forge](https://forge.etsi.org/gitlab/users/sign_in)
    - Set the environment variable USERNAME to your ETSI EOL account user name
    - Set the environment variable PASSWORD to your ETSI EOL account password
- Install Docker

Procedure:
- On your host machine, open a command line session (PuTTY, DOS window...)
- From the ETSI Emergency Communications project, clone the Vagrant folder
- In the file Vagrantfile, modify the tag config.vm.provision replacing <username> & <password> strings by your ETSI credentials
- In the Vagrant folder, execute the following commands:
Procedure on the host machine:
- Open a Terminal
- Clone the ETSI NG112 Test System
- From the ETSI NG112 Test System root directory, build the Docker image executing the following commands:

```sh
$ vagrant up --provider virtualbox --provision
...
$ cd ./virtualization/docker
$ docker build --no-cache --tag alpine-ng112 -f Dockerfile --force-rm .
$ docker images
```

NOTE The creation and the installations will take some time to achieve
- Stop vagrant virtual machine
To build the NG112 Test Suite, execute the following command:

```sh
$ vagrant halt
...
$ ./docker-run.sh build
```

- Update the file 'Vagrantfile' to match with your networks configuration
- Re-start the vagrant virtual machine and log to to the machine
Possble other options are 'clean' to remove all the build outputs or 'rebuild' to force a build of the Test Suite after a 'clean'.

To retrieve the list of the available test cases, execute the following command:

```sh
$ vagrant up
...
$ vagrant ssh
$ ./docker-run.sh list
```

- Switch to the next clause (Usage)
Before to execute the NG112 Test Suite, prepare, edit and update the configuration file:

NOTE The user password is vagrant.
```sh
$ ln -sf ../../etc/AtsXxx/AtsXxx_yyy.cf_ ../../etc/AtsXxx/AtsXxx.cfg
$ vi ../../etc/AtsXxx/AtsXxx.cfg # To update it
```

To execute the NG112 Test Suite, execute the following command:

```sh
$ ./docker-run.sh run
```

<b>Notes</b>:
- The NG112 Test System is listening on port 443
- Updating the file etc/AtsXxx/AtsXxx.cfg is about (e.g. etc/AtsBCF/AtsBCF.cfg):
. Selecting the test(s) to be executed
. Updating value of PICs and PIXITs
. Updating HTTP port setting

### Using Docker
## Using development Docker image

In this configuration, the TITAN compiler, the sources and the outputs are located on the Docker image.

Pre-requisites on your host machine:
- Install Virtualbox
- Install Docker

Procedure for a Windows host machine:
@@ -129,7 +139,50 @@ $ ./docker/run-container.sh
- Switch to the next clause (Usage)


### From scratch
## Using Vagrant

Pre-requisites on your host machine:
- Install [Virtualbox](https://www.virtualbox.org/manual/ch01.html)
- Install [Vagrant](https://www.vagrantup.com/intro/getting-started/)
- Install Vagrant plugin vagrant-vbguest
- Credentials to access [ETSI forge](https://forge.etsi.org/gitlab/users/sign_in)
    - Set the environment variable USERNAME to your ETSI EOL account user name
    - Set the environment variable PASSWORD to your ETSI EOL account password

Procedure:
- On your host machine, open a command line session (PuTTY, DOS window...)
- From the ETSI Emergency Communications project, clone the Vagrant folder
- In the file Vagrantfile, modify the tag config.vm.provision replacing <username> & <password> strings by your ETSI credentials
- In the Vagrant folder, execute the following commands:

```sh
$ vagrant up --provider virtualbox --provision
...
```

NOTE The creation and the installations will take some time to achieve
- Stop vagrant virtual machine

```sh
$ vagrant halt
...
```

- Update the file 'Vagrantfile' to match with your networks configuration
- Re-start the vagrant virtual machine and log to to the machine

```sh
$ vagrant up
...
$ vagrant ssh
```

- Switch to the next clause (Usage)

NOTE The user password is vagrant.


## From scratch

Pre-requisites:
- Install Virtualbox
@@ -230,7 +283,28 @@ $ cp ./ttcn/patch_sip_titan/module.mk ./ttcn/LibSip/
- Switch to the next clause (Usage)


## Usage
# Generate certificates for TLS and NG112 security support 

This clause describes how generate certificates desrived from Let's encrypt certificate. These certificate will be used for TS mutual authentication.
<b>NOTE:</b>
- Certficates shall be renewed every 3 months
- The port 80 shall be vailable for standalone validation

Pre-requisites:
- You need to install python and [certbot](https://manpages.ubuntu.com/manpages/impish/en/man1/certbot.1.html).

To generate certifcates, execute the following command:

```sh
$ export REQUESTS_CA_BUNDLE=$(dirname `python -c "import certifi; print(certifi.where())"`)
$ mkdir -p $HOME/var/ssl
$ sudo certbot certonly --debug --ng112-tls-cert --config-dir $HOME/var/ssl --work-dir $HOME/var/ssl  --logs-dir $HOME/var/ssl --standalone --agree-tos --email <your email> -d <your domain> -w $HOME/var/ssl/
```

<b>NOTE:</b> For testing certificate generation and renewal, use the certbot's --dry-run option.


# Usage

This clause describes how to compile and execute an Abstract Test Suite.
The procedures below illustrate how to run the CAM test suite. The same procedures will apply for any other ETSI Emergency Communications test suite.
@@ -277,7 +351,7 @@ $ ./run-all.bash
- The log files are located in ../logs/AtsLIS folder. You can edit them using any editor or using the Eclipse TITAN log plugins


## How to Report a Bug
# How to Report a Bug

The ETSI Emergency Communications project is under constant development, so it is possible that you will
encounter a bug while using it. Please report bugs at cti_support at etsi dot org.
+4 −4
Original line number Diff line number Diff line
@@ -94,10 +94,6 @@ int held_codec::decode (const OCTETSTRING& p_data, LibHttp__XmlMessageBodyTypes:
{
  loggers::get_instance().log_msg(">>> held_codec::decode: p_data=", p_data);

  TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
  TTCN_EncDec::clear_error();
  TTCN_Buffer decoding_buffer(p_data);

  // Sanity checks
  params::const_iterator it;
  if (p_params == nullptr) {
@@ -111,6 +107,10 @@ int held_codec::decode (const OCTETSTRING& p_data, LibHttp__XmlMessageBodyTypes:
    }
  }
  
  TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
  TTCN_EncDec::clear_error();
  TTCN_Buffer decoding_buffer(OCTETSTRING(it->second.length(), (const unsigned char*)it->second.c_str()));

  if ((it->second.find("<locationRequest") != std::string::npos) || (it->second.find(":locationRequest") != std::string::npos)) {
    urn__ietf__params__xml__ns__geopriv__held::LocationRequestType location_request;
    location_request.decode(urn__ietf__params__xml__ns__geopriv__held::LocationRequest_descr_, decoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
+1 −6
Original line number Diff line number Diff line
@@ -26,11 +26,6 @@ then
    rm -f ./core
fi

if [ "$ATS" == "AtsRSUsSimulator" ]
then
    sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH ../bin/$ATS 127.0.0.1 12001
else
sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH ../bin/$ATS 127.0.0.1 12000
fi

cd ${CURPWD}
Loading