Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save harshithjv/d408fc4787359cdcc43abd2d61eb7fa0 to your computer and use it in GitHub Desktop.

Select an option

Save harshithjv/d408fc4787359cdcc43abd2d61eb7fa0 to your computer and use it in GitHub Desktop.
Using Azurite.

Documentation

https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite

Install on npm

npm install -g azurite

Note: Prefix sudo in unix/linux environment and enter the password when prompted.

Run azurite with remote access on network

$ azurite --silent --location ~/.azurite/ --debug ~/.azurite/debug.log --blobHost 0.0.0.0 - -blobPort 18888 --queueHost 0.0.0.0 --queuePort 18889 -L

Ports used in above commands are 18888 and 18889. Document mentions 10000, 10001 and so on though.

Connection String

Default storage account: devstoreaccount1

Default full connection string: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;

Replace only IP address and port number for BlobEndpoint and QueueEndpoint. E.g.: If IP address is 10.0.0.19 and port number is 18888 for Blob storage and 18889 for Queue storage then full connection string will be: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://10.0.0.19:18888/devstoreaccount1;QueueEndpoint=http://10.0.0.19:18889/devstoreaccount1;

Download 'Storage Explorer'

Download the 'Storage Explorer' from this link and select OS version to download fromt the 'Operating system' drop-down: https://azure.microsoft.com/en-us/features/storage-explorer/

Connect and create blob container on the 'Storage Explorer'

  • Open the 'Storage Explorer' software
  • In Explorer sidebar locate 'Storage Accounts' under 'Local & Attached' tree item. Right-click and click on 'Connect to Azure storage...'
  • On 'Connect to Azure Storage' dialog, click on 'Use a connection string' radio option and click 'Next' button.
  • Enter a preferred Display name that will be visible in Explorer section and fill the 'Connection string' field as required. Click 'Next' button and then 'Connect' button on next page of the wizard/dialog.
  • After successful connection, an item with given Display name will appear below 'Storage Accounts' tree menu.
  • Expand newly created Storage item with whatever Display name given and right-click on 'Blob Containers' menu item. Click on 'Create Blob Container' and give a new name to blob container on an empty text field that appears below 'Blob container' menu item.
  • Right click on newly created blob container and click 'Set Public level access...' On that dialog select 'Public read access for container and blobs' and click on Apply button to make the container access public on a network.

CRUD operations on new container

  • Double click or right-click to open tab to view container contents.
  • You can upload, clone, delete and other operations within this window/tab
  • Try uploading a file using 'Upload' button.
  • Once a file is successfully uploaded. Try other operations on the file.
  • After all the operations are successful we can delete the container by right-click and clicking on 'Delete' menu item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment