AzureConf 2014 - Meet Azure Files, your new

advertisement
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
Agenda
1)
2)
3)
4)
5)
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)
Blobs
Queues
Tables
Files
Azure Storage Account (500 TB)
5
REST
REST
REST
Blob Head
Table Head
Queue Head
REST
SMB
2.1
File Share Head
Massive Scale Out & Auto Load Balancing Index Layer
Distributed Replication Layer
6
Using Azure Files
VM
Cloud Service
SMB 2.1
REST
Web Site
SMB 2.1
REST
REST
Azure Files
West-Europe
8
Cloud Service
VM
Web Site
Other Region
Contoso
(On-Premises)
REST
REST
Azure Files
West-Europe
9
PowerShell
• Creating a share
$c = New-AzureStorageContext <acc> <key>
New-AzureStorageShare <share> -Context $ctx
10
AzCopy
• Recursive copy
AzCopy G:\Backups\
https://acc.file.core.windows.net/share/
/DestKey:key /s
11
SMB
• Creating a mapped drive
net use Z:
\\acc.file.core.windows.net\share
/u:acc key==
• Persisting credentials
cmdkey /add:acc.file.core.windows.net
/user:acc /pass:key
12
SMB
• In Code (P/Invoke)
WNetAddConnection2 (Mpr.dll)
• In Code (Using RedDog.Storage)
CloudFileShare share =
client.GetShareReference("reports");
share.Mount("P:");
13
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
14
REST
• Using the Storage Client Library
var fileClient = storageAccount.CreateCloudFileClient();
var share = fileClient.GetShareReference("reports");
if (share.Exists())
{
var dir = share.GetRootDirectoryReference();
var file = dir.GetFileReference("report.txt")
var content = await file.DownloadTextAsync();
}
15
Comparing to Azure Blobs
Differences between Azure Files and Azure Blobs
Comparing to Azure Blobs
Attribute
Azure Blobs
Azure Files
Durability options
LRS, ZRS, GRS (and RA-GRS for higher
availability)
LRS, GRS
Accessibility / Connectivity
REST APIs – Worldwide
REST APIs – Worldwide
SMB 2.1 - Within region
Endpoints
http://myaccount.blob.core.windows.
net/mycontainer/myblob
\\myaccount.file.core.windows.net\my
share\myfile.txt
http://myaccount.file.core.windows.ne
t/myshare/myfile.txt
Directories
Flat namespace
True directory objects
Case sensitivity of names
Case sensitive
Case insensitive, but case preserving
17
Comparing to Azure Blobs
Attribute
Azure Blobs
Azure Files
Capacity
Up to 500TB containers
5TB file shares
Throughput
Up to 60 MB/s per block blob
Up to 60 MB/s per share
Object size
Up to 200GB/block blob
Up to 1TB/page blob
Up to 1 TB/file
Billed capacity
Based on bytes written
Based on file size
Shared Access Signatures
Yes
No
Client libraries
Multiple languages
Multiple languages
18
Comparing to Azure Disks
Differences between Azure Files and Azure Disks
Comparing to Azure Disks
Attribute
Azure Data Disks
Azure Files
Scope
Exclusive to a single virtual machine
Shared access across multiple virtual
machines
Snapshots and Copy
Yes
No
Configuration
Connected at startup of the virtual
machine
Connected after the virtual machine
has started
Authentication
Built-in
Set up with net use
Caching Support
Yes
No
Access using REST
Files within the VHD cannot be
accessed when Virtual Machine is
running
Files stored in a share can be
accessed
20
Comparing to Azure Disks
Attribute
Azure Data Disks
Azure Files
Max Size
1TB Disk
5TB File Share and 1TB file within
share
Max 8KB IOps
500 IOps
1000 IOps
Throughput
Up to 60 MB/s per Disk
Up to 60 MB/s per File Share
I/O traffic
Uses the Virtual Disk Driver
Uses network bandwidth (same
interface as your applications)
Limit
Maximum 16 disks (depending on VM
size: Small = 2, Medium = 4, …)
Limited to available drive letters on
your VM
21
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
23
Lift and Shift
ASP.NET Web
Application
ASP.NET Web
Application
Service Account
Local Disk
DFS
Azure Files
Service Account
Storage Account Credentials
24
On-Premises Replication to Azure Files
Virtual Machine
Sync Engine
(File System Watcher / ...)
SMB
Local Disk
DFS
On-Premises
REST
Azure Files
West Europe
25
High-Available FTP Server
21
10000-10050
20000-20050
VM 1
VM 2
SMB
Cloud Service
Azure Files
26
Links
Links
• Introducing Microsoft Azure File Service
http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-
azure-file-service.aspx
• Comparing with Azure Blobs and Azure Drives
http://msdn.microsoft.com/en-us/library/azure/dn790517.aspx
• Persisting connections to Microsoft Azure Files
http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/27/persisting-connectionsto-microsoft-azure-files.aspx
28
Links
• Azure Files on Linux
http://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-rolesand-worker-role/
• Cloud Portam
https://app.cloudportam.com/
• Passive FTP and Windows Azure Virtual Machines
http://fabriccontroller.net/blog/posts/passive-ftp-and-dynamic-ports-in-iis8-and-windows-azurevirtual-machines/
29
Download