SpecificationApplications

Application Description

The purpose of the Application Description is to enable an application's discovery, configuration, and deployment on edge devices. To deploy an application the end user specifies values for the parameters given in an Application Description (e.g., through a UI of the WFM) to instantiate an ApplicationDeployment, which defines the desired state for an application.

Top-level Attributes

AttributeTypeRequired?Description
apiVersionstringYIdentifier of the version of the API the object definition follows. Must be "v1".
idstringYAn identifier for the application. The id is used to help create unique identifiers where required, such as namespaces. The id must be lower case letters and numbers and MAY contain dashes. Uppercase letters, underscores and periods MUST NOT be used. The id MUST NOT be more than 200 characters.
metadataMetadataYMetadata element specifying characteristics about the application deployment. See the Metadata Attributes section below.
deploymentProfiles[]DeploymentProfileYDeployment profiles element specifying the types of deployments the application supports. See the Deployment section below.
parametersmap[string][Parameter]NParameters element specifying the configurable parameters to use when installing, or updating, the application. Defined as a map where each key is the user-defined parameter name (e.g. mysqlDatabase:, greeting:, idpName:, myAppEndpoint:), and value would be Parameter object, i.e. map[string]Parameter. See the Parameter section below.
configurationConfigurationNConfiguration element specifying how parameters should be displayed to the user for setting the value as well as the rules to use to validate the user's input. See the Configuration section below.
x-<unique-name>-extensionsmap[string]interface{}NAllows addition of arbitrary object (mapping) whose contents suppliers use to provide vendor-specific functionality beyond what is defined in the Margo specification. See the Specification Extensions section below for more details.

Metadata Attributes

Metadata about the application.

AttributeTypeRequired?Description
namestringYThe application's official name. This name is for display purposes only and can container whitespace and special characters.
descriptionstringNNone
versionstringYThe application's version.
catalogCatalogYCatalog element specifying the application's metadata for enabling its discovery. See the Catalog section below.

Catalog Attributes

Catalog metadata for displaying the application.

AttributeTypeRequired?Description
applicationApplicationMetadataNApplication element specifying the application specific metadata. See the Application Metadata section below.
author[]AuthorNAuthor element specifying metadata about the application's author. See the Author Metadata section below.
organization[]OrganizationYOrganization element specifying metadata about the organization/company providing the application. See the Organization Metadata section below.

ApplicationMetadata Attributes

Metadata specific to the application.

AttributeTypeRequired?Description
descriptionFilestringNLink to the file containing the application's full description. The file should be a markdown file.
iconstringNLink to the icon file (e.g., in PNG format).
licenseFilestringNLink to the file that details the application's license. The file should either be a plain text, markdown or PDF file.
releaseNotesstringNStatement about the changes for this application's release. The file should either be a markdown or PDF file.
sitestringNLink to the application's website.
taglinestringNThe application's slogan.
tags[]stringNAn array of strings that can be used to provide additional context for the application in a user interface to assist with task such as categorizing, searching, etc.

Author Attributes

Information about the application's author.

AttributeTypeRequired?Description
namestringNThe name of the application's creator.
emailstringNEmail address of the application's creator.

Organization Attributes

Information about the providing organization.

AttributeTypeRequired?Description
namestringYOrganization responsible for the application's development and distribution.
sitestringNLink to the organization's website.

DeploymentProfile Attributes

Represents a deployment configuration for the application.

AttributeTypeRequired?Description
typestringYDefines the type of this deployment configuration for the application. The allowed values are helm, to indicate the deployment profile's format is Helm version 3 or Version 4 using Chart APIVersion v2 (see special exceptions below), compose to indicate the deployment profile's format is a Compose file, and custom to indicate the deployment profile's format is custom and not defined in the Margo specification. When installing the application on a device supporting the Kubernetes platform, all helm components, and only helm components, will be provided to the device in same order they are listed in the application description file. When installing the application on a device supporting Compose, all compose components, and only compose components, will be provided to the device in the same order they are listed in the application description file. The device will install the components in the same order they are listed in the application description file. When installing the application on a device supporting a matched custom deployment format, all custom components, and only custom components, will be provided to the device in the same order they are listed in the application description file. Since custom deployment types are beyond the scope of the Margo specification, application and device suppliers should collaborate to understand how the application will be deployed. See the custom runtimes and deployments section below for more details.
idstringYAn identifier for the deployment profile, given by the application developer, used to uniquely identify this deployment profile from others within this application description's scope.
components[]ComponentYComponent element indicating the components to deploy when installing the application. See the Component section below.
descriptionstringNThis human-readable description of a deployment profile allows for providing additional context about the deployment profile. E.g., the application developer can use this to describe the deployment profile's purpose, such as the intended use case. Additionally, the application developer can use this to provide further details about the resources, peripherals, and interfaces required to run the application.
deviceConstraintsDeviceConstraintsNDevice constraints specifying the minimum device capabilities and eligibility rules required for the application. See the Device Constraints section below.
x-<unique-name>-extensionsmap[string]interface{}NAllows addition of arbitrary object (mapping) whose contents suppliers use to provide vendor-specific functionality beyond what is defined in the Margo specification. See the Specification Extensions section below for more details.

