51
Microsoft Azure Cloud Computing and Hosting Hans-Petter Halvorsen 2017.03.02

Microsoft Azure...Create Database SQL Scripts ERwin SQL Server Generate Script Visual Studio Team Services Visual Studio Local Development PC Source Code Control (SCC) Design Save

  • Upload
    others

  • View
    24

  • Download
    0

Embed Size (px)

Citation preview

MicrosoftAzureCloudComputingandHosting

Hans-PetterHalvorsen

2017.03.02

CloudHostingandServices

Hans-PetterHalvorsen,M.Sc.

TheCloud

CloudComputingandHostingProviders

TheyrentCloudbasedserviceslikeVirtualMachines(ComputerswithOSrunningintheCloud),WebServer,DatabaseSystemstoCustomersbasedonMonthlyFees

Deployment

Hans-PetterHalvorsen,M.Sc.

DeploymentofDatabases,WebSites,WebApps,WebServices,etc.

WhatisDeployment?Softwaredeploymentisalloftheactivitiesthatmakeasoftwaresystemavailableforuse.Examples:• Getthesoftwareouttothecustomers• CreatingInstallationPackages• Documentation

– InstallationGuide,etc.• Installation• etc.Deploymentstrategiesmayvarydependingofwhatkindofsoftwarewecreate,etc.(e.g.DesktopAppvs.WebSite)

Deployment

PCs

Client-sideSoftwareServer-sideSoftware

TheCloud/Internet/

LocalNetwork

WebServers

DatabaseServers

HTMLYourWebSite/App

YourDatabase

YourDesktopApp

ViewingyourWebAppinaWebBrowser

YourWebServices

DeploymentofdifferenttypesofApps

DesktopApps

WebApps

ServicesandApplications

MobileAppsDatabases WebServers

CloudServices

DesktopApps

WebApps

MobileApps

DeploymentondifferentPlatforms

Developer:NeedtoDeploytoAppStores.End-user:EasytoinstallfromanAppstore.Updatescanbeinstalledautomatically.

Developer:Needtocreate.ExefilesandInstallation/SetuppackagesanddistributethesetotheEnd-users.End-user:Installationisnotalwayseasy,especiallyfornon-experienceusers.Developer:NeedtoDeployto

WebServers.End-user:Don'tneedtoinstallanything,availablefromaWebBrowser.Latestversionalwaysavailablewithoutanyinstallation.

DeveloperEnvironmentvs.ProductionEnvironment

SQLServer

VisualStudio

DeveloperPC Customer(Production)Environment

CustomerPCs

Server(WindowsServer2012/14,..)

SQLServer

Softwareas.exefiles

IIS

Windows8,10WindowsXP,7,8,10

Note!CustomerdonthaveVisualStudioontheirPCs

CreateDatabaseSQLScripts

ERwin SQLServer

GenerateScript

VisualStudioTeamServices

VisualStudio

LocalDevelopment

PC

SourceCodeControl(SCC)

Design

SaveScript(Tables.sql)inVSTS

EachDevelopercanthendownloadthelatestDBScriptfromVSTSandExecutetheSQLScriptinSQLServerManagementStudiooneachlocalDevelopmentPC

Tables.sql

DatabaseAdministrator(DBA) Software

Developer

CreateScriptsfor“DefaultData”,Views,StoredProcedures,Triggers,etc

TheDBAisinchargeofmainteningtheDBScriptthatcanbeusedontheDeveloperPCsandlaterdeployedintheCustomerEnvironment

SavetheminseparateSQLfilesanduploadthemtotheDBfolderinVSTS

WebDeployment

Hans-PetterHalvorsen,M.Sc.

DeploymentofWebSites,WebApps,WebServices,etc.

WebDeployment

PCswithWebBrowsers

ClientsServers

TheCloud/Internet/

LocalNetwork

WebServers

DatabaseServers

HTML

HTML

DatabasePlatforms

WebServerPlatforms

Thetermwebservercanrefertoeitherthehardware(thecomputer)orthesoftware(thecomputerapplication)thathelpstodeliverwebcontentthatcanbeaccessedthroughtheInternet.Themostcommonuseofwebserversistohostwebsites,butthereareotherusessuchasgaming,datastorageorrunningenterpriseapplications.

