4
Documentation for the Non Functional Stats Service (NFSS). NFSS is composed of a few different parts:
6
* A python3 / pyramid app that exposes a RESTful interface to a postgres data store.
7
* A client-side javascript-based UI that talks to the above.
9
While the system is generally very simple, there are a few things that sysadmins ought to be aware of:
11
Generating Client Keys
12
-----------------------
14
Test data is submitted to the data store via the RESTful api, and this API call is secured with oauth. Client access keys need to be generated for every external client that wants to be able to post data into the database. This is achieved by changing to the nf-stats-service directory and running:
16
$ python3 -m nfss keys-add
18
This is an interactive script that will ask for client details, and finally will write a python script that can be used by the external client to insert data into the data store.
20
A list of client keys can be generated in a similar fashion:
22
$ python3 -m nfss keys-list
24
A specific client id can be revoked by specifying it's client access key like so:
26
$ python3 -m nfss keys-del cj2DriLAGxmxinDyJzvDVQVltRSLNI
28
(obviously the client key will change, this is just an example).
31
----------------------
33
Part of the oauth authentication scheme involves storing nonce values in the database. In order to prevent this table from filling up, we install a daily cron job that cleans the database. This can be achieved manually by running:
35
$ python3 -m nfss database-clean
37
Although this should never need to be done manually, since the restish charm installs a cron daily job to run this command.
b'\\ No newline at end of file'