• No results found

Microsoft Azure - Week6 Tuesday -

N/A
N/A
Protected

Academic year: 2021

Share "Microsoft Azure - Week6 Tuesday -"

Copied!
57
0
0

Loading.... (view fulltext now)

Full text

(1)

1

Smart Embedded System Lab

Smart Embedded System Lab

Kookmin University

Smart Embedded System Lab

Microsoft Azure

Week6 Tuesday

(2)

- Objectives and what to study

 Window Azure Cloud Service Concepts

 Window Azure Cloud Service Development

 Deploy offline

 Create an Azure storage account

 Deploy on Azure cloud

(3)

3

Smart Embedded System Lab Smart Embedded System Lab

 Objectives

 Understand basic concepts of Window Azure Cloud

Service

 What to study

 How to setup the environment to develop Window

Azure Cloud Service application

 Develop a simple Window Azure Cloud Service applicat

(4)

WINDOW AZURE

CLOUD SERVICES

(5)

5

Smart Embedded System Lab Smart Embedded System Lab

 Reference from Microsoft Azure Website

http://azure.microsoft.com/

(6)

 Reference from Microsoft Azure Website

(7)

7

Smart Embedded System Lab Smart Embedded System Lab

 Reference from Microsoft Azure Website

 Click on “Cloud Services” tab

(8)

 Microsoft Azure provides sample code and explanation to develop app

lications applying Azure services

 Link:

 https://code.msdn.microsoft.com/windowsazure/

(9)

9

Smart Embedded System Lab Smart Embedded System Lab

 Cloud Services explanation

 Compute

• Create a multi-tier .NET application with an ASP.NET • Build a .NET multi-tier app with Service Bus Queues

• Create a multi-tier app using Storage Tables, Queues, and Blobs • Configure SSL for a cloud service

• Configure a custom domain name for a cloud service • Cloud service roles

 Deployment & source control

• Manage cloud service deployments to staging and production • Publishing Cloud Services from Visual Studio

• Continuous delivery to Azure using Visual Studio online and Git • Continuous delivery to Azure using Visual Studio Online

(10)

 Cloud Services samples

 Data

• Azure data management and analytics services • Blob Storage

• Table Storage • Queue Storage • SQL Database

• Managing SQL Database using SSMS

(11)

11

Smart Embedded System Lab Smart Embedded System Lab

 Cloud Services samples

 App services

• Azure Active Directory • Service Bus Queues • Service Bus Topics • Event Hubs

• Service Bus Relay • Service Bus AMQP

• Upload, encode, and stream media with Media Services • Scheduler

• Send email using SendGrid

• Use Twilio for phone calls and SMS • Use Blitline for image processing

(12)

 Cloud Services samples

 App services

 Cloud ready

• Building real-world cloud applications • Cloud design patterns

• Managed Cache • Redis Cache • In-role cache

• Azure Content Delivery Network (CDN)

(13)

13

Smart Embedded System Lab Smart Embedded System Lab

 This tutorial shows how to create a multi-tier .NET application with an

ASP.NET MVC front-end, and deploy it to an Azure cloud service.

 Use

 Azure SQL Database  Azure Blob service  Azure Queue service

 The Contoso Ads application

 Description

• An advertising bulletin board

• Users create ads by entering texts and uploading images.  Code:

• http://code.msdn.microsoft.com/Simple-Azure-Cloud-Service-e01df2e4

 Start

• Uncompress code • Open project

(14)

 Error

 Packages’ Error

 Reason: not yet added Reference packages to the namespaces  Solution:

• Download reference packages using NuGet

(15)

15

Smart Embedded System Lab Smart Embedded System Lab

 Error

 Right click on solution of the project  Click “Restore”

 Project will automatically install required packages  Click Close button

(16)

 Set ContosoAdsCloudService as the st

artup project

 Ctrl + F5 to start application

 Visual Studio automatically invokes the

Azure

compute emulator

and Azure

stora

ge emulator

.

 The compute emulator uses your comput er's resources to simulate the web role a nd worker role environments.

 The storage emulator uses a SQL Server Express LocalDB database to simulate Az ure cloud storage

(17)

17

Smart Embedded System Lab Smart Embedded System Lab

 Create an Ad

 Enter data and select a .jpg image to u

pload

(18)

• Create an Azure cloud service

• Create an Azure SQL database

• Create an Azure storage account

• Configure to use Azure SQL database

• Configure to use Azure storage

account

• Deploy the project

Content

(19)

19

Smart Embedded System Lab Smart Embedded System Lab

 Go to

http://manage.windowsazure.com/

Sign in

Deploy to Azure Create Azure Cloud service

(20)

Deploy to Azure Create Azure Cloud service

 Click New -> Compute -> Cloud Service -> Quick Create

 In URL box: create a unique URL prefix

 Choose region

(21)

21

Smart Embedded System Lab Smart Embedded System Lab

 Server informs cloud service was created

(22)

 Click New -> Data Services -> SQL Database -> Quick Create

 In Database Name box: use again the previous URL

 In Server drop-down list, choose “New SQL Database server”

 Choose the same region with the previous selection

(23)

23

Smart Embedded System Lab Smart Embedded System Lab

 Create new “Login Name” and “Password”

 Click on “Create SQL Database”

(24)

 A SQL database is created in Azure Management Portal

(25)

25

Smart Embedded System Lab Smart Embedded System Lab

 Click on the name of the created database

 Click on Dashboard tab

