3232: Reorganized user guide
[arvados.git] / doc / user / tutorials / tutorial-new-pipeline.html.textile.liquid
index d3d4f4a1e06030c31645213b3093480a9a6c2d4c..83303ad7cc18416f40b49c3119c1eee12ba302dd 100644 (file)
@@ -6,75 +6,22 @@ title: "Writing a multi-step pipeline"
 
 A pipeline in Arvados is a collection of crunch scripts, in which the output from one script may be used as the input to another script.
 
-*This tutorial assumes that you are "logged into an Arvados VM instance":{{site.baseurl}}/user/getting_started/ssh-access.html#login, and have a "working environment.":{{site.baseurl}}/user/getting_started/check-environment.html*
+{% include 'tutorial_expectations' %}
 
-This tutorial uses *@you@* to denote your username.  Replace *@you@* with your user name in all the following examples.
 
-h2. Create a new script
-
-Our second script will filter the output of @hash.py@ and only include hashes that start with 0.  Create a new script in <notextile><code>~/<b>you</b>/crunch_scripts/</code></notextile> called @0-filter.py@:
-
-<notextile> {% code '0_filter_py' as python %} </notextile>
-
-Now add it to your repository:
+First, use @arv pipeline_template create@ to create a new empty template.  The @--format=uuid@ option will print out the unique identifier for the new template:
 
 <notextile>
-<pre><code>~/<b>you</b>/crunch_scripts$ <span class="userinput">chmod +x 0-filter.py</span>
-~/<b>you</b>/crunch_scripts$ <span class="userinput">git add 0-filter.py</span>
-~/<b>you</b>/crunch_scripts$ <span class="userinput">git commit -m"zero filter"</span>
-~/<b>you</b>/crunch_scripts$ <span class="userinput">git push origin master</span>
-</code></pre>
-</notextile>
-
-h2. Create a pipeline template
-
-Next, create a file that contains the pipeline definition:
-
-<notextile>
-<pre><code>~/<b>you</b>/crunch_scripts$ <span class="userinput">cat &gt;~/the_pipeline &lt;&lt;EOF
-{
-  "name":"Filter MD5 hash values",
-  "components":{
-    "do_hash":{
-      "script":"hash.py",
-      "script_parameters":{
-        "input":{
-          "required": true,
-          "dataclass": "Collection"
-        }
-      },
-      "repository":"$USER",
-      "script_version":"master",
-      "output_is_persistent":false
-    },
-    "do_filter":{
-      "script":"0-filter.py",
-      "script_parameters":{
-        "input":{
-          "output_of":"do_hash"
-        }
-      },
-      "repository":"$USER",
-      "script_version":"master",
-      "output_is_persistent":true
-    }
-  }
-}
-EOF
+<pre><code>~$ <span class="userinput">arv --format=uuid pipeline_template create --pipeline-template '{}'</span>
+qr1hi-p5p6p-wt1vdhkezgx7g2k
 </span></code></pre>
 </notextile>
 
-* @"output_of"@ indicates that the @output@ of the @do_hash@ component should be used as the @"input"@ of @do_filter@.  Arvados uses these dependencies between jobs to automatically determine the correct order to run them.
-
-(Your shell should automatically fill in @$USER@ with your login name.  The JSON that gets saved should have @"repository"@ pointed at your personal Git repository.)
+Next, use @arv edit@ to edit the template.  This will open the template record in an interactive text editor (as specified by $EDITOR or $VISUAL, otherwise defaults to @nano@).  Replace the empty fields with the following content:
 
-Now, use @arv pipeline_template create@ to register your pipeline template in Arvados:
+<notextile>{% code 'tutorial_bwa_pipeline' as javascript %}</notextile>
 
-<notextile>
-<pre><code>~/<b>you</b>/crunch_scripts$ <span class="userinput">arv pipeline_template create --pipeline-template "$(cat ~/the_pipeline)"</span>
-</code></pre>
-</notextile>
 
-Your new pipeline template will appear on the Workbench "Compute %(rarr)&rarr;% Pipeline&nbsp;templates":https://{{ site.arvados_workbench_host }}/pipeline_instances page.
+Your new pipeline template will appear on the Workbench "Pipeline&nbsp;templates":https://{{ site.arvados_workbench_host }}/pipeline_templates page.
 
 For more information and examples for writing pipelines, see the "pipeline template reference":{{site.baseurl}}/api/schema/PipelineTemplate.html