Author: tmckay Date: 2012-10-11 14:42:57 +0000 (Thu, 11 Oct 2012) New Revision: 5506
Added: trunk/cumin/etc/cumin.messaging.conf Modified: trunk/cumin/etc/cumin.conf trunk/cumin/python/cumin/config.py Log: Support messaging persona through an additional config file that overrides default settings (grid) in the standard config file. BZ846010
Modified: trunk/cumin/etc/cumin.conf =================================================================== --- trunk/cumin/etc/cumin.conf 2012-10-10 20:30:51 UTC (rev 5505) +++ trunk/cumin/etc/cumin.conf 2012-10-11 14:42:57 UTC (rev 5506) @@ -9,10 +9,7 @@ # If a configuration section does not set a value for # a particular parameter, the parameter is searched for # in the [common] section. This allows values to be set -# globally and then optionally overridden per section. -# For example, to set the 'persona' value to grid for every -# web section in the file, you may add 'persona: grid' -# to the common section. +# globally and then optionally overridden per section.
[common] # database: dbname=cumin @@ -78,25 +75,13 @@ # webs: web
# Default cumin-data configuration at installation. -# Assumes 'persona' setting in the web section is 'grid' # Expiration of samples and vacuuming of the database is handled # by the data.grid thread. datas: data.grid, data.grid-slots, data.grid-submissions, data.sesame
-# If the 'persona' setting in the web section is set to 'default' then -# the 'data.other' section should be added as follows. -#datas: data.grid, data.grid-slots, data.grid-submissions, data.sesame, data.other - -# If the 'persona' setting in the web section is set to 'messaging' then -# the 'data.grid*' section names may be omitted from 'datas' as follows. -# ***NOTE*** that in this case the data.grid section will not be included -# so the expire and vacuum settings should be changed in one of these sections. -# Failure to do so will cause the database to grow continually! -#datas: data.sesame, data.other - # To run a single cumin-data process in a small deployment set 'datas' as follows # and optionally modify 'include-classes' and 'exclude-classes' in the [data] -# section based on 'persona'. See additional comments in [data] section. +# section. See additional comments in [data] section. #datas: data
# Reporting is off by default. @@ -114,7 +99,6 @@ # operator-email: [none] # update-interval: 10 # max-qmf-table-sort: 1000 -# persona: grid # authorize: False # auth: # ldap_tls_cacertfile: @@ -135,21 +119,10 @@ # expire-threshold: 86400 # vacuum-enabled: True # vacuum-interval: 3600 -# include-classes: [all] +include-classes: com.redhat.grid:*, com.redhat.sesame:* # exclude-classes: [none]
-# If 'persona' in the web section is set to 'default' -# then include-classes and exclude-classes should be -# left unspecified (the default)
-# If 'persona' in the web section is set to 'grid' then -# set include-classes as follows and leave exclude-classes unspecified -#include-classes: com.redhat.grid:*, com.redhat.sesame:* - -# If 'persona' in the web section is set to 'messaging' then -# set exclude-classes as follows and leave include-classes unspecified -#exclude-classes: com.redhat.grid:* - [data.grid] # log-file: /usr/share/cumin/log/data.grid.log # expire-enabled: True @@ -192,16 +165,6 @@ include-classes: com.redhat.sesame:* # exclude-classes: [none]
-[data.other] -# log-file: /usr/share/cumin/log/data.other.log -expire-enabled: False -# expire-interval: 3600 -# expire-threshold: 86400 -vacuum-enabled: False -# vacuum-interval: 3600 -# include-classes: [all] -exclude-classes: com.redhat.grid:*, com.redhat.sesame:* - [report] # include-classes: [all] # exclude-classes: [none] @@ -234,7 +197,7 @@ ## wallaby-broker: [first item in 'brokers' list] ## The broker to use for interaction with a Wallaby agent. ## This is not necessarily the same broker used for grid -## and messaging information. The default value is the +## information. The default value is the ## first item in the 'brokers' list if not specified. To ## turn off interaction with Wallaby, set wallaby-broker to ## the string 'None'. @@ -306,12 +269,6 @@ ## set and valid, Cumin will use ssl. The scheme in the ## Cumin URL will be "https://" instead of "http://".
-## persona: grid -## Controls content of the top level page. -## Valid values are "default", "grid", and "messaging". -## The "default" persona contains content for both grid and -## messaging. - ## authorize: False ## Controls whether or not roles are enforced. ## Roles are assigned to users with cumin-admin.
Added: trunk/cumin/etc/cumin.messaging.conf =================================================================== --- trunk/cumin/etc/cumin.messaging.conf (rev 0) +++ trunk/cumin/etc/cumin.messaging.conf 2012-10-11 14:42:57 UTC (rev 5506) @@ -0,0 +1,23 @@ +[web] +persona: messaging + +[master] +#datas: data +datas: data.sesame, data.messaging + +# Use this for a simple deployment with a +# single cumin-data instance. Set 'datas' +# to 'data' in the [master] section above. +[data] +include-classes: +exclude-classes: com.redhat.grid:* + +[data.messaging] +# log-file: /usr/share/cumin/log/data.messaging.log +# expire-enabled: True +expire-interval: 900 +# expire-threshold: 86400 +# vacuum-enabled: True +vacuum-interval: 900 +# include-classes: [all] +exclude-classes: com.redhat.grid:*, com.redhat.sesame:* \ No newline at end of file
Modified: trunk/cumin/python/cumin/config.py =================================================================== --- trunk/cumin/python/cumin/config.py 2012-10-10 20:30:51 UTC (rev 5505) +++ trunk/cumin/python/cumin/config.py 2012-10-11 14:42:57 UTC (rev 5506) @@ -44,6 +44,9 @@ paths = list()
paths.append(os.path.join(os.sep, "etc", "cumin", "cumin.conf")) + # for messaging installation /etc/cumin.conf.d/messaging.conf should + # contain settings for the messaging persona. + paths.append(os.path.join(os.sep, "etc", "cumin", "cumin.conf.d", "messaging.conf")) paths.append(os.path.join(self.home, "etc", "cumin.conf")) paths.append(os.path.join(os.path.expanduser("~"), ".cumin.conf"))