Helm Exceptions

Applications can be deployed as Helm charts using either Helm version 3 or version 4 using Chart APIVersion v2 only.

In order to facilitate the required deployment options for Helm charts, Margo does not support Helm functions requiring direct communication with the Kubernetes API.

Your Helm based application MUST NOT rely on the following Helm functions:

  • Lookup: The lookup template function queries live resources in the target Kubernetes cluster at render time, for example to fetch ConfigMaps, Secrets, or other objects. This requires direct API access and cluster credentials during rendering.
  • Hooks: Hooks (pre/post install, upgrade, delete, rollback, test, etc.) execute additional Kubernetes resources or jobs at specific points in the release lifecycle. Helm waits for these resources to reach a ready state by monitoring them via the Kubernetes API, and the hooks themselves may perform privileged or arbitrary operations in the cluster.
  • CRD management via Helm: Installing or managing Custom Resource Definitions (CRDs) with Helm requires checking for the presence of CRDs and registering new APIs with the cluster, which involves API calls and may require elevated permissions.

Note: This function list is based on the current Helm v3 and v4 implementations. Additional functions may be added later if Helm introduces new functions requiring communication with the Kubernetes API to work.

DeviceConstraints Attributes

Device constraints specifying the minimum device capabilities and eligibility rules required for the application.

AttributeTypeRequired?Description
capacityRequirementsCapacityRequirementsNMinimum CPU, memory, and storage requirements for the deployment profile. See the Capacity Requirements section below.
eligibilityRules[]EligibilityRuleNOptional rules used to match the application with device properties and supplier-defined labels reported in the device capabilities. See the Eligibility Rules section below.

Workload fleet manager implementations are not required to guarantee a workload can be deployed to a selected device. Ultimately, this responsibility falls to the device to determine if a workload can be deployed or not.

Workload fleet manager implementations MAY choose to implement device eligibility matching in order to reduce the risk of deployment failures because of incompatibility between what a workload requires and what a device provides.

If a workload fleet manager chooses to implement device eligibility matching they MUST follow the matching rules define below to match the application description's device constraint requirements with device's reported capabilities.

  • A workload fleet manager MUST evaluate deviceConstraints before selecting a target device for a deployment profile.
  • A device that does not satisfy the minimum required CPU, memory, and storage defined in the capacityRequirements MUST NOT be selected for that profile.
  • If eligibilityRules are present, a device that does not satisfy the required rule evaluation MUST NOT be selected for that profile.
  • If no available device satisfies the profile's required constraints, the deployment MUST be reported as not placeable according to the implementation's existing status model.

If a workload fleet manager chooses to implement device eligibility matching they MAY choose to find only the first suitable device or all suitable devices.

CapacityRequirements Attributes

Minimum device capacity required by the deployment profile.

AttributeTypeRequired?Description
cpuCPUNCPU element specifying the CPU requirements for the application. See the CPU section below.
memorystringNThe minimum amount of memory required. The value is given in binary units (Ki = Kibibytes, Mi = Mebibytes, Gi = Gibibytes). This is defined by the application developer. After deployment of the application, the device MUST provide this amount of memory for the application.
storagestringNThe amount of storage required for the application to run. This encompasses the installed application and the data it needs to store. The value is given in binary units (Ki = Kibibytes, Mi = Mebibytes, Gi = Gibibytes, Ti Tebibytes, Pi = Pebibytes, Ei = Exbibytes). This is defined by the application developer. After deployment of the application, the device MUST provide this amount of storage for the application

