~larry-e-works/uci-engine/write-exitcode-to-file

« back to all changes in this revision

Viewing changes to nf-stats-service/README

  • Committer: Ubuntu CI Bot
  • Author(s): Thomi Richards, Robert Bruce Park
  • Date: 2014-07-01 23:04:05 UTC
  • mfrom: (629.2.18 nfss)
  • Revision ID: ubuntu_ci_bot-20140701230405-bwij2o5lga3iwyal
[r=Francis Ginther, PS Jenkins bot, Andy Doan] Initial import of non functional stats service app.  from Canonical CI Engineering

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
ReadMe
 
2
======
 
3
 
 
4
Documentation for the Non Functional Stats Service (NFSS). NFSS is composed of a few different parts:
 
5
 
 
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.
 
8
 
 
9
While the system is generally very simple, there are a few things that sysadmins ought to be aware of:
 
10
 
 
11
Generating Client Keys
 
12
-----------------------
 
13
 
 
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:
 
15
 
 
16
$ python3 -m nfss keys-add
 
17
 
 
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.
 
19
 
 
20
A list of client keys can be generated in a similar fashion:
 
21
 
 
22
$ python3 -m nfss keys-list
 
23
 
 
24
A specific client id can be revoked by specifying it's client access key like so:
 
25
 
 
26
$ python3 -m nfss keys-del cj2DriLAGxmxinDyJzvDVQVltRSLNI
 
27
 
 
28
(obviously the client key will change, this is just an example).
 
29
 
 
30
Cleaning the database
 
31
----------------------
 
32
 
 
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:
 
34
 
 
35
$ python3 -m nfss database-clean
 
36
 
 
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'