Using Azure Storage

The following sections show how to work with the Azure command line interface (cli) to manipulate files and settings as well as how to setup the Unified Storage Proxy.

Using the Azure CLI

First setup the Azure CLI interface.

The cli interface allows to list available storage accounts:

#!/bin/bash

az storage account list

as well as create accounts and containers:

#!/bin/bash

az storage account create -n your-bucket -g your-bucket -l westeurope --sku Standard_LRS
az container create -g your-bucket -n your-bucket --image myimage:latest --cpu 1 --memory 1

You can configure the default subscription using;

#!/bin/bash

az account set -s NAME_OR_ID

Files have to be copied individually to copy them as blob to the container:

#!/bin/bash

cd tears-of steel
for f in *; do
  az storage blob upload -a your-bucket -k KEY "${f##*/}" tears-of-steel "${f##*/}"
done

Containers can also be deleted:

#!/bin/bash

az container delete --name tears-of-steel --resource-group your-bucket

The endpoint then is the following:

https://your-bucket.blob.core.windows.net

To list containers and blobs:

#!/bin/bash

az storage container list -a your-bucket -k KEY
az storage blob list -a your-bucket -k KEY tears-of-steel

Please note that permissions should be set on content before it can be accessed:

#!/bin/bash

az storage container set -a your-bucket -k KEY -p Container tears-of-steel

For further options and possibilities please refer to the Azure documentation.

Using the Storage Proxy

Following the storage proxy Installation documentation, the just created bucket and uploaded content can be streamed by adding the UspEnableSubreq directive and defining <Proxy> sections for each remote storage server used.

<Location "/">
  UspHandleIsm on
  UspEnableSubreq on
  IsmProxyPass https://your-bucket.blob.core.windows.net/
</Location>

SSLProxyEngine on

<Proxy "https://your-bucket.blob.core.windows.net/">
  ProxySet connectiontimeout=5 enablereuse=on keepalive=on retry=0 timeout=30 ttl=300
</Proxy>

The URL to the content then becomes the following, for instance for MPEG-DASH:

http://www.example.com/tears-of-steel/tears-of-steel.ism/.mpd

where www.example.com is the webserver running USP and has the previous vhost snippet (and the tears-of-steel content in 'your-bucket' used with both IsmProxPass and Proxy directives.

Note

For guidelines on howto use Unified Packager with Azure Storage see How to write directly to Azure Blob Storage.