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 As an alternative to local and network-attached POSIX filesystems, Keepstore can store data in an Azure Storage container.
14 h2. Create a container
16 Normally, all keepstore services are configured to share a single Azure Storage container.
18 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.
21 <pre><code>~$ <span class="userinput">azure config mode arm</span>
22 ~$ <span class="userinput">azure login</span>
23 ~$ <span class="userinput">azure group create exampleGroupName eastus</span>
24 ~$ <span class="userinput">azure storage account create --type LRS --location eastus --resource-group exampleGroupName exampleStorageAccountName</span>
25 ~$ <span class="userinput">azure storage account keys list --resource-group exampleGroupName exampleStorageAccountName</span>
26 info: Executing command storage account keys list
27 + Getting storage account keys
28 data: Primary: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
29 data: Secondary: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy==
30 info: storage account keys list command OK
31 ~$ <span class="userinput">AZURE_STORAGE_ACCOUNT="exampleStorageAccountName" \
32 AZURE_STORAGE_ACCESS_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==" \
33 azure storage container create exampleContainerName</span>
37 h2. Configure keepstore
39 Copy the primary storage account key to a file where it will be accessible to keepstore at startup time.
42 <pre><code>~$ <span class="userinput">sudo sh -c 'cat >/etc/sv/keepstore/exampleStorageAccountName.key <<EOF'
43 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
45 ~$ <span class="userinput">sudo chmod 0400 /etc/sv/keepstore/exampleStorageAccountName.key</span>
49 In your keepstore startup script, instead of specifying a local storage using @-volume /path@ or discovering mount points automatically, use @-azure-*@ arguments to specify the storage container:
56 -azure-storage-account-key-file <span class="userinput">/etc/sv/keepstore/exampleStorageAccountName.key</span> \
57 -azure-storage-account-name <span class="userinput">exampleStorageAccountName</span> \
58 -azure-storage-container-volume <span class="userinput">exampleContainerName</span>
62 Start (or restart) keepstore, and check its log file to confirm it is using the new configuration.
65 <pre><code>2015/10/26 21:06:24 Using volume azure-storage-container:"exampleContainerName" (writable=true)