Arvados Composer » History » Version 3

Peter Amstutz, 10/03/2019 01:37 PM

1 1 Peter Amstutz
h1. Arvados Composer
2 1 Peter Amstutz
3 1 Peter Amstutz
Arvados Composer is a graphical workflow editor integrated with Arvados.  It is originally based on "Rabix Composer":https://github.com/rabix/composer
4 1 Peter Amstutz
5 1 Peter Amstutz
h2. Running from Composer
6 1 Peter Amstutz
7 1 Peter Amstutz
This is described in the "walkthrough":https://doc.arvados.org/user/composer/composer.html
8 1 Peter Amstutz
9 1 Peter Amstutz
You can paste in a keep reference into the file input, in the form "keep:portabledatahash+123/path/to/file.txt".  You currently you cannot choose files through Composer.  However, when you press "Run" it will open up a Workbench workflow submission page in a new tab.  You are able to choose Workflow inputs here.
10 1 Peter Amstutz
11 1 Peter Amstutz
Be aware that Composer marks inputs as "optional" by default.  At least one input needs to be marked as "required".  If all inputs are optional (not required, null by default) the Workbench page for choosing inputs will be skipped, which may lead to confusion.
12 1 Peter Amstutz
13 2 Peter Amstutz
*Docker images used by your workflow must be uploaded using arv-keepdocker*
14 2 Peter Amstutz
15 3 Peter Amstutz
In particular, you may need to upload the arvados/jobs image:
16 3 Peter Amstutz
17 3 Peter Amstutz
@$ arv-keepdocker arvados/jobs@
18 3 Peter Amstutz
19 3 Peter Amstutz
If the Docker image isn't found, launching the workflow from composer will fail (unfortunately, as of this writing, there is no error message).  So if launching the workflow isn't working, this should be the first thing to check.
20 2 Peter Amstutz
21 1 Peter Amstutz
h2. Registering the workflow to run from Workbench (and also running from the command line)
22 1 Peter Amstutz
23 1 Peter Amstutz
Composer workflow are stored in git repository managed by Arvados.
24 1 Peter Amstutz
25 1 Peter Amstutz
From Composer, the repositories list can be accessed by clicking on the "gear" icon under "My Repositories", or the "Repositories" link on the Workbench drop-down menu.
26 1 Peter Amstutz
27 1 Peter Amstutz
The repositories page provides information on how to to clone the repository, see also "Working with an Arvados git repository":https://doc.arvados.org/v1.4/user/tutorials/git-arvados-guide.html in the user guide.
28 1 Peter Amstutz
29 1 Peter Amstutz
Once you have cloned the repository, you can "submit a worklow from the command line using arvados-cwl-runner":https://doc.arvados.org/v1.4/user/cwl/cwl-runner.html
30 1 Peter Amstutz
31 1 Peter Amstutz
<pre>
32 1 Peter Amstutz
$ arvados-cwl-runner composerdemo.cwl
33 1 Peter Amstutz
</pre>
34 1 Peter Amstutz
35 1 Peter Amstutz
To register a workflow so it can be executed through workbench, use "arvados-cwl-runner --create-workflow":https://doc.arvados.org/v1.4/user/tutorials/writing-cwl-workflow.html
36 1 Peter Amstutz
37 1 Peter Amstutz
<pre>
38 1 Peter Amstutz
$ arvados-cwl-runner --create-workflow composerdemo.cwl
39 1 Peter Amstutz
xxxxx-7fd4e-dfynud09qop82ji
40 1 Peter Amstutz
</pre>
41 1 Peter Amstutz
42 1 Peter Amstutz
After doing so, you will be able to run the workflow on Workbench using "Run a process".
43 1 Peter Amstutz
44 1 Peter Amstutz
You can update a workflow definition using --update-workflow.  You need to know the UUID of the workflow record (this is printed out when you run --create-workflow, or can be found by browsing the workflows list on Workbench.)
45 1 Peter Amstutz
46 1 Peter Amstutz
<pre>
47 1 Peter Amstutz
$ arvados-cwl-runner --update-workflow xxxxx-7fd4e-dfynud09qop82ji composerdemo.cwl
48 1 Peter Amstutz
</pre>