π£ CCP Method Descriptor: method.jsonο
Every method in CCP is defined by a structured JSON file called method.json
. This file fully describes the methodβs behavior, interface, and execution context, and is essential for running, sharing, and reproducing the method.
You can download it using the Download button () in the method list.
Purposeο
The method.json
file is the definitive contract for a methodβs definition. It:
Specifies inputs, outputs, runtime, and logic
Enables sharing and importing/exporting across VREs
Supports method versioning and provenance tracking
Structure Overviewο
id
(required)ο
"id": "af3e3771-5b1f-402b-89b8-4ecdb121af92"
A globally unique identifier for the method. It must remain consistent to ensure traceability of executions and metadata.
title
, description
, version
ο
Basic metadata used for display and documentation.
metadata
ο
Contains roles like:
author
: person or group creating the methodcategory
: classification in the UIcontext
: VRE or infrastructure where the method is defined
inputs
ο
Defines the methodβs parameters. Each includes:
id
,title
,description
schema
with type, format, and MIME typeminOccurs
/maxOccurs
ccpimage
: Runtime Docker Image (required)ο
"ccpimage": {
"id": "ccpimage",
"title": "Runtime",
"description": "The image of the runtime to use for method execution.",
"schema": {
"type": "string",
"format": "url",
"default": "hub.dev.d4science.org/test/python-gdal:latest"
}
}
This input defines the Docker image used to run the method logic inside the container. It must be compatible with the target infrastructure.
π¦ Output outputs
ο
Standard and custom outputs, including stdout
, stderr
, or generated files.
additionalParameters
ο
Includes:
deploy-script
: prepares the environmentexecute-script
: runs the methodundeploy-script
: optional cleanuplifecycle
: timestamps and modifications
links
β compatibleWith
(required)ο
"links": [
{
"rel": "compatibleWith",
"title": "D4Science production Infrastructure",
"href": "infrastructures/d4science-prod-swarm"
}
]
This field is mandatory and declares which infrastructure(s) the method is compatible with. If not present, the method cannot be scheduled for execution.
It ensures that:
The method can run on the selected infrastructure
The Docker image is accessible from that infrastructure
Runtime features (e.g., network, storage) match execution requirements
keywords
(optional)ο
Used for search and discovery in the CCP interface.
π‘ Note Notesο
The
id
andcompatibleWith
fields are mandatoryThe method is executed only if the infrastructure matches
compatibleWith
The file can be uploaded again to update, clone, or transfer the method across VREs