Add GPG key for RVM installation in the doc.
[arvados.git] / doc / install / install-compute-node.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install a compute node
5 ...
6
7 This installation guide assumes you are on a 64 bit Debian or Ubuntu system.
8
9 h2. Install dependencies
10
11 First add the Arvados apt repository, and then install a number of packages.
12
13 <notextile>
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>
18 </code></pre>
19 </notextile>
20
21 h2. Install slurm and munge
22
23 <notextile>
24 <pre><code>~$ <span class="userinput">sudo /usr/bin/apt-get install slurm-llnl munge</span>
25 </code></pre>
26 </notextile>
27
28 h2. Copy configuration files from the dispatcher (api)
29
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.
31
32 h2. Crunch user account
33
34 * @adduser crunch@
35
36 The crunch user should have the same UID, GID, and home directory on all compute nodes and on the dispatcher (api server).
37
38 h2. Configure fuse
39
40 Install this file as @/etc/fuse.conf@:
41
42 <notextile>
43 <pre>
44 # Set the maximum number of FUSE mounts allowed to non-root users.
45 # The default is 1000.
46 #
47 #mount_max = 1000
48
49 # Allow non-root users to specify the 'allow_other' or 'allow_root'
50 # mount options.
51 #
52 user_allow_other
53 </pre>
54 </notextile>
55
56 h2. Tell the API server about this compute node
57
58 Load your API superuser token on the compute node:
59
60 <notextile>
61 <pre><code>
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>
66 </code>
67 </pre>
68 </notextile>
69
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:
71
72 <notextile>
73 <pre><code>
74 #!/bin/bash
75 if ! test -f /root/node.json ; then
76     arv node create --node "{\"hostname\": \"$(hostname)\"}" > /root/node.json
77
78     # Make sure /dev/fuse permissions are correct (the device appears after fuse is loaded)
79     chmod 1660 /dev/fuse && chgrp fuse /dev/fuse
80 fi
81
82 UUID=`grep \"uuid\" /root/node.json  |cut -f4 -d\"`
83 PING_SECRET=`grep \"ping_secret\" /root/node.json  |cut -f4 -d\"`
84
85 if ! test -f /etc/cron.d/node_ping ; then
86     echo "*/5 * * * * root /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping" > /etc/cron.d/node_ping
87 fi
88
89 /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping?ping_secret=$PING_SECRET
90 </code>
91 </pre>
92 </notextile>
93
94 And remove your token from the environment:
95
96 <notextile>
97 <pre><code>
98 ~$ <span class="userinput">unset ARVADOS_API_TOKEN</span>
99 ~$ <span class="userinput">unset ARVADOS_API_HOST</span>
100 </code>
101 </pre>
102 </notextile>
103