3 navsection: installguide
4 title: Install a compute node
7 This installation guide assumes you are on a 64 bit Debian or Ubuntu system.
9 h2. Install dependencies
11 First add the Arvados apt repository, and then install a number of packages.
14 <pre><code>~$ <span class="userinput">echo "deb http://apt.arvados.org/ wheezy main" | sudo tee /etc/apt/sources.list.d/apt.arvados.org.list</span>
15 ~$ <span class="userinput">sudo /usr/bin/apt-key adv --keyserver pool.sks-keyservers.net --recv 1078ECD7</span>
16 ~$ <span class="userinput">sudo /usr/bin/apt-get update</span>
17 ~$ <span class="userinput">sudo /usr/bin/apt-get install python-pip python-pyvcf python-gflags python-google-api-python-client python-virtualenv libattr1-dev libfuse-dev python-dev python-llfuse fuse crunchstat python-arvados-fuse iptables ca-certificates lxc apt-transport-https docker.io</span>
21 h2. Install slurm and munge
24 <pre><code>~$ <span class="userinput">sudo /usr/bin/apt-get install slurm-llnl munge</span>
28 h2. Copy configuration files from the dispatcher (api)
30 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.
32 h2. Crunch user account
36 The crunch user should have the same UID, GID, and home directory on all compute nodes and on the dispatcher (api server).
40 Install this file as @/etc/fuse.conf@:
44 # Set the maximum number of FUSE mounts allowed to non-root users.
45 # The default is 1000.
49 # Allow non-root users to specify the 'allow_other' or 'allow_root'
56 h2. Tell the API server about this compute node
58 Load your API superuser token on the compute node:
62 ~$ <span class="userinput">HISTIGNORE=$HISTIGNORE:'export ARVADOS_API_TOKEN=*'</span>
63 ~$ <span class="userinput">export ARVADOS_API_TOKEN=@your-superuser-token@</span>
64 ~$ <span class="userinput">export ARVADOS_API_HOST=@uuid_prefix.your.domain@</span>
65 ~$ <span class="userinput">unset ARVADOS_API_HOST_INSECURE</span>
70 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:
76 if ! test -f /root/node.json ; then
78 import arvados, json, socket
79 node = arvados.api('v1').nodes().create(body={'hostname': socket.gethostname()}).execute()
80 with open('/root/node.json', 'w') as node_file:
81 json.dump(node, node_file, indent=2)
84 # Make sure /dev/fuse permissions are correct (the device appears after fuse is loaded)
85 chmod 1660 /dev/fuse && chgrp fuse /dev/fuse
88 UUID=`grep \"uuid\" /root/node.json |cut -f4 -d\"`
89 PING_SECRET=`grep \"ping_secret\" /root/node.json |cut -f4 -d\"`
91 if ! test -f /etc/cron.d/node_ping ; then
92 echo "*/5 * * * * root /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping" > /etc/cron.d/node_ping
95 /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping?ping_secret=$PING_SECRET
100 And remove your token from the environment:
104 ~$ <span class="userinput">unset ARVADOS_API_TOKEN</span>
105 ~$ <span class="userinput">unset ARVADOS_API_HOST</span>