13558: Merge branch 'master' into wtsi-hgi-13558-debug-log-tag-req-id
[arvados.git] / doc / install / configure-s3-object-storage.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Configure S3 object storage
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 Keepstore can store data in object storage compatible with the S3 API, such as Amazon S3, Google Cloud Storage, or Ceph RADOS.
13
14 h2. Configure keepstore
15
16 Copy the "access key" and "secret key" to files where they will be accessible to keepstore at startup time.
17
18 <notextile>
19 <pre><code>~$ <span class="userinput">sudo sh -c 'cat &gt;/etc/arvados/keepstore/aws_s3_access_key.txt &lt;&lt;EOF'
20 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
21 EOF</span>
22 ~$ <span class="userinput">sudo chmod 0400 /etc/arvados/keepstore/aws_s3_access_key.txt</span>
23 </code></pre>
24 </notextile>
25
26 Next, edit the @Volumes@ section of the @keepstore.yml@ config file.
27
28 h3. Example config for Amazon S3
29
30 <pre>
31 Volumes:
32 - # The volume type, this indicates object storage compatible with the S3 API
33   Type: S3
34
35   # Storage provider.  If blank, uses Amazon S3 by default.
36   # See below for example alternate configuration for Google cloud
37   # storage.
38   Endpoint: ""
39
40   # The bucket to use for the backing store.
41   Bucket: example-bucket-name
42
43   # The region where the bucket is located.
44   Region: us-east-1
45
46   # The credentials to use to access the bucket.
47   AccessKeyFile: /etc/arvados/keepstore/aws_s3_access_key.txt
48   SecretKeyFile: /etc/arvados/keepstore/aws_s3_secret_key.txt
49
50   # Maximum time to wait making the initial connection to the backend before
51   # failing the request.
52   ConnectTimeout: 1m0s
53
54   # Page size for s3 "list bucket contents" requests
55   IndexPageSize: 1000
56
57   # True if the region requires a LocationConstraint declaration
58   LocationConstraint: false
59
60   # Maximum eventual consistency latency
61   RaceWindow: 24h0m0s
62
63   # If true, do not accept write or trash operations, only reads.
64   ReadOnly: false
65
66   # Maximum time to wait for a complete response from the backend before
67   # failing the request.
68   ReadTimeout: 2m0s
69
70   # How much replication is performed by the underlying bucket.
71   # This is used to inform replication decisions at the Keep layer.
72   S3Replication: 2
73
74   # Storage classes to associate with this volume.  See
75   # "Storage classes" in the "Admin" section of doc.arvados.org.
76   StorageClasses: null
77
78   # Enable deletion (garbage collection) even when TrashLifetime is
79   # zero.  WARNING: eventual consistency may result in race conditions
80   # that can cause data loss.  Do not enable this unless you know what
81   # you are doing.
82   UnsafeDelete: false
83 </pre>
84
85 Start (or restart) keepstore, and check its log file to confirm it is using the new configuration.
86
87 h3. Example config for Google cloud storage
88
89 See previous section for documentation of configuration fields.
90
91 <pre>
92 Volumes:
93 - # Example configuration using alternate storage provider
94   # Configuration for Google cloud storage
95   Endpoint: https://storage.googleapis.com
96   Region: ""
97
98   AccessKeyFile: /etc/arvados/keepstore/gce_s3_access_key.txt
99   SecretKeyFile: /etc/arvados/keepstore/gce_s3_secret_key.txt
100   Bucket: example-bucket-name
101   ConnectTimeout: 1m0s
102   IndexPageSize: 1000
103   LocationConstraint: false
104   RaceWindow: 24h0m0s
105   ReadOnly: false
106   ReadTimeout: 2m0s
107   S3Replication: 2
108   StorageClasses: null
109   UnsafeDelete: false
110 </pre>
111
112 Start (or restart) keepstore, and check its log file to confirm it is using the new configuration.