Merge branch 'master' into 15572-new-install-docs
[arvados.git] / doc / install / install-keepstore.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install Keepstore servers
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 # "Introduction":#introduction
13 # "Update config.yml":#update-config
14 # "Install keepstore package":#install-packages
15 # "Restart the API server and controller":#restart-api
16 # "Confirm working installation":#confirm-working
17
18 h2. Introduction
19
20 Keepstore provides access to underlying storage for reading and writing content-addressed blocks, with enforcement of Arvados permissions.  Keepstore supports a variety of cloud object storage and POSIX filesystems for its backing store.
21
22 h3. Plan your storage layout
23
24 In the steps below, you will configure a number of backend storage volumes (like local filesystems and S3 buckets) and specify which keepstore servers have read-only and read-write access to which volumes.
25
26 It is possible to configure arbitrary server/volume layouts. However, in order to provide good performance and efficient use of storage resources, we strongly recommend using one of the following layouts:
27
28 # Each volume is writable by exactly one server, and optionally readable by one or more other servers. The total capacity of all writable volumes is the same for each server.
29 # Each volume is writable by all servers. Each volume has enough built-in redundancy to satisfy your requirements, i.e., you do not need Arvados to mirror data across multiple volumes.
30
31 We recommend starting off with two Keepstore servers.  Exact server specifications will be site and workload specific, but in general keepstore will be I/O bound and should be set up to maximize aggregate bandwidth with compute nodes.  To increase capacity (either space or throughput) it is straightforward to add additional servers, or (in cloud environments) to increase the machine size of the existing servers.
32
33 By convention, we use the following hostname pattern:
34
35 <div class="offset1">
36 table(table table-bordered table-condensed).
37 |_. Hostname|
38 |keep0.@ClusterID@.example.com|
39 |keep1.@ClusterID@.example.com|
40 </div>
41
42 Keepstore servers should not be directly accessible from the Internet (they are accessed via "keepproxy":install-keepproxy.html), so the hostnames only need to resolve on the private network.
43
44 h2(#update-config). Update cluster config
45
46 h3. Configure storage volumes
47
48 Fill in the @Volumes@ section of @config.yml@ for each storage volume.  Available storage volume types include POSIX filesystems and cloud object storage.  It is possible to have different volume types in the same cluster.
49
50 * To use a POSIX filesystem, including both local filesystems (ext4, xfs) and network file system such as GPFS or Lustre, follow the setup instructions on "Filesystem storage":configure-fs-storage.html
51 * If you are using S3-compatible object storage (including Amazon S3, Google Cloud Storage, and Ceph RADOS), follow the setup instructions on "S3 Object Storage":configure-s3-object-storage.html
52 * If you are using Azure Blob Storage, follow the setup instructions on "Azure Blob Storage":configure-azure-blob-storage.html
53
54 h3. List services
55
56 Add each keepstore server to the @Services.Keepstore@ section of @/etc/arvados/config.yml@ .
57
58 <notextile>
59 <pre><code>    Services:
60       Keepstore:
61         # No ExternalURL because they are only accessed by the internal subnet.
62         InternalURLs:
63           "http://<span class="userinput">keep0.ClusterID.example.com</span>:25107/": {}
64           "http://<span class="userinput">keep1.ClusterID.example.com</span>:25107/": {}
65           # and so forth
66 </code></pre>
67 </notextile>
68
69 h2(#install-packages). Install keepstore package
70
71 On each host that will run keepstore, install the @keepstore@ package.
72
73 h3. Centos 7
74
75 <notextile>
76 <pre><code># <span class="userinput">yum install keepstore</span>
77 </code></pre>
78 </notextile>
79
80 h3. Debian and Ubuntu
81
82 <notextile>
83 <pre><code># <span class="userinput">apt-get install keepstore</span>
84 </code></pre>
85 </notextile>
86
87 h2(#restart-api). Restart the API server and controller
88
89 After adding all of your keepstore servers to the Services section, make sure the cluster config file is up to date on the API server host, and restart the API server and controller processes to ensure the changes are applied.
90
91 <notextile>
92 <pre><code># <span class="userinput">systemctl restart nginx arvados-controller</span>
93 </code></pre>
94 </notextile>
95
96 h2(#confirm-working). Confirm working installation
97
98 Install the "Python SDK":{{site.baseurl}}/sdk/python/sdk-python.html
99
100 @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@ must be set in the environment.
101
102 You should now be able to use @arv-put@ to upload collections and @arv-get@ to fetch collections:
103
104 <pre>
105 $ echo "hello world!" > hello.txt
106
107 $ arv-put --portable-data-hash hello.txt
108 2018-07-12 13:35:25 arvados.arv_put[28702] INFO: Creating new cache file at /home/example/.cache/arvados/arv-put/1571ec0adb397c6a18d5c74cc95b3a2a
109 0M / 0M 100.0% 2018-07-12 13:35:27 arvados.arv_put[28702] INFO:
110
111 2018-07-12 13:35:27 arvados.arv_put[28702] INFO: Collection saved as 'Saved at 2018-07-12 17:35:25 UTC by example@example'
112 59389a8f9ee9d399be35462a0f92541c+53
113
114 $ arv-get 59389a8f9ee9d399be35462a0f92541c+53/hello.txt
115 hello world!
116 </pre>
117
118 h3. Note on storage management
119
120 On its own, a keepstore server never deletes data. Instead, the keep-balance service determines which blocks are candidates for deletion and instructs the keepstore to move those blocks to the trash. Please see the "Balancing Keep servers":{{site.baseurl}}/admin/keep-balance.html for more details.