The following rules MUST be applied when performing capacity requirements matching:

  • cpu.cores is the minimum number of CPU cores required on the target device.
  • cpu.architectures, when present, restricts acceptable CPU architectures.
  • memory is the minimum memory required by the deployment profile.
  • storage is the minimum storage required by the deployment profile.
  • A device MUST satisfy all specified capacityRequirements to remain eligible for further evaluation.

The capacity requirements device constraint is intended to make it easier for application suppliers to indicate the most common workload constraints. Application suppliers MAY use either the capacityRequirements or a propertySelector eligibility rule to describe their capacity constraints. Application suppliers SHOULD avoid using both simultaneously. If both are used, validation logic MUST treat them as independent rule definitions and not try to correlate what is defined in the capacityRequirements with what is defined in the properSelector.

CPU Attributes

CPU element specifying the CPU requirements for the application.

AttributeTypeRequired?Description
coresdoubleYThe required amount of CPU cores the application must use to run in its full functionality. Specified as decimal units of CPU cores (e.g., 0.5 is half a core). This is defined by the application developer. After deployment of the application, the device MUST provide this number of CPU cores for the application.
architectures[]CpuArchitectureTypeNThe CPU architectures supported by the application. This can be e.g. amd64, arm64, arm. See the CpuArchitectureType definition for all permissible values. Multiple architecture types can be specified, as the deployment profile may support multiple CPU architectures.

EligibilityRule Attributes

A rule matching properties and supplier-defined labels reported through the device capabilities.

AttributeTypeRequired?Description
propertySelectorSelectorNSelector evaluated against the properties reported in the device capabilities properties object.
labelSelectorSelectorNSelector evaluated against the labels reported in the device capabilities labels dictionary.

Eligibility rules

The following rules MUST be applied when performing eligibility rule matching:

eligible devices =
    OR over each rule in eligibilityRules:
        AND(
            propertySelector matches   (TRUE if propertySelector is omitted),
            labelSelector matches      (TRUE if labelSelector is omitted)
        )
  • Each eligibility rule is evaluated using a logical OR.
    • A least one eligibility rule MUST evaluate to true to be considered a match.
    • If eligibilityRules is omitted, the deployment profile has no additional selector-based constraint beyond capacityRequirements, if present.
  • The propertySelector and labelSelector expressions are combined using a logical AND.
    • An eligibility rule MAY contain a propertySelector, labelSelector or both.
    • All property selector and all label selectors expressions MUST evaluate to true to be considered a match.
  • All matchExpressions within a single property or label selector are combined using logical AND.
    • All match expressions MUST evaluate to true to be considered a match.
You want...Do this
Condition A AND condition B must both be true within the same selector typeOne matchExpressions list with both expressions in the same propertySelector or labelSelector
Condition A AND condition B must both be true but one condition is a property and the other a labelOne eligibilityRules entry with both propertySelector and labelSelector set
Condition A OR condition B must be trueTwo separate eligibilityRules entries

Property selector key format

propertySelector.matchExpressions[].key MUST be a JSON Pointer as defined by RFC 6901, evaluated relative to the device capabilities properties object.

Examples:

  • /vendor
  • /id
  • /modelNumber

Property selectors MUST resolve to a device capability property whose value is either:

  • a string, number, or boolean
  • an array of strings, or numbers
  • an array of objects

If a property selector resolves to any other JSON type, the expression MUST evaluate to false.

If a property selector resolves to an array of objects, ContainsAll or ContainsAny must be used, or else the expression MUST evaluate to false.

Label selector key format

labelSelector.matchExpressions[].key MUST be the exact label key to evaluate within the device capabilities labels dictionary.

This label selector MUST resolve to a device capability label whose value is either:

  • a string, number, or boolean
  • an array of strings, or numbers

If a label selector resolves to any other JSON type, the expression MUST evaluate to false.

Selector Attributes

A set of match expressions evaluated with AND semantics.

AttributeTypeRequired?Description
matchExpressions[]MatchExpressionYMatch expressions evaluated against the device's reported capabilities.

MatchExpression Attributes

An expression used to match a device's reported capabilities properties or labels.

