README.md 3.97 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
CoAP Testing Tool:
------------------

This repo conaints all necessary software (and their dependencies) for running a 
CoAP interoperability test session.

This can be run as standalone software and also integrated to f-interop 
architecture.

### TODO
Federico Sismondi's avatar
Federico Sismondi committed
11
- add coap client automated IUT
12
- add feat for handling step by step analysis
Federico Sismondi's avatar
Federico Sismondi committed
13
- add more unit testing of coordinator component
14 15 16 17
- document isntallation of requirements and dependencies

### CoAP Testing tools components

Federico Sismondi's avatar
Federico Sismondi committed
18 19 20
The CoAP testing tool handles the coordination, sniffing, dissection
and analysis of traces for the tests described in the test description.
The implemented test description is based on:
21 22 23 24
[ETSI CoAP test description](http://www.etsi.org/plugtests/CoAP/Document/CoAP_TestDescriptions_v015.pdf)

For description of components please visit: [f-interop doc](doc.f-interop.eu)

25 26 27

-----------------------------------------------------------------------------

Federico Sismondi's avatar
doc++  
Federico Sismondi committed
28 29
### Clonning the project
```
30
git clone --recursive https://gitlab.f-interop.eu/fsismondi/coap_testing_tool.git
31
cd coap_testing_tool
Federico Sismondi's avatar
doc++  
Federico Sismondi committed
32
```
33

34
### Running CoAP testing tool as standalone mode
35

36
(# TODO talk about the CLI, without it you cannot run a session)
37

38 39 40
First thing needed is to have the rabbit running. Whaat?
You need a server running RabbitMQ message broker for handling the
messaging between the components taking part in your test session.
41

42 43 44 45 46 47 48 49 50 51 52 53
The options for this are:

- install locally RabbitMQ message broker on local machine,
create RMQ vhost, user, pass on local machine

    (# TODO add instructions)

- Request a remote vhost and its user, pass credentials to F-Interop developers.

    for this contact federico.sismondi@inria.fr or remy.leone@inria.fr

then, export in the machine where the testing tool is running the following vars:
54 55

    ```
Federico Sismondi's avatar
Federico Sismondi committed
56
    export AMQP_URL='amqp://someUser:somePassword@server/amqp_vhost'
Federico Sismondi's avatar
Federico Sismondi committed
57
    export AMQP_EXCHANGE='default'
58 59
    ```

60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
---
#### Building & running the tool
Now, let's get the testing tool running. Several approaches can be used,
these are:

( tested with debian based OS & macos )

**1.** Build the testing tool using docker (see Dockerfile) &
run the testing tool inside a docker container (recommended)

**2.** Install dependencies with ansible in the local machine &
run the testing tool using supervisor.
(no agent can be run in the same machine after)

**3.** Install dependencies with ansible in remote machine &
run the testing tool using supervisor.

**4.** Install everything manually, why not right?

---

#### Opt 1 - Building & running CoAP testing tool with docker

First, let's install docker. For this just follow this instructions:

https://docs.docker.com/engine/installation/

Don't forget to start it!

Second, **build** the testing tool, from inside coap_testing_tool dir run:
```
docker build -t finterop-coap .
```

Finally, **run** it, from inside coap_testing_tool run:
```
docker run -it --env AMQP_EXCHANGE='default' --env AMQP_URL='amqp://someUser:somePassword@server/amqp_vhost' --privileged finterop-coap supervisord --nodaemon --configuration supervisor.conf
```

Run the CLI & Agent and you are ready to launch CoAP tests from your PC!

#### Opt 2 & 3 - Build CoAP testing tool with ansible


First thing, install ansible:

http://docs.ansible.com/ansible/intro_installation.html


Install supervisor (needed for spawning and monitoring processes):
For this follow this instructions:

http://supervisord.org/installing.html

  
Now, let's install the testing tool requirements:

**for Opt 2 (local install)**:

- change in ansible/main.yml the variable unix_user from f-interop to your
unix user, then run ansible script:

    ```
    ansible-playbook -i ansible/hosts.local ansible/main.yml --ask-become-pass
    ```

126
- run CoAP testing tool and monitor processes
Federico Sismondi's avatar
Federico Sismondi committed
127
    
128
    ```
129 130
    sudo -E supervisord -c supervisor.conf
    sudo supervisorctl -c supervisor.conf
131
    ```
Federico Sismondi's avatar
Federico Sismondi committed
132 133
	note: use -E when launching supervisor process, it preserves the
	env vars
134

135
Run the CLI & Agent and you are ready to launch CoAP tests from your PC!
136

137
**for Opt 3 (remote install)**:
138

139
TDB