Merge branch 'fibre' of ssh://git.onelab.eu/git/myslice into fibre
[unfold.git] / sla / README
1 This is the README.txt file for sla-dashboard application.\r
2 \r
3 sla-dashboard application is composed by the following directories:\r
4 * sladashboard: the app related to the application itself. The settings\r
5     file maybe need to be modified: read below.\r
6 * slagui: the sla dashboard GUI project.\r
7 * slaclient: this project contains all the code needed to connect to\r
8     SLA Manager REST interface, and the conversion from xml/json to python\r
9     objects.\r
10 * samples: this directory contains sample files to load in the SLA Manager for\r
11     testing.\r
12 * bin: some useful scripts\r
13 \r
14 \r
15 Software requirements\r
16 ---------------------\r
17 Python version: 2.7.x\r
18 \r
19 The required python packages are listed in requirements.txt\r
20 \r
21 Installing the requirements inside a virtualenv is recommended.\r
22 \r
23 SLA Manager (java backend) needs to be running in order to use the dashboard.\r
24 \r
25 Installing\r
26 ----------\r
27 (to be corrected/completed)\r
28 \r
29 #\r
30 # Install virtualenv\r
31 #\r
32 $ pip install virtualenv\r
33 \r
34 \r
35 #\r
36 # Create virtualenv.\r
37 # E.g.: VIRTUALENVS_DIR=~/virtualenvs\r
38 #\r
39 $ virtualenv $VIRTUALENVS_DIR/sla-dashboard\r
40 \r
41 #\r
42 # Activate virtualenv\r
43 #\r
44 $ . $VIRTUALENVS_DIR/sla-dashboard/bin/activate\r
45 \r
46 #\r
47 # Change to application dir and install requirements\r
48 #\r
49 $ cd $SLA_DASHBOARD\r
50 $ pip install -r requirements.txt\r
51 \r
52 #\r
53 # Create needed tables for sessions, admin, etc\r
54 #\r
55 $ ./manage.py syncdb\r
56 \r
57 Settings\r
58 --------\r
59 \r
60 * sladashboard/settings.py:\r
61     - SLA_MANAGER_URL : The URL of the SLA Manager REST interface.\r
62     - DEBUG: Please, set this to FALSE in production\r
63 \r
64 * sladashboard/urls.py:\r
65     - dashboard root url: the slagui project is accessed by default\r
66         in $server:$port/slagui. Change "slagui" with the desired path.\r
67 \r
68 \r
69 Running\r
70 -------\r
71 NOTE: this steps are not suitable in production mode.\r
72 \r
73 #\r
74 # Activate virtualenv\r
75 #\r
76 $ . $VIRTUALENVS_DIR/sla-dashboard/bin/activate\r
77 \r
78 #\r
79 # Cd to application dir\r
80 #\r
81 $ cd $SLA_DASHBOARD\r
82 \r
83 #\r
84 # Start server listing in port 8000 (change port as desired)\r
85 #\r
86 $ ./manage.py runserver 0.0.0.0:8000\r
87 \r
88 #\r
89 # Test\r
90 #\r
91 curl http://localhost:8000/slagui