|
1 |
| -This is a proof of concept web service for the Common Workflow Language. It |
2 |
| -works with any `cwl-runner` that supports the CWL standard command line interface: |
3 |
| -http://www.commonwl.org/draft-3/CommandLineTool.html#Executing_CWL_documents_as_scripts |
| 1 | +# Workflow as a Service |
4 | 2 |
|
5 |
| -Theory of operation: |
| 3 | +This provides client and server implementations of the [GA4GH Workflow |
| 4 | +Execution Service](https://github.com/ga4gh/workflow-execution-schemas) API for |
| 5 | +the Common Workflow Language. |
6 | 6 |
|
7 |
| -* Accept job order via HTTP POST, create job and redirect to job URL |
8 |
| -* Client can poll for job status |
9 |
| -* Client can get streaming logs (stderr of `cwl-runner`) |
| 7 | +It provides an (Arvados)[https://github.com/curoverse/arvados] backend. It |
| 8 | +also works with any `cwl-runner` that supports the CWL standard command line |
| 9 | +interface: http://www.commonwl.org/v1.0/CommandLineTool.html#Executing_CWL_documents_as_scripts |
10 | 10 |
|
11 | 11 | Installation:
|
12 | 12 |
|
13 | 13 | ```
|
14 |
| -python setup.py install |
| 14 | +pip install wes-service |
15 | 15 | ```
|
16 | 16 |
|
17 |
| -Run standalone server: |
| 17 | +Run a standalone server with default `cwl-runner` backend: |
18 | 18 |
|
19 | 19 | ```
|
20 |
| -cwl-server |
| 20 | +$ wes-server |
21 | 21 | ```
|
22 | 22 |
|
23 |
| -Run a job, get status, get log: |
| 23 | +Submit a workflow to run: |
24 | 24 |
|
25 | 25 | ```
|
26 |
| -$ echo '{"message": "It works"}' | curl -L -X POST -d@- http://localhost:5000/run?wf=https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/master/draft-3/examples/1st-tool.cwl |
27 |
| -{ |
28 |
| - "state": "Running", |
29 |
| - "run": "https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/master/draft-3/examples/1st-tool.cwl", |
30 |
| - "log": "http://localhost:5000/jobs/0/log", |
31 |
| - "input": { |
32 |
| - "message": "It works" |
33 |
| - }, |
34 |
| - "output": null, |
35 |
| - "id": "http://localhost:5000/jobs/0" |
36 |
| -} |
37 |
| -$ curl http://localhost:5000/jobs/0 |
38 |
| -{ |
39 |
| - "state": "Success", |
40 |
| - "run": "https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/master/draft-3/examples/1st-tool.cwl", |
41 |
| - "log": "http://localhost:5000/jobs/0/log", |
42 |
| - "input": { |
43 |
| - "message": "It works" |
44 |
| - }, |
45 |
| - "output": {}, |
46 |
| - "id": "http://localhost:5000/jobs/0" |
47 |
| -} |
48 |
| -$ curl http://localhost:5000/jobs/0/log |
49 |
| -cwl-runner 1.0.20160518201549 |
50 |
| -[job 1st-tool.cwl] /tmp/tmpKcoc_I$ echo \ |
51 |
| - 'It works' |
52 |
| -It works |
53 |
| -Final process status is success |
| 26 | +$ wes-client --host=localhost:8080 myworkflow.cwl myjob.json |
| 27 | +``` |
| 28 | + |
| 29 | +List workflows: |
| 30 | + |
| 31 | +``` |
| 32 | +$ wes-client --list |
| 33 | +``` |
| 34 | + |
| 35 | +Get workflow status: |
| 36 | + |
| 37 | +``` |
| 38 | +$ wes-client --get <workflow-id> |
| 39 | +``` |
| 40 | + |
| 41 | +Get stderr log from workflow: |
| 42 | + |
| 43 | +``` |
| 44 | +$ wes-client --log <workflow-id> |
| 45 | +``` |
| 46 | + |
| 47 | +# Server Options |
| 48 | + |
| 49 | +## Run a standalone server with Arvados backend: |
| 50 | + |
| 51 | +``` |
| 52 | +$ wes-server --backend=wes_service.arvados_wes |
| 53 | +``` |
| 54 | + |
| 55 | +## Use a different executable with cwl_runner backend |
| 56 | + |
| 57 | +``` |
| 58 | +$ wes-server --backend=wes_service.cwl_runner --opt runner=cwltoil |
| 59 | +``` |
| 60 | + |
| 61 | +## Pass parameters to cwl-runner |
| 62 | + |
| 63 | +``` |
| 64 | +$ wes-server --backend=wes_service.cwl_runner --opt extra=--workDir=/ |
| 65 | +``` |
| 66 | + |
| 67 | +# Client environment options |
| 68 | + |
| 69 | +Set service endpoint: |
| 70 | + |
| 71 | +``` |
| 72 | +$ export WES_API_HOST=localhost:8080 |
| 73 | +``` |
| 74 | + |
| 75 | +Set the value to pass in the `Authorization` header: |
| 76 | + |
| 77 | +``` |
| 78 | +$ export WES_API_AUTH=my_api_token |
| 79 | +``` |
| 80 | + |
| 81 | +Set the protocol (one of http, https) |
| 82 | + |
| 83 | +``` |
| 84 | +$ export WES_API_PROTO=http |
54 | 85 | ```
|
0 commit comments