Skip to content

Commit

Permalink
Rename transaction directory to deploy_replace_undeploy.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvretano committed Oct 18, 2021
1 parent a829fae commit a0bdca3
Show file tree
Hide file tree
Showing 59 changed files with 576 additions and 178 deletions.
File renamed without changes.

Large diffs are not rendered by default.

File renamed without changes.
323 changes: 323 additions & 0 deletions extensions/deploy_replace_undeploy/standard/clause_7_apppkg.adoc.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
== Requirements Class "OGC Application Package"

[[ogcapppkg-overview]]
=== Overview

include::requirements/requirements_class_ogcapppkg.adoc[]

This conformance class defines the schema of an `OGC Application Package`. An
`OGC Application Package` is a document that describes a process in sufficient
detail so that an implementation of this extension can dynamically deploy the
process and make it available for execution via an OGC processes API. An
`OGC Application Package` document includes the following:

* A formal description of the process including what inputs the process takes and what outputs the process generates.
* Either inline or by reference an execution unit which is the `code` that the server needs to execute whenever the process is invoked.
* A declaration of the processes' deployment profile which indicates the type of execution unit (e.g. Docker, CWL, etc.)

=== OGC Application Package schema

==== Overview

include::requirements/ogcapppkg/REQ_schema.adoc[]

[[schema_ogcappkg]]
.link:http://schemas.opengis.net/ogcapi/processes/part2/1.0/openapi/schemas/ogcapppkg.yaml[Schema for the OGC Application Package]
[source,YAML]
----
type: object
required:
- processAsset
- deploymentProfile
properties:
processDescription:
$ref: "../../../core/openapi/schemas/process.yaml"
processAsset:
description: Executable or runtime information to execute the process
type: array
minItems: 1
items:
type: object
example:
type: docker
image: mydocker/ndvi:latest
config:
type: object
description: Hardware requirements and configuration properties
properties:
cpuMin:
description: Minimum number of CPU required to run the process (unit is CPU core). Minimum value is 1.
type: number
cpuMax:
description: Maximum number of CPU dedicated to the process (unit is CPU core)
type: number
memoryMin:
description: Minimum RAM memory (in GB) required to run the application.
type: number
memoryMax:
description: Maximum RAM memory (in GB) dedicated to the application.
type: number
tempStorageMin:
description: Minimum required temporary storage size in GB.
type: number
outputStorageMin:
description: Minimum required output storage size in GB.
type: number
jobTimeout:
description: Timeout delay for a job execution (in seconds)
type: number
deploymentProfile:
type: string
format: uri
example: http://www.opengis.net/profiles/eoc/container
----

==== immediateDeployment property

NOTE: Some text here about the immediateDeployment property; I don't remember its purpose.

==== processDescription property

The formal process description (i.e. its inputs, its output, etc.) are provided,
either in-line or by reference as the value of the `processDescription`
property.

include::requirements/ogcapppkg/REQ_process-description.adoc[]

NOTE: Should this requirement be a recommendation? Making it a recommendation opens up the possibility of using the `OGC Application Package` schema with alternative process description languages.

==== executionUnit property

The execution unit is the `code` that an implementation of this extensions needs
to execute whenever the deployed process is executed. The execution unit can be
either specified in-line or by reference.

include::requirements/ogcapppkg/REQ_execution-unit-docker.adoc[]

==== deploymentProfile property

The deploymentProfile property is used to indicate the type of execution unit
that is being provided.

include::requirements/ogcapppkg/REQ_profile-docker.adoc[]

NOTE: I think we need to consult with the OGC NA to get a property identifier indicating that the profile is "dockerized application".

