13579: Admin documentation about storage classes
[arvados.git] / doc / install / configure-azure-blob-storage.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Configure Azure Blob 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 one or more Azure Storage containers.
13
14 h2. Create a storage container
15
16 Using the Azure web portal or command line tool, create or choose a storage account with a suitable redundancy profile and availability region. Use the storage account keys to create a new container.
17
18 <notextile>
19 <pre><code>~$ <span class="userinput">azure config mode arm</span>
20 ~$ <span class="userinput">azure login</span>
21 ~$ <span class="userinput">azure group create exampleGroupName eastus</span>
22 ~$ <span class="userinput">azure storage account create --type LRS --location eastus --resource-group exampleGroupName exampleStorageAccountName</span>
23 ~$ <span class="userinput">azure storage account keys list --resource-group exampleGroupName exampleStorageAccountName</span>
24 info:    Executing command storage account keys list
25 + Getting storage account keys
26 data:    Primary: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
27 data:    Secondary: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy==
28 info:    storage account keys list command OK
29 ~$ <span class="userinput">AZURE_STORAGE_ACCOUNT="exampleStorageAccountName" \
30 AZURE_STORAGE_ACCESS_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==" \
31 azure storage container create exampleContainerName</span>
32 </code></pre>
33 </notextile>
34
35 Note that Keepstore services may be configued to use multiple Azure Storage accounts and multiple containers within a storage account.
36
37 h2. Configure keepstore
38
39 Copy the primary storage account key to a file where it will be accessible to keepstore at startup time.
40
41 <notextile>
42 <pre><code>~$ <span class="userinput">sudo sh -c 'cat &gt;/etc/arvados/keepstore/azure_storage_account_key.txt &lt;&lt;EOF'
43 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
44 EOF</span>
45 ~$ <span class="userinput">sudo chmod 0400 /etc/arvados/keepstore/azure_storage_account_key.txt</span>
46 </code></pre>
47 </notextile>
48
49 Next, edit the @Volumes@ section of the @keepstore.yml@ config file:
50
51 <pre>
52 Volumes:
53 - # The volume type, this indicates Azure blob storage
54   Type: Azure
55
56   # How much replication is performed by the underlying container.
57   # This is used to inform replication decisions at the Keep layer.
58   AzureReplication: 3
59
60   # The storage container to use for the backing store.
61   ContainerName: exampleContainerName
62
63   # If true, do not accept write or trash operations, only reads.
64   ReadOnly: false
65
66   # Amount of time to wait for a response before failing the request
67   RequestTimeout: 2m0s
68
69   # The storage account name, used for authentication
70   StorageAccountName: exampleStorageAccountName
71
72   # The storage account secret key, used for authentication
73   StorageAccountKeyFile: /etc/arvados/keepstore/azure_storage_account_key.txt
74
75   # The cloud environment to use.  If blank, use the default cloud
76   # environment.  See below for an example of an alternate cloud environment.
77   StorageBaseURL: ""
78
79   # Storage classes to associate with this volume.  See "Storage
80   # classes" in the "Admin" section of doc.arvados.org.
81   StorageClasses: null
82
83 - # Example configuration to use Azure China.
84   #
85   # The alternate cloud environment to use.
86   # Note that cloud environments are different from regions.  A
87   # cloud environment is an entirely separate instance of Azure with
88   # separate accounts, requiring separate credentials.
89   #
90   StorageBaseURL: core.chinacloudapi.cn
91   StorageAccountKeyFile: /etc/arvados/keepstore/azure_cn_storage_account_key.txt
92   StorageAccountName: cn-account-name
93   ContainerName: exampleChinaContainerName
94
95   # The rest are the same as above
96   Type: Azure
97   AzureReplication: 3
98   ReadOnly: false
99   RequestTimeout: 10m0s
100   StorageClasses: null
101 </pre>
102
103 Start (or restart) keepstore, and check its log file to confirm it is using the new configuration.