Project

General

Profile

PgGraph2Install » History » Version 2

Aurynn Shaw, 12/26/2006 05:02 PM

1 1 Aurynn Shaw
2 2 Aurynn Shaw
h1. Installation
3 1 Aurynn Shaw
4 2 Aurynn Shaw
5
6
h2. Install Reportlab
7
8
[[ReportLab]] is fairly easily installed; ubuntu and debian have it in their software repositories. 
9
10 1 Aurynn Shaw
All other platforms, installing it is as simple as downloading the latest package from the website, http://www.reportlab.org/, unpacking it, and building it using python setup.py install.
11
12
13 2 Aurynn Shaw
h2. Install [[RenderPM]]
14 1 Aurynn Shaw
15
16 2 Aurynn Shaw
Installing [[RenderPM]] is more involved than [[ReportLab]].
17 1 Aurynn Shaw
18 2 Aurynn Shaw
First, you must install the PIL extensions for Python, as [[RenderPM]] relies on them for imaging support.
19
20
Second, the latest [[RenderPM]] source must be checked out of the [[ReportLab]] SVN, from http://reportlab.org/rl_addons.html
21
22 1 Aurynn Shaw
Third, the standard setup routine, python setup.py install, should be run.
23
24
Finally, you must find and locate the Adobe Base Font package. This can be found on several places on the Internet, or in the Acrobat distribution. Currently, this is unneeded, as it has been checked in to our pggraph repository under trunk/fonts
25
26 2 Aurynn Shaw
I have always had a difficult time getting [[RenderPM]] to acknowledge the existence of these fonts. As I figure out a more complete voodoo spell to get it to work, it will be posted here.
27 1 Aurynn Shaw
28
29 2 Aurynn Shaw
h2. Installing pggraph2
30 1 Aurynn Shaw
31
32 2 Aurynn Shaw
* your database must be created - pggraph2 was developed using the dbname of pggraph2, however, this is not hardcoded. You must also run CREATE LANGUAGE plpgsql; after you have created your database. The installer assumes that plpgsql is already an installed pl language.
33 1 Aurynn Shaw
34 2 Aurynn Shaw
* edit the config.ini to reflect your local environment needs. All the items should be self-explanatory or documented to aid you.
35 1 Aurynn Shaw
36 2 Aurynn Shaw
* Set up forward.py and bridge.py. Bridge.py in particular needs to be edited to have the absolute path to config.ini set, due to cron not being able to subjectively reference the location of the config file.
37 1 Aurynn Shaw
38 2 Aurynn Shaw
* Run forward.py, if needed. It will fork() itself and initiate the SSH tunnel to the server to be queried for statistics.
39 1 Aurynn Shaw
40 2 Aurynn Shaw
* Run install.py. It will create all the required tables, functions, indexes, and types required for pggraph2 to operate.
41 1 Aurynn Shaw
42 2 Aurynn Shaw
* Install a cronjob to run the bridge.py script at your preferred polling interval. Pggraph was developed with 5 minutes as the shortest interval, but larger numbers can be set. Please see the config.ini comment for shortest_interval on what interval spaces pggraph2 is aware of.
43 1 Aurynn Shaw
44 2 Aurynn Shaw
* Wait one interval
45 1 Aurynn Shaw
46 2 Aurynn Shaw
* Mark pggraph_index.py, pggraph_database.py, and pggraph_table.py as executable.
47 1 Aurynn Shaw
48 2 Aurynn Shaw
* Test the above scripts with your web browser. Fiddle the settings, and hit "show".
49
50
51
h2. Known limitations
52
53
54
* Changing the prefix in the config file AFTER the installer has been run will create serious breakage. This is due to some objects (indexes, tablenames) being hard-coded into the DB using the prefix name. Choose wisely, or be prepared to manually fix it.