Configuration of Azure Blob storage for application access

Following are the steps can be useful if you have any application (service) in your on premise that need to access (download/upload) files to Microsoft Azure blob storage.

Open Azure web portal Configure free tire account if not configured.

Create a blob storage resource.

CreateResource.jpg

 

Give appropriate name for Storage account, remember this should be unique in AWS infrastructure, and select storage kind as ‘Blob storage’, select ‘New’ in ‘Resource group’ section. If you have already created any resource group then select one of old one. Select ‘Pin to dashboard’ so you can access it directly from dashboard.

StorageAccount.jpg

 

From the dash board, click on storage account ‘appazurestorage1’ you just created.

DashBoard.jpg

 

Create a new ‘Container’. It’s kind of folder, in AWS & Google cloud it’s called as a bucket. Keep the access level as private.

Container.jpg

 

Click on ‘Access key’ tab, note down storage account name & key.

AccessKey.jpg

 

The basic configuration of blob storage is ready. You can now upload few files manually using Azure portal by click on bucket you just created.

Upload.jpg

 

Testing bucket access:-

Method 1 using cloud Berry
a. Download and Install Cloudberry (freeware) for Azure in your on premise server.
b. Connect to Azure blob using access key & account name.

CloudBerry.jpg

 

c. Test copy (/cut) paste of file (/s) using cloud berry console.

CloudBerryCopypaste.jpg

 

Method 2 Using MS AzCopy command line tool.
Download and install AzCopy on server. Open command prompt, switch to AzCopy directory which is most likely “C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy“

Download all blobs (files) of a container to local disk.
Sample Syntax

AzCopy /Source:https://myaccount.blob.core.windows.net/mycontainer /Dest:C:\myfolder /SourceKey:key /S

Example.

AzCopy /Source:https://appazurestorage1.blob.core.windows.net/myappbucket /Dest:C:\temp\Azure /SourceKey:pQrvBr+rwoI9psWKx73SKcrE8M0JW+ZUQeIY05CJ+PJMGSFMpXV+U9Maygbtiwtc69+aPkabmZna6hxfhuw2NA== /S /sourceType:blob

 

c1.jpg

 

Upload all blobs (files) in a container (bucket)
Syntax

AzCopy /Source:C:\myfolder /Dest:https://myaccount.blob.core.windows.net/mycontainer /DestKey:key /S

Example

AzCopy /Source:C:\temp\Azure\upload /Dest:https://appazurestorage1.blob.core.windows.net/myappbucket /DestKey:pQrvBr+rwoI9psWKx73SKcrE8M0JW+ZUQeIY05CJ+PJMGSFMpXV+U9Maygbtiwtc69+aPkabmZna6hxfhuw2NA== /S

 

c2.jpg

More details about AzCopy tool.

Advertisements