3 navsection: installguide
4 title: Configure Azure Blob storage
7 Copyright (C) The Arvados Authors. All rights reserved.
9 SPDX-License-Identifier: CC-BY-SA-3.0
12 Keepstore can store data in one or more Azure Storage containers.
14 h2. Set up VMs and Storage Accounts
16 Before starting the configuration of individual keepstore servers is good to have an idea of the keepstores servers' final layout. One key decision is the amount of servers and type of VM to run. Azure may change over time the bandwith capacity of each type. After conducting some empirical saturation tests, the conclusion was that the bandwith is proportional to the amount of cores with some exceptions. As a rule of thumb, is better to invest resources in more cores instead of memory or IOps.
18 Another decision is how many VMs should be running keepstore. For example there could be 8 VMs with one core each or one machine with 8 cores. Or anything in between. Assuming is the same cost for Cloud resources, there is always the benefit of distributing the risk of faulty VMs. The recommendation is to start with 2 VMs and expand in pairs. Having a minimum of 2 cores each. The total amount of VMs will be a function of the budget and the pipeline traffic to avoid saturation during periods of high usage. Standard D v3 family is a balanced choice, making Standard_D2_v3 the 2-core option
20 There are many options for storage accounts. You can read details from Azure on their documentation https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction. The type of storage and access tier will be a function of the budget and desired responsiveness. A balanced option is to have General-purpose Standard Storage account and use Blob storage, hot access tiers.
22 Keepstore can be configure to reflect the level of underlaying redundancy the storage will have. This is call data replication option. For example LRS (Locally Redundant Storage) saves 3 copies of the data. There desired redundancy can be chosen at the keepstore layer or at the Storage Accunt layer. The decision where the redundancy will be done and the type of Storage Account data replication (LRS, ZRS, GRS and RA-GRS) has trade-offs. Please read more on https://docs.microsoft.com/en-us/azure/storage/common/storage-redundancy and decide what is best for your needs.
24 h2. Create a storage container
26 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.
29 <pre><code>~$ <span class="userinput">azure config mode arm</span>
30 ~$ <span class="userinput">azure login</span>
31 ~$ <span class="userinput">azure group create exampleGroupName eastus</span>
32 ~$ <span class="userinput">azure storage account create --type LRS --location eastus --resource-group exampleGroupName exampleStorageAccountName</span>
33 ~$ <span class="userinput">azure storage account keys list --resource-group exampleGroupName exampleStorageAccountName</span>
34 info: Executing command storage account keys list
35 + Getting storage account keys
36 data: Primary: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
37 data: Secondary: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy==
38 info: storage account keys list command OK
39 ~$ <span class="userinput">AZURE_STORAGE_ACCOUNT="exampleStorageAccountName" \
40 AZURE_STORAGE_ACCESS_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==" \
41 azure storage container create exampleContainerName</span>
45 Note that Keepstore services may be configued to use multiple Azure Storage accounts and multiple containers within a storage account.
47 h2. Configure keepstore
49 Copy the primary storage account key to a file where it will be accessible to keepstore at startup time.
52 <pre><code>~$ <span class="userinput">sudo sh -c 'cat >/etc/arvados/keepstore/azure_storage_account_key.txt <<EOF'
53 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
55 ~$ <span class="userinput">sudo chmod 0400 /etc/arvados/keepstore/azure_storage_account_key.txt</span>
59 Next, edit the @Volumes@ section of the @keepstore.yml@ config file:
63 - # The volume type, this indicates Azure blob storage
66 # How much replication is performed by the underlying container.
67 # This is used to inform replication decisions at the Keep layer.
70 # The storage container to use for the backing store.
71 ContainerName: exampleContainerName
73 # If true, do not accept write or trash operations, only reads.
76 # Amount of time to wait for a response before failing the request
79 # The storage account name, used for authentication
80 StorageAccountName: exampleStorageAccountName
82 # The storage account secret key, used for authentication
83 StorageAccountKeyFile: /etc/arvados/keepstore/azure_storage_account_key.txt
85 # The cloud environment to use. If blank, use the default cloud
86 # environment. See below for an example of an alternate cloud environment.
89 # Storage classes to associate with this volume. See "Storage
90 # classes" in the "Admin" section of doc.arvados.org.
93 - # Example configuration to use Azure China.
95 # The alternate cloud environment to use.
96 # Note that cloud environments are different from regions. A
97 # cloud environment is an entirely separate instance of Azure with
98 # separate accounts, requiring separate credentials.
100 StorageBaseURL: core.chinacloudapi.cn
101 StorageAccountKeyFile: /etc/arvados/keepstore/azure_cn_storage_account_key.txt
102 StorageAccountName: cn-account-name
103 ContainerName: exampleChinaContainerName
105 # The rest are the same as above
109 RequestTimeout: 10m0s
113 Start (or restart) keepstore, and check its log file to confirm it is using the new configuration.