InternetInformationServices

ASP.NETCross-platform:UNIX,Linux,OSX,Windows,...

(pronounced"enginex")- Hasbecomeverypopularlately

PHP

MicrosoftAzure

Hans-PetterHalvorsen,M.Sc.

MicrosoftAzure

SQLDatabases

VirtualMachines

CloudServices App

Services

Storage

“WindowsrunningintheCloud”

DeploymenttoMicrosoftAzureMicrosoftAzurePortal(https://portal.azure.com)

HostingofWebSites(ASP.NETWebPages)

YourSQLServerDatabase

CreateSQLServerDatabaseinMicrosoftAzure

ConnecttotheMicrosoftAzureSQLServerfromyourlocalSQLManagementStudio

1. YouconnecttotheMicrosoftAzureSQLServerDatabaseinthesamewayasyouconnecttoalocalDatabase

2. Note!YouNeedtoConfigureFirewallinMicrosoftAzure

3. CreateTables,Views,StoredProcedures,etc.->usingaSQLScriptisrecommended!

CreateAppServicefromAzurePortal

<MyWebApp>.azurewebsites.net

DeploytheWebProjecttotheAzureWebAppfromVisualStudio

WebAppDeploymentExample

Hans-PetterHalvorsen,M.Sc.

Example1

ASP.NETWebApp

Database

DatabaseThisisourExampleDatabase(SQLServerDesigner)

CreateDatabaseinMicrosoftAzurePortal

ConnecttoMicrosoftAzureDatabasefromLocalComputer

DatabaseSinceallnecessaryTables,Views,StoredProcedures,etc.alreadyarestoredinonesingleSQLFileitiseasytoDeploytheDatabasetotheMicrosoftAzureDatabase

DeployWebApp

CreateAppService

DeploytheWebProjecttotheAzureWebAppfromVisualStudio

Web.config• SincetheConnectionStringalreadyisstoredinWeb.Config,itiseasytochangetheConnectionstringaccordingtotheMicrosoftAzureDatabase

DefaultDocuments

Finished

StartPage:Index.aspx ->Thispageagainredirectsto/WebPages/Books.aspx

DataloggingandMonitoringExample

Hans-PetterHalvorsen,M.Sc.

Example2

https://www.youtube.com/watch?v=xAZm--SshKw

SystemOverview

DataLogging DataMonitoring

DAQ

DAQmxDriver

TheCloud

DataAnalysis Trigger(s)

Database

Database

CreateDatabaseinMicrosoftAzurePortal

ConnecttoMicrosoftAzureDatabasefromLocalComputer

DatabaseSinceallnecessaryTables,Views,StoredProcedures,etc.alreadyarestoredinonesingleSQLFileitiseasytoDeploytheDatabasetotheMicrosoftAzureDatabase

DataloggingAppStoreMeasurementDataintheCloud(MicrosoftAzure)

LabVIEWHMIExample

TemperatureData:30

Exit

0

DataloggingApp

TheTemperatureDatafromtheTC-01DAQdeviceshouldbestoredintheDatabase.

Chart

Chart

Button

Time

SensorName MeasurementValue

ConnectstoMicrosoftAzure Database

MonitoringAppGettingMeasurementandAnalysisDatafromtheCloud(MicrosoftAzure)

VisualStudioHMIExample

Date&Time Value[C] Value[F]2016.03.2214:45 22 71.6

... ... ...

... ... ...

... ... ...

TemperatureData:

0

30

DataMonitoringApp

Average:

Min:

Max:

22

10

26

YoushouldgettheDatafromtheDatabase

TextBoxesLabels

DataGridView

Chart

TypicallyyougetDatafromtheDatabaseusingViewsand/orStoredProcedures

Time

App.config• SincetheConnectionStringalreadyisstoredinApp.Config,itiseasytochangetheConnectionstringaccordingtotheMicrosoftAzureDatabase

Hans-PetterHalvorsen,M.Sc.

UniversityCollegeofSoutheastNorwaywww.usn.no

E-mail:[email protected]:http://home.hit.no/~hansha/