You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the SPS is redeployed, the Airflow Postgres database is restored, but the OGC processes that were deployed are not visible any more because the Python code does not exist any more in the Airflow DAG directory.
One solution to this problem is (with corresponding CURL commands):
Query the OGC API for all processes currently deployed:
export WPST_API=http://.......:8080/unity-luca-1/dev/ogc/
curl -k -v -X GET $WPST_API/processes
Parse the JSON output, and loop over the process ids. Query the API to retrieve the description of each process, save it to a local JSON file:
curl -k -v -X GET -o ${PROCESS_ID}.json $WPST_API/processes/${PROCESS_ID}
Undeploy each process:
curl -k -v -X GET $WPST_API/processes/${PROCESS_ID}
4)Read the JSON description of each process and convert it to a format suitable for OGC publication.
Specifically, file ${PROCESS_ID}.json [1] must be converted to file ${PROCESS_ID}_new.json [2]
After the SPS is redeployed, the Airflow Postgres database is restored, but the OGC processes that were deployed are not visible any more because the Python code does not exist any more in the Airflow DAG directory.
One solution to this problem is (with corresponding CURL commands):
export WPST_API=http://.......:8080/unity-luca-1/dev/ogc/
curl -k -v -X GET $WPST_API/processes
Parse the JSON output, and loop over the process ids. Query the API to retrieve the description of each process, save it to a local JSON file:$WPST_API/processes/$ {PROCESS_ID}
curl -k -v -X GET -o ${PROCESS_ID}.json
Undeploy each process:$WPST_API/processes/$ {PROCESS_ID}
curl -k -v -X GET
4)Read the JSON description of each process and convert it to a format suitable for OGC publication.
Specifically, file ${PROCESS_ID}.json [1] must be converted to file ${PROCESS_ID}_new.json [2]
curl -k -v -X POST -H "Expect:" -H "Content-Type: application/json; charset=utf-8" --data-binary @"./${PROCESS_ID}_new.json" "${WPST_API}/processes"
=========================
[1]
{
"title": "Generic CWL Process",
"description": "This process executes any CWL workflow.",
"keywords": null,
"metadata": null,
"id": "cwl_dag",
"version": "1.0.0",
"jobControlOptions": [
"async-execute"
],
"links": null,
"inputs": {
"cwl_args": {
"title": "CWL Workflow Parameters URL",
"description": "The URL of the CWL workflow's YAML parameters file",
"keywords": null,
"metadata": null,
"schema": {
"title": null,
"multipleOf": null,
"maximum": null,
"exclusiveMaximum": false,
"minimum": null,
"exclusiveMinimum": false,
"maxLength": null,
"minLength": 0,
"pattern": null,
"maxItems": null,
"minItems": 0,
"uniqueItems": false,
"maxProperties": null,
"minProperties": 0,
"required": null,
"enum": null,
"type": "string",
"not": null,
"allOf": null,
"oneOf": null,
"anyOf": null,
"items": null,
"properties": null,
"additionalProperties": null,
"description": null,
"format": "uri",
"default": null,
"nullable": false,
"readOnly": false,
"writeOnly": false,
"example": null,
"deprecated": false,
"contentMediaType": null,
"contentEncoding": null,
"contentSchema": null
},
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": null
},
"cwl_workflow": {
"title": "CWL Workflow URL",
"description": "The URL of the CWL workflow",
"keywords": null,
"metadata": null,
"schema": {
"title": null,
"multipleOf": null,
"maximum": null,
"exclusiveMaximum": false,
"minimum": null,
"exclusiveMinimum": false,
"maxLength": null,
"minLength": 0,
"pattern": null,
"maxItems": null,
"minItems": 0,
"uniqueItems": false,
"maxProperties": null,
"minProperties": 0,
"required": null,
"enum": null,
"type": "string",
"not": null,
"allOf": null,
"oneOf": null,
"anyOf": null,
"items": null,
"properties": null,
"additionalProperties": null,
"description": null,
"format": "uri",
"default": null,
"nullable": false,
"readOnly": false,
"writeOnly": false,
"example": null,
"deprecated": false,
"contentMediaType": null,
"contentEncoding": null,
"contentSchema": null
},
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": null
},
"request_instance_type": {
"title": "Requested EC2 Type",
"description": "The specific EC2 instance type requested for the job",
"keywords": null,
"metadata": null,
"schema": {
"title": null,
"multipleOf": null,
"maximum": null,
"exclusiveMaximum": false,
"minimum": null,
"exclusiveMinimum": false,
"maxLength": null,
"minLength": 0,
"pattern": null,
"maxItems": null,
"minItems": 0,
"uniqueItems": false,
"maxProperties": null,
"minProperties": 0,
"required": null,
"enum": null,
"type": "string",
"not": null,
"allOf": null,
"oneOf": null,
"anyOf": null,
"items": null,
"properties": null,
"additionalProperties": null,
"description": null,
"format": null,
"default": null,
"nullable": false,
"readOnly": false,
"writeOnly": false,
"example": null,
"deprecated": false,
"contentMediaType": null,
"contentEncoding": null,
"contentSchema": null
},
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": null
},
"request_storage": {
"title": "Requested Storage",
"description": "The amount of storage requested for the job",
"keywords": null,
"metadata": null,
"schema": {
"title": null,
"multipleOf": null,
"maximum": null,
"exclusiveMaximum": false,
"minimum": null,
"exclusiveMinimum": false,
"maxLength": null,
"minLength": 0,
"pattern": null,
"maxItems": null,
"minItems": 0,
"uniqueItems": false,
"maxProperties": null,
"minProperties": 0,
"required": null,
"enum": null,
"type": "string",
"not": null,
"allOf": null,
"oneOf": null,
"anyOf": null,
"items": null,
"properties": null,
"additionalProperties": null,
"description": null,
"format": null,
"default": null,
"nullable": false,
"readOnly": false,
"writeOnly": false,
"example": null,
"deprecated": false,
"contentMediaType": null,
"contentEncoding": null,
"contentSchema": null
},
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": null
}
},
"outputs": {
"result": {
"title": "Process Result",
"description": "The result of the SBG Preprocess Workflow execution",
"keywords": null,
"metadata": null,
"schema": {
"$ref": "some-ref"
}
}
}
}%
============
[2]
{
"title": "Generic CWL Process",
"description": "This process executes any CWL workflow.",
"keywords": null,
"metadata": null,
"id": "cwl_dag",
"version": "1.0.0",
"jobControlOptions": [
"async-execute"
],
"links": null,
"inputs": {
"cwl_args": {
"title": "CWL Workflow Parameters URL",
"description": "The URL of the CWL workflow's YAML parameters file",
"keywords": null,
"metadata": null,
"schema": {
"title": null,
"multipleOf": null,
"maximum": null,
"exclusiveMaximum": false,
"minimum": null,
"exclusiveMinimum": false,
"maxLength": null,
"minLength": 0,
"pattern": null,
"maxItems": null,
"minItems": 0,
"uniqueItems": false,
"maxProperties": null,
"minProperties": 0,
"required": null,
"enum": null,
"type": "string",
"not": null,
"allOf": null,
"oneOf": null,
"anyOf": null,
"items": null,
"properties": null,
"additionalProperties": null,
"description": null,
"format": "uri",
"default": null,
"nullable": false,
"readOnly": false,
"writeOnly": false,
"example": null,
"deprecated": false,
"contentMediaType": null,
"contentEncoding": null,
"contentSchema": null
},
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": null
},
"cwl_workflow": {
"title": "CWL Workflow URL",
"description": "The URL of the CWL workflow",
"keywords": null,
"metadata": null,
"schema": {
"title": null,
"multipleOf": null,
"maximum": null,
"exclusiveMaximum": false,
"minimum": null,
"exclusiveMinimum": false,
"maxLength": null,
"minLength": 0,
"pattern": null,
"maxItems": null,
"minItems": 0,
"uniqueItems": false,
"maxProperties": null,
"minProperties": 0,
"required": null,
"enum": null,
"type": "string",
"not": null,
"allOf": null,
"oneOf": null,
"anyOf": null,
"items": null,
"properties": null,
"additionalProperties": null,
"description": null,
"format": "uri",
"default": null,
"nullable": false,
"readOnly": false,
"writeOnly": false,
"example": null,
"deprecated": false,
"contentMediaType": null,
"contentEncoding": null,
"contentSchema": null
},
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": null
},
"request_instance_type": {
"title": "Requested EC2 Type",
"description": "The specific EC2 instance type requested for the job",
"keywords": null,
"metadata": null,
"schema": {
"title": null,
"multipleOf": null,
"maximum": null,
"exclusiveMaximum": false,
"minimum": null,
"exclusiveMinimum": false,
"maxLength": null,
"minLength": 0,
"pattern": null,
"maxItems": null,
"minItems": 0,
"uniqueItems": false,
"maxProperties": null,
"minProperties": 0,
"required": null,
"enum": null,
"type": "string",
"not": null,
"allOf": null,
"oneOf": null,
"anyOf": null,
"items": null,
"properties": null,
"additionalProperties": null,
"description": null,
"format": null,
"default": null,
"nullable": false,
"readOnly": false,
"writeOnly": false,
"example": null,
"deprecated": false,
"contentMediaType": null,
"contentEncoding": null,
"contentSchema": null
},
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": null
},
"request_storage": {
"title": "Requested Storage",
"description": "The amount of storage requested for the job",
"keywords": null,
"metadata": null,
"schema": {
"title": null,
"multipleOf": null,
"maximum": null,
"exclusiveMaximum": false,
"minimum": null,
"exclusiveMinimum": false,
"maxLength": null,
"minLength": 0,
"pattern": null,
"maxItems": null,
"minItems": 0,
"uniqueItems": false,
"maxProperties": null,
"minProperties": 0,
"required": null,
"enum": null,
"type": "string",
"not": null,
"allOf": null,
"oneOf": null,
"anyOf": null,
"items": null,
"properties": null,
"additionalProperties": null,
"description": null,
"format": null,
"default": null,
"nullable": false,
"readOnly": false,
"writeOnly": false,
"example": null,
"deprecated": false,
"contentMediaType": null,
"contentEncoding": null,
"contentSchema": null
},
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": null
}
},
"outputs": {
"result": {
"title": "Process Result",
"description": "The result of the SBG Preprocess Workflow execution",
"keywords": null,
"metadata": null,
"schema": {
"$ref": "some-ref"
}
}
}
}
The text was updated successfully, but these errors were encountered: