310 likes | 544 Views
Meet Azure Files, your new Swiss Army Knife. Sandrino Di Mattia (@ sandrinodm ) Microsoft Azure Consultant at RealDolmen Author at JustAzure.com http://fabriccontroller.net. Azure Files. “Shared Drive”-as-a-Service. Agenda. Azure Storage and Azure Files Using Azure Files
E N D
Meet Azure Files, your new Swiss Army Knife • Sandrino Di Mattia (@sandrinodm) • Microsoft Azure Consultant at RealDolmen • Author at JustAzure.com • http://fabriccontroller.net
Azure Files “Shared Drive”-as-a-Service
Agenda Azure Storage and Azure Files Using Azure Files Comparing to Azure Blobs Comparing to Azure Disks Scenarios & Demos
Azure Storage Abstractions: Blobs, Tables, Queues and now Files
Disks (IaaS) Block Page Drives (PaaS) Queues Files Blobs Tables Azure Storage Account (500 TB)
SMB 2.1 REST REST REST REST Blob Head Table Head Queue Head File Share Head Massive Scale Out & Auto Load Balancing Index Layer Distributed Replication Layer
West-Europe VM Cloud Service Web Site SMB 2.1REST SMB 2.1REST REST Azure Files
Other Region Contoso (On-Premises) VM Cloud Service Web Site REST REST West-Europe Azure Files
PowerShell Creating a share$c = New-AzureStorageContext <acc> <key>New-AzureStorageShare <share> -Context $ctx
AzCopy Recursive copy AzCopyG:\Backups\ https://acc.file.core.windows.net/share/ /DestKey:key /s
SMB Creating a mapped drivenet use Z:\\acc.file.core.windows.net\share /u:acc key== Persisting credentials cmdkey /add:acc.file.core.windows.net /user:acc /pass:key
SMB In Code (P/Invoke)WNetAddConnection2 (Mpr.dll) In Code (Using RedDog.Storage)CloudFileShareshare =client.GetShareReference("reports");share.Mount("P:");
SMB • Credentials: persisted per user • Mapped drives: persisted per user context • User can have 1 normal context • User can have 1 elevated context (administrator) • Use /runas to store credentials and map drives for other users
REST Using the Storage Client Library varfileClient = storageAccount.CreateCloudFileClient(); var share = fileClient.GetShareReference("reports"); if (share.Exists()) { vardir = share.GetRootDirectoryReference(); var file = dir.GetFileReference("report.txt") var content = await file.DownloadTextAsync(); }
Comparing to Azure Blobs Differences between Azure Files and Azure Blobs
Comparing to Azure Disks Differences between Azure Files and Azure Disks
Scenarios & Demos Lift and shift, hybrid applications, …
Scenarios Lift and Shift CMS (media folder) Central Logging Remote Backup (MySQL, …) ISO / Software Repository Centralized Configuration / IIS Shared Configuration Lucene (Near Real Time Search) NServiceBus (FileShareDataBus) On-Premises Replication High-Available FTP Server
Lift and Shift Service Account Service Account ASP.NET Web Application ASP.NET Web Application Local Disk DFS Storage Account Credentials Azure Files
On-Premises Replication to Azure Files West Europe On-Premises Virtual Machine Sync Engine (File System Watcher / ...) SMB Local Disk DFS Azure Files REST
High-Available FTP Server 21 10000-10050 20000-20050 Cloud Service VM 1 VM 2 SMB Azure Files
Links Introducing Microsoft Azure File Servicehttp://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx Comparing with Azure Blobs and Azure Driveshttp://msdn.microsoft.com/en-us/library/azure/dn790517.aspx Persisting connections to Microsoft Azure Fileshttp://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/27/persisting-connections-to-microsoft-azure-files.aspx
Links Azure Files on Linuxhttp://channel9.msdn.com/Blogs/Open/Shared-storage-on-Linux-via-Azure-Files-Preview-Part-1 Using the Azure File Service in your Cloud Services (Web and Worker Roles)http://fabriccontroller.net/blog/posts/using-the-azure-file-service-in-your-cloud-services-web-roles-and-worker-role/ Cloud Portamhttps://app.cloudportam.com/ Passive FTP and Windows Azure Virtual Machineshttp://fabriccontroller.net/blog/posts/passive-ftp-and-dynamic-ports-in-iis8-and-windows-azure-virtual-machines/