5824: Add install doc
[arvados.git] / doc / install / install-keep-web.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install download server
5 ...
6
7 This installation guide assumes you are on a 64 bit Debian or Ubuntu system.
8
9 The keep-web server provides read-only HTTP access to files stored in Keep. It serves public data to anonymous and unauthenticated clients, and accepts authentication via Arvados tokens. It can be installed anywhere with access to Keep services, typically behind a web proxy that provides SSL support.
10
11 By convention, we use the following hostname for the download service:
12
13 <div class="offset1">
14 table(table table-bordered table-condensed).
15 |dl.@uuid_prefix@.your.domain|
16 </div>
17
18 This hostname should resolve from anywhere on the internet.
19
20 h2. Install keep-web
21
22 First add the Arvados apt repository, and then install the keep-web package.
23
24 <notextile>
25 <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>
26 ~$ <span class="userinput">sudo /usr/bin/apt-key adv --keyserver pool.sks-keyservers.net --recv 1078ECD7</span>
27 ~$ <span class="userinput">sudo /usr/bin/apt-get update</span>
28 ~$ <span class="userinput">sudo /usr/bin/apt-get install keep-web</span>
29 </code></pre>
30 </notextile>
31
32 Verify that @keep-web@ is functional:
33
34 <notextile>
35 <pre><code>~$ <span class="userinput">keep-web -h</span>
36 Usage of keep-web:
37   -address="0.0.0.0:80": Address to listen on, "host:port".
38 </code></pre>
39 </notextile>
40
41 We recommend running @arv-git-httpd@ under "runit":https://packages.debian.org/search?keywords=runit or something similar.
42
43 Your @run@ script should look something like this:
44
45 <notextile>
46 <pre><code>export ARVADOS_API_HOST=<span class="userinput">uuid_prefix</span>.your.domain
47 exec sudo -u nobody keep-web -address=:9002 2&gt;&1
48 </code></pre>
49 </notextile>
50
51 h3. Set up a reverse proxy with SSL support
52
53 The keep-web service will be accessible from anywhere on the internet, so we recommend using SSL for transport encryption.
54
55 This is best achieved by putting a reverse proxy with SSL support in front of keep-web, running on port 443 and passing requests to keep-web on port 9002 (or whatever port you chose in your run script).
56
57 h3. Tell the API server about the keep-web service
58
59 In your API server's config/application.yml file, add the following entry:
60
61 <notextile>
62 <pre><code>keep-web: dl.<span class="userinput">uuid_prefix</span>.your.domain
63 </code></pre>
64 </notextile>