README.md 2.85 KB
Newer Older
Olivier Sallou's avatar
fix md  
Olivier Sallou committed
1
# biomaj-watcher
Olivier Sallou's avatar
Olivier Sallou committed
2

Olivier Sallou's avatar
Olivier Sallou committed
3
Web interface for biomaj (https://github.com/genouest/biomaj) 
Olivier Sallou's avatar
Olivier Sallou committed
4

Olivier Sallou's avatar
fix md  
Olivier Sallou committed
5
# License
Olivier Sallou's avatar
Olivier Sallou committed
6

Olivier Sallou's avatar
Olivier Sallou committed
7
AGPL
Olivier Sallou's avatar
Olivier Sallou committed
8

Olivier Sallou's avatar
fix md  
Olivier Sallou committed
9
# Requirements
Olivier Sallou's avatar
Olivier Sallou committed
10 11 12

biomaj3

Olivier Sallou's avatar
Olivier Sallou committed
13 14 15
Javascript dependencies are downloaded help with bower (see next).
Dependencies are listed in biomajwatcher/webapp/bower.json.

Olivier Sallou's avatar
Olivier Sallou committed
16
# Build web app
Olivier Sallou's avatar
Olivier Sallou committed
17

Olivier Sallou's avatar
Olivier Sallou committed
18
Install npm (apt-get install npm/ yum install npm)
Olivier Sallou's avatar
Olivier Sallou committed
19

Olivier Sallou's avatar
Olivier Sallou committed
20
in biomajwatcher/webapp
Olivier Sallou's avatar
Olivier Sallou committed
21

Olivier Sallou's avatar
Olivier Sallou committed
22 23 24
    npm install -g bower
    bower install

Olivier Sallou's avatar
fix md  
Olivier Sallou committed
25
# Configuration
Olivier Sallou's avatar
Olivier Sallou committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39

Configuration is done in development.ini or production.ini

    global_properties = PATH_TO_BIOMAJ_global.properties
    
    # List of user ids with admin priviledges.
    # Users need to be create or be ldap users if ldap
    # is configured in global.properties
    admin = admin, jdoe
    
    # Celery configuration over mongodb, mongodb url
    BROKER_URL = mongodb://localhost/biomaj_celery


Olivier Sallou's avatar
Olivier Sallou committed
40 41 42 43
# Install

    python setup.py develop

Olivier Sallou's avatar
fix md  
Olivier Sallou committed
44
# Running
Olivier Sallou's avatar
Olivier Sallou committed
45 46 47 48 49 50 51 52

## Development

    pserve development.ini

## Production

    gunicorn -p /var/run/gunicorn_bmaj.pid --log-config=production.ini --paste production.ini &
Olivier Sallou's avatar
add doc  
Olivier Sallou committed
53 54


Olivier Sallou's avatar
Olivier Sallou committed
55 56
Web server will start to listen on port 6543 by default. Update ini files to
customize web configuration.
Olivier Sallou's avatar
add doc  
Olivier Sallou committed
57

Olivier Sallou's avatar
Olivier Sallou committed
58

Olivier Sallou's avatar
fix md  
Olivier Sallou committed
59
# Background processing (Optional)
Olivier Sallou's avatar
Olivier Sallou committed
60

Olivier Sallou's avatar
Olivier Sallou committed
61
To allow banks update/removal by authenticated user, Celery is needed. Celery can run on same node, or multiple distant ones to execute bank updates.
Olivier Sallou's avatar
Olivier Sallou committed
62

Olivier Sallou's avatar
Olivier Sallou committed
63
    pceleryd development.ini/production.ini
Olivier Sallou's avatar
Olivier Sallou committed
64 65

One can use flower to monitor celery.
Olivier Sallou's avatar
Olivier Sallou committed
66

Olivier Sallou's avatar
fix md  
Olivier Sallou committed
67
# User creation
Olivier Sallou's avatar
Olivier Sallou committed
68

Olivier Sallou's avatar
Olivier Sallou committed
69
python db/seed.py --config global.properties --user yyy --pwd xxxx
Olivier Sallou's avatar
Olivier Sallou committed
70

Olivier Sallou's avatar
Olivier Sallou committed
71 72 73 74 75 76
# API / REST interface

The old API interface (/BmajWatcher/GET) is still available. A new REST
interface is available but we kept the old one for compatibility for other
tools. The old interface does not take advantage of the new features however.

Olivier Sallou's avatar
Olivier Sallou committed
77 78 79 80 81 82 83 84
# Don't like the color? Need your logo?

You can easily customize the look of the watcher. Theme is pure CSS and CSS giles are available in directroy biomajwatcher/webapp/app/styles. CSS are based on Bootstrap 3. You may also need to override some directives from *app.css* according to your theme (font color...)

If you want to customize the theme, create a new theme CSS file (with an other name), and update the <link> reference to "_path_to_styles_/theme.css" to your new file in biomajwatcher/webapp/app/index.html.

In index.html you can also add your logol, chnage header etc...

Olivier Sallou's avatar
Olivier Sallou committed
85 86 87 88 89 90 91 92 93 94 95 96
# REST API

    /bank  : list of banks
    /bank/:id : details of bank
    /bank/:id/status: current status of the bank
    /bank/:id/config: properties of the bank
    /bank/:id/log/:sessionid : log file of the session
    /search: search in banks with GET parameter "q=query", query follows Lucene syntax
    /search/format/:format: get banks having format
    /search/type/:type: get banks having type
    /search/format/:format/type/:type : get banks having format and type
    /stat : get banks disk usage
97

Olivier Sallou's avatar
fix md  
Olivier Sallou committed
98
# Credits
99

Olivier Sallou's avatar
Olivier Sallou committed
100
Signin image from http://bootsnipp.com/snippets/featured/google-style-login