Azure - хранение данных в облаке

  • Published on
    07-Jan-2017

  • View
    114

  • Download
    7

Embed Size (px)

Transcript

Stronger. Together. One Microsoft

Windows Azure

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.6/15/20161

Windows Azure Azure SQL Windows Azure Windows Azure , Azure

AzureAzure SQL

Azure StorageBlobsDrivesTables Queues

Azure Files

DocumentDB

Azure SQL Azure SQL Windows Azure Azure SQL -

Azure SQL DB

Azure SQL ,

Azure SQL

Azure SQL

, SQL Server VM?

, SQL Server VM?SQL Database, ( ) SQL Server Azure VM

, SQL Server VM?SQL Database Azure IP- SQL Server Azure VM Azure

: SQL Server VM?

Azure SQL

Azure SQL

Demonstration StepsOn the Start screen, click the Internet Explorer tile.Go to https://portal.azure.com.In the email address box, type the email address of your Microsoft account.Click Continue.In the password box, type your password for your Microsoft account. At the bottom-left corner of the portal, click New.In the New blade that displays, click SQL Database.In the SQL database blade that displays, perform the following steps:In the Name box, type SQLDemo.Click Pricing Tier.In the Recommended pricing tier blade that displays, select the Basic option.Click Select to close the blade.Click Select Source.Select the Blank Database option.In the SQL database blade, click Server.In the Server blade that displays, click Create a new server.In the New Server blade that displays, locate the Server Name dialog box.In the Server Name box, enter a unique value.In the Server Admin Login box, type testuser.In the Password box, type TestPa$$w0rd.In the Confirm Password box, type TestPa$$w0rd.Click Location.In the Location blade that displays, select the region that is closes to your location.

p. In the New server blade, click OK.

In the SQL database blade, click Create to create the SQL database and Server.

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.6/15/201615

Azure SQLSQL Server Management Studio

SQL Server Data Tools (SSDT)https://msdn.microsoft.com/en-us/mt186501

Visual Studio

SQL Database Migration Wizardhttps://sqlazuremw.codeplex.com/

Azure Websites Migration Assistanthttps://www.movemetothecloud.net/

SQL Server Management Studio , - IP-. () SQL Server, ,

Visual Studio Server Explorer SQL Server Management Studio

, ,

SQL Server Object Explorer

Azure

Visual Studio SQL Server Object Explorer

Server Explorer

Visual Studio Cloud Explorer Azure,

SQL Server Object Explorer

Visual Studio Database Projects

Discussion Question: Why would you use a database project to create your schema as opposed to a SQL management tool?Answer: You can use a database project to place the design in source control, share the design among your team members, and roll back to previous revisions of the design. You also can use it to generate SQL scripts from the design that can be used to create development copies of the database locally.

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.6/15/201621

SQL Server Integration Services Azure

SQL Database Migration Wizard

Azure Websites Migration Assistant SQL Management Objects

-

- Azure

(point-in-time recovery) Basic , , 5 : https://azure.microsoft.com/ru-ru/blog/azure-sql-database-point-in-time-restore/

BACPACK- ,

- Basic - Premium*, , - : , : https://azure.microsoft.com/en-us/documentation/articles/sql-database-geo-replication-overview/

- c Basic

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.6/15/201628

-

: 1 Azure SQL 2 Entity Framework Azure SQL

: 35

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.6/15/201630

- , Azure .

Entity Framework Code First- .

: ORM framework?

Microsoft Azure Windows Azure Azure

Azure

()

: Azure , ,

Blobs Drives NTFS- Azure ( )Tables . - Queues

Windows Azure Managed Library Windows Azure Storage services HTTP-based API

Storage Emulator Windows Azure Storage account

(.scfg),

!

