Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,996 changes: 1,797 additions & 1,199 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ dependencies = [
'mkdocs>=1.6.1',
'mkdocs-markdownextradata-plugin>=0.2.6',
'mkdocs-material>=9.5.44',
'linkml>=1.8.5',
'linkml @ git+https://github.com/linkml/linkml.git#subdirectory=packages/linkml',
'linkml-runtime @ git+https://github.com/linkml/linkml.git#subdirectory=packages/linkml_runtime'
]

[tool.poetry]
Expand Down
257 changes: 162 additions & 95 deletions src/specification/applications/application-description.linkml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,44 @@ classes:
rank: 20
range: string
required: false
requiredResources:
deviceConstraints:
description: >-
Required resources element specifying the resources required to install the application.
See the [Required Resources](#requiredresources-attributes) section below.
The consequences (e.g., aborting / blocking the installation or execution of the application) of not meeting these required resources are not defined (yet) by margo.
Device constraints specifying the minimum device capabilities and eligibility rules required for the application.
See the [Device Constraints](#deviceconstraints-attributes) section below.
rank: 30
range: RequiredResources
range: DeviceConstraints
required: false
slots:
- type
- components
- x-placeholder-extensions

RequiredResources:
DeviceConstraints:
description: >-
Required resources element specifying the resources required to install the application.
Device constraints specifying the minimum device capabilities and eligibility rules required for the application.
rank: 61
attributes:
capacityRequirements:
description: >-
Minimum CPU, memory, and storage requirements for the deployment profile.
See the [Capacity Requirements](#capacityrequirements-attributes) section below.
range: CapacityRequirements
required: false
rank: 10
eligibilityRules:
description: >-
Optional rules used to match the application with device properties and supplier-defined labels reported in the device capabilities.
See the [Eligibility Rules](#eligibilityrule-attributes) section below.
range: EligibilityRule
multivalued: true
inlined: true
inlined_as_list: true
required: false
rank: 20

CapacityRequirements:
description: Minimum device capacity required by the deployment profile.
rank: 62
attributes:
cpu:
description: >-
Expand All @@ -246,44 +267,24 @@ classes:
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.
rank: 20
range: string
pattern: ^[0-9]+(Mi|Gi|Ki)$
required: false
rank: 20
storage:
description: The 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
rank: 30
range: string
pattern: ^[0-9]+(Mi|Gi|Ki|Ti|Pi|Ei)$
required: false
peripherals:
description: >-
Peripherals element specifying the peripherals required to run the application.
See the [Peripheral](#peripheral-attributes) section below.
range: Peripheral
rank: 40
multivalued: true
inlined: true
inlined_as_list: true
required: false
interfaces:
description: >-
Interfaces element specifying the communication interfaces required to run the application.
See the [Communication Interfaces](#communicationinterface-attributes) section below.
range: CommunicationInterface
rank: 40
multivalued: true
inlined: true
inlined_as_list: true
required: false
rank: 30

CPU:
description: >-
CPU element specifying the CPU requirements for the application.
rank: 62
rank: 63
attributes:
cores:
description: The required amount of CPU cores the application must use to run in its full functionality.
Expand All @@ -296,46 +297,124 @@ classes:
architectures:
description: The CPU architectures supported by the application. This can be e.g. amd64, arm64, arm.
See the [CpuArchitectureType](#cpuarchitecturetype) definition for all permissible values.
Multiple arcitecture types can be specified, as the deployment profile may support multiple CPU architectures.
Multiple architecture types can be specified, as the deployment profile may support multiple CPU architectures.
rank: 20
range: CpuArchitectureType
required: false
multivalued: true
inlined: true
inlined_as_list: true
Peripheral:
description: Peripheral hardware of a device.
rank: 65

EligibilityRule:
description: A rule matching properties and supplier-defined labels reported through the device capabilities.
rank: 64
attributes:
type:
description: The type of peripheral. This can be e.g. GPU, display, camera, microphone, speaker.
See the [PeriperalType](#peripheraltype) definition for all permissible values.
rank: 20
range: PeripheralType
required: true
manufacturer:
description: The name of the manufacturer. If `manufacturer` is specified as a requirement here, it may be difficult to find devices that can host the application. Please use these requirements with caution.
rank: 30
range: string
propertySelector:
description: Selector evaluated against the properties reported in the [device capabilities properties](../margo-management-interface/device-capabilities#properties-attributes) object.
range: Selector
required: false
model:
description: The model of the peripheral. If `model` is specified as a requirement here, it may be difficult to find devices that can host the application. Please use these requirements with caution.
rank: 40
range: string
rank: 10
labelSelector:
description: Selector evaluated against the labels reported in the [device capabilities labels](../margo-management-interface/device-capabilities#request-body-attributes) dictionary.
range: Selector
required: false
rank: 20

CommunicationInterface:
description: >-
Communication interface of a device.
Selector:
description: A set of match expressions evaluated with AND semantics.
rank: 65
attributes:
matchExpressions:
description: Match expressions evaluated against the device's reported capabilities.
range: MatchExpression
multivalued: true
inlined: true
inlined_as_list: true
required: true
rank: 10

MatchExpression:
description: An expression used to match a device's reported capabilities properties or labels.
rank: 66
attributes:
type:
description: The type of a communication interface. This can be e.g. Ethernet, WiFi, Cellular, Bluetooth, USB, CANBus, RS232.
See the [CommunicationInterfaceType](#communicationinterfacetype) definition for all permissible values.
rank: 30
range: CommunicationInterfaceType
rules:
- description: '`values` MUST be present when the operator is `In`.'
preconditions:
slot_conditions:
operator:
equals_string: In
postconditions:
slot_conditions:
values:
required: true
- description: '`values` MUST be present when the operator is `NotIn`.'
preconditions:
slot_conditions:
operator:
equals_string: NotIn
postconditions:
slot_conditions:
values:
required: true
- description: '`values` MUST be present when the operator is `Gt`.'
preconditions:
slot_conditions:
operator:
equals_string: Gt
postconditions:
slot_conditions:
values:
required: true
- description: '`values` MUST be present when the operator is `Lt`.'
preconditions:
slot_conditions:
operator:
equals_string: Lt
postconditions:
slot_conditions:
values:
required: true
- description: '`itemSelector` MUST be present when the operator is `ContainsAll`.'
preconditions:
slot_conditions:
operator:
equals_string: ContainsAll
postconditions:
slot_conditions:
itemSelector:
required: true
- description: '`itemSelector` MUST be present when the operator is `ContainsAny`.'
preconditions:
slot_conditions:
operator:
equals_string: ContainsAny
postconditions:
slot_conditions:
itemSelector:
required: true
attributes:
key:
description: The key used to match the device's reported capabilities. For property selectors, this MUST be a JSON Pointer, as defined by [RFC 6901](https://datatracker.ietf.org/doc/html/rfc6901), mapping to a specific property. For label selectors, this MUST be the exact label key.
range: string
required: true
rank: 10
operator:
description: Operator used to evaluate the referenced value. See [SelectorOperator](#selectoroperator) for all permissible values.
range: SelectorOperator
required: true
rank: 20
values:
description: Values used by the operator when required for matching expressions. Required for the `In`, `NotIn`, `Gt`, or `Lt` operator.
range: Any
multivalued: true
inlined: true
inlined_as_list: true
required: false
rank: 30
itemSelector:
description: Selector evaluated against array elements. Required for the `ContainsAll` or `ContainsAny` operator.
range: Selector
required: false
rank: 40

HelmDeploymentProfile:
is_a: DeploymentProfile
Expand Down Expand Up @@ -715,15 +794,19 @@ slots:
description: >-
Defines 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](#helm-exceptions)),
and `compose` to indicate the deployment profile's format is a Compose file.
`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](#custom-runtimes-and-deployments) section below for more details.
range: string
required: true
pattern: ^(helm|compose)$
pattern: ^(helm|compose|custom)$
rank: 10

components:
Expand All @@ -749,6 +832,25 @@ slots:
rank: 999

enums:
SelectorOperator:
permissible_values:
In:
description: Matches when the referenced value equals one of the supplied values.
NotIn:
description: Matches when the referenced value does not equal any supplied value.
Exists:
description: Matches when the referenced key is present.
DoesNotExist:
description: Matches when the referenced key is absent.
Gt:
description: Matches when the referenced value is greater than the supplied value.
Lt:
description: Matches when the referenced value is less than the supplied value.
ContainsAll:
description: Matches when an array contains an object satisfying all item selector expressions.
ContainsAny:
description: Matches when an array contains an object satisfying any item selector expression.

CpuArchitectureType:
permissible_values:
amd64:
Expand All @@ -762,38 +864,3 @@ enums:
other:
description: >-
Any other CPU architecture not listed here. The application developer MUST provide a description of the architecture in the deployment profile's `description` field.

CommunicationInterfaceType:
permissible_values:
ethernet:
description: This type stands for an Ethernet interface.
wifi:
description: This type stands for an WiFi interface.
cellular:
description: This type stands for cellular communication technologies such as 5G, LTE, 3G, 2G, ....
bluetooth:
description: This type stands for a Bluetooth or Bluetooth Low-Energy (BLE) interface.
usb:
description: This type stands for a USB interface.
canbus:
description: This type stands for a CANBus interface.
rs232:
description: This type stands for a RS232 interface.
other:
description: This type stands for any other communication interface not listed here. The application developer MUST provide a description of the interface in the deployment profile's `description` field.

PeripheralType:
permissible_values:
gpu:
description: This type stands for a Graphics Processing Unit (GPU) peripheral.
display:
description: This type stands for a display peripheral.
camera:
description: This type stands for a camera peripheral.
microphone:
description: This type stands for a microphone peripheral.
speaker:
description: This type stands for a speaker peripheral.
other:
description: This type stands for any other peripheral not listed here. The application developer MUST provide a description of the peripheral in the deployment profile's `description` field.

Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,35 @@ deploymentProfiles:
repository: oci://northstarida.azurecr.io/charts/northstarida-digitron-orchestrator
revision: 1.0.9
wait: true
requiredResources:
cpu:
cores: 1.5
architectures:
- amd64
memory: 1024Mi
storage: 10Gi
peripherals:
- type: gpu
manufacturer: NVIDIA
- type: display
interfaces:
- type: ethernet
- type: bluetooth
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description calls this property selectorOperator

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nilanjan-samajdar - It's unclear what you are suggesting here. The property name is "operator," and the property type in the LinkML/OpenAPI documentation is "SelectorOperator". Are you suggesting that the property type should also be "Operator," or something else?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nilanjan-samajdar - Just following up on my reply to your statement.

values: ["gpu"]
- key: /manufacturer
operator: In

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description calls this property selectorOperator

values: ["NVIDIA"]
- key: /interfaces
operator: ContainsAll
itemSelector:
matchExpressions:
- key: /type
operator: In

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description calls this property selectorOperator

values: ["ethernet", "bluetooth"]

- type: compose
id: com-northstartida-digitron-orchestrator-compose-a
components:
Expand Down
Loading
Loading