a4a3fa6af6e6a63267616c08b1b458c34f27131f
[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 * [Globus toolkit](http://toolkit.globus.org/toolkit/)
22
23 ### Python
24
25 Python version: 2.7. 
26
27 All required python packages are listed in requirements.txt or requirements_dev.txt files 
28 for production or development usage respectively.
29
30 All packages could be automatically installed using pip (if there are new positions add to file, run this command again):
31
32     pip install -r requirements_dev.txt
33
34 One additional package not listed in requirements file that is needed for production is *uwsgi*.
35
36
37 ## Deployment
38
39 Key functions of the portal require access to PLGrid infrastructure. Access authorization is based on user's proxy. 
40 In development this proxy is loaded from file pointed by `settings.PROXY_FILE` 
41 (in production this proxy is given by OpenID service). 
42 This proxy file could be obtained by logging into *qcg.man.poznan.pl* and running:
43
44     grid-proxy-init -valid 2400:00 -out proxy
45
46 This command creates new proxy valid for 100 days and saves it to file *proxy*.
47
48
49 To be able to use above proxy, one must install CA certificates: copy *certificates* directory to *~/.globus/*.
50 This solution is acceptable only for development configuration, for production instructions visit [this page](https://www.qoscosgrid.org/trac/qcg/wiki/CA%20certificates). 
51
52
53 1. Create database tables (this should be also run after updates which add new migrations):
54
55         manage.py migrate
56
57 2. Create user account (username should be same as user for which the proxy was generated):
58
59         manage.py createsuperuser
60
61 3. Run server process:
62
63         manage.py runserver
64
65 # Contact
66
67 [qcg@plgrid.pl](mailto:qcg@plgrid.pl)