X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2eb5599c5a74fd84875258a3f0fdcff21a923ce4..e537bd8dd1ac786164f192374e0d076bdc0327f3:/doc/user/tutorials/running-external-program.html.textile.liquid?ds=sidebyside
diff --git a/doc/user/tutorials/running-external-program.html.textile.liquid b/doc/user/tutorials/running-external-program.html.textile.liquid
index 875e3cf803..26b93ce6b3 100644
--- a/doc/user/tutorials/running-external-program.html.textile.liquid
+++ b/doc/user/tutorials/running-external-program.html.textile.liquid
@@ -1,39 +1,35 @@
---
layout: default
navsection: userguide
-navmenu: Tutorials
-title: "Running external programs"
-
+title: "Using Crunch to run external programs"
...
-h1. Running external programs
-
This tutorial demonstrates how to use Crunch to run an external program by writting a wrapper using the Python SDK.
-*This tutorial assumes that you are "logged into an Arvados VM instance":{{site.basedoc}}/user/getting_started/ssh-access.html#login, and have a "working environment.":{{site.basedoc}}/user/getting_started/check-environment.html*
+*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*
In this tutorial, you will use the external program @md5sum@ to compute hashes instead of the built-in Python library used in earlier tutorials.
-Start by entering the @crunch_scripts@ directory of your git repository:
+Start by entering the @crunch_scripts@ directory of your Git working tree:
~$ cd you/crunch_scripts
~/you/crunch_scripts$ nano run-md5sum.py
Add the following code to use the @md5sum@ program to compute the hash of each file in a collection:
-{% include 'run_md5sum_py' %}
+~/you/crunch_scripts$ chmod +x run-md5sum.py
-Next, add the file to @git@ staging, commit and push:
+Next, use Git to stage the file, commit, and push:
~/you/crunch_scripts$ git add run-md5sum.py
@@ -42,30 +38,31 @@ Next, add the file to @git@ staging, commit and push:
~/you/crunch_scripts$ cat >~/the_job <<EOF
-{
- "script": "run-md5sum.py",
- "script_version": "you:master",
- "script_parameters":
- {
- "input": "c1bad4b39ca5a924e481008009d94e32+210"
- }
-}
-EOF
-~/you/crunch_scripts$ arv -h job create --job "$(cat the_job)"
+~/you/crunch_scripts$ cat >~/the_pipeline <<EOF
{
- ...
- "uuid":"qr1hi-xxxxx-xxxxxxxxxxxxxxx"
- ...
-}
-~/you/crunch_scripts$ arv -h job get --uuid qr1hi-xxxxx-xxxxxxxxxxxxxxx
-{
- ...
- "output":"4d164b1658c261b9afc6b479130016a3+54",
- ...
+ "name":"Run external md5sum program",
+ "components":{
+ "do_hash":{
+ "script":"run-md5sum.py",
+ "script_parameters":{
+ "input":{
+ "required": true,
+ "dataclass": "Collection"
+ }
+ },
+ "repository":"$USER",
+ "script_version":"master"
+ }
+ }
}
+EOF
+~/you/crunch_scripts$ arv pipeline_template create --pipeline-template "$(cat ~/the_pipeline)"