Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / doc / install / install-keepstore.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install Keepstore servers
5 ...
6
7 This installation guide assumes you are on a 64 bit Debian or Ubuntu system.
8
9 We are going to install two Keepstore servers. By convention, we use the following hostname pattern:
10
11 <div class="offset1">
12 table(table table-bordered table-condensed).
13 |_Hostname_|
14 |keep0.@uuid_prefix@.your.domain|
15 |keep1.@uuid_prefix@.your.domain|
16 </div>
17
18 Because the Keepstore servers are not directly accessible from the internet, these hostnames only need to resolve on the local network.
19
20 h2. Install Keepstore
21
22 First add the Arvados apt repository, and then install the Keepstore 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 keepstore</span>
29 </code></pre>
30 </notextile>
31
32 Verify that Keepstore is functional:
33
34 <notextile>
35 <pre><code>~$ <span class="userinput">keepstore -h</span>
36 2014/10/29 14:23:38 Keep started: pid 6848
37 Usage of keepstore:
38   -data-manager-token-file="": File with the API token used by the Data Manager. All DELETE requests or GET /index requests must carry this token.
39   -enforce-permissions=false: Enforce permission signatures on requests.
40   -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.
41   -never-delete=false: If set, nothing will be deleted. HTTP 405 will be returned for valid DELETE requests.
42   -permission-key-file="": File containing the secret key for generating and verifying permission signatures.
43   -permission-ttl=1209600: Expiration time (in seconds) for newly generated permission signatures.
44   -pid="": Path to write pid file
45   -serialize=false: If set, all read and write operations on local Keep volumes will be serialized.
46   -volumes="": Comma-separated list of directories to use for Keep volumes, e.g. -volumes=/var/keep1,/var/keep2. If empty or not supplied, Keep will scan mounted filesystems for volumes with a /keep top-level directory.
47 </code></pre>
48 </notextile>
49
50 If you want access control on your Keepstore server(s), you should provide a permission key. The @-permission-key-file@ argument should contain the path to a file that contains a single line with a long random alphanumeric string. It should be the same as the @blob_signing_key@ that can be set in the "API server":install-api-server.html config/application.yml file.
51
52 Prepare one or more volumes for Keepstore to use. Simply create a /keep directory on all the partitions you would like Keepstore to use, and then start Keepstore. For example, using 2 tmpfs volumes:
53
54 <notextile>
55 <pre><code>~$ <span class="userinput">keepstore</span>
56 2014/10/29 11:41:37 Keep started: pid 20736
57 2014/10/29 11:41:37 adding Keep volume: /tmp/tmp.vwSCtUCyeH/keep
58 2014/10/29 11:41:37 adding Keep volume: /tmp/tmp.Lsn4w8N3Xv/keep
59 2014/10/29 11:41:37 Running without a PermissionSecret. Block locators returned by this server will not be signed, and will be rejected by a server that enforces permissions.
60 2014/10/29 11:41:37 To fix this, run Keep with --permission-key-file=<path> to define the location of a file containing the permission key.
61
62 </code></pre>
63 </notextile>
64
65 It's recommended to run Keepstore under "runit":https://packages.debian.org/search?keywords=runit or something similar.
66
67 Repeat this section for each Keepstore server you are setting up.
68
69 h3. Tell the API server about the Keepstore servers
70
71 The API server needs to be informed about the presence of your Keepstore servers. For each of the Keepstore servers you have created, please execute the following commands on your <strong>shell server</strong>.
72
73 Make sure to update the @service_host@ value to match each of your Keepstore servers.
74
75 <notextile>
76 <pre><code>~$ <span class="userinput">prefix=`arv --format=uuid user current | cut -d- -f1`</span>
77 ~$ <span class="userinput">echo "Site prefix is '$prefix'"</span>
78 ~$ <span class="userinput">read -rd $'\000' keepservice &lt;&lt;EOF; arv keep_service create --keep-service "$keepservice"</span>
79 <span class="userinput">{
80  "service_host":"keep0.$prefix.your.domain",
81  "service_port":25107,
82  "service_ssl_flag":false,
83  "service_type":"disk"
84 }
85 EOF</span>
86 </code></pre></notextile>
87
88
89