3 navsection: installguide
4 title: Configure Azure Blob storage
7 As an alternative to local and network-attached POSIX filesystems, Keepstore can store data in an Azure Storage container.
11 Normally, all keepstore services are configured to share a single Azure Storage container.
13 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.
16 <pre><code>~$ <span class="userinput">azure config mode arm</span>
17 ~$ <span class="userinput">azure login</span>
18 ~$ <span class="userinput">azure group create exampleGroupName eastus</span>
19 ~$ <span class="userinput">azure storage account create --type LRS --location eastus --resource-group exampleGroupName exampleStorageAccountName</span>
20 ~$ <span class="userinput">azure storage account keys list --resource-group exampleGroupName exampleStorageAccountName</span>
21 info: Executing command storage account keys list
22 + Getting storage account keys
23 data: Primary: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
24 data: Secondary: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy==
25 info: storage account keys list command OK
26 ~$ <span class="userinput">AZURE_STORAGE_ACCOUNT="exampleStorageAccountName" \
27 AZURE_STORAGE_ACCESS_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==" \
28 azure storage container create exampleContainerName</span>
32 h2. Configure keepstore
34 Copy the primary storage account key to a file where it will be accessible to keepstore at startup time.
37 <pre><code>~$ <span class="userinput">sudo sh -c 'cat >/etc/sv/keepstore/exampleStorageAccountName.key <<EOF'
38 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz==
40 ~$ <span class="userinput">sudo chmod 0400 /etc/sv/keepstore/exampleStorageAccountName.key</span>
44 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:
51 -azure-storage-account-key-file <span class="userinput">/etc/sv/keepstore/exampleStorageAccountName.key</span> \
52 -azure-storage-account-name <span class="userinput">exampleStorageAccountName</span> \
53 -azure-storage-container-volume <span class="userinput">exampleContainerName</span>
57 Start (or restart) keepstore, and check its log file to confirm it is using the new configuration.
60 <pre><code>2015/10/26 21:06:24 Using volume azure-storage-container:"exampleContainerName" (writable=true)