19234: s3v2 + non-aws: default to us-east-1 signing settings.
[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 Volumes are configured in the @Volumes@ section of the cluster configuration file.
15
16 {% include 'assign_volume_uuid' %}
17
18 <notextile><pre><code>    Volumes:
19       <span class="userinput">ClusterID</span>-nyw5e-<span class="userinput">000000000000000</span>:
20         AccessViaHosts:
21           # This section determines which keepstore servers access the
22           # volume. In this example, keep0 has read/write access, and
23           # keep1 has read-only access.
24           #
25           # If the AccessViaHosts section is empty or omitted, all
26           # keepstore servers will have read/write access to the
27           # volume.
28           "http://<span class="userinput">keep0.ClusterID.example.com</span>:25107": {}
29           "http://<span class="userinput">keep1.ClusterID.example.com</span>:25107": {ReadOnly: true}
30
31         Driver: <span class="userinput">S3</span>
32         DriverParameters:
33           # Bucket name.
34           Bucket: <span class="userinput">example-bucket-name</span>
35
36           # IAM role name to use when retrieving credentials from
37           # instance metadata. It can be omitted, in which case the
38           # role name itself will be retrieved from instance metadata
39           # -- but setting it explicitly may protect you from using
40           # the wrong credentials in the event of an
41           # installation/configuration error.
42           IAMRole: <span class="userinput">""</span>
43
44           # If you are not using an IAM role for authentication,
45           # specify access credentials here instead.
46           AccessKeyID: <span class="userinput">""</span>
47           SecretAccessKey: <span class="userinput">""</span>
48
49           # Storage provider region. If Endpoint is specified, the
50           # region determines the request signing method, and defaults
51           # to "us-east-1".
52           Region: <span class="userinput">us-east-1</span>
53
54           # Storage provider endpoint. For Amazon S3, use "" or
55           # omit. For Google Cloud Storage, use
56           # "https://storage.googleapis.com".
57           Endpoint: ""
58
59           # Change to true if the region requires a LocationConstraint
60           # declaration.
61           LocationConstraint: false
62
63           # Use V2 signatures instead of the default V4. Amazon S3
64           # supports V4 signatures in all regions, but this option
65           # might be needed for other S3-compatible services.
66           V2Signature: false
67
68           # Use the AWS S3 v2 Go driver instead of the goamz driver.
69           UseAWSS3v2Driver: false
70
71           # By default keepstore stores data using the MD5 checksum
72           # (32 hexadecimal characters) as the object name, e.g.,
73           # "0123456abc...". Setting PrefixLength to 3 changes this
74           # naming scheme to "012/0123456abc...". This can improve
75           # performance, depending on the S3 service being used. For
76           # example, PrefixLength 3 is recommended to avoid AWS
77           # limitations on the number of read/write operations per
78           # second per prefix (see
79           # https://aws.amazon.com/premiumsupport/knowledge-center/s3-request-limit-avoid-throttling/).
80           #
81           # Note that changing PrefixLength on an existing volume is
82           # not currently supported. Once you have started using a
83           # bucket as an Arvados volume, you should not change its
84           # configured PrefixLength, or configure another volume using
85           # the same bucket and a different PrefixLength.
86           PrefixLength: 0
87
88           # Requested page size for "list bucket contents" requests.
89           IndexPageSize: 1000
90
91           # Maximum time to wait while making the initial connection
92           # to the backend before failing the request.
93           ConnectTimeout: 1m
94
95           # Maximum time to wait for a complete response from the
96           # backend before failing the request.
97           ReadTimeout: 2m
98
99           # Maximum eventual consistency latency
100           RaceWindow: 24h
101
102         # How much replication is provided by the underlying bucket.
103         # This is used to inform replication decisions at the Keep
104         # layer.
105         Replication: 2
106
107         # If true, do not accept write or trash operations, even if
108         # AccessViaHosts.*.ReadOnly is false.
109         #
110         # If false or omitted, enable write access (subject to
111         # AccessViaHosts.*.ReadOnly, where applicable).
112         ReadOnly: false
113
114         # Storage classes to associate with this volume.  See "Storage
115         # classes" in the "Admin" section of doc.arvados.org.
116         StorageClasses: null
117 </code></pre></notextile>
118
119 Two S3 drivers are available. Historically, Arvados has used the @goamz@ driver to talk to S3-compatible services. More recently, support for the @aws-sdk-go-v2@ driver was added. This driver can be activated by setting the @UseAWSS3v2Driver@ flag to @true@.
120
121 The @aws-sdk-go-v2@ does not support the old S3 v2 signing algorithm. This will not affect interacting with AWS S3, but it might be an issue when Keep is backed by a very old version of a third party S3-compatible service.
122
123 The @aws-sdk-go-v2@ driver can improve read performance by 50-100% over the @goamz@ driver, but it has not had as much production use. See the "wiki":https://dev.arvados.org/projects/arvados/wiki/Keep_real_world_performance_numbers for details.