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 On Debian-based systems:
14 <pre><code>~$ <span class="userinput">sudo apt-get install perl python-virtualenv fuse python-arvados-python-client python-arvados-fuse crunchstat iptables ca-certificates</span>
18 On Red Hat-based systems:
21 <pre><code>~$ <span class="userinput">sudo yum install perl python27-python-virtualenv fuse python27-python-arvados-python-client python27-python-arvados-fuse crunchstat iptables ca-certificates</span>
25 {% include 'note_python27_sc' %}
29 Compute nodes must have Docker installed to run jobs inside containers. This requires a relatively recent version of Linux (at least upstream version 3.10, or a distribution version with the appropriate patches backported). Follow the "Docker Engine installation documentation":https://docs.docker.com/ for your distribution.
31 For Debian-based systems, the Arvados package repository includes a backported @docker.io@ package with a known-good version you can install.
35 Install SLURM following "the same process you used to install the Crunch dispatcher":{{ site.baseurl }}/install/install-crunch-dispatch.html#slurm.
37 h2. Copy configuration files from the dispatcher (API server)
39 The @/etc/slurm-llnl/slurm.conf@ and @/etc/munge/munge.key@ files need to be identicaly across the dispatcher and all compute nodes. Copy the files you created in the "Install the Crunch dispatcher":{{site.baseurl}} step to this compute node.
43 Install this file as @/etc/fuse.conf@:
47 # Set the maximum number of FUSE mounts allowed to non-root users.
48 # The default is 1000.
52 # Allow non-root users to specify the 'allow_other' or 'allow_root'
59 h2. Crunch user account
61 Create a Crunch user account, and add it to the @fuse@ and @docker@ groups so it can use those tools:
64 <pre><code>~$ <span class="userinput">sudo useradd --groups fuse,docker crunch</span>
68 The crunch user should have the same UID, GID, and home directory across all compute nodes and the dispatcher (API server).
70 h2. Tell the API server about this compute node
72 Load your API superuser token on the compute node:
76 ~$ <span class="userinput">HISTIGNORE=$HISTIGNORE:'export ARVADOS_API_TOKEN=*'</span>
77 ~$ <span class="userinput">export ARVADOS_API_TOKEN=@your-superuser-token@</span>
78 ~$ <span class="userinput">export ARVADOS_API_HOST=@uuid_prefix.your.domain@</span>
79 ~$ <span class="userinput">unset ARVADOS_API_HOST_INSECURE</span>
84 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:
90 if ! test -f /root/node.json ; then
92 import arvados, json, socket
93 node = arvados.api('v1').nodes().create(body={'hostname': socket.gethostname()}).execute()
94 with open('/root/node.json', 'w') as node_file:
95 json.dump(node, node_file, indent=2)
98 # Make sure /dev/fuse permissions are correct (the device appears after fuse is loaded)
99 chmod 1660 /dev/fuse && chgrp fuse /dev/fuse
102 UUID=`grep \"uuid\" /root/node.json |cut -f4 -d\"`
103 PING_SECRET=`grep \"ping_secret\" /root/node.json |cut -f4 -d\"`
105 if ! test -f /etc/cron.d/node_ping ; then
106 echo "*/5 * * * * root /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping" > /etc/cron.d/node_ping
109 /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping?ping_secret=$PING_SECRET
114 And remove your token from the environment:
118 ~$ <span class="userinput">unset ARVADOS_API_TOKEN</span>
119 ~$ <span class="userinput">unset ARVADOS_API_HOST</span>