AttributeTypeRequired?Description
keystringYThe key used to match the device's reported capabilities. For property selectors, this MUST be a JSON Pointer, as defined by RFC 6901, mapping to a specific property. For label selectors, this MUST be the exact label key.
operatorSelectorOperatorYOperator used to evaluate the referenced value. See SelectorOperator for all permissible values.
values[]AnyNValues used by the operator when required for matching expressions. Required for the In, NotIn, Gt, or Lt operator.
itemSelectorSelectorNSelector evaluated against array elements. Required for the ContainsAll or ContainsAny operator.

The following rules MUST be followed when evaluating match expressions:

OperatorEvaluation Rule
InTrue when the referenced device capabilities value equals one of values, or when the referenced array contains at least one element that equals one of values
NotInTrue when the referenced device capabilities key exists and none of its values match any entry in values
ExistsTrue when the referenced device capabilities key is present
DoesNotExistTrue when the referenced device capabilities key is absent
GtTrue when the referenced device capabilities value is greater than values
LtTrue when the referenced device capabilities value is less than values
ContainsAllTrue when the referenced device capabilities value is an array of objects, and at least one array element satisfies all itemSelector.matchExpressions (AND logic)
ContainsAnyTrue when the referenced device capabilities value is an array of objects, and at least one array element satisfies any itemSelector.matchExpression (OR logic)

String comparisons MUST be exact and case-sensitive.

For the In and NotIn operator:

  • values MUST be present
  • values MUST contain one or more strings or numbers, or one boolean
  • values MUST be the same data type when indicating more than one.

For the Exists and DoesNotExist operator:

  • values MUST be omitted

For the Gt and Lt operator:

  • values MUST be present
  • values MUST be parsable as numbers
  • values MUST only contain a single number

For the ContainsAll and ContainsAny operator:

  • itemSelector MUST be present
  • itemSelector.matchExpressions MUST contain one or more expressions
  • values MUST be omitted
  • Keys within itemSelector.matchExpressions are JSON Pointers relative to each array element (not absolute)
  • Expressions within itemSelector.matchExpressions are combined using AND logic for ContainsAll and OR logic for ContainsAny

Object Array Item Matching

ContainsAll and ContainsAny operators enable matching on properties of objects within an array. These operators are used when the device capability property referenced by key resolves to an array of objects.

ContainsAll (array element with all conditions):

Evaluates to true when at least one array element satisfies all conditions specified in itemSelector.matchExpressions. All expressions within the itemSelector are combined using AND logic.

Example: Match a device that has at least one GPU peripheral manufactured by NVIDIA:

propertySelector:
  matchExpressions:
    - key: /peripherals
      operator: ContainsAll
      itemSelector:
        matchExpressions:
          - key: /type
            operator: In
            values: ["gpu"]
          - key: /manufacturer
            operator: In
            values: ["NVIDIA"]
ContainsAny (array element with any condition):

Evaluates to true when at least one array element satisfies any condition specified in itemSelector.matchExpressions. Expressions within the itemSelector are combined using OR logic.

Example: Match a device that has at least one peripheral that is either a GPU or a high-speed NIC:

propertySelector:
  matchExpressions:
    - key: /peripherals
      operator: ContainsAny
      itemSelector:
        matchExpressions:
          - key: /type
            operator: In
            values: ["gpu", "nic"]
Interaction with other expressions:

Multiple matchExpressions within the same propertySelector remain AND'd together. For example:

propertySelector:
  matchExpressions:
    - key: /vendor
      operator: In
      values: ["Vendor Name"]
    - key: /peripherals
      operator: ContainsAll
      itemSelector:
        matchExpressions:
          - key: /type
            operator: In
            values: ["gpu"]

This evaluates to true only when the device vendor matches AND the device has at least one GPU peripheral.

Component Attributes

A class representing a component of a deployment profile.

AttributeTypeRequired?Description
namestringYA unique name used to identify the component package. For helm installations the name will be used as the chart name. The name must be lower case letters and numbers and MAY contain dashes. Uppercase letters, underscores and periods MUST NOT be used.
propertiesComponentPropertiesYA dictionary element specifying the component packages's deployment details. See the Component Properties section below.
x-<unique-name>-extensionsmap[string]interface{}NAllows addition of arbitrary object (mapping) whose contents suppliers use to provide vendor-specific functionality beyond what is defined in the Margo specification. See the Specification Extensions section below for more details.

