source: TI03-DataExtractor/branches/titania_install/pygss/serverConfig.py~ @ 1524

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/titania_install/pygss/serverConfig.py~@1610
Revision 1524, 5.8 KB checked in by astephen, 14 years ago (diff)

Titania installed version latest.

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"""
6serverConfig.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
40# Import python modules
41import os   # used to combine paths in variables below
42
43# DEBUG:
44# Set to 1 if you want to be in DEBUG mode. This reports CGI errors
45# directly to the browser.
46DEBUG=1
47
48# RESTRICTED_DATA:
49# Do you want security on (1) or off (0)?
50# Note that there is no in-built security implementation in
51# gs, just a set of hooks under which your security system
52# can be called.
53RESTRICTED_DATA=1
54
55SECURITY_MODEL="badc"
56
57# PACKAGE_NAME:
58# This will appear as the main title displayed
59# on the web interface.
60PACKAGE_NAME="GeoSPlAT - GeoSpatial Plotting and Animation Tool"
61
62# LOCAL_RULES:
63# Do you want local rules switched on or off (1 or 0)?
64# This will apply to any parts of the code where local
65# modifications have been made and wrapped in an if clause.
66LOCAL_RULES=0
67
68# UNRESTRICTED_CREDIT:
69# Flag on whether there are any resource limits applied.
70# Value of 1 means no restrictions.
71UNRESTRICTED_CREDIT=1
72
73# CREDIT_LIMIT:
74# Limit on the number of credits allowed on any job
75CREDIT_LIMIT=2
76
77# TOKEN_VALID_LIFETIME:
78# Period before security token should expire (in seconds)
79TOKEN_VALID_LIFETIME=60*60*8   # 8 hours
80
81# REGISTRATION_PAGE:
82# For restricted datasets, this is the web page from which users
83# can find registration details.
84REGISTRATION_PAGE="http://badc.nerc.ac.uk"
85
86# REQUEST_SIZE_LIMIT:
87# A limit in the number of Megabytes for any user requests.
88REQUEST_SIZE_LIMIT=200 # MB
89
90# MAX_FILE_SIZE:
91# A limit on the size of each output file
92# (cannot be greater than REQUEST_SIZE_LIMIT)
93MAX_FILE_SIZE=200 # MB
94if MAX_FILE_SIZE>REQUEST_SIZE_LIMIT:
95    MAX_FILE_SIZE=REQUEST_SIZE_LIMIT
96
97# TIMING_SCALE_FACTOR:
98# Since every system will run at a different speed this scale
99# factor can be adjusted to improve the estimated duration of
100# requests.
101TIMING_SCALE_FACTOR=0.00001
102
103# ADMIN_MAIL_ADDRESS:
104# The e-mail address of the adminstrator for this version. 
105ADMIN_MAIL_ADDRESS="a.stephens@rl.ac.uk"
106
107# LOCAL_MAIL_HOST:
108# The outgoing mail box address for the host machine.
109# On many systems you can just use "localhost".
110LOCAL_MAIL_HOST="outbox.rl.ac.uk"
111
112# ADMIN_NOTIFICATION:
113# Set this to 1 if you want to be notified by e-mail when an error has
114# occurred.
115ADMIN_NOTIFICATION=1
116
117# SOAP_SERVER_PORT:
118# Port over which the Web Service (or first method)  will run.
119SOAP_SERVER_PORT=8407
120
121# BASEDIR:
122# Full path to the main package location.
123# "/usr/local/gss" is recommended but you can change it as
124# you wish.
125BASEDIR="/usr/local/badc/linux/suse10/gss"
126
127# OUTPUT_DIR:
128# The full path on the local machine of the output directory.
129OUTPUT_DIR="/requests"
130
131# OUTPUT_DIR_URL:
132# URL path to output directory.
133OUTPUT_DIR_URL="http://badc.nerc.ac.uk/cgi-bin/data_browser/data_browser/requests"
134
135# SESSION_OBJECT_DIR:
136# Location of persistent session objects saved during a session.
137# These are saved as Python module
138SESSION_OBJECT_DIR=os.path.join(BASEDIR, "sessionObjects")
139
140# OUTPUT_FILE_USER:
141# Unix owner (user) for output files
142OUTPUT_FILE_USER="badc"
143
144# OUTPUT_FILE_GROUP:
145# Unix group for output files
146OUTPUT_FILE_GROUP="byacl"
147
148# OUTPUT_DIR_PERMISSION:
149# Unix permission for access to output directories
150OUTPUT_DIR_PERMISSION=0750
151
152# OUTPUT_FILE_PERMISSION:
153# Unix permission for access to output files
154OUTPUT_FILE_PERMISSION=0640
155
156# OUTPUT_FORMATS:
157# List of available output formats.
158OUTPUT_FORMATS=["GIF", "Postscript", "CGM"]
159
160# VCS_TEMPLATES:
161# A dictionary of template names used by the GeoSPlAT package
162VCS_TEMPLATES={"with_levels":"GEOSPLAT_001",
163               "no_levels":"GEOSPLAT_002"}
164
165# SOURCE_NAME:
166# String to appear on plots.
167SOURCE_NAME="Source: British Atmospheric Data Centre"
168
169# MESSAGE_TO_USERS:
170# A message that will be written at the top of all web pages underneath
171# the main header.
172MESSAGE_TO_USERS="""This application has recently been upgraded and may present bugs. Please contact <A HREF="mailto:%s">%s</A> if an error occurs so that we can improve this service.""" % (ADMIN_MAIL_ADDRESS, ADMIN_MAIL_ADDRESS)
173
174# PROCESS_LIST_DIR
175# The directory in which GS should store the list of processes
176# currently running jobs. This directory holds a database that is
177# checked and added to each time another GS job is started. If the
178# user is already running a job then they are told there is no
179# resource currently available to them.
180PROCESS_LIST_DIR=os.path.join(BASEDIR, "processes")
181
182# LOG_DIR:
183# Location of log directory.
184LOG_DIR=os.path.join(BASEDIR, "logs")
185
186# ERROR_LOG
187# Location of the error log.
188ERROR_LOG=os.path.join(LOG_DIR, "errors")
189
190# REQUEST_LOG
191# Location of completed request log.
192# Note that requests are only logged if a user has asked to create some
193# data and it has extracted successfully.
194REQUEST_LOG=os.path.join(LOG_DIR, "requests")
195
Note: See TracBrowser for help on using the repository browser.