Connect to cluster via Slurm REST API
Start and cancel a workflow in the cluster via the Slurm REST API.
Python bindings from an OpenAPI specification can be created with OpenAPI Generator. Use the option library=asyncio
to create an async client.
The request to submit a Job looks like this.
POST http://<cluster ip>/slurm/v0.0.38/job/submit
{
"script": "#!/bin/bash\n nextflow run <workflow url> -c /mnt/config-bucket/<workflow config> -hub <github|gitlab|bitbucket> -revision <git commit SHA>",
"job": {
"current_working_directory": "/vol/spool/clowm-workflows",
"name": "<execution id>",
"requeue": false,
"environment": {
"NXF_HOME": "/home/slurm/.nextflow"
}
}
}
Edited by Daniel Göbel