(26)

 Click on “Manage allowed IP addresses”

 Under Allowed Services, click Yes

 Click Save

(27)

27

Smart Embedded System Lab Smart Embedded System Lab

 Click on the name of the new database

 Click Manage tab -> Yes -> Yes

(28)

 Click Manage tab again

 Log in with the created Username

and Password

(29)

29

Smart Embedded System Lab Smart Embedded System Lab

 Click New -> Data Services -> Storage -> Quick Create

 Enter an URL

 Location: East Asia

 In REPLICATION, choose “Locally redundant”

 Click Create storage account

(30)

 To use Azure SQL database

 In ContosoAdsWeb project  open Web.Release.config

(31)

31

Smart Embedded System Lab Smart Embedded System Lab

 Replace comment block

 By the following block

Configure the solution

<connectionStrings>

<add name="ContosoAdsContext" connectionString="{connectionstring}"

providerName="System.Data.SqlClient" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> </connectionStrings>

(32)

 In Azure Management Portal, click SQL Database  Click Dashboard -> click Show connection strings

(33)

33

Smart Embedded System Lab Smart Embedded System Lab

 The portal displays connection strings

(34)

 In the

Web.Release.config, delete

{connectionstring} and paste the ADO.NE connection string

 Replace {your_password_here} with your password for the new SQL database

 Save file

 Copy the connection string for use in the next steps

(35)

35

Smart Embedded System Lab Smart Embedded System Lab

 Right click ContosoAdsWorker -> Click Properties

(36)

 Click Settings tab

 Change Service Configuration to Cloud

 Select ContosoAdsDbConnectionString, and past the connection string  Save

(37)

37

Smart Embedded System Lab Smart Embedded System Lab

“Connection strings” for both the web role project and the worker role project are stored in environment settings in the cloud service project.

For each project, separate settings are used when the application runs locally or runs in the cloud.

Update the cloud environment setting for both web and worker role projects.

(38)

 Right-click on ContosoAdsWeb project -> Properties

(39)

39

Smart Embedded System Lab Smart Embedded System Lab

 Click Settings tab

 In Service Configuration, choose Cloud

(40)

 Open the Create Storage Account Connection String dialog box

 By click on the corresponding button of StorageConnectionString

(41)

41

Smart Embedded System Lab Smart Embedded System Lab

 In the Create Storage Account Connection String dialog box

 choose the created storage account -> OK

(42)

 set the Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString c

onnection string for logging

(43)

43

Smart Embedded System Lab Smart Embedded System Lab

 choose the created storage account -> OK

 Save changes

(44)

 Setting the ContosoAdsWorker project

 Right click on ContosoAdsWorker project -> Properties

(45)

45

Smart Embedded System Lab Smart Embedded System Lab

 On “Service Configuration” choose Cloud

(46)

 Set StorageConnectionString

(47)

47

Smart Embedded System Lab Smart Embedded System Lab

 Set Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString

(48)

 After configuring, the role environment settings are stored in the follo

wing files in the “ContosoAdsCloudService” project

ServiceDefinition.csdef

- Defines the setting names.

ServiceConfiguration.Cloud.cscfg

- Provides values for when the app runs in the

cloud.

ServiceConfiguration.Local.cscfg

- Provides values for when the app runs locally.

(49)

49

Smart Embedded System Lab Smart Embedded System Lab

 Right click on the ContosoAdsCloudService project -> Publish

(50)

 Click Next to sign in

(51)

51

Smart Embedded System Lab Smart Embedded System Lab

 In Settings, click Next

(52)

 In Summary, click Publish

(53)

53

Smart Embedded System Lab Smart Embedded System Lab

 The Azure Activity Log window opens in Visual Studio.

 Click the right arrow icon to expand the deployment

 click the Website URL to launch the application

(54)

 Result of created page

 Click on “Create an Ad” to add Ads

(55)

55

Smart Embedded System Lab Smart Embedded System Lab

 Similarly, create an Ad

 Enter data and select a .jpg image to u

pload

(56)

 Edit ads

(57)

57

Smart Embedded System Lab Smart Embedded System Lab

 Result

 Access portal -> Storage -> Click on the created storage

Deploy the project to Azure

References

Related documents

Module 12: Configuring a Self-Service Multi- Tenant Cloud with the Windows Azure Pack Students learn how to configure a multi-tenant private cloud by Windows Azure Pack including

Cloud BURR (Backup Recovery &amp; Restore) involves backing up data offsite to a data centre.. (Organization’s central data center

The solutions that are part of the Noah Mobile cloud service are based on the core Platform-as-a-Service (PaaS) services on the Microsoft Azure Platform.. The Noah Mobile

The hyperbolic case occurs when the extended map has no fixed point in L itself but has two fixed points at infinity: we examine this transformation in the half- space model H

Cloud App Security service, hosted by Microsoft Azure Sandbox service (&lt;2% files), hosted by Trend Micro. •

Cloud App Security service, hosted by Microsoft Azure Sandbox service (&lt;2% files), hosted by Trend Micro. •

Field Service Cloud (TOA) Custom scoped Java Cloud Rapid Start Integration Cloud Service Cloud Rapid Implementation Packs CPQ Cloud Custom scoped HR Cloud

You can take advantage of the digital audio output from your set-top by connecting a suitable cable between your home theater receiver and the OPTICAL AUDIO OUT connector (as shown