Resource plugin is an executable or script which generates RMS configuration for dds-submit. It can be written in any programming language and doesn’t depend on ODC.
The contract between resource plugin and ODC:
- Input: a resource description string. For example, it can be in JSON ar XML format or any other format. ODC executes plugin and provides a resource string via
--resand partition ID via--idcommand line options:
myplugin --res "Resource description string" --id "Partition ID"
- Output: an RMS configuration in
stdoutin the XML format.
ODC uses XML with the following top level tags:
| Tag | Description |
|---|---|
<rms> |
Name of the DDS RMS plugin |
<configFile> |
Path to the configuration file |
<agents> |
Number of agents |
<slots> |
Number of slots per agent |
Each tag corresponds to the command line option used by dds-submit. Not all tags are required. A set of required tags depends on the used DDS RMS plugin.
ODC provides the odc-rp-same plugin out of the box. The plugin prints to stdout a received resource description string. It can be used, for example, if ODC client (or ECS) generates the RMS configuration itself.
ODC also implemens odc-rp-epn plugin for EPN project of ALICE. The plugin queries node allocation info via a special epnc service using gRPC and generates SSH configuration file for DDS. Plugin expects JSON resource description provided via --res option. Either a single resource or an array of resources can be requested:
{
"zone":"online",
"n":10
}or
[{
"zone":"online",
"n":10
},
{
"zone":"calib",
"n":1
}]zone is the zone name. n is the number of EPN nodes.
In order to use custom resource plugin one need to register it in ODC server. odc-grpc-server and odc-cli-server have --rp command line option which allows to register custom plugins. For example:
odc-grpc-server --rp my_plugin:/path/to/my_plugin another_plugin:/path/to/another_pluginRegistered plugins can be addressed by using plugin field of SubmitRequest or RunRequest.
ODC containes several examples of resource plugins:
- A built-in
odc-rp-sameplugin implemented inC++. - A built-in
odc-rp-epnplugin usesgRPCand implemented inC++. - A built-in
odc-rp-epn-slurmReceives resources description from AliECS via gRPC and translates these into DDS slurm configuration. - A DDS SSH configuration plugin implemented as a
bashscript.