Ran linkchecker and fixed links.
[arvados.git] / doc / user / topics / running-pipeline-command-line.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "Running a pipeline on the command line"
5 ...
6
7 It is possible run pipelines on the command line using @arv pipeline run@ using the UUID that you received from @arv pipeline create@:
8
9 <notextile>
10 <pre><code>$ <span class="userinput">arv pipeline run --template qr1hi-p5p6p-xxxxxxxxxxxxxxx</span>
11 2013-12-16 14:08:40 +0000 -- pipeline_instance qr1hi-d1hrv-vxzkp38nlde9yyr
12 do_hash qr1hi-8i9sb-hoyc2u964ecv1s6 queued 2013-12-16T14:08:40Z
13 filter  -                           -
14 2013-12-16 14:08:51 +0000 -- pipeline_instance qr1hi-d1hrv-vxzkp38nlde9yyr
15 do_hash qr1hi-8i9sb-hoyc2u964ecv1s6 e2ccd204bca37c77c0ba59fc470cd0f7+162
16 filter  qr1hi-8i9sb-w5k40fztqgg9i2x queued 2013-12-16T14:08:50Z
17 2013-12-16 14:09:01 +0000 -- pipeline_instance qr1hi-d1hrv-vxzkp38nlde9yyr
18 do_hash qr1hi-8i9sb-hoyc2u964ecv1s6 e2ccd204bca37c77c0ba59fc470cd0f7+162
19 filter  qr1hi-8i9sb-w5k40fztqgg9i2x 735ac35adf430126cf836547731f3af6+56
20 </code></pre>
21 </notextile>
22
23 This instantiates your pipeline and displays a live feed of its status.  The new pipeline instance will also show up on the Workbench %(rarr)&rarr;% Compute %(rarr)&rarr;% Pipeline&nbsp;instances page.
24
25 Arvados adds each pipeline component to the job queue as its dependencies are satisfied (or immediately if it has no dependencies) and finishes when all components are completed or failed and there is no more work left to do.
26
27 The Keep locators of the output of each of @"do_hash"@ and @"filter"@ component are available from the output log shown above.  The output is also available on the Workbench by navigating to %(rarr)&rarr;% Compute %(rarr)&rarr;% Pipeline&nbsp;instances %(rarr)&rarr;% pipeline uuid under the *id* column %(rarr)&rarr;% components.
28
29 <notextile>
30 <pre><code>$ <span class="userinput">arv keep get e2ccd204bca37c77c0ba59fc470cd0f7+162/md5sum.txt</span>
31 0f1d6bcf55c34bed7f92a805d2d89bbf alice.txt
32 504938460ef369cd275e4ef58994cffe bob.txt
33 8f3b36aff310e06f3c5b9e95678ff77a carol.txt
34 $ <span class="userinput">arv keep get 735ac35adf430126cf836547731f3af6+56/0-filter.txt</span>
35 0f1d6bcf55c34bed7f92a805d2d89bbf alice.txt
36 </code></pre>
37 </notextile>
38
39 Indeed, the filter has picked out just the "alice" file as having a hash that starts with 0.
40
41 h3. Running a pipeline with different parameters
42
43 Notice that the pipeline definition explicitly specifies the Keep locator for the input:
44
45 <notextile>
46 <pre><code>...
47     "do_hash":{
48       "script_parameters":{
49         "input": "887cd41e9c613463eab2f0d885c6dd96+83"
50       },
51     }
52 ...
53 </code></pre>
54 </notextile>
55
56 You can specify values for pipeline component script_parameters like this:
57
58 <notextile>
59 <pre><code>$ <span class="userinput">arv pipeline run --template qr1hi-d1hrv-vxzkp38nlde9yyr do_hash::input=33a9f3842b01ea3fdf27cc582f5ea2af+242</span>
60 2013-12-17 20:31:24 +0000 -- pipeline_instance qr1hi-d1hrv-tlkq20687akys8e
61 do_hash qr1hi-8i9sb-rffhuay4jryl2n2 queued 2013-12-17T20:31:24Z
62 filter  -                           -
63 2013-12-17 20:31:34 +0000 -- pipeline_instance qr1hi-d1hrv-tlkq20687akys8e
64 do_hash qr1hi-8i9sb-rffhuay4jryl2n2 {:done=>1, :running=>1, :failed=>0, :todo=>0}
65 filter  -                           -
66 2013-12-17 20:31:44 +0000 -- pipeline_instance qr1hi-d1hrv-tlkq20687akys8e
67 do_hash qr1hi-8i9sb-rffhuay4jryl2n2 {:done=>1, :running=>1, :failed=>0, :todo=>0}
68 filter  -                           -
69 2013-12-17 20:31:55 +0000 -- pipeline_instance qr1hi-d1hrv-tlkq20687akys8e
70 do_hash qr1hi-8i9sb-rffhuay4jryl2n2 880b55fb4470b148a447ff38cacdd952+54
71 filter  qr1hi-8i9sb-j347g1sqovdh0op queued 2013-12-17T20:31:55Z
72 2013-12-17 20:32:05 +0000 -- pipeline_instance qr1hi-d1hrv-tlkq20687akys8e
73 do_hash qr1hi-8i9sb-rffhuay4jryl2n2 880b55fb4470b148a447ff38cacdd952+54
74 filter  qr1hi-8i9sb-j347g1sqovdh0op fb728f0ffe152058fa64b9aeed344cb5+54
75 </code></pre>
76 </notextile>
77
78 Now check the output:
79
80 <notextile>
81 <pre><code>$ <span class="userinput">arv keep get 880b55fb4470b148a447ff38cacdd952+54/md5sum.txt</span>
82 44b8ae3fde7a8a88d2f7ebd237625b4f var-GS000016015-ASM.tsv.bz2
83 $ <span class="userinput">arv keep get fb728f0ffe152058fa64b9aeed344cb5+54/0-filter.txt</span>
84
85 </code></pre>
86 </notextile>
87
88 Since none of the files in the collection have hash code that start with 0, output of the filter component is empty.