Crunch2 installation » History » Version 3
Tom Clegg, 06/16/2016 02:23 PM
1 | 1 | Tom Clegg | h1. Crunch2 installation |
---|---|---|---|
2 | |||
3 | (DRAFT -- when ready, this will move to doc.arvados.org→install) |
||
4 | |||
5 | 2 | Tom Clegg | {{toc}} |
6 | |||
7 | h2. Set up a crunch-dispatch service |
||
8 | |||
9 | Currently, dispatching containers via SLURM is supported. |
||
10 | |||
11 | Install crunch-dispatch-slurm on a node that can submit SLURM jobs. This can be the slurm controller node, a worker node, or any other node that has the appropriate SLURM/munge configuration. |
||
12 | |||
13 | <pre><code class="shell"> |
||
14 | sudo apt-get install crunch-dispatch-slurm |
||
15 | </code></pre> |
||
16 | |||
17 | Create a privileged token for use by the dispatcher. If you have multiple dispatch processes, you should give each one a different token. |
||
18 | |||
19 | <pre><code class="shell"> |
||
20 | apiserver:~$ cd /var/www/arvados-api/current |
||
21 | apiserver:/var/www/arvados-api/current$ sudo -u webserver-user RAILS_ENV=production bundle exec script/create_superuser_token.rb |
||
22 | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz |
||
23 | </code></pre> |
||
24 | |||
25 | Save the token on the dispatch node, in <code>/etc/sv/env/ARVADOS_API_TOKEN</code> |
||
26 | |||
27 | Example runit script: |
||
28 | |||
29 | <pre><code class="shell"> |
||
30 | #!/bin/sh |
||
31 | |||
32 | export ARVADOS_API_HOST=uuid_prefix.your.domain |
||
33 | |||
34 | exec chpst -e ./env -u crunch crunch-dispatch-slurm |
||
35 | </code></pre> |
||
36 | |||
37 | Ensure the @crunch@ user exists -- and has the same UID, GID, and home directory -- on the dispatch node and all SLURM compute nodes. Ensure the @crunch@ user can run docker containers on SLURM compute nodes. |
||
38 | |||
39 | 3 | Tom Clegg | h2. Install crunch-run on all compute nodes |
40 | 1 | Tom Clegg | |
41 | 3 | Tom Clegg | <pre><code class="shell"> |
42 | sudo apt-get install crunch-run |
||
43 | </code></pre> |
||
44 | |||
45 | h2. Enable cgroup accounting on all compute nodes |
||
46 | |||
47 | Check https://docs.docker.com/engine/installation/linux/ for instructions specific to your distribution. |
||
48 | |||
49 | For example, on Ubuntu: |
||
50 | # Update @/etc/default/grub@ to include: <pre> |
||
51 | GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" |
||
52 | </pre> |
||
53 | # @sudo update-grub@ |
||
54 | # Reboot |
||
55 | 2 | Tom Clegg | |
56 | h2. Configure docker |
||
57 | |||
58 | h2. Test the dispatcher |