ComponentProperties Attributes

The expected properties for all OCI-based deployment types (Helm and Compose) are indicated below.

AttributeTypeRequired?Description
repositorystringYOCI repository URI for the component package (e.g., oci://registry.example.com/org/component-name). MUST be a valid OCI reference using the oci:// scheme. See Compose Component Registry for details.
revisionstringYOCI tag identifying the component version. MUST be a valid SemVer 2.0 string without a leading v. Build metadata separator + MUST be stored as _ because + is not a valid OCI tag character.
waitboolNIf True, indicates the device MUST wait until the component installation completes before installing the next component. For Helm: waits until the release is deployed. For Compose: waits until all containers reach running state. The default is True. The Workload Fleet Management Client MUST support True and MAY support False. Only applies if multiple components are provided.
timeoutstringNThe time to wait for the component's installation to complete. If the installation does not complete before the timeout occurs the installation process fails. The format is "##m##s" indicating the total number of minutes and seconds to wait.

Defining configurable application parameters

To allow customizable configuration values when installing an application, the application description defines the parameters and configuration sections giving the application vendor control over what can be configured when installing, or updating, an application. The configuration section describes how the workload orchestration software vendor must display parameters to the user to allow them to specify the values. The schema section describes how the workload orchestration software vendor must validate the values provided by the user before the application is installed or updated.

Note: At this point the specification only deals with parameter values provided by the user as part of installing, or updating, the application. We anticipate parameter values to come from other sources, such as the device, in the future and not only from the user.

Parameter Attributes

Defines a configurable parameter for the application. This object is used to build a property bag, i.e. parameters, defined in application description. See parameters attribute under ApplicationDescription Attributes section for better understanding.

AttributeTypeRequired?Description
value<see description>NThe parameter's default value. Accepted data types are string, integer, double, boolean, array[string], array[integer], array[double], array[boolean].
targets[]TargetYUsed to indicate which component the value should be applied to when installing, or updating, the application. See the Target section below.

Target Attributes

Specifies where the parameter applies in the deployment.

AttributeTypeRequired?Description
pointerstringYThe name of the parameter in the deployment configuration. For Helm deployments, this is the dot notation for the matching element in the values.yaml file. This follows the same naming convention you would use with the --set command line argument with the helm install command. For compose deployments, this is the name of the environment variable to set.
components[]stringYIndicates which deployment profile [component](#component-attributes the parameter target applies to. The component name specified here MUST match a component name in the deployment profiles section.

Configuration Attributes

Configuration layout and validation rules.

AttributeTypeRequired?Description
sections[]SectionYSections are used to group related parameters together, so it is possible to present a user interface with a logical grouping of the parameters in each section. See the Section section below.
schema[]SchemaYSchema is used to provide details about how to validate each parameter value. At a minimum, the parameter value must be validated to match the schema's data type. The schema indicates additional rules the provided value must satisfy to be considered valid input. See the Schema section below.

Section Attributes

Named sections within the configuration layout.

AttributeTypeRequired?Description
namestringYThe name of the section. This may be used in the user interface to show the grouping of the associated parameters within the section.
settings[]SettingYSettings are used to provide instructions to the workload orchestration software vendor for displaying parameters to the user. A user MUST be able to provide values for all settings. See the Setting section below.

Setting Attributes

Individual configuration settings.

AttributeTypeRequired?Description
parameterstringYThe name of the parameter the setting is associated with.
namestringYThe parameter's display name to show in the user interface.
descriptionstringNThe parameters's short description to provide additional context to the user in the user interface about what the parameter is for.
immutablebooleanNIf true, indicates the parameter value MUST not be changed once it has been set and used to install the application. Default is false if not provided.
schemastringYThe name of the schema definition to use to validate the parameter's value. See the Schema section below.

Schema Attributes

Defines data type and rules for validating user provided parameter values. Subclasses (see below) define for each data type their own set of validation rules that can be used. The value MUST be validated against all rules defined in the schema.

AttributeTypeRequired?Description
namestringYThe name of the schema rule. This used in the setting to link the setting to the schema rule.
dataTypestringYIndicates the expected data type for the user provided value. Accepted values are string, integer, double, boolean, array[string], array[integer], array[double], array[boolean]. At a minimum, the provided parameter value MUST match the schema's data type if no other validation rules are provided.

(Subclass of Schema)
Extends schema to define a string/text-specific set of validation rules that can be used.

AttributeTypeRequired?Description
allowEmptybooleanNIf true, an empty value is permitted. Default is false if not provided.
minLengthintegerNIf set, indicates the minimum number of characters the value must have to be considered valid.
maxLengthintegerNIf set, indicates the maximum number of characters the value must have to be considered valid.
regexMatchstringNIf set, indicates a regular expression to use to validate the value.

(Subclass of Schema)
Extends schema to define a boolean-specific set of validation rules that can be used.

AttributeTypeRequired?Description
allowEmptybooleanNIf true, an empty value is permitted. Default is false if not provided.

(Subclass of Schema)
Extends schema to define a integer-specific set of validation rules that can be used.

AttributeTypeRequired?Description
allowEmptybooleanNIf true, an empty value is permitted. Default is false if not provided.
minValueintegerNIf set, indicates the minimum allowed integer value the value must have to be considered valid.
maxValueintegerNIf set, indicates the maximum allowed integer value the value must have to be considered valid.

(Subclass of Schema)
Extends schema to define a double-specific set of validation rules that can be used.

AttributeTypeRequired?Description
allowEmptybooleanNIf true, an empty value is permitted. Default is false if not provided.
minValuefloatNIf set, indicates the minimum value to be considered valid.
maxValuefloatNIf set, indicates the maximum value to be considered valid.
minPrecisionintegerNIf set, indicates the minimum level of precision the value must have to be considered valid.
maxPrecisionintegerNIf set, indicates the maximum level of precision the value must have to be considered valid.

(Subclass of Schema)
Extends schema to define a specific set of validation rules that can be used for select options.

AttributeTypeRequired?Description
allowEmptybooleanNIf true, an empty value is permitted. Default is false if not provided.
multiselectbooleanNIf true, indicates multiple values can be selected. If multiple values can be selected the resulting value is an array of the selected values. The default is false if not provided.
options[]stringYThis provides the list of acceptable options the user can select from. The data type for each option must match the parameter setting’s data type.

Enumerations

These enumerations are used as vocabularies for attribute values of the ApplicationDescription.

CpuArchitectureType

Permissible ValuesDescription
amd64AMD 64-bit architecture.
arm64ARM 64-bit architecture.
armARM 32-bit architecture.

SelectorOperator

Permissible ValuesDescription
InIndicates matching should find a match with at least one specified value.
NotInIndicates matching should not find a match with any specified values.
ExistsIndicates matching should find a match on the specified key.
DoesNotExistIndicates matching should not find a match on the specified key.
GtIndicates matching should find a match if the target value is greater than the specified value.
LtIndicates matching should find a match if the target value is less than the specified value.
ContainsAllIndicates matching should find a match against all itemSelectors.
ContainersAnyIndicates matching should find a match against at least one itemSelector.

Application Description Examples

Example 1: Simple Application Description

A simple hello-world example of an ApplicationDescription is shown below:

apiVersion: v1
id: com-northstartida-hello-world
metadata:
  name: Hello World
  description: A basic hello world application
  version: "1.0"
  catalog:
    application:
      icon: ./resources/hw-logo.png
      tagline: Northstar Industrial Application's hello world application.
      descriptionFile: ./resources/description.md
      releaseNotes: ./resources/release-notes.md
      licenseFile: ./resources/license.pdf
      site: http://www.northstar-ida.com
      tags: ["monitoring"]
    author:
      - name: Roger Wilkershank
        email: rpwilkershank@northstar-ida.com
    organization:
      - name: Northstar Industrial Applications
        site: http://northstar-ida.com
deploymentProfiles:
  - type: helm
    id: com-northstartida-hello-world-helm-a
    components:
      - name: hello-world
        properties:  
          repository: oci://northstarida.azurecr.io/charts/hello-world
          revision: 1.0.1
          wait: true
parameters:
  greeting:
    value: Hello
    targets:
    # Maps to deployment configuration param,
    # e.g., helm install ... --set global.config.appGreeting="Hello"
    - pointer: global.config.appGreeting
      components: ["hello-world"]
  greetingAddressee:
    value: World
    targets:
    - pointer: global.config.appGreetingAddressee
      components: ["hello-world"]
configuration:
  sections:
    - name: General Settings
      settings:
        - parameter: greeting
          name: Greeting
          description: The greeting to use.
          schema: requireText
        - parameter: greetingAddressee
          name: Greeting Addressee
          description: The person, or group, the greeting addresses.
          schema: requireText
  schema:
    - name: requireText
      dataType: string
      maxLength: 45
      allowEmpty: false

Example 2: Application Description with Deployment Profiles for Helm and Compose

An example of an ApplicationDescription defining deployment profiles for both cases, Helm chart as well as Compose, is shown below.

apiVersion: v1
id: com-northstartida-digitron-orchestrator
metadata:
  name: Digitron orchestrator
  description: The Digitron orchestrator application
  version: 1.2.1 
  catalog:
    application:
      icon: ./resources/ndo-logo.png
      tagline: Northstar Industrial Application's next-gen, AI driven, Digitron instrument orchestrator.
      descriptionFile: ./resources/description.md
      releaseNotes: ./resources/release-notes.md
      licenseFile: ./resources/license.pdf
      site: http://www.northstar-ida.com
      tags: ["optimization", "instrumentation"]
    author:
      - name: Roger Wilkershank
        email: rpwilkershank@northstar-ida.com
    organization:
      - name: Northstar Industrial Applications
        site: http://northstar-ida.com
deploymentProfiles:
  - type: helm
    id: com-northstartida-digitron-orchestrator-helm-a
    description: This allows to install / run the application as a Helm chart deployment.
      The device where this application is installed needs to have a screen and a keyboard (as indicated in the required peripherals).
    components:
      - name: database-services
        properties: 
          repository: oci://quay.io/charts/realtime-database-services
          revision: 2.3.7
          wait: true
          timeout: 8m30s
      - name: digitron-orchestrator
        properties:
          repository: oci://northstarida.azurecr.io/charts/northstarida-digitron-orchestrator
          revision: 1.0.9
          wait: true
    deviceConstraints:
      capacityRequirements:
        cpu:
          cores: 1.5
          architectures:
            - amd64
        memory: 1024Mi
        storage: 10Gi
      eligibilityRules:
        - propertySelector:
            matchExpressions:
              - key: /peripherals
                operator: ContainsAll
                itemSelector:
                  matchExpressions:
                    - key: /type
                      operator: In
                      values: ["gpu"]
                    - key: /manufacturer
                      operator: In
                      values: ["NVIDIA"]
              - key: /interfaces
                operator: ContainsAll
                itemSelector:
                  matchExpressions:
                    - key: /type
                      operator: In
                      values: ["ethernet", "bluetooth"]
  - type: compose
    id: com-northstartida-digitron-orchestrator-compose-a
    components:
      - name: digitron-orchestrator-docker
        properties:
          repository: oci://northstarida.azurecr.io/compose/digitron-orchestrator
          revision: 1.0.9
parameters:
  idpName:
    value: "test"
    targets:
      # Maps to deployment configuration param,
      # e.g., helm install ... --set idp.name="test"
      - pointer: idp.name
        components: ["digitron-orchestrator"]
      # Maps to environment variables, e.g., IDP_NAME=test docker compose ...
      - pointer: IDP_NAME
        components: ["digitron-orchestrator-docker"]
  idpProvider:
    targets:
      - pointer: idp.provider
        components: ["digitron-orchestrator"]
      - pointer: IDP_PROVIDER
        components: ["digitron-orchestrator-docker"]
  idpClientId:
    targets:
      - pointer: idp.clientId
        components: ["digitron-orchestrator"]
      - pointer: IDP_CLIENT_ID
        components: ["digitron-orchestrator-docker"]
  idpUrl:
    targets:
      - pointer: idp.providerUrl
        components: ["digitron-orchestrator"]
      - pointer: idp.providerMetadata
        components: ["digitron-orchestrator"]
      - pointer: IDP_URL
        components: ["digitron-orchestrator-docker"]
  adminName:
    targets:
      - pointer: administrator.name
        components: ["digitron-orchestrator"]
      - pointer: ADMIN_NAME
        components: ["digitron-orchestrator-docker"]
  adminPrincipalName:
    targets:
      - pointer: administrator.userPrincipalName
        components: ["digitron-orchestrator"]
      - pointer: ADMIN_PRINCIPALNAME
        components: ["digitron-orchestrator-docker"]
  pollFrequency:
    value: 30
    targets: 
      - pointer: settings.pollFrequency
        components: ["digitron-orchestrator", "database-services"]
      - pointer: POLL_FREQUENCY
        components: ["digitron-orchestrator-docker"]
  siteId:
    targets:
      - pointer: settings.siteId
        components: ["digitron-orchestrator", "database-services"]
      - pointer: SITE_ID
        components: ["digitron-orchestrator-docker"]
  cpuLimit:
    value: 1 
    targets:
      - pointer: settings.limits.cpu
        components: ["digitron-orchestrator"]
  memoryLimit:
    value: 16384
    targets:
      - pointer: settings.limits.memory
        components: ["digitron-orchestrator"]
configuration:
  sections:
    - name: General
      settings:
        - parameter: pollFrequency
          name: Poll Frequency
          description: How often the service polls for updated data in seconds
          schema: pollRange
        - parameter: siteId
          name: Site Id
          description: Special identifier for the site (optional)
          schema: optionalText
    - name: Identity Provider
      settings:
        - parameter: idpName
          name: Name
          description: The name of the Identity Provider to use
          immutable: true
          schema: requiredText
        - parameter: idpProvider
          name: Provider
          description: Provider something something
          immutable: true
          schema: requiredText
        - parameter: idpClientId
          name: Client ID
          description: The client id
          immutable: true
          schema: requiredText
        - parameter: idpUrl
          name: Provider URL
          description: The url of the Identity Provider
          immutable: true
          schema: url
    - name: Administrator
      settings:
        - parameter: adminName
          name: Presentation Name
          description: The presentation name of the administrator
          schema: requiredText
        - parameter: adminPrincipalName
          name: Principal Name
          description: The principal name of the administrator
          schema: email
    - name: Resource Limits
      settings:
        - parameter: cpuLimit
          name: CPU Limit
          description: Maximum number of CPU cores to allow the application to consume
          schema: cpuRange
        - parameter: memoryLimit
          name: Memory Limit
          description: Maximum number of memory to allow the application to consume
          schema: memoryRange
  schema:
    - name: requiredText
      dataType: string
      maxLength: 45
      allowEmpty: false
    - name: email
      dataType: string
      allowEmpty: false
      regexMatch: .*@[a-z0-9.-]*
    - name: url
      dataType: string
      allowEmpty: false
      regexMatch: ^(http(s):\/\/.)[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$
    - name: pollRange
      dataType: integer
      minValue: 30
      maxValue: 360
      allowEmpty: false
    - name: optionalText
      dataType: string  
      minLength: 5
      allowEmpty: true
    - name: cpuRange
      dataType: double
      minValue: 0.5
      maxPrecision: 1
      allowEmpty: false
    - name: memoryRange
      dataType: integer
      minValue: 16384
      allowEmpty: false

Custom runtimes and deployments

Note: See the Custom Runtimes and Deployments page for additional details.

An application and device supplier MAY collaborate to enable deploying workloads using a format other than Margo's specified deployment types.

If suppliers choose this option, they MUST follow these rules:

  • The deployment profile type MUST be set to custom.
  • Device constraint eligibility rules MUST be defined with label selectors matching the supplier's agreed-upon key/value label pairs reported in the device's capabilities document.
  • The workload artifacts MUST be packaged in an OCI blob. The specific details for how this OCI blob is created are the responsibility of the suppliers to agree upon.

Specification extensions

Note: See the specification extensions page for additional details.

The Application Description document supports the following specification extension scenarios:

Collaboration between application and workload fleet manager suppliers

To make use of specification extensions defined by a workload fleet manager supplier, the extension property MUST be added to the Application Description YAML document's root.

The workload fleet manager MUST ignore any unknown specification extensions targeting a workload fleet manager supplier. Importing an application description with unknown specification extensions MUST NOT result in a failure because of the included specification extensions.

The workload fleet manager MUST NOT propagate these specification extension properties to the device via the Application Deployment yaml document.

Collaboration between application and device suppliers

To make use of specification extensions defined by a device supplier, the extension property MUST be added to the root of either the deploymentProfile or component objects.

The workload fleet manager MUST import an application description with specification extensions targeting a device supplier without resulting in a failure because of the included specification extensions.

The workload fleet manager MUST propagate these extension properties to the device via the Application Deployment yaml document.