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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ classes:
required: true
equals_string: "ApplicationDescription"
rank: 20
id:
description: >-
An 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.
rank: 25
range: string
required: true
pattern: ^[a-z0-9-]{1,200}$
metadata:
description: >-
Metadata element specifying characteristics about the application deployment.
Expand Down Expand Up @@ -69,15 +78,6 @@ classes:
description: Metadata about the application.
rank: 10
attributes:
id:
description: >-
An 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.
rank: 10
range: string
required: true
pattern: ^[a-z0-9-]{1,200}$
name:
description: >-
The application's official name.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Demonstrates validation of kind field
# Invalid kind of Kubernetes custom resource.
apiVersion: margo.org/v1-alpha1
# `kind` != `ApplicationDescription`
kind: SomethingErroneous
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.v3
id: com-northstartida-hello-world-helm.v3-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:
- 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# Demonstrates validation of id field
# Invalid id format being defined in this test
apiVersion: margo.org/v1-alpha1
kind: ApplicationDescription
id: an-incorrect-id-with-special-chars**&%
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.v3
id: com-northstartida-digitron-orchestrator-helm.v3-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
requiredResources:
cpu:
cores: 1.5
architectures:
- amd64
memory: 1024Mi
storage: 10Gi
peripherals:
- type: gpu
manufacturer: NVIDIA
- type: display
interfaces:
- type: ethernet
- type: bluetooth
- type: compose
id: com-northstartida-digitron-orchestrator-compose-a
components:
- name: digitron-orchestrator-docker
properties:
packageLocation: https://northsitarida.com/digitron/docker/digitron-orchestrator.tar.gz
keyLocation: https://northsitarida.com/digitron/docker/public-key.asc
parameters:
idpName:
targets:
- pointer: idp.name
components: ["digitron-orchestrator"]
- pointer: ENV.IDP_NAME
components: ["digitron-orchestrator-docker"]
idpProvider:
targets:
- pointer: idp.provider
components: ["digitron-orchestrator"]
- pointer: ENV.IDP_PROVIDER
components: ["digitron-orchestrator-docker"]
idpClientId:
targets:
- pointer: idp.clientId
components: ["digitron-orchestrator"]
- pointer: ENV.IDP_CLIENT_ID
components: ["digitron-orchestrator-docker"]
idpUrl:
targets:
- pointer: idp.providerUrl
components: ["digitron-orchestrator"]
- pointer: idp.providerMetadata
components: ["digitron-orchestrator"]
- pointer: ENV.IDP_URL
components: ["digitron-orchestrator-docker"]
adminName:
targets:
- pointer: administrator.name
components: ["digitron-orchestrator"]
- pointer: ENV.ADMIN_NAME
components: ["digitron-orchestrator-docker"]
adminPrincipalName:
targets:
- pointer: administrator.userPrincipalName
components: ["digitron-orchestrator"]
- pointer: ENV.ADMIN_PRINCIPALNAME
components: ["digitron-orchestrator-docker"]
pollFrequency:
value: 30
targets:
- pointer: settings.pollFrequency
components: ["digitron-orchestrator", "database-services"]
- pointer: ENV.POLL_FREQUENCY
components: ["digitron-orchestrator-docker"]
siteId:
targets:
- pointer: settings.siteId
components: ["digitron-orchestrator", "database-services"]
- pointer: ENV.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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: margo.org/v1-alpha1
kind: ApplicationDescription
id: com-northstartida-hello-world
metadata:
id: com-northstartida-hello-world
name: Hello World
description: A basic hello world application
version: "1.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: margo.org/v1-alpha1
kind: ApplicationDescription
id: com-northstartida-digitron-orchestrator
metadata:
id: com-northstartida-digitron-orchestrator
name: Digitron orchestrator
description: The Digitron orchestrator application
version: 1.2.1
Expand Down
3 changes: 2 additions & 1 deletion src/specification/applications/resources/index.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ which defines the [desired state](../margo-management-interface/desired-state.md
| Attribute | Type | Required? | Description |
| --- | --- | --- | --- |
{% for slot in schemaview.class_slots("ApplicationDescription")|sort(attribute='rank') -%}
| {{ slot }} | {{ format_range(schemaview.get_slot(slot)) }} | {% if schemaview.get_slot(slot).required == True %} Y {% else %} N {% endif %} | {{ schemaview.get_slot(slot).description }}|
{% set slot_def = schemaview.induced_slot(slot, "ApplicationDescription") -%}
| {{ slot }} | {{ format_range(slot_def) }} | {% if slot_def.required == True %} Y {% else %} N {% endif %} | {{ slot_def.description }}|
{% endfor -%}

{% for c in gen.all_class_objects()|sort(attribute='rank') %}
Expand Down
Loading
Loading