Azure Blob Storage

In this guide, we’ll link a private Azure storage account blob container to a Valohai project.

Azure Blob Storage

On Azure, you create storage accounts that have multiple services attached. One of those services is blob container, which is Valohai’s main interface on Azure-based installations.

Requirements

  • A Microsoft Azure subscription you can administer

  • A Valohai project which to link the Azure Blob Storage to

Storage Account and Container

Using an existing Azure Blob storage

You can skip this part and go directly to the next section if you’re using an existing Storage container.

  1. Create an Azure Storage Account in your Microsoft Azure subscription.

  2. Select storage account name and location. Create the storage account in the location you’ll be running your work to reduce transfer costs.

  3. Click on Containers on the navigation bar on the right side.

  4. Click on + Container.

  5. Give the container a name like valohai-sample and keep the public access level as Private.

  6. Click Create.

CORS Settings

What is CORS?

CORS is an HTTP feature that enables a web application running under one domain (app.valohai.com for example) to access resources in another domain (your storage). Read more at Microsoft Docs.

If you wish to be able to upload files to the store using the app.valohai.com web UI, you will need to add a CORS policy document to the blob container.

  1. Click on CORS on the navigation bar on the right side.

  2. Make sure the Blob service tab is selected.

  3. Add the following 2 lines of configuration:

Origins
Methods
Allowed Headers
Exposed Headers
Max Age

*

GET,OPTIONS

content-type,x-ms-*

x-ms-meta-*

3000

https://app.valohai.com

POST,PUT

content-type,x-ms-*

x-ms-meta-*

3000

Now your blob container allows uploads through https://app.valohai.com web application.

Access Key

Using the Azure portal, find and save the access key under the storage account Access keys tab. This will be added to Valohai in the next step.

Add the store to Valohai

You can connect this data store either to a single project, or create it on the organization level.

  1. Navigate to Hi, <name> (the top-right menu) > Manage <organization>.

  2. Open the Data Stores tab and add your store’s details.

  3. The data store can be shared with everyone in the organization, or you can expose the data store to only certain team(s).

Data Stores can be either configured on the project level or shared across your organization.

Default data store for project

  1. Open a project in the web application.

  2. Click on the Data Store table.

  3. Click on Add Azure Blob Storage Store.

  4. Add in the details you created in the Azure portal.

  5. The store name is the name that will be visible on Valohai. Make it something you recognize (e.g. <organization-name>-store).

  6. (optional) Click on Make project default store to make it the default upload location for this project.

  7. When you create the store, the provided access key will be validated.

Last updated

Was this helpful?