Merge branch 'devel'
[qcg-portal.git] / README.md
1 # QCG Portal
2
3 Portal providing access to PLGrid infrastructure via [QosCosGrid](http://www.qoscosgrid.org) services.
4
5
6 # Installation
7
8 There are two sets of configuration files: one for development and one for production usage.
9
10 Development settings use django development server with sqlite database. 
11 Production settings use uwsgi server with shipped configuration file and postgres database.
12   
13 Production configuration should be individually adapted therefore it isn't covered in this short description.
14 Contact us if you have questions or need any help with it.
15
16
17 ## Requirements
18
19 ### Non python
20
21 * Java (tested version: OpenJDK 7)
22 * [Globus toolkit](http://toolkit.globus.org/toolkit/)
23
24 ### Python
25
26 Python version: 2.7. 
27
28 All required python packages are listed in requirements.txt or requirements_dev.txt files 
29 for production or development usage respectively.
30
31 All packages could be automatically installed using pip (if there are new positions add to file, run this command again):
32
33     pip install -r requirements_dev.txt
34
35 One additional package not listed in requirements file that is needed for production is *uwsgi*.
36
37
38 ## Deployment
39
40 Key functions of the portal require access to PLGrid infrastructure. Access authorization is based on user's proxy. 
41 In development this proxy is loaded from file pointed by `settings.PROXY_FILE` 
42 (in production this proxy is given by OpenID service). 
43 This proxy file could be obtained by logging into *qcg.man.poznan.pl* and running:
44
45     grid-proxy-init -valid 2400:00 -out proxy
46
47 This command creates new proxy valid for 100 days and saves it to file *proxy*.
48
49
50 To be able to use above proxy, one must install CA certificates: copy *certificates* directory to *~/.globus/*.
51 This solution is acceptable only for development configuration, for production instructions visit [this page](https://www.qoscosgrid.org/trac/qcg/wiki/CA%20certificates). 
52
53
54 1. Create database tables (this should be also run after updates which add new migrations):
55
56         manage.py migrate
57
58 2. Create user account (username should be same as user for which the proxy was generated):
59
60         manage.py createsuperuser
61
62 3. Run server process:
63
64         manage.py runserver
65
66 # Contact
67
68 [qcg@plgrid.pl](mailto:qcg@plgrid.pl)