Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / doc / install / install-keepproxy.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install Keepproxy server
5 ...
6
7 This installation guide assumes you are on a 64 bit Debian or Ubuntu system.
8
9 The Keepproxy server is a gateway into your Keep storage. Unlike the Keepstore servers, which are only accessible on the local LAN, Keepproxy is designed to provide secure access into Keep from anywhere on the internet.
10
11 By convention, we use the following hostname for the Keepproxy:
12
13 <div class="offset1">
14 table(table table-bordered table-condensed).
15 |_Hostname_|
16 |keep.@uuid_prefix@.your.domain|
17 </div>
18
19 This hostname should resolve from anywhere on the internet.
20
21 h2. Install Keepproxy
22
23 First add the Arvados apt repository, and then install the Keepproxy package.
24
25 <notextile>
26 <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>
27 ~$ <span class="userinput">sudo /usr/bin/apt-key adv --keyserver pool.sks-keyservers.net --recv 1078ECD7</span>
28 ~$ <span class="userinput">sudo /usr/bin/apt-get update</span>
29 ~$ <span class="userinput">sudo /usr/bin/apt-get install keepproxy</span>
30 </code></pre>
31 </notextile>
32
33 Verify that Keepproxy is functional:
34
35 <notextile>
36 <pre><code>~$ <span class="userinput">keepproxy -h</span>
37 Usage of default:
38   -default-replicas=2: Default number of replicas to write if not specified by the client.
39   -listen=":25107": Interface on which to listen for requests, in the format ipaddr:port. e.g. -listen=10.0.1.24:8000. Use -listen=:port to listen on all network interfaces.
40   -no-get=false: If set, disable GET operations
41   -no-put=false: If set, disable PUT operations
42   -pid="": Path to write pid file
43 </code></pre>
44 </notextile>
45
46 It's recommended to run Keepproxy under "runit":https://packages.debian.org/search?keywords=runit or something similar.
47
48 h3. Create an API token for the Keepproxy server
49
50 The Keepproxy server needs a token to talk to the API server.
51
52 On the <strong>API server</strong>, use the following command to create the token:
53
54 <notextile>
55 <pre><code>~/arvados/services/api/script$ <span class="userinput">RAILS_ENV=production ./get_anonymous_user_token.rb</span>
56 hoShoomoo2bai3Ju1xahg6aeng1siquuaZ1yae2gi2Uhaeng2r
57 </code></pre></notextile>
58
59 The value for the @api_token@ field should be added to Keepproxy's environment as ARVADOS_API_TOKEN. Make sure to also set ARVADOS_API_HOST to @uuid_prefix@.your.domain.
60
61 h3. Set up a reverse proxy with SSL support
62
63 Because the Keepproxy is intended for access from anywhere on the internet, it is recommended to use SSL for transport encryption.
64
65 This is best achieved by putting a reverse proxy with SSL support in front of Keepproxy. Keepproxy itself runs on port 25107 by default; your reverse proxy can run on port 443 and pass requests to Keepproxy on port 25107.
66
67 h3. Tell the API server about the Keepproxy server
68
69 The API server needs to be informed about the presence of your Keepproxy server. Please execute the following commands on your <strong>shell server</strong>.
70
71 <notextile>
72 <pre><code>~$ <span class="userinput">prefix=`arv --format=uuid user current | cut -d- -f1`</span>
73 ~$ <span class="userinput">echo "Site prefix is '$prefix'"</span>
74 ~$ <span class="userinput">read -rd $'\000' keepservice &lt;&lt;EOF; arv keep_service create --keep-service "$keepservice"</span>
75 <span class="userinput">{
76  "service_host":"keep.$prefix.your.domain",
77  "service_port":443,
78  "service_ssl_flag":true,
79  "service_type":"proxy"
80 }
81 EOF</span>
82 </code></pre></notextile>
83