3 navsection: installguide
4 title: Install the Crunch dispatcher
10 The dispatcher normally runs on the same host/VM as the API server.
12 h4. Perl SDK dependencies
14 Install the Perl SDK on the controller.
16 * See "Perl SDK":{{site.baseurl}}/sdk/perl/index.html page for details.
18 h4. Python SDK dependencies
20 Install the Python SDK and CLI tools on controller and all compute nodes.
22 * See "Python SDK":{{site.baseurl}}/sdk/python/sdk-python.html page for details.
26 On the API server, install slurm and munge, and generate a munge key:
29 <pre><code>~$ <span class="userinput">sudo /usr/bin/apt-get install slurm-llnl munge</span>
30 ~$ <span class="userinput">sudo /usr/sbin/create-munge-key</span>
34 Now we need to give slurm a configuration file in @/etc/slurm-llnl/slurm.conf@. Here's an example:
38 ControlMachine=uuid_prefix.your.domain
42 StateSaveLocation=/tmp
43 SlurmdSpoolDir=/tmp/slurmd
44 SwitchType=switch/none
46 SlurmctldPidFile=/var/run/slurmctld.pid
47 SlurmdPidFile=/var/run/slurmd.pid
48 ProctrackType=proctrack/pgid
51 TaskPlugin=task/affinity
62 SchedulerType=sched/backfill
64 SelectType=select/cons_res
65 SelectTypeParameters=CR_CPU_Memory
73 JobCompType=jobcomp/none
75 JobAcctGatherType=jobacct_gather/none
79 PartitionName=DEFAULT MaxTime=INFINITE State=UP
80 PartitionName=compute Default=YES Shared=yes
82 NodeName=compute[0-255]
84 PartitionName=compute Nodes=compute[0-255]
88 Please make sure to update the value of the @ControlMachine@ parameter to the hostname of your dispatcher (api server).
90 h4. Crunch user account
94 The crunch user should have the same UID, GID, and home directory on all compute nodes and on the dispatcher (api server).
98 Crunch scripts must be in Git repositories in the directory configured as @git_repositories_dir@/*.git (see the "API server installation":install-api-server.html#git_repositories_dir).
100 Once you have a repository with commits -- and you have read access to the repository -- you should be able to create a new job:
103 read -rd $'\000' newjob <<EOF; arv job create --job "$newjob"
104 {"script_parameters":{"input":"f815ec01d5d2f11cb12874ab2ed50daa"},
105 "script_version":"master",
107 "repository":"arvados"}
111 Without getting this error:
114 ArgumentError: Specified script_version does not resolve to a commit
119 * @services/api/script/crunch-dispatch.rb@ must be running.
120 * @crunch-dispatch.rb@ needs @services/crunch/crunch-job@ in its @PATH@.
121 * @crunch-job@ needs @sdk/perl/lib@ and @warehouse-apps/libwarehouse-perl/lib@ in its @PERLLIB@
122 * @crunch-job@ needs @ARVADOS_API_HOST@ (and, if necessary in a development environment, @ARVADOS_API_HOST_INSECURE@)
124 Example @/var/service/arvados_crunch_dispatch/run@ script:
131 ## uncomment this line if you use rvm:
132 #rvmexec="/usr/local/rvm/bin/rvm-exec 2.1.1"
134 export PATH="$PATH":/path/to/arvados/services/crunch
135 export ARVADOS_API_HOST={{ site.arvados_api_host }}
136 export CRUNCH_DISPATCH_LOCKFILE=/var/lock/crunch-dispatch
138 fuser -TERM -k $CRUNCH_DISPATCH_LOCKFILE || true
140 ## Only if your SSL cert is unverifiable:
141 # export ARVADOS_API_HOST_INSECURE=yes
143 cd /path/to/arvados/services/api
144 export RAILS_ENV=production
145 exec $rvmexec bundle exec ./script/crunch-dispatch.rb 2>&1