8.2   MWS Configuration

These properties can be modified by setting the appropriate values in the mws-config.groovy file. This file is located in MWS_HOME/etc/ or /opt/mws/etc/ by default as explained in 1.1  Configuring Moab Web Services.

For documentation clarity, '/opt/mws/' is used in the file names instead of 'MWS_HOME'.

The configuration file is read not only on startup but also each time it is changed. Several properties, including those for Moab Workload Manager (moab), Moab Accounting Manager (mam), Mongo (grails.mongo), and authentication (auth) are processed after each change and can affect the runtime behavior of MWS.

Configuration files can also be placed in the /opt/mws/etc/mws.d directory. Any configuration files here get merged with /opt/mws/etc/mws-config.groovy. In case of conflict, the configuration in /opt/mws/etc/mws.d takes precedence.

Configuration Reference

For all possible values that can be set, see the Grails reference guide. For project specific settings (usually the only ones you will need to change), you can set the following properties:

Property Type Default Description
auth.defaultUser.password String changeme!

Unencoded password of the default admin user.

The following characters must be escaped in strings in the /opt/insight/etc/config.groovy and /opt/mws/etc/mws-config.groovy files (such as when used in a password): \ (backslash), " (double quote), ' (single quote), $ (dollar sign). For example: mongo.password="my\$cool\$password". We recommend that you avoid using these characters.

auth.defaultUser.username String moab-admin Username of the default admin user (only created if no other users exist).
grails.mime.use.accept.header Boolean false When enabled, uses the HTTP Content-Accept header to determine the content type used for return data (JSON only for now).
grails.mongo.databaseName String mws The MongoDB database name to use.
grails.mongo.host String 127.0.0.1

The MongoDB host to use (note that MongoDB runs on 127.0.0.1 and not localhost by default).

grails.mongo.options.autoConnectRetry Boolean true Controls whether the system retries automatically on connection errors.
grails.mongo.options.connectionsPerHost Integer 50 The number of connections allowed per host.
grails.mongo.options.threads
AllowedToBlockForConnectionMultiplier
Integer 5 The number of threads per connection allowed to wait for an available connection.
grails.mongo.options.ssl Boolean false Whether the driver should use an SSL connection to MongoDB.
grails.mongo.password String -

(Optional) The password to use when connecting to MongoDB.

The following characters must be escaped in strings in the /opt/insight/etc/config.groovy and /opt/mws/etc/mws-config.groovy files (such as when used in a password): \ (backslash), " (double quote), ' (single quote), $ (dollar sign). For example: mongo.password="my\$cool\$password". We recommend that you avoid using these characters.

grails.mongo.port Integer 27017 The MongoDB port to use.
grails.mongo.replicaSet List of Strings n/a

The MongoDB replica set servers to use (for example, ["moab1:27017","moab2:27017"]); note that grails.mongo.host must be set to null to use this option.

grails.mongo.username String - (Optional) The username to use when connecting to MongoDB.
grails.plugins.springsecurity.active Boolean true Enables or disables security for MWS as a whole, including all providers.
grails.plugins.springsecurity.basic.realmName String Moab Web Services The HTTP realm used when using basic auth.
grails.plugins.springsecurity.oauthProvider.active Boolean true Enables or disables the OAuth2 provider.
grails.plugins.springsecurity.useBasicAuth Boolean true Enables or disables basic auth with a simple username/password.
insight.command.port Integer 5568 The port on which Insight accepts commands.
insight.command.timeout.seconds Integer 5 Number of seconds MWS waits for Insight to respond.
insight.server String localhost The Insight server's host name or IP address.
ldap.baseDNs List of Strings - A list of distinguished names that are the root entries for LDAP searches.
ldap.bindUser String - The distinguished name of the LDAP bind user.
ldap.directory.type String -

The type of LDAP directory (for example, "Microsoft Active Directory"). See 1.1  Configuring Moab Web Services for values.

ldap.password String -

The password of the LDAP bind user.

The following characters must be escaped in strings in the /opt/insight/etc/config.groovy and /opt/mws/etc/mws-config.groovy files (such as when used in a password): \ (backslash), " (double quote), ' (single quote), $ (dollar sign). For example: mongo.password="my\$cool\$password". We recommend that you avoid using these characters.

ldap.port Integer - LDAP server's port.
ldap.security.type String -

How the connection between MWS and LDAP is secured. See 1.2  Setting up MWS Security for more information.