Demonstration StepsOn the Start screen, click the Internet Explorer tile.Browse to the Windows Azure Management Portal at http://manage.windowsazure.comNote: The browser should automatically log you in to the portal. If you are redirected to the Windows Live ID Sign in page, type your email and password, and then click Sign in.If the Windows Azure Tour dialog appears, close it.Click NEW on the lower left of the portal.Click DATA SERVICES, then STORAGE, and then click QUICK CREATE.In the URL text box, enter demostorageaccountyourinitials (yourinitials contains your names initials, in lower-case). Explain that the URL will be used to access blob, queue, and table resources for the account. Explain that storage account URLs are always written in lowercase.In the REGION box, select the region closest to your location. Explain that in order to reduce communication latency, it is better to create the storage account in the same region.as your application deploymentClick CREATE STORAGE ACCOUNT at the lower right corner of the portal. Wait until the storage account is created. Note: If you get a message saying the storage account creation failed because you reached your storage account limit, delete one of your existing storage accounts and retry the step.Click the newly created storage account, then click DASHBOARD, and then show to the student the different URLs for the blob, table, and queue.Show the students the options in the CONFIGURE tab. Click MANAGE ACCESS KEYS at the bottom of the page.Explain that the access keys are used to gain access to the storage account. Explain that the secondary key is intended to be used when renewing the primary key, for example, if the primary key is compromised.

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.6/15/201638

Storage Blobs : ,

Storage Blobs

http[s]://.blob.core.windows.net//

Page blobsBlock blobs

Page Blobs 512 Azure (immediately committed) 1 TB

Block Blobs ( block ID) MD5 , (uncommitted) , , - 200 GB

REST API REST- GET BLOBhttps://[account].blob.core.windows.net/[container]/[blob]POST, PUT DELETE (HTTP-)

restypehttps://[account].blob.core.windows.net/[container]?restype=container

Shared Access Signature (SAS)

:

Full public read Public read for blobs only No public read , ,

Shared Access Signature (SAS Token) URI, , ,

(HTTPS) :

(Read, Write, Delete, List, None)

Shared Access Signaturehttps://myaccount.blob.core.windows.net/sascontainer/sasblob.txt?sv=2012-02-12&st=2013-04-29T22%3A18%3A26Z&se=2013-04-30T02%3A23%3A26Z&sr=b&sp=rw&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D

http://[account].blob.core.windows.net/[container]/[blob]?sv=[Storage Services Version]&?st=[Start Time]&se=[Expiry Time]&sr=[Resource]&sr=[Permissions Granted]&si=[nameofpolicy]&sig=[HMAC-SHA256 value]

In this example, the signature has the resource set to blob and permissions set to Read/Write. The start and expiry times are in ISO 8061 format. The signature is an HMAC computed over a string-to-sign and key using the SHA256 algorithm, and then encoded by using Base64 encoding.

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.6/15/201649

shared access signatures , URL , ,

, Stored Access Policies

// Get a reference to the container var container = blobClient.GetContainerReference(files"); container.CreateIfNotExists();

// Create blob container permissionsvar blobPermissions = new BlobContainerPermissions(); blobPermissions.SharedAccessPolicies.Add("mypolicy", new SharedAccessBlobPolicy() { SharedAccessExpiryTime = DateTime.UtcNow.AddHours(10), Permissions = SharedAccessBlobPermissions.Read });

blobPermissions.PublicAccess = BlobContainerPublicAccessType.Off;

// Set the permission policy on the container container.SetPermissions(blobPermissions);

// Get a reference to the container for the shared access signaturevar container = blobClient.GetContainerReference(files"); container.CreateIfNotExists();

// Get the shared access signature to share with users string sasToken = container.GetSharedAccessSignature(new SharedAccessBlobPolicy(), "mypolicy);

Content Delivery Network CDN

CDN - Azure, CDN-

: https://azure.microsoft.com/en-us/documentation/articles/cdn-create-a-storage-account-with-cdn/

Cross-Origin Resource SharingCross-Origin Resource Sharing (CORS) - CORS / HTTP ( )CORS CORS ,

: http://henry-chong.com/enabling-cors-cross-origin-resource-sharing-for-your-microsoft-azure-storage-blobs-etc

CloudBerry Explorerhttp://www.cloudberrylab.com/free-microsoft-azure-explorer.aspx

Azure Storage Explorerhttps://azurestorageexplorer.codeplex.com/

Azure Management Studiohttp://www.cerebrata.com/

Cloud Portamhttp://www.cloudportam.com/

? https://techmike2kx.wordpress.com/2013/08/23/10-tools-of-the-trade-for-your-windowsazure-environment/

Azure

Azure Azure Files (SMB),

SMB , , Azure

REST API Windows PowerShell

SMB 2.1

Windows

: https://azure.microsoft.com/ru-ru/documentation/articles/storage-dotnet-how-to-use-files/

: 1 2 3 2

: 55

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. M...

Recommended

View more >