Configuration

The Plugins SDK comes with a set of commands for accessing the SDK features from a shell. These commands are available in the bin folder. In order to access them from any location on the installation machine, add plugins-export-env to the $HOME/.bash_profile as follows:

source $INSTALLATION_DIRECTORY/bin/plugins-export-env

In this way, just typing plugins + TAB on the terminal window, you will be prompted with the available commands described in this guide.

The plugin SDK offers command line tools to:

Submitting an Executable Plugin Job for remote execution

To submit an Executable Plugin job, use the command plugins-submit-job with the following syntax:

plugins-submit-job \
--job-area JOB_AREA_LOCATION \
--fileset-area FILESET_AREA_LOCATION \
--plugins-dir PLUGINS_ROOT_LOCATION \
--owner OWNER \
--queue QUEUE_NAME \
--env-script ENV_SCRIPT_FILE \
--repository REPOSITORY_DIR \
--artifact-server SERVER \
--job JOB_ID \
INPUT_SLOT_NAME1: TAG1 TAG2 ...TAGN INPUT_SLOT_NAME2: TAG3 TAG4...TAGZ

where:

  • FILESET_AREA_LOCATION must be relative to the Job execution side. If the area with the filesets referred by TAG* is visible from the filesystem of the compute node where the job is submitted (identified by the JOB_AREA_LOCATION), the location must be a local path.
  • QUEUE_NAME is the name of an OGE queue used when the job is submitted to a remote job area connected to a OGE cluster. It is not considered for local submissions.
  • ENV_SCRIPT_FILE is the path to a script to initialize the plugin environment. A sample script is available in templates/artifact-config/env.sh. If omitted, the env script distributed with the plugins repository is used.
  • REPOSITORY_DIR is a directory that holds the artifact repository on the deployment machine.
  • SERVER is the host name of the server where to the artifacts installation scripts are located (under REPOSITORY_DIR).
  • JOB_ID is the identifier of the executable plugin as specified in its description file (config.xml). The identifier must be in the format ID:VERSION or ID (in this latter case, the latest version is considered for submission).
  • INPUT_SLOT_NAME* are the names of slots as defined in the InputSchema of the job configuration.
  • TAG* are the tags of a registered FileSet instances. To be valid, the source FileSet configurations MUST match the type of the slot (also declared in the InputSchema) and MUST be owned or shared with the OWNER.

Submitting an Executable Plugin Job for local execution

To execute an Executable Plugin job on your local machine, use the command plugins-submit-job with the following syntax:

plugins-submit-job \
--job-area JOB_AREA_LOCATION \
--fileset-area FILESET_AREA_LOCATION \
--plugins-dir PLUGINS_ROOT_LOCATION \
--owner OWNER \
--repository REPOSITORY_DIR \
--env-script ENV_SCRIPT_FILE \
--artifact-server SERVER \
--job JOB_ID \
INPUT_SLOT_NAME1: TAG1 TAG2 ...TAGN INPUT_SLOT_NAME2: TAG3 TAG4...TAGZ

where:

  • JOB_AREA_LOCATION is the path to a local folder that will hold job execution files.
  • FILESET_AREA_LOCATION is the path to a local folder where input slots are available and output slots will be registered.
  • ENV_SCRIPT_FILE is the path to a script to initialize the plugin environment. A sample script is available in templates/artifact-config/env.sh.If omitted, the env script distributed with the plugins repository is used.
  • REPOSITORY_DIR is a directory that holds the artifact repository on the local machine.
  • SERVER is the host name of the server where to the artifacts installation scripts are located (under REPOSITORY_DIR).
  • JOB_ID is the identifier of the executable plugin as specified in its description file (config.xml). The identifier must be in the format ID:VERSION or ID (in this latter case, the latest version is considered for submission).
  • INPUT_SLOT_NAME* are the names of slots as defined in the InputSchema of the job configuration.
  • TAG* are the tags of a registered FileSet instances. To be valid, the source FileSet configurations MUST match the type of the slot (also declared in the InputSchema) and MUST be owned or shared with the OWNER.