ldap.server String - LDAP server hostname or IP address.
mam.messageDigestAlgorithm String SHA-1 The message digest algorithm that MWS uses to communicate with Moab Accounting Manager. For now, MAM supports only SHA-1.
mam.port Integer 7112 Moab Accounting Manager server's port.
mam.secretKey String mamsecret Secret key used to communicate with Moab Accounting Manager.
mam.server String localhost Moab Accounting Manager server hostname or IP address.
moab.databaseName String moab

The name of the MongoDB database to use to retrieve current Moab HPC Suite data; this should match the database setting in Moab HPC Suite.

moab.messageDigestAlgorithm String SHA1

The message digest algorithm that MWS uses to communicate with Moab Workload Manager. Possible values are SHA-1 and SHA-512.

If the Moab parameter is set to HMAC64, then moab.messageDigestAlgorithm must be set to SHA-1. Likewise, if SERVERCSALGO is set to HMACSHA2, then moab.messageDigestAlgorithm must be set to SHA-512.

moab.messageQueue.port Integer 5570 The port on which Moab HPC Suite publishes ZeroMQ messages.
moab.messageQueue.secretKey String -

Used to encrypt and decrypt messages on the message queue using AES. Must be a Base64-encoded 128-bit (16-byte) key, for example: "1r6RvfqJa6voezy5wAx0hw=="

moab.port Integer 42559 Moab HPC Suite server's port.
moab.secretKey String moabsecret

Secret key used to communicate with Moab HPC Suite. See information about secret key in the Moab Workload Manager Administrator Guide.

moab.server String localhost Moab HPC Suite server hostname or IP address.
mws.cache.duration.default Integer 60 The default number of seconds to use for caching objects from Moab HPC Suite. This is only supported in certain objects such as policies.
mws.cache.duration.policy Integer 180 The number of seconds that the cache for policies is valid. If set to null, the default is used.
mws.certificates.location String etc/ssl.crt

The directory (relative or absolute) where plugin certificates are stored. See 6.2.15 Managing SSL Connections.

mws.events.expireAfterSeconds Integer 2592000 Events older than this many seconds (30 days by default) will be deleted from the database. Effective only with MongoDB 2.2 or later.
mws.health.check.period Integer 30

The number of seconds in between health checks. Used in creating notification conditions if problems exist in configuration or connections. For more information, see 4.13  Notification Conditions.

mws.hooks.location String hooks

The directory (relative or absolute) where Hooks are stored. See 3.7  Pre- and Post-Processing Hooks for more information.

mws.messageQueue.address String - The IP address on which MWS publishes ZeroMQ messages.
mws.messageQueue.port Integer 5564 The port on which MWS publishes ZeroMQ messages.
mws.plugins.location String plugins

The directory (relative or absolute) where Plugins are stored. See Chapter 6: About Moab Web Services Plugins for more information.

mws.services.hooks.syncInterval Integer 30 The number of seconds between each time MWS checks for service phase transition hooks that completed or timed out.
mws.services.phases.syncInterval Integer 14400 The number of seconds between each time MWS checks with Moab Workload Manager to verify that the service phases are correctly synchronized.
mws.suite String HPC

The suite or context that MWS is running in (see Suite for values).

pam.configuration.service String -

The PAM service to authenticate against. For example, login. For more information, see 1.1.4 PAM (Pluggable Authentication Module) Configuration Using /opt/mws/etc/mws-config.groovy.

plugins.autoStart Boolean true

Default configuration value for the plugin autoStart field (see 6.5.7 Setting Default Plugin Configuration).

plugins.config Map -

Default configuration value for the plugin config field (see 6.5.7 Setting Default Plugin Configuration).

plugins.loadInitialPlugins Boolean true

If true, loads the initial plugins defined for uploaded or built-in plugin types (see 6.2.17.A  Plugin Projects and Metadata).

plugins.pluginType String -

Default configuration value for the plugin pluginType field (see 6.5.7 Setting Default Plugin Configuration).

plugins.pollInterval Integer 30

Default configuration value for the plugin pollInterval field (see 6.5.7 Setting Default Plugin Configuration).

plugins.stateConsolidationPolicy NodeStatePolicy null

If 'optimistic', treats state data optimistically. If 'pessimistic', treats state data pessimistically. Can be null. See 6.1.6 Data Consolidation for more information.

Related Topics