-
Notifications
You must be signed in to change notification settings - Fork 13
Configuration example
Valentin Kuznetsov edited this page May 27, 2016
·
2 revisions
In order to run WMArchive service we need to setup /data/srv/state/wmarchive/wma.keytab file. This can be done using the following procedure (one time operation before to start the service):
cd /YOUR_AREA
# run ktutil command
ktutil
# it will give you an interactive prompt where you'll need to put your username and provide your password
ktutil: addent -password -p [email protected] -k 1 -e rc4-hmac
Password for [email protected]:
ktutil: addent -password -p [email protected] -k 1 -e aes256-cts
Password for [email protected]:
ktutil: wkt username.keytab
ktutil: quit
# the aforementioned step will write username.keytab file in local area which you'll move to service area
# and change its ownership to wmarchive
mv username.keytab /data/srv/state/wmarchive/wma.keytab
sudo chown _wmarchive._wmarchive /data/srv/state/wmarchive/wma.keytab
This file configure WMArchive service
"""
WMArchive configuration file.
"""
import os
import socket
from WMCore.Configuration import Configuration
HOST = socket.gethostname().lower()
ROOTDIR = os.getenv('WMA_STATIC_ROOT', os.getcwd())
config = Configuration()
main = config.section_("main")
srv = main.section_("server")
srv.thread_pool = 30
main.application = "wmarchive"
main.port = 8200 # main application port it listens on
main.index = 'data' # Configuration requires index attribute
# Security configuration
#main.authz_defaults = {"role": None, "group": None, "site": None}
#sec = main.section_("tools").section_("cms_auth")
#sec.key_file = "%s/auth/wmcore-auth/header-auth-key" % ROOTDIR
# this is where the application will be mounted, where the REST API
# is reachable and this features in CMS web frontend rewrite rules
app = config.section_(main.application)
app.admin = "[email protected]"
app.description = "CMS data operations WMArchive."
app.title = "CMS Request Manager (WMArchive)"
# define different views for our application
views = config.section_("views")
# web UI interface
ui = views.section_('web') # was section 'ui'
ui.object = 'WMArchive.Service.FrontPage.FrontPage'
ui.static = ROOTDIR
# REST interface
data = views.section_('data')
data.object = 'WMArchive.Service.RestApi.RestInterface'
data.short_storage_uri = 'mongodb://localhost:8230'
data.long_storage_uri = 'hdfs:///cms/wmarchive/test/avro/fwjr_prod.avsc'
data.long_storage_thr = 1*30*24*60*60 # 1 month
data.specmap = os.path.join(ROOTDIR, 'maps/qlmap.txt')
data.wmauri = 'http://localhost:%s' % main.port
# yarn option will be passed to myspark string
# use empty string for no yarn or --yarn or --yarn-cluster strings
data.yarn = ''