From 2ea5d7a9764390d7f0a158fbc9d20b872072f3fc Mon Sep 17 00:00:00 2001 From: Alputer Date: Thu, 29 Aug 2024 13:36:41 +0200 Subject: [PATCH] feat(openapi): update reana.yaml schema to include dask properties (#467) --- AUTHORS.md | 1 + .../openapi_specifications/reana_server.json | 75 +++++++++++++++++++ .../schemas/reana_analysis_schema.json | 21 ++++++ 3 files changed, 97 insertions(+) diff --git a/AUTHORS.md b/AUTHORS.md index cde7e81a..3d83b76f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -5,6 +5,7 @@ The list of contributors in alphabetical order: - [Adelina Lintuluoto](https://orcid.org/0000-0002-0726-1452) - [Agisilaos Kounelis](https://orcid.org/0000-0001-9312-3189) - [Alastair Lyall](https://orcid.org/0009-0000-4955-8935) +- [Alp Tuna](https://orcid.org/0009-0001-1915-3993) - [Audrius Mecionis](https://orcid.org/0000-0002-3759-1663) - [Bruno Rosendo](https://orcid.org/0000-0002-0923-3148) - [Burt Holzman](https://orcid.org/0000-0001-5235-6314) diff --git a/reana_commons/openapi_specifications/reana_server.json b/reana_commons/openapi_specifications/reana_server.json index e3500970..7da1cafa 100644 --- a/reana_commons/openapi_specifications/reana_server.json +++ b/reana_commons/openapi_specifications/reana_server.json @@ -429,6 +429,26 @@ "slurmcern" ] }, + "dask_cluster_default_number_of_workers": { + "title": "Default number of workers for Dask clusters", + "value": "2Gi" + }, + "dask_cluster_default_single_worker_memory": { + "title": "Amount of memory for one Dask worker by default", + "value": "2Gi" + }, + "dask_cluster_max_memory_limit": { + "title": "Maximum memory limit for Dask clusters", + "value": "16Gi" + }, + "dask_cluster_max_single_worker_memory": { + "title": "Maximum amount of memory for one Dask worker", + "value": "8Gi" + }, + "dask_enabled": { + "title": "Dask workflows allowed in the cluster", + "value": "False" + }, "default_kubernetes_jobs_timeout": { "title": "Default timeout for Kubernetes jobs", "value": "604800" @@ -479,6 +499,61 @@ }, "type": "object" }, + "dask_cluster_default_number_of_workers": { + "properties": { + "title": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "dask_cluster_default_single_worker_memory": { + "properties": { + "title": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "dask_cluster_max_memory_limit": { + "properties": { + "title": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "dask_cluster_max_single_worker_memory": { + "properties": { + "title": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "dask_enabled": { + "properties": { + "title": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, "default_kubernetes_jobs_timeout": { "properties": { "title": { diff --git a/reana_commons/validation/schemas/reana_analysis_schema.json b/reana_commons/validation/schemas/reana_analysis_schema.json index 1a3bc422..f5681711 100644 --- a/reana_commons/validation/schemas/reana_analysis_schema.json +++ b/reana_commons/validation/schemas/reana_analysis_schema.json @@ -108,6 +108,27 @@ "$id": "/properties/workflow/properties/resources/properties/kerberos", "type": "boolean", "title": "Kerberos authentication for the whole workflow." + }, + "dask": { + "$id": "/properties/workflow/properties/resources/properties/dask", + "type": "object", + "title": "Dask cluster to be used by the workflow", + "properties": { + "image": { + "type": "string", + "description": "Image to be used by Dask workers and scheduler" + }, + "number_of_workers": { + "type": "number", + "description": "Number of workers in the Dask cluster." + }, + "single_worker_memory": { + "type": "string", + "description": "Memory for one Dask worker.", + "pattern": "^[1-9][0-9]*(Ei|Pi|Ti|Gi|Mi|Ki|E|P|T|G|M|K)$" + } + }, + "required": ["image"] } }, "additionalProperties": false