Installing a local kTBS

Make sure you have read and executed the Common Prerequisites instructions, i.e installed all dependencies, and a Python virtual environment.

Installing the stable version

Instead of installing kTBS from the source code, you can install it and its dependencies from PyPI. Ensure that you have activated your virtual environment, and simply type:

(ktbs-env) $ pip install ktbs

Note however that the stable version is not updated very often, and so might very quickly be outdated compared to the development version. Hence, this option is not recommended.

Testing the installed kTBS

Once installed, just run the ktbs command, it launches an internal HTTP server on the 8001 port (by default).

(ktbs-env) $ ktbs
INFO        2019-09-15 14:28:18 CEST        ktbs.server     PID: 26566
INFO        2019-09-15 14:28:18 CEST        ktbs.server     listening on http://localhost:8001/

You stop kTBS with Ctrl-C.

Make the trace bases persistent

By default, kTBS stores the trace bases in memory, so they will not be retained after you stop kTBS. To make the trace bases persistent, you need to configure a repository.

This can be done with the -r option.

(ktbs-env) $ ktbs -r <dirname>

A directory named <dirname> will be used to store the trace bases; if it does not exist, it will be automatically created and initialized.

Note

You must not create the directory for the store; if the directory already exists, kTBS will assume that it is correctly initialized, and fail if it is not the case (e.g. if it is empty).

Advanced configuration

There are a lot more configuration options that you can set on the command lines (type ktbs --help for a list). But a safer way to configure your kTBS instance is to store those options in a configuration file. An example is provided in the example/conf/ directory of the source code. Then, pass the configuration file as an argument to kTBS:

(ktbs-env) $ ktbs my.conf
INFO        2019-09-15 14:28:18 CEST        ktbs.server     PID: 26567
INFO        2019-09-15 14:28:18 CEST        ktbs.server     listening on http://localhost:1234/