[[example1]]
----
{
"processDescription": {
"process": {
"id": "NdviCalculation",
"title": "Calculation of NDVI using the SNAP toolbox for Sentinel-2",
"description": "Calculation of NDVI using the SNAP toolbox for Sentinel-2",
"version": "1.0.0",
"keywords": [
"Vegetation",
"NDVI"
],
"inputs": [
{
"id": "source",
"title": "Source Input Image (sentinel-2 product in SAFE format)",
"description": "Source Input Image (sentinel-2 product in SAFE format). Either provided inline, by reference or by product ID",
"minOccurs": 1,
"maxOccurs": 1,
"input": {
"formats": [
{
"mimeType": "text/plain",
"default": true
},
{
"mimeType": "application/zip",
"default": false
}
]
}
},
{
"id": "red_source_band",
"title": "the band to be used for the red band",
"minOccurs": 0,
"maxOccurs": 1,
"input": {
"literalDataDomains": [
{
"default": true,
"dataType": {
"name": "integer"
},
"valueDefinition": [
{
"minimumValue": "1",
"maximumValue": "13",
"rangeClosure": "closed"
}
]
}
]
}
},
{
"id": "nir_source_band",
"title": "the band to be used for the near-infrared band",
"minOccurs": 0,
"maxOccurs": 1,
"input": {
"literalDataDomains": [
{
"default": true,
"dataType": {
"name": "integer"
},
"valueDefinition": [
{
"minimumValue": "\n1\n",
"maximumValue": "13\n",
"rangeClosure": "closed"
}
]
}
]
}
},
{
"id": "red_factor",
"title": "the factor of the NRI",
"minOccurs": 0,
"maxOccurs": 1,
"input": {
"literalDataDomains": [
{
"default": true,
"defaultValue": "1.0\n",
"dataType": {
"name": "float"
},
"valueDefinition": [
{
"minimumValue": "0.0",
"rangeClosure": "closed"
}
]
}
]
}
},
{
"id": "nir_factor",
"title": "the factor of the NIR",
"minOccurs": 0,
"maxOccurs": 1,
"input": {
"literalDataDomains": [
{
"default": true,
"defaultValue": "1.0",
"dataType": {
"name": "float"
},
"valueDefinition": [
{
"minimumValue": "0.0",
"rangeClosure": "closed"
}
]
}
]
}
},
{
"id": "cloud_coverage",
"title": "The cloud coverage of the scene.",
"minOccurs": 0,
"maxOccurs": 1,
"input": {
"literalDataDomains": [
{
"default": true,
"dataType": {
"name": "float"
},
"valueDefinition": [
{
"minimumValue": "0.0",
"maximumValue": "100.0",
"rangeClosure": "closed"
}
]
}
]
}
},
{
"id": "max_cloud_coverage",
"title": "The maximum cloud coverage of the scene.",
"minOccurs": 0,
"maxOccurs": 1,
"input": {
"literalDataDomains": [
{
"default": true,
"dataType": {
"name": "float"
},
"valueDefinition": [
{
"minimumValue": "0.0",
"maximumValue": "100.0",
"rangeClosure": "closed"
}
]
}
]
}
}
],
"outputs": [
{
"id": "raster",
"title": "The raster of the resulting NDVI calculation",
"output": {
"formats": [
{
"mimeType": "image/geotiff",
"default": true
}
]
}
}
]
},
"jobControlOptions": [
"async-execute"
],
"outputTransmission": [
"reference"
]
},
"immediateDeployment": true,
"executionUnit": [
{
"unit": {
"type": "docker",
"image": "eoc/ndvi:latest"
}
}
],
"deploymentProfileName": "http://www.opengis.net/profiles/eoc/dockerizedApplication"
}
----

==== Binding the process description to the invocation of the execution unit

NOTE: TBD. Need to have a discussion here about how the process inputs are mapped to the invocation of the execution unit. Command line arguments can be expressed in many ways (e.g. '-arg value', 'arg=value', etc.) and metadata needs to be provided to tell the server how to invoke the execution unit.

NOTE: TBD. I envision this clause being composed of a series of recommendations (not requirements) based on using the `additionaParameters` property of the process description from <<OAProc-1,OGC API - Processes - Part 1: Core>>.

==== Providing value hints for process inputs

NOTE: TBD. Need to have a discussion here about how hints (or perhaps stronger guidance) can be provided for process inputs. This is beyond the kind of enum or range value that might be specified in the process description. Rather I am thinking about being able to provide references to authoritative code lists or providing references to catalogues that can be searched for suitable values.

NOTE: TBD. I envision this clause being composed of a series of recommendations (not requirements) based on using the `metadata` property of the process description from <<OAProc-1,OGC API - Processes - Part 1: Core>>.
File renamed without changes.

0 comments on commit a0bdca3

Please sign in to comment.