Azure Files shared by VMs in a Dev Team

Azure File is a service in Azure Storage Accounts such that I look at it a managed network file share. For a further introduction read Introduction to Azure Files

A practical use case for me in a development team scenario is where each team member has its own or shared Azure Virtual Machine and there is a need to share files. A traditional approach I have seen is using on-premises network file shares.

The type of files one can store are software installation files, scripts, local Git repos, developer and system admin documentation, etc. But I wouldn’t suggest this to be a replacement for project and document management solutions such as SharePoint or TFS.

Other alternative approaches may not feasible such as Dropbox or online cloud drives where they have network policies and security policies that discourage or limit use. Or on-premises network file shares may not be accessible or the network latency is too slow.

Another viable option is to share Azure files across dev, system integration test, user acceptance test or even production environments. This is where you may want to have convenient access to specific scripts for maintenance and troubleshooting.

I think Azure Files is flexible and a good starting point until your organization is readily supporting cloud drives and other options to work in an established governance model with their Azure public cloud.

  1. Create a Storage and File Share
    AzureFiles1
    Note that when choosing Performance over standard, only Blob storage available. As premium configuration is designed for supporting virtual machines.
  2. Create File share in storage account. Click File share
    AzureFiles2
    Enter name of file share and any quota in GB. In my case the name is oneteam.
  3. In the newly created file share, click Connect to see ways to mount the file share in virtual machines. I choose to use the net use command. It requires credentials such as the storage account key. Copy the command.
    AzureFiles3
  4. Login into the various virtual machines to mount the file share. For detailed instructions and background, read Mount the Azure File share with Command Prompt
    The first command is to mount to Z: drive. The second command is to store the credentials to automatically reconnect on reboot.AzureFiles4
  5. In one of the virtual machines using windows explorer, the file share has been mounted to Z: drive and view of the folders and files.azurefiles5
  6. In the Azure Portal, you can see the same files
    azurefiles6
  7. You can also manage files from Azure Storage Explorer.
    azurefiles7

For further security to isolate from public internet access, you can enable the storage service endpoint and setup virtual network integration in the VNets of your virtual machines.

As virtual machines can be shutdown, you can still access these files in the Azure file share anytime. This is a more flexible approach than leaving shared files tied to one virtual machine’s disk.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s