# Interfaces

# Model Class Naming

The classes in this project follow a strict naming scheme.

Class Name Suffix Meaning
*Descriptor Things which are provided by the 'outside' world to describe artifacts processed by us.
*Configuration Holds data generated by us, based on *Descriptors, user input, or even thin air.
*Manifest Wraps and manages storage of *Configurations in the underlying BHives. Also handles enumeration/scanning for according objects in the BHive(s).
*Dto (not actually in the interfaces project, but ui specific). Holds/groups data which is required in this form for user display/interaction in the UI.
*Resource Interfaces for remote (JAX-RS) resources.
*Provider Providers for variable expansion in configurations on the target system.

# Variable Expansion

This project contains the logic for resolving variables when deploying to a minion. The following schemes are supported.

Expansion of variables happens for launcher paths and parameter values. Additionally, all configuration files are post-processed on the target to perform the exact same expansion.

Variable Pattern: {{V:[APP:]PARAM}}

Supported Values:

  • APP: (optional) The name of the application to reference. If not given, the parameter is referenced within the same application as the referencing parameter
  • PARAM: The name of the parameter

Example: {{V:MyServer:my.param.id}}

Description: Expand the value of another parameter inline into the value of this parameter.

Variable Pattern: {{P:PATH_ID}}

Supported Values:

  • CONFIG: directory where all configuration files will be placed by deployment
  • BIN: directory where all binaries are placed by deployment
  • RUNTIME: directory with runtime data (e.d. stdout/stderr capture files)
  • DATA: persistent data directory - the only directory shared by multiple deployments of the same instance.

Example: {{P:CONFIG}}/myFile.json

Description: Expand one of the special directories (see SpecialDirectory) know by the deployment process.

Variable Pattern: {{I:VAR}}

Supported Values:

  • SYSTEM_PURPOSE: the purpose of the instance, see InstancePurpose
  • ID: ID of the instance
  • NAME: name of the instance
  • PRODUCT_ID: name of the MANIFEST key's name of the configured product
  • PRODUCT_TAG: the tag (i.e. 'version') of the configured product

Example: {{I:SYSTEM_PURPOSE}}

Description: Expand values related to the instance containing the parameter's process

Variable Pattern: {{M:MANIFEST_NAME[:TAG]}}

Supported Values:

  • MANIFEST_NAME: the name of the manifest to reference. The variable will expand to the installation path of that other manifest. * TAG: (optional) if given expand to the exact manifest version.

Example: {{M:openjdk/jre8}}/bin/java

Description: Expand the absolute installation path to another manifest's path on the target system.

Variable Pattern: {{OSNAME:VALUE}}

Supported Values:

  • OSNAME: either OperatingSystem value (WINDOWS, LINUX, AIX).
  • VALUE: the target value to expand if the target OS matches the OSNAME value.

Example: .../bin/java{{WINDOWS:.exe}}

Description: Insert the given VALUE if and only if the given OSNAME (see OperatingSystem) matches.

Variable Pattern: {{H:HOSTNAME}}

Supported Values:

  • HOSTNAME: expands to the hostname of the target minion where the application is deployed.

Example: {{H:HOSTNAME}}

Description: Expands to target minion properties - currently only HOSTNAME is supported.