3 navsection: installguide
4 title: Install a compute node
7 h2. Install dependencies
9 First, "add the appropriate package repository for your distribution":{{ site.baseurl }}/install/install-manual-prerequisites.html#repos.
11 {% include 'note_python_sc' %}
13 On Red Hat-based systems:
16 <pre><code>~$ <span class="userinput">echo 'exclude=python2-llfuse' | sudo tee -a /etc/yum.conf</span>
17 ~$ <span class="userinput">sudo yum install perl python-virtualenv fuse python-arvados-python-client python-arvados-fuse crunchrunner crunchstat arvados-docker-cleaner iptables ca-certificates</span>
21 On Debian-based systems:
24 <pre><code>~$ <span class="userinput">sudo apt-get install perl python-virtualenv fuse python-arvados-python-client python-arvados-fuse crunchrunner crunchstat arvados-docker-cleaner iptables ca-certificates</span>
28 {% include 'install_compute_docker' %}
32 Install SLURM following "the same process you used to install the Crunch dispatcher":install-crunch-dispatch.html#slurm.
34 h2. Copy configuration files from the dispatcher (API server)
36 The @slurm.conf@ and @/etc/munge/munge.key@ files need to be identical across the dispatcher and all compute nodes. Copy the files you created in the "Install the Crunch dispatcher":install-crunch-dispatch.html step to this compute node.
38 {% include 'install_compute_fuse' %}
40 {% include 'install_docker_cleaner' %}
42 h2. Add a Crunch user account
44 Create a Crunch user account, and add it to the @fuse@ and @docker@ groups so it can use those tools:
47 <pre><code>~$ <span class="userinput">sudo useradd --groups fuse,docker crunch</span>
51 The crunch user should have the same UID, GID, and home directory across all compute nodes and the dispatcher (API server).
53 h2. Tell the API server about this compute node
55 Load your API superuser token on the compute node:
59 ~$ <span class="userinput">HISTIGNORE=$HISTIGNORE:'export ARVADOS_API_TOKEN=*'</span>
60 ~$ <span class="userinput">export ARVADOS_API_TOKEN=@your-superuser-token@</span>
61 ~$ <span class="userinput">export ARVADOS_API_HOST=@uuid_prefix.your.domain@</span>
62 ~$ <span class="userinput">unset ARVADOS_API_HOST_INSECURE</span>
67 Then execute this script to create a compute node object, and set up a cron job to have the compute node ping the API server every five minutes:
73 if ! test -f /root/node.json ; then
75 import arvados, json, socket
76 fqdn = socket.getfqdn()
77 hostname, _, domain = fqdn.partition('.')
78 node = arvados.api('v1').nodes().create(body={'hostname': hostname, 'domain': domain}).execute()
79 with open('/root/node.json', 'w') as node_file:
80 json.dump(node, node_file, indent=2)
83 # Make sure /dev/fuse permissions are correct (the device appears after fuse is loaded)
84 chmod 1660 /dev/fuse && chgrp fuse /dev/fuse
87 UUID=`grep \"uuid\" /root/node.json |cut -f4 -d\"`
88 PING_SECRET=`grep \"ping_secret\" /root/node.json |cut -f4 -d\"`
90 if ! test -f /etc/cron.d/node_ping ; then
91 echo "*/5 * * * * root /usr/bin/curl -k -d ping_secret=$PING_SECRET https://$ARVADOS_API_HOST/arvados/v1/nodes/$UUID/ping" > /etc/cron.d/node_ping
94 /usr/bin/curl -k -d ping_secret=$PING_SECRET https://$ARVADOS_API_HOST/arvados/v1/nodes/$UUID/ping?ping_secret=$PING_SECRET
99 And remove your token from the environment:
103 ~$ <span class="userinput">unset ARVADOS_API_TOKEN</span>
104 ~$ <span class="userinput">unset ARVADOS_API_HOST</span>