ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/REQMGR/util/DefaultConfig.py
Revision: 1.5
Committed: Fri May 28 17:10:57 2010 UTC (14 years, 11 months ago) by rpw
Content type: text/x-python
Branch: MAIN
Changes since 1.4: +11 -10 lines
Log Message:
New things for WebRequestSchema

File Contents

# User Rev Content
1 rpw 1.1 import socket
2     """
3     Defines default config values for errorhandler specific
4     parameters.
5     """
6     __all__ = []
7 rpw 1.5 __revision__ = "$Id: DefaultConfig.py,v 1.4 2010/05/12 21:00:38 rpw Exp $"
8     __version__ = "$Revision: 1.4 $"
9 rpw 1.1
10     import os
11    
12     from WMCore.Configuration import Configuration
13    
14 rpw 1.5 cmsswInstallation = '/uscmst1/prod/sw/cms'
15 rpw 1.1
16     config = Configuration()
17 rpw 1.4 connectUrl = "mysql://rpw@localhost/reqmgr_rpw"
18     dbsock = '/var/lib/mysql/mysql.sock'
19 rpw 1.1
20     config.section_("CoreDatabase")
21     #config.CoreDatabase.dialect = 'mysql'
22 rpw 1.4 config.CoreDatabase.socket = dbsock
23 rpw 1.1 #config.CoreDatabase.user = 'rpw'
24 rpw 1.4 #config.CoreDatabase.passwd = 'XXXXXXX'
25 rpw 1.1 #config.CoreDatabase.hostname = 'localhost'
26     #config.CoreDatabase.name = 'reqmgr_rpw'
27 rpw 1.4 #config.CoreDatabase.dialect = os.getenv("DIALECT")
28 rpw 1.1
29 rpw 1.4 config.CoreDatabase.connectUrl = connectUrl
30     config.CoreDatabase.dbsock = dbsock
31     host = "cmssrv49.fnal.gov"
32     port = 8585
33 rpw 1.1
34 rpw 1.4 config.component_('ReqMgr')
35     config.ReqMgr.templates = os.environ['WTBASE'] + '/src/templates/WMCore/WebTools'
36     config.ReqMgr.admin = 'rickw@caltech.edu'
37     config.ReqMgr.title = 'CMS Request Manager'
38     config.ReqMgr.description = 'CMS Request manager'
39 rpw 1.1
40 rpw 1.4 config.webapp_("ReqMgr")
41     config.ReqMgr.componentDir = "/home/rpw/ReqMgr"
42     config.ReqMgr.server.host = host
43     config.ReqMgr.server.port = port
44     #config.ReqMgr.database.connectUrl = "oracle://rpw:changeme_2009@cmscald"
45     config.ReqMgr.database.connectUrl = "mysql://rpw@localhost/reqmgr_rpw"
46     config.ReqMgr.database.socket = config.CoreDatabase.socket
47 rpw 1.2 config.ReqMgr.templates = os.environ['WTBASE'] + '/src/templates/WMCore/WebTools'
48     config.ReqMgr.admin = 'rickw@caltech.edu'
49     config.ReqMgr.title = 'CMS Request Manager'
50     config.ReqMgr.description = 'CMS Request manager'
51 rpw 1.4 config.ReqMgr.couchURL = 'cmssrv52.fnal.gov:5984'
52 rpw 1.2
53 rpw 1.1
54 rpw 1.4 reqMgrHost = '%s:%s' % (host, port)
55    
56     # FIXME only needed for running from ROot.py?
57    
58 rpw 1.1 # This component has all the configuration of CherryPy
59     config.component_('Webtools')
60 rpw 1.4 config.Webtools.host = host
61     config.Webtools.port = port
62 rpw 1.1 # This is the application
63 rpw 1.2 config.Webtools.application = 'ReqMgr'
64     views = config.ReqMgr.section_('views')
65 rpw 1.1 active = views.section_('active')
66    
67 rpw 1.4
68     views = config.ReqMgr.section_('views')
69     active = views.section_('active')
70    
71 rpw 1.1 # download workflows
72     active.section_('download')
73     active.download.object = 'WMCore.HTTPFrontEnd.Downloader'
74 rpw 1.4 active.download.dir = config.ReqMgr.componentDir
75 rpw 1.1
76     active.section_('requestDataService')
77     active.requestDataService.object = 'ReqMgr.Component.RequestDataService.RequestDataService'
78 rpw 1.2 active.requestDataService.reqMgrHost = reqMgrHost
79 rpw 1.3 active.requestDataService.workloadCache = active.download.dir
80 rpw 1.4 active.requestDataService.configCacheUrl = config.ReqMgr.couchURL
81    
82     active.section_('reqMgrBrowser')
83     active.reqMgrBrowser.object = 'ReqMgr.RequestInterface.WWW.ReqMgrBrowser'
84     active.reqMgrBrowser.reqMgrHost = reqMgrHost
85     active.reqMgrBrowser.workloadCache = active.download.dir
86     active.reqMgrBrowser.configCacheUrl = config.ReqMgr.couchURL
87 rpw 1.1
88 rpw 1.2 #active.section_('CmsDriverWebRequest')
89     #active.CmsDriverWebRequest.object = 'ReqMgr.RequestInterface.WWW.CmsDriverWebRequest'
90     #active.CmsDriverWebRequest.cmsswInstallation = cmsswInstallation
91     #active.CmsDriverWebRequest.cmsswDefaultVersion = 'CMSSW_2_2_3'
92     #active.CmsDriverWebRequest.configCacheDbUrl = configCache
93 rpw 1.4 #config.component_('SecurityModule')
94     #config.SecurityModule.oid_server = 'http://localhost:8400/'
95 rpw 1.2 #config.SecurityModule.app_url = 'https://cmsweb.cern.ch/myapp'
96 rpw 1.4 #config.SecurityModule.handler = 'WMCore.WebTools.OidDefaultHandler'
97     #config.SecurityModule.mount_point = 'auth'
98     #config.SecurityModule.session_name = 'SecurityModule'
99     #config.SecurityModule.store = 'filestore'
100     #config.SecurityModule.store_path = os.environ['WMCOREBASE'] + '/tmp/security-store'
101 rpw 1.2
102 rpw 1.1
103     active.section_('reqMgr')
104     active.reqMgr.object = 'WMCore.WebTools.RESTApi'
105 rpw 1.4 #active.reqMgr. = config.ReqMgr.database.connectUrl
106     #active.reqMgr.dialect = config.ReqMgr.dialect
107 rpw 1.1 #active.reqMgr.database = 'mysql://rpw@localhost/reqmgr_rpw?unix_socket=/var/lib/mysql/mysql.sock'
108    
109     active.reqMgr.section_('model')
110     active.reqMgr.model.object = 'ReqMgr.RequestInterface.WWW.ReqMgrRESTModel'
111 rpw 1.3 active.reqMgr.model.workloadCache = active.download.dir
112 rpw 1.2 active.reqMgr.model.reqMgrHost = reqMgrHost
113 rpw 1.1 active.reqMgr.section_('formatter')
114     active.reqMgr.formatter.object = 'WMCore.WebTools.RESTFormatter'
115 rpw 1.3 active.reqMgr.formatter.templates = config.ReqMgr.templates
116 rpw 1.1
117 rpw 1.5 active.section_('WebRequestSchema')
118     active.WebRequestSchema.object = 'ReqMgr.RequestInterface.WWW.WebRequestSchema'
119     active.WebRequestSchema.reqMgrHost = reqMgrHost
120     active.WebRequestSchema.cmsswInstallation = cmsswInstallation
121     active.WebRequestSchema.cmsswDefaultVersion = 'CMSSW_3_5_8'
122     active.WebRequestSchema.configCacheUrl = "http://dmwmwriter:gutslap!@cmssrv52.fnal.gov:5984"
123     active.WebRequestSchema.configCacheDBName = "wmagent_config_cache"
124     active.WebRequestSchema.templates = config.ReqMgr.templates