11# Workflow as a Service
22
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.
3+ This is a client and server implementation of the [ GA4GH Workflow
4+ Execution Service] ( https://github.com/ga4gh/workflow-execution-schemas ) 1.0.0 API.
65
7- It provides an [ Arvados] ( https://github.com/curoverse/arvados ) backend . It
6+ It provides [ Arvados] ( https://arvados.org/ ) and [ Toil ] ( http://toil.ucsc-cgl.org/ ) backends . It
87also works with any ` cwl-runner ` that supports the CWL standard command line
98interface: http://www.commonwl.org/v1.0/CommandLineTool.html#Executing_CWL_documents_as_scripts
109
@@ -16,43 +15,66 @@ pip install wes-service
1615
1716## Usage
1817
19- Run a standalone server with default ` cwl-runner ` backend:
18+ ### Client configuration
19+
20+ Command line parameter or environment variable.
21+
22+ ` --host ` or ` WES_API_HOST `
23+
24+ The host to contact.
25+
26+ ` --proto ` or ` WES_API_PROTO `
27+
28+ The protocol (http or https) to use.
29+
30+ ` --auth ` or ` WES_API_AUTH `
31+
32+ Credentials. Format is 'Header: value' or just 'value'. If header name is not provided, value goes in the 'Authorization'.
33+
34+ ### Get service info
2035
2136```
22- $ wes-server
37+ $ wes-client --info
2338```
2439
2540### Submit a workflow to run:
2641
27- Note! All inputs files must be accessible from the filesystem.
42+ Attachments must be accessible from the filesystem. Workflow runners may also support http URLs or other storage systems .
2843
2944```
30- $ wes-client --host=localhost:8080 --proto=http -- attachments="testdata/dockstore-tool-md5sum.cwl,testdata/md5sum.input" testdata/md5sum.cwl testdata/md5sum.cwl.json
45+ $ wes-client --attachments="testdata/dockstore-tool-md5sum.cwl,testdata/md5sum.input" testdata/md5sum.cwl testdata/md5sum.cwl.json
3146```
3247
3348### List workflows
3449
3550```
36- $ wes-client --proto http --host=localhost:8080 -- list
51+ $ wes-client --list
3752```
3853
3954### Get workflow status
4055
4156```
42- $ wes-client --proto http --host=localhost:8080 -- get <workflow -id>
57+ $ wes-client --get <run -id>
4358```
4459
4560### Get stderr log from workflow:
4661
4762```
48- $ wes-client --proto http --host=localhost:8080 -- log <workflow -id>
63+ $ wes-client --log <run -id>
4964```
5065
5166## Server Configuration
5267
68+ ### Run a standalone server with default ` cwl-runner ` backend:
69+
70+ ```
71+ $ wes-server
72+ ```
73+
5374### Run a standalone server with Arvados backend:
5475
5576```
77+ $ pip install arvados-cwl-runner
5678$ wes-server --backend=wes_service.arvados_wes
5779```
5880
@@ -63,46 +85,21 @@ $ pip install toil[all]
6385$ wes-server --backend=wes_service.toil_wes --opt extra=--clean=never
6486```
6587
66- ### Use a different executable with cwl_runner backend
88+ ### Use alternate executable with cwl-runner backend
6789
6890```
69- $ pip install toil[all]
70- $ wes-server --backend=wes_service.cwl_runner --opt runner=cwltoil --opt extra=--logLevel=CRITICAL
91+ $ pip install cwltool
92+ $ wes-server --backend=wes_service.cwl_runner --opt runner=cwltool --opt extra=--logLevel=CRITICAL
7193```
7294
7395### Pass parameters to cwl-runner
7496
75- ```
76- $ wes-server --backend=wes_service.cwl_runner --opt extra=--workDir=/
77- ```
78-
79- ## Client Configuration
80-
81- These options will be read in as defaults when running the client from the
82- command line. The default protocol is https, to support secure communications,
83- but the server starts using http, to ease development.
84-
85- Set service endpoint:
86-
87- ```
88- $ export WES_API_HOST=localhost:8080
89- ```
90-
91- Set the value to pass in the ` Authorization ` header:
97+ Use "--opt" following by "key=value"
9298
9399```
94- $ export WES_API_AUTH=my_api_token
100+ $ wes-server --backend=wes_service.cwl_runner --opt extra=--workDir=/tmp/work
95101```
96102
97- Set the protocol (one of http, https)
98-
99- ```
100- $ export WES_API_PROTO=http
101- ```
102-
103- Then, when you call ` wes-client ` these defaults will be used in place of the
104- flags, ` --host ` , ` --auth ` , and ` proto ` respectively.
105-
106103## Development
107104If you would like to develop against ` workflow-service ` make sure you pass the provided test and it is flake8 compliant
108105
@@ -113,7 +110,7 @@ $ virtualenv venv && source venv/bin/activate && pip install toil[all] && pip in
113110```
114111
115112#### Running Tests
116- From path ` workflow-service ` run
113+ From path ` workflow-service ` run
117114
118115```
119116$ pytest && flake8
0 commit comments