4 title: "Tutorial: Writing a Crunch script"
8 {% include alert-stub.html %}
10 h1. Tutorial 2: Writing a Crunch script
12 In this tutorial, we will write the "hash" script demonstrated in the first tutorial.
14 *This tutorial assumes that you are logged into an Arvados VM instance, as described in "accessing arvados over ssh.":ssh-access.html#login*
22 The @script@ and @script_version@ attributes of a Job allow you to confirm the code that was used to run the job. Specifically, @script@ refers to a file in the @/crunch_scripts@ directory in the tree indicated by the commit hash @script_version@.
28 git clone git://github.com/clinicalfuture/arvados.git
30 git checkout $the_version
31 less crunch_scripts/hash
35 _If we're going to direct the user to open up the code, some
36 discussion of the python API is probably in order. If the hash
37 job is going to be the canonical first crunch map reduce program
38 for everybody, than we should break down the program line-by-line and
39 explain every step in detail._