source: TI04-geosplat/trunk/pygsc/clientConfig.py @ 798

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI04-geosplat/trunk/pygsc/clientConfig.py@798
Revision 798, 6.6 KB checked in by astephen, 14 years ago (diff)

Latest working version with install method.
Can accept more than one file but doesn't combine variables yet.

Line 
1#   Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ).
2#   This software may be distributed under the terms of the
3#   Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
4
5"""
6clientConfig.py
7===============
8
9Holds the main configuration details that must be set up in order
10for a version of the package to run on a new machine.
11
12Each option below is documented to guide the user through setting
13up the interface.
14
15All these global variables are used in various parts of the
16package. For consistency they are all CAPITALISED.
17
18Some setup instructions follow:
19===============================
20
211. You will need to copy the PCMDI_GRAPHICS folder to the home directory
22of your web user account. This is the directory defined as USER_HOMEDIR
23below.
24
252. In order to allow plotting via the web you must allow your x-server to
26let anyone connect to it. To do this you must run the following command:
27
28xhost +
29
30Note that this might be a security hole. Luckily I don't know too much
31about security.
32
333. The mailing facility is currently switched off using the ERROR_NOTIFICATION
34variable set to 0. If you want the system to mail the administrator when
35an error has occurred then set this variable to 1.
36
37"""
38
39# Import python modules
40import os   # used to combine paths in variables below
41
42# DEBUG:
43# Set to 1 if you want to be in DEBUG mode. This reports CGI errors
44# directly to the browser.
45DEBUG=1
46
47# CALL_METHOD
48# Method used for client to communicate with the server.
49# Either "WS" for Web Service or "Local" for local machine.
50CALL_METHOD="WS"
51
52# RESTRICTED_DATA:
53# Do you want security on (1) or off (0)?
54# Note that there is no in-built security implementation in
55# GeoSplAT, just a set of hooks under which your security system
56# can be called.
57RESTRICTED_DATA=0
58
59# PACKAGE_NAME:
60# This will appear as the main title displayed
61# on the web interface.
62PACKAGE_NAME="GeoSPlAT (GeoSpatial Plotting and Animation Tool)"
63
64# LOCAL_RULES:
65# Do you want local rules switched on or off (1 or 0)?
66# This will apply to any parts of the code where local
67# modifications have been made and wrapped in an if clause.
68LOCAL_RULES=0
69
70# REGISTRATION_PAGE:
71# For restricted datasets, this is the web page from which users
72# can find registration details.
73REGISTRATION_PAGE="http://badc.nerc.ac.uk"
74
75# ADMIN_MAIL_ADDRESS:
76# The e-mail address of the adminstrator for this version. 
77ADMIN_MAIL_ADDRESS="yourmail@yourhost"
78
79# LOCAL_MAIL_HOST:
80# The outgoing mail box address for the host machine.
81# On many systems you can just use "localhost".
82LOCAL_MAIL_HOST="youroutbox.yourdomain"
83
84# ADMIN_NOTIFICATION:
85# Set this to 1 if you want to be notified by e-mail when an error has
86# occurred.
87ADMIN_NOTIFICATION=0
88
89# SOAP_SERVER_PORT:
90# Port over which the Web Service will run.
91SOAP_SERVER_PORT=8407
92
93# SOAP_SERVER_NAME:
94# URL of server.
95SOAP_SERVER_NAME="localhost"
96
97# LOCAL_SERVER_PACKAGE
98# Local path to Server Package if callable locally
99LOCAL_SERVER_PACKAGE="/home/as56/abstractWebService/gss"
100
101# MAX_NUM_DATASETS:
102# A kind of fake maximum number of datasets
103# to make the CGI client behave sensibly.
104MAX_NUM_DATASETS=10
105
106# REQUEST_XML_DIR:
107# Directory for request document uploads and downloads on the local machine.
108# Probably a temporary store.
109REQUEST_XML_DIR="/srv/www/htdocs/request_xmls"
110
111# HTTP_REQUEST_XML_DIR:
112# The URL address of the REQUEST_XML_DIR
113# NOTE IMPLEMENTED!!! HTTP_REQUEST_XML_DIR="http://localhost/request_xmls"
114
115# STATIC_WEBSERVER_URL_PATH
116# HTTP location of the webserver
117STATIC_WEBSERVER_URL_PATH="http://localhost"
118
119# STATIC_WEBSERVER_LOCAL_PATH
120# Location on the local machine of the webserver top level directory.
121STATIC_WEBSERVER_LOCAL_PATH="/srv/www/htdocs"
122
123# WEB_EXTRAS_URL_PATH:
124# HTTP location of the web extras directory.
125WEB_EXTRAS_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "dx_extras")
126
127# WEB_EXTRAS_LOCAL_PATH:
128# Local location of the web extras directory.
129WEB_EXTRAS_LOCAL_PATH=os.path.join(STATIC_WEBSERVER_LOCAL_PATH, "dx_extras")
130
131# CGI_SCRIPT_URL_PATH:
132# The full path of the main CGI script on your system.
133# "http://yourdomain/cgi-bin/splatui" is the most likely but
134# you are free to rename the files if you wish.
135CGI_SCRIPT_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "cgi-bin/splatui")
136
137# CGI_SCRIPT_LOCAL_PATH:
138# The local path of the CGI script on your system.
139# "/srv/www/cgi-bin/splatui" is likely on a SUSE system but
140# you are free to rename this as you wish.
141CGI_SCRIPT_LOCAL_PATH="/srv/www/cgi-bin/splatui"
142
143# TOKEN_VALID_LIFETIME:
144# Period before security token (cookie) should expire (in seconds)
145TOKEN_VALID_LIFETIME=60*60*8   # 8 hours
146
147# COOKIE_NAME:
148# Name of cookie to hold security information and user roles.
149COOKIE_NAME="dx_cookie"
150
151# TOKEN_DOMAIN:
152# The domain that should be written in the secure token (cookie).
153TOKEN_DOMAIN="localhost"
154
155# BASEDIR:
156# Full path to the main client package location.
157# "/usr/local/gsc" is recommended but you can change it as
158# you wish.
159BASEDIR="/home/as56/abstractWebService/gsc"
160
161# OUTPUT_DIR_LOCAL_PATH
162# The full path on the local machine of the output directory.
163OUTPUT_DIR_LOCAL_PATH=os.path.join(STATIC_WEBSERVER_LOCAL_PATH, "output")
164
165# OUTPUT_DIR_URL_PATH:
166# The URL address of the OUTPUT_DIR_LOCAL_PATH
167OUTPUT_DIR_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "output")
168
169# LOGO_DIR:
170# Location of logos for the header section, this should be a
171# full or relative URL and NOT a directory path on your machine.
172LOGO_DIR=os.path.join(STATIC_WEBSERVER_URL_PATH, "dx_extras/logos")
173
174# LEFT_LOGO:
175# Name of logo file for left hand side of header.
176LEFT_LOGO="geosplat_logo.jpg"
177
178# RIGHT_LOGO:
179# Name of logo file for right hand side of header.
180RIGHT_LOGO="geosplat_logo.jpg"
181
182# HTML_DIR_LOCAL_PATH:
183# Location of the HTML header and footer files in the package
184HTML_DIR_LOCAL_PATH=os.path.join(BASEDIR, "html")
185
186# DATA_EXTRACTOR_URL_PATH:
187# URL of a Data Extractor if you'd like to present links to new DX
188# requests at the end of a GeoSPlAT session.
189DATA_EXTRACTOR_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "cgi-bin/dxuitest")
190
191# MESSAGE_TO_USERS:
192# A message that will be written at the top of all web pages underneath
193# the main header.
194MESSAGE_TO_USERS="""This is a test version of the %s so it may contain bugs.
195Please contact <A HREF="mailto:%s">%s</A> if an
196error occurs so that we can improve this
197service.""" % (PACKAGE_NAME, ADMIN_MAIL_ADDRESS, ADMIN_MAIL_ADDRESS)
198
199# CONFIRMATION_PAGE:
200# Should the CGI interface include a confirmation page?
201# 1 for yes and 0 for no.
202CONFIRMATION_PAGE=1
Note: See TracBrowser for help on using the repository browser.