ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/REQMGR/util/DefaultConfig.py
Revision: 1.2
Committed: Mon Feb 8 22:43:02 2010 UTC (15 years, 2 months ago) by rpw
Content type: text/x-python
Branch: MAIN
Changes since 1.1: +29 -20 lines
Log Message:
Add security module, clean up a little

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.2 __revision__ = "$Id: DefaultConfig.py,v 1.1 2010/01/30 00:38:50 rpw Exp $"
8     __version__ = "$Revision: 1.1 $"
9 rpw 1.1
10     import os
11    
12     from WMCore.Configuration import Configuration
13     import ReqMgr.RequestDB.Configuration
14    
15     cmsswInstallation = '/uscmst1/prod/sw/cms/slc4_ia32_gcc345/cms/cmssw'
16     configCache = 'cmssrv52.fnal.gov:5984'
17    
18     config = Configuration()
19    
20     config.section_("Agent")
21     config.Agent.contact = "rickw@caltech.edu"
22     config.Agent.teamName = "Dodgers"
23     config.Agent.agentName = "Manny Ramirez"
24    
25     config.section_("General")
26     config.General.workDir = '/home/rpw/work'
27     config.section_("CoreDatabase")
28     #config.CoreDatabase.dialect = 'mysql'
29     #config.CoreDatabase.socket = '/var/lib/mysql/mysql.sock'
30     #config.CoreDatabase.user = 'rpw'
31     #config.CoreDatabase.passwd = ''
32     #config.CoreDatabase.hostname = 'localhost'
33     #config.CoreDatabase.name = 'reqmgr_rpw'
34     config.CoreDatabase.dialect = os.getenv("DIALECT")
35     config.CoreDatabase.connectUrl = os.getenv("DATABASE")
36     #config.CoreDatabase.dbsock = os.getenv("DBSOCK")
37    
38    
39    
40 rpw 1.2 config.component_('ReqMgr')
41     config.ReqMgr.templates = os.environ['WTBASE'] + '/src/templates/WMCore/WebTools'
42     config.ReqMgr.admin = 'rickw@caltech.edu'
43     config.ReqMgr.title = 'CMS Request Manager'
44     config.ReqMgr.description = 'CMS Request manager'
45    
46 rpw 1.1
47     # This component has all the configuration of CherryPy
48     config.component_('Webtools')
49     config.Webtools.host = 'cmssrv49.fnal.gov'
50     config.Webtools.port = 8585
51     # This is the application
52 rpw 1.2 config.Webtools.application = 'ReqMgr'
53     views = config.ReqMgr.section_('views')
54 rpw 1.1 active = views.section_('active')
55    
56 rpw 1.2 reqMgrHost = config.Webtools.host+ ':' + str(config.Webtools.port)
57    
58 rpw 1.1 # download workflows
59     active.section_('download')
60     active.download.object = 'WMCore.HTTPFrontEnd.Downloader'
61     active.download.dir = ReqMgr.RequestDB.Configuration.config['WorkflowCache']
62    
63     active.section_('requestDataService')
64     active.requestDataService.object = 'ReqMgr.Component.RequestDataService.RequestDataService'
65     active.requestDataService.dialect = config.CoreDatabase.dialect
66 rpw 1.2 active.requestDataService.reqMgrHost = reqMgrHost
67 rpw 1.1 active.requestDataService.configCacheUrl = configCache
68    
69 rpw 1.2 #active.section_('CmsDriverWebRequest')
70     #active.CmsDriverWebRequest.object = 'ReqMgr.RequestInterface.WWW.CmsDriverWebRequest'
71     #active.CmsDriverWebRequest.cmsswInstallation = cmsswInstallation
72     #active.CmsDriverWebRequest.cmsswDefaultVersion = 'CMSSW_2_2_3'
73     #active.CmsDriverWebRequest.configCacheDbUrl = configCache
74     config.component_('SecurityModule')
75     config.SecurityModule.oid_server = 'http://localhost:8400/'
76     #config.SecurityModule.app_url = 'https://cmsweb.cern.ch/myapp'
77     config.SecurityModule.handler = 'WMCore.WebTools.OidDefaultHandler'
78     config.SecurityModule.mount_point = 'auth'
79     config.SecurityModule.session_name = 'SecurityModule'
80     config.SecurityModule.store = 'filestore'
81     config.SecurityModule.store_path = os.environ['WMCOREBASE'] + '/tmp/security-store'
82    
83 rpw 1.1
84     active.section_('WebRequestSchema')
85     active.WebRequestSchema.object = 'ReqMgr.RequestInterface.WWW.WebRequestSchema'
86 rpw 1.2 active.WebRequestSchema.reqMgrHost = reqMgrHost
87 rpw 1.1 active.WebRequestSchema.cmsswInstallation = cmsswInstallation
88     active.WebRequestSchema.cmsswDefaultVersion = 'CMSSW_2_2_3'
89     active.WebRequestSchema.configCacheDbUrl = configCache
90    
91     active.section_('reqMgr')
92     active.reqMgr.object = 'WMCore.WebTools.RESTApi'
93     active.reqMgr.database = config.CoreDatabase.connectUrl
94     active.reqMgr.dialect = config.CoreDatabase.dialect
95     #active.reqMgr.database = 'mysql://rpw@localhost/reqmgr_rpw?unix_socket=/var/lib/mysql/mysql.sock'
96    
97     active.reqMgr.section_('model')
98     active.reqMgr.model.object = 'ReqMgr.RequestInterface.WWW.ReqMgrRESTModel'
99     active.reqMgr.model.requestSpecDir = active.download.dir
100 rpw 1.2 active.reqMgr.model.reqMgrHost = reqMgrHost
101 rpw 1.1 active.reqMgr.section_('formatter')
102     active.reqMgr.formatter.object = 'WMCore.WebTools.RESTFormatter'
103     active.reqMgr.formatter.templates = os.environ['WTBASE'] + '/templates/WMCore/WebTools/'
104