6.1.1 Plugin Introduction

Moab Web Services plugins provide a highly extensible interface to interact with Moab HPC Suite, MWS, and external resources. Plugins can perform some of the same functions as Moab HPC Suite resource managers (RMs), while also providing many other features not available to RMs. This section will discuss the main features of plugins, some basic terminology, and how MWS plugins can interact with Moab HPC Suite.

Features

Plugins can:

  • Be created, modified, and deleted without restarting Moab Workload Manager or MWS.
  • Be defined in Groovy and uploaded to MWS without restarting.
  • Have individual data storage space and configuration.
  • Access MWS configuration and RESTful web services.
  • Log to a standard location configured in MWS.
  • Be polled at a regular interval (configured on a per-plugin basis).
  • Be informed of important system events.
  • Be individually stopped, started, paused, and resumed.
  • Expose secured and unsecured custom web services for external use.
  • Be manipulated via a full RESTful API (for more information, see Chapter 4: Resources).
  • Be manipulated via a full user interface in a browser.

Terminology

There are two distinct terms in the plugin layer: plugin types and plugins (instances).

Term Description
plugin types

Plugin types can be considered plugin templates with built-in logic. In object-oriented programming languages, this relates to the concept of a class. They possess certain abilities, or methods, that can be called by MWS to query or update information about certain resources. They also can define methods that will be exposed to external clients as web services. They do not contain any configuration or current data but they are often tied to a type of component, such as components that communicate with Moab HPC Suite's WIKI Protocol, or those that are built on a certain product.

They can define several types of methods:

  • Instance methods that return information about the current plugin, such as getState. (While these are defined in the plugin type, the plugin type itself does not have a state.)
  • The poll event method that is called at a configured interval.
  • Lifecycle event methods of plugins created from the plugin type, such as beforeStart and afterStart.
  • RM event methods that are called by Moab HPC Suite when certain events occur.
  • Web service methods that expose custom functionality as public web services.

 

Some examples of plugin types include the Native and vCenter plugin types.

plugins (instances) Plugins (also called plugin instances) are created from plugin types. They contain current data or configuration and use the plugin type methods to interact with resources.

Interactions with Moab HPC Suite as a Resource Manager

The plugin layer in MWS is integrated with Moab Workload Manager via the Native Resource Manager (RM) interface. When utilizing plugins, MWS is configured as a RM in Moab HPC Suite, as explained in the next section. Events from Moab HPC Suite are pushed through the RM interface to MWS, which is then pushed to each plugin in turn. The relationship between MWS, Moab HPC Suite, and plugins is shown in the following image:

For more information, see 6.1.6 Data Consolidation and 6.2.9 Reporting State Data.