Skip to content

Azure Storage POC demo

Lakindu Gunasekara edited this page Jul 6, 2018 · 4 revisions

Setup

  • Install [https://code.visualstudio.com/download](VS Code) or any of your favorite editors.
  • Git clone https://github.com/cloudlibz/clocal-azure.git (since no npm module published yet)
  • Go to the root and install modules (npm install / yarn install)

Commands

To run the azure storage,

clocal storage start

This will start running docker image of "Azurite" from azure for local emulation. https://github.com/Azure/Azurite

Since the Azurite is running on docker, the docker commands are executed via Dockerode To define the properties of the docker image,

var Docker = require('dockerode');

var docker = new Docker({socketPath: '/var/run/docker.sock'});

var docker1 = new Docker(); //defaults to above if env variables are not used

var docker2 = new Docker({host: 'http://192.168.1.10', port: 3000});

var docker3 = new Docker({protocol:'http', host: '127.0.0.1', port: 3000});

var docker4 = new Docker({host: '127.0.0.1', port: 3000}); //defaults to http

Limitations [TODO]

Azurite TODO List

Blob Storage API

  • Account SAS Support [TODO]
  • See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas for specification
  • Get Blob Service Stats [TODO]
  • Retrieves statistics related to replication for the Blob service. This operation is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account.
  • Set Blob Tier [TODO] The Set Blob Tier operation sets the tier on a blob.

Table Storage API

  • Get Table ACL [TODO]
  • Set Table ACL [TODO]
  • Entity Group Transaction (Batch Operation) [TODO]

Azure Storage Files API [TODO]

  • API not implemented