|
|
# Setup Guide
|
|
|
|
|
|
<br />
|
|
|
|
|
|
This guide explains the necessary steps to setup a new FlockLab testbed.
|
|
|
A FlockLab testbed consists of a server part and an observer part. The observers interact with the devices under test (targets) and locally store the test data. The server provides a user interface and is responsible for starting and stopping tests as well as fetching the test data from the observers.
|
|
|
|
|
|
<br />
|
|
|
|
|
|
## Server
|
|
|
|
|
|
The FlockLab server must provide the following three components:
|
|
|
* test management
|
|
|
* database
|
|
|
* webpage
|
|
|
These can either be on the same machine or distributed on separate servers.
|
|
|
|
|
|
### Test management
|
|
|
|
|
|
* Copy the [files](https://gitlab.ethz.ch/tec/public/flocklab/server/-/tree/master/testmanagementserver) to your test management server.
|
|
|
* Adjust the [config file](https://gitlab.ethz.ch/tec/public/flocklab/server/-/blob/master/config/flocklab_config.ini) and copy it to the server.
|
|
|
* Install [crontab](https://gitlab.ethz.ch/tec/public/flocklab/server/-/blob/master/config/crontab) to periodically call the scheduling and cleanup scripts.
|
|
|
* Install all [required python packages](https://gitlab.ethz.ch/tec/public/flocklab/server/-/blob/master/config/python_requirements).
|
|
|
* Make sure the user that runs the test management scripts has SSH access to all your FlockLab observers via public key authentication.
|
|
|
|
|
|
### Database
|
|
|
|
|
|
* Create a MySQL-compatible database `flocklab` on your DB server.
|
|
|
* Use the provided [template](https://gitlab.ethz.ch/tec/public/flocklab/server/-/tree/master/database) to create all necessary tables.
|
|
|
* Create the user `flocklab_testmng` and grant it access to the database `flocklab`:
|
|
|
```
|
|
|
CREATE USER 'flocklab_testmng'@'localhost' IDENTIFIED BY '[YOUR_PASSWORD]';
|
|
|
GRANT ALL PRIVILEGES ON flocklab.* TO 'flocklab_testmng'@'localhost';
|
|
|
```
|
|
|
* Start to populate the database tables: `tbl_serv_observer`, `tbl_serv_architectures`, `tbl_serv_platforms`, `tbl_serv_tg_adapt_types` and `tbl_serv_tg_adapt_list`.
|
|
|
* Make sure the database access credentials in `flocklab_config.ini` on the test management server are correct.
|
|
|
|
|
|
### Webpage
|
|
|
|
|
|
* Copy the [webpage files](https://gitlab.ethz.ch/tec/public/flocklab/server/-/tree/master/webserver) to your webserver.
|
|
|
* Adjust the path to the `flocklab_config.ini` file in `include/config.php`.
|
|
|
|
|
|
<br />
|
|
|
|
|
|
## Observer
|
|
|
|
|
|
* A guide on how to prepare the observer hardware in available on request.
|
|
|
*
|
|
|
|
|
|
|