comparison README.rst @ 40:e640b2302fab

Add short README with install and setup instructions.
author Daniele Nicolodi <daniele@grinta.net>
date Wed, 29 Jun 2011 00:40:07 +0200
parents
children dd5e5fc17a62
comparison
equal deleted inserted replaced
39:532d9d070ef5 40:e640b2302fab
1 INSTALL
2 =======
3
4 This package uses buildout for development and deployment. The use of
5 buildout allows for the creation of a self contained environment
6 containing application code and most of the required dependencies.
7
8
9 Prerequisites
10 -------------
11
12 1. Running MySQL server version >= 5.0
13 2. Python version >= 2.6
14 3. MySQLdb Python package
15
16 To install this application you need a recent python interpreter:
17 development and testing have been performed with Python 2.6, but
18 Python 2.7 should work as well. MySQL and the Python MySQL connector
19 are not installed as part of the buildout recipe because it is much
20 easier to do so with the help of the OS package management software.
21
22 On a Debian or Debian like GNU-Linux installation you can easily
23 install all the required packages as follows::
24
25 # apt-get install mysql-server python2.6 python2.6-mysqldb
26
27
28 Install
29 -------
30
31 The buildout recipe takes care of installing all the other required
32 component. For that you need to have an Internet connection, if you
33 access the Web through a proxy server remember to set it correctly for
34 you shell. For a bash shell::
35
36 # export http_proxy=http://proxy.example.net:3128/
37 # export https_proxy=http://proxy.example.net:3128/
38
39 First download the buildout software itself::
40
41 # python2.6 bootstrap.py --distribute
42
43 Then run the buildout recipe::
44
45 # ./bin/buildout
46
47
48 Setup
49 -----
50
51 The application needs to know how to connect to your MySQL server.
52 Those information are stored in file in the application source code
53 directory. Edit the configuration file::
54
55 # edit ./src/ltpdarepo/config.py
56
57 and enter the required information. Chose a database name at will:
58 this database will be created during the application initialization.
59 The user used in the connection should have administrative
60 capabilities on all the MySQL database.
61
62 To initialize the database use the provide LTPDA Repository
63 administration command line tool::
64
65 # ./bin/admin install
66
67 Then create an administrator user to use in the first connection
68 through the Web interface::
69
70 # ./bin/admin useradd username password
71 # ./bin/admin grant username % admin
72
73 Upgrading from the PHP base Web interface is also possible. It is
74 strongly recommended to perform a backup of the database before
75 attempting the upgrade. Configure the application to connect to the
76 old administrative database (the old default administrative database
77 name is `ltpda_admin`) and run the upgrade procedure::
78
79 # ./bin/admin upgrade
80
81 Help on the usage of the command line tool can be obtained with::
82
83 # ./bin/admin help
84
85 For development and evaluation you can run the Web application within
86 an embedded HTTP server::
87
88 # ./bin/run
89
90 and connect to it at the address http://localhost:5000/
91
92
93 Deployment
94 ----------
95
96 For the deployment to a production server you do not want to use the
97 embedded simple HTTP server. You can use any WSGI capable web server.
98 The easiest solution it is probably to use Apache `mod_wsgi`.
99
100 .. TODO: complete this section