1 |
rpw |
1.1 |
import socket
|
2 |
|
|
"""
|
3 |
|
|
Defines default config values for errorhandler specific
|
4 |
|
|
parameters.
|
5 |
|
|
"""
|
6 |
|
|
__all__ = []
|
7 |
rpw |
1.4 |
__revision__ = "$Id: DefaultConfig.py,v 1.3 2010/02/10 20:23:57 rpw Exp $"
|
8 |
|
|
__version__ = "$Revision: 1.3 $"
|
9 |
rpw |
1.1 |
|
10 |
|
|
import os
|
11 |
|
|
|
12 |
|
|
from WMCore.Configuration import Configuration
|
13 |
|
|
|
14 |
|
|
cmsswInstallation = '/uscmst1/prod/sw/cms/slc4_ia32_gcc345/cms/cmssw'
|
15 |
|
|
|
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_('WebRequestSchema')
|
104 |
|
|
active.WebRequestSchema.object = 'ReqMgr.RequestInterface.WWW.WebRequestSchema'
|
105 |
rpw |
1.2 |
active.WebRequestSchema.reqMgrHost = reqMgrHost
|
106 |
rpw |
1.1 |
active.WebRequestSchema.cmsswInstallation = cmsswInstallation
|
107 |
|
|
active.WebRequestSchema.cmsswDefaultVersion = 'CMSSW_2_2_3'
|
108 |
rpw |
1.4 |
active.WebRequestSchema.configCacheDbUrl = config.ReqMgr.couchURL
|
109 |
rpw |
1.1 |
|
110 |
|
|
active.section_('reqMgr')
|
111 |
|
|
active.reqMgr.object = 'WMCore.WebTools.RESTApi'
|
112 |
rpw |
1.4 |
#active.reqMgr. = config.ReqMgr.database.connectUrl
|
113 |
|
|
#active.reqMgr.dialect = config.ReqMgr.dialect
|
114 |
rpw |
1.1 |
#active.reqMgr.database = 'mysql://rpw@localhost/reqmgr_rpw?unix_socket=/var/lib/mysql/mysql.sock'
|
115 |
|
|
|
116 |
|
|
active.reqMgr.section_('model')
|
117 |
|
|
active.reqMgr.model.object = 'ReqMgr.RequestInterface.WWW.ReqMgrRESTModel'
|
118 |
rpw |
1.3 |
active.reqMgr.model.workloadCache = active.download.dir
|
119 |
rpw |
1.2 |
active.reqMgr.model.reqMgrHost = reqMgrHost
|
120 |
rpw |
1.1 |
active.reqMgr.section_('formatter')
|
121 |
|
|
active.reqMgr.formatter.object = 'WMCore.WebTools.RESTFormatter'
|
122 |
rpw |
1.3 |
active.reqMgr.formatter.templates = config.ReqMgr.templates
|
123 |
rpw |
1.1 |
|