source: TI03-DataExtractor/trunk/pydxs/serverConfig.py @ 1153

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/trunk/pydxs/serverConfig.py@1153
Revision 1153, 7.6 KB checked in by astephen, 14 years ago (diff)

Latest version with javascript select all in the GUI, date/time
javascript checking (needs onsubmit), cleaned up selection by domain.

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 dx 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
18"""
19
20
21# Import python modules
22import os   # used to combine paths in variables below
23
24# DEBUG:
25# Set to 1 if you want to be in DEBUG mode. This reports CGI errors
26# directly to the browser.
27DEBUG=1
28
29# RESTRICTED_DATA:
30# Do you want security on (1) or off (0)?
31# Note that there is no in-built security implementation in
32# dx, just a set of hooks under which your security system
33# can be called.
34RESTRICTED_DATA=0
35
36# SECURITY_MODEL:
37# The name of the security model being used. The standard
38# ***and insecure (until you have implemented your local hooks)***
39# version is "basic". NERC DataGrid is "ndg".
40SECURITY_MODEL="ndg"
41
42# PACKAGE_NAME:
43# This will appear as the main title displayed
44# on the web interface.
45PACKAGE_NAME="Data Extractor"
46
47# LOCAL_RULES:
48# Do you want local rules switched on or off (1 or 0)?
49# This will apply to any parts of the code where local
50# modifications have been made and wrapped in an if clause.
51LOCAL_RULES=0
52
53# UNRESTRICTED_CREDIT:
54# Flag on whether there are any resource limits applied.
55# Value of 1 means no restrictions.
56UNRESTRICTED_CREDIT=1
57
58# CREDIT_LIMIT:
59# Limit on the number of credits allowed on any job
60CREDIT_LIMIT=2
61
62# TOKEN_VALID_LIFETIME:
63# Period before security token should expire (in seconds)
64TOKEN_VALID_LIFETIME=60*60*8   # 8 hours
65
66# REGISTRATION_PAGE:
67# For restricted datasets, this is the web page from which users
68# can find registration details.
69REGISTRATION_PAGE="http://yourhost/your_link.html"
70
71# REQUEST_SIZE_LIMIT:
72# A limit in the number of Megabytes for any user requests.
73REQUEST_SIZE_LIMIT=100 # MB
74
75# MAX_FILE_SIZE:
76# A limit on the size of each output file
77# (cannot be greater than REQUEST_SIZE_LIMIT)
78MAX_FILE_SIZE=1 # MB
79if MAX_FILE_SIZE>REQUEST_SIZE_LIMIT:
80    MAX_FILE_SIZE=REQUEST_SIZE_LIMIT
81
82# ONE_FILE_PER_TIMESTEP:
83# Sets whether default output should be one file per timestep.
84ONE_FILE_PER_TIMESTEP=0
85
86# TIMING_SCALE_FACTOR:
87# Since every system will run at a different speed this scale
88# factor can be adjusted to improve the estimated duration of
89# requests.
90TIMING_SCALE_FACTOR=0.00001
91
92# ADMIN_MAIL_ADDRESS:
93# The e-mail address of the adminstrator for this version. 
94ADMIN_MAIL_ADDRESS="as56@localhost"
95
96# LOCAL_MAIL_HOST:
97# The outgoing mail box address for the host machine.
98# On many systems you can just use "localhost".
99LOCAL_MAIL_HOST="localhost"
100
101# ADMIN_NOTIFICATION:
102# Set this to 1 if you want to be notified by e-mail when an error has
103# occurred.
104ADMIN_NOTIFICATION=1
105
106# SOAP_SERVER_PORT:
107# Port over which the Web Service (or first method)  will run.
108SOAP_SERVER_PORT=8406
109
110# BASEDIR:
111# Full path to the main package location.
112# "/usr/local/dxs" is recommended but you can change it as
113# you wish.
114BASEDIR="/home/as56/abstractWebService/releases/dx/dxs"
115
116# OUTPUT_DIR:
117# The full path on the local machine of the output directory.
118# Where you are also using the dxc client package you will
119# normally need to specify a directory visible under the
120# webserver (e.g. /srv/www/htdocs/dx/output) that is the same
121# as the value of OUTPUT_DIR_LOCAL_PATH in the client (dxc)
122# package.
123OUTPUT_DIR="/home/as56/apache/htdocs/dx/output"
124
125# OUTPUT_DIR_URL:
126# URL path to output directory.
127OUTPUT_DIR_URL="http://localhost/output"
128
129# SESSION_OBJECT_DIR:
130# Location of persistent session objects saved during a session.
131# These are saved as Python module
132SESSION_OBJECT_DIR=os.path.join(BASEDIR, "sessionObjects")
133
134# OUTPUT_FILE_USER:
135# Unix owner (user) for output files
136OUTPUT_FILE_USER="as56"
137
138# OUTPUT_FILE_GROUP:
139# Unix group for output files
140OUTPUT_FILE_GROUP="users"
141
142# OUTPUT_DIR_PERMISSION:
143# Unix permission for access to output directories
144OUTPUT_DIR_PERMISSION=0755
145
146# OUTPUT_FILE_PERMISSION:
147# Unix permission for access to output files
148OUTPUT_FILE_PERMISSION=0644 
149
150# USER_HOMEDIR:
151# Required home directory for CDAT to run.
152# NOTE: This may not be needed for non-graphical applications.
153# However, if you do need it you must copy/create a
154# PCMDI_GRAPHICS sub-directory within this directory in order
155# for CDAT to run.
156USER_HOMEDIR="/var/lib/wwwrun"
157
158# TOP_LEVEL:
159# Decides whether the DatasetGroup (standard configuration) is
160# the highest level or Dataset (as required by the NERC DataGrid)
161# is the highest level
162TOP_LEVEL="datasetGroup"
163
164# OUTPUT_FORMATS:
165# List of available output formats.
166OUTPUT_FORMATS=["NetCDF", "NASA Ames", "CSML/NetCDF"]
167
168# LOCAL_PYTHONPATH:
169# Python list of required directories that need to be added
170# to the PYTHONPATH environment variable to access all parts of
171# CDAT and NUMERIC packages.
172LOCAL_PYTHONPATH=['YOUR_CDAT/lib/python2.4', 
173    'YOUR_CDAT/lib/python2.4/site-packages', 
174    'YOUR_CDAT/cdat/lib/python2.4/site-packages/Numeric',
175    'YOUR_CDAT/lib/python2.3',
176    'YOUR_CDAT/lib/python2.3/site-packages',
177    'YOUR_CDAT/cdat/lib/python2.3/site-packages/Numeric']
178   
179
180# CDAT_BIN_PATH:
181# The bin directory that holds the cdat executable on your system.
182CDAT_BIN_PATH="/usr/local/cdat/bin"
183
184# NAPPY_PATH:
185# Location of NAppy package used to generate NASA Ames output
186NAPPY_PATH="/usr/local/nappy"
187
188# MESSAGE_TO_USERS:
189# A message that will be written at the top of all web pages underneath
190# the main header.
191MESSAGE_TO_USERS="""This is a test version of the %s so it may contain bugs. Please contact <A HREF="mailto:%s">%s</A> if an error occurs so that we can improve this service.""" % (PACKAGE_NAME, ADMIN_MAIL_ADDRESS, ADMIN_MAIL_ADDRESS)
192
193# PROCESS_LIST_DIR
194# The directory in which the DX should store the list of processes
195# currently running jobs. This directory holds a database that is
196# checked and added to each time another DX job is started. If the
197# user is already running a job then they are told there is no
198# resource currently available to them.
199PROCESS_LIST_DIR=os.path.join(BASEDIR, "processes")
200
201# CF_METADATA_GLOBAL_ATTRIBUTES
202# Define a set of core Climate and Forecasts (CF) Metadata Standards
203# for NetCDF compliant global file attributes to put in all files.
204CF_METADATA_GLOBAL_ATTRIBUTES={"comments":"Created by test data extractor."}
205
206# MAX_NUM_DATASETS
207# Maximum number of datasets allowed per request
208MAX_NUM_DATASETS=2
209
210# INPUT_DATASETS_FILE:
211# This is the file containing the XML document containing a top-level
212# description of Dataset Groups and Datasets for use with the locally
213# configured version of the DX.
214INPUT_DATASETS_FILE=os.path.join(BASEDIR, "datasets", "inputDatasets.xml")
215
216# LOG_DIR:
217# Location of log directory.
218LOG_DIR=os.path.join(BASEDIR, "logs")
219
220# ERROR_LOG:
221# Location of the error log.
222ERROR_LOG=os.path.join(LOG_DIR, "errors")
223
224# REQUEST_LOG:
225# Location of completed request log.
226# Note that requests are only logged if a user has asked to create some
227# data and it has extracted successfully.
228REQUEST_LOG=os.path.join(LOG_DIR, "requests")
229
230# FILE_NAME_TEMPLATING:
231# Use output filenames based on the input data.
232# Note: you will need to provide this information in
233# the ingestion of datasets. 0=OFF, 1=ON.
234FILE_NAME_TEMPLATING=1
Note: See TracBrowser for help on using the repository browser.