windows azure compute myth busters€¦ · windows compute emulator • voraussetzungen windows...

56

Upload: others

Post on 02-Aug-2020

34 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe
Page 2: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Windows Azure Compute Myth

Busters

Rainer Stropek

software architects gmbh

[email protected]

Page 4: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Vorkenntnisse und Ziele

• Vorkenntnisse:

● Schon einmal von Azure gehört

• Ziele:

● Was bedeutet Azure für Entwickler?

● Was bleibt gleich, was ist neu?

● Tipps, Tricks und typische Fallen

• Kein Ziel:

● Marketingsession

Page 5: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Um mit Cloud Computing zu starten,

muss ich viel lernen – keine Zeit dafür!

Common Creative License

Source: http://www.flickr.com/photos/fornal/394740182/

Page 6: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Just another

Windows Server

Just another

IIS

Just another

SQL Server

Just another

Server Cluster

Just another

Web Farm

Just another

SQL Server Cluster

Page 7: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

TIME

IT C

AP

AC

ITY

tatsächliche

Last

Ressourcen

erwartete Last

bestimmt Umsatz

bestimmen Kosten

Page 8: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Intelligent Network Load Balancer

Stateless “Worker” Machines

Stateless Web and/or Application Servers

Async Activation

Network Activation

Shared

Filesystem

Partitioned

RDBMS

Key/Value

Datastores

State

Tier Queues

Page 9: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Clients Webserver DB-Server

http GET (Form)

http POST (Reg.)

Events

externer

Partner

Save Reg.

Confirm.

Doc.

http GET (Conf.)

Conf.

Page 10: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe
Page 11: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Clients Webserver

Reg.

Queue

Table

Worker

Blob Extern DB

Page 12: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo

Load-Test auf verteilter Architektur

http://www.loadstorm.com

Page 13: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Service, Rollen, Instanzen

Status Svc.

HTTP

Customer Website WebDAV Thumbnail Worker

Port 80

HTTP

Port 8090

HTTP

S XL M

Height

Width 500 MB

200 px

200 px

Service Definition Service Configuration

Page 14: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo Walkthrough:

Konfigurationseinstellungen

.cscfg und .csdef statt web.config

Page 15: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Com

mo

n C

rea

tive L

ice

nse

So

urc

e:

htt

p:/

/ww

w.f

lickr.

co

m/p

ho

tos/a

lan

cle

ave

r/2

63

88

83

65

0/

In Azure zahlt man dauernd,

selbst während der Entwicklung!

Page 16: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Windows Compute Emulator

• Windows Azure Compute Emulator aka DevFabric

● Teil des Windows Azure SDK kostenlos

• Simuliert Windows Azure während des

Entwicklungsprozesses

● Zum Debugging

● Zur Kostenreduktion

● Für Offline-Szenarien

• Emulator ≠ Windows Azure

● Emulator kann auf lokale Ressourcen zugreifen

● Lokale Ressourcen stehen in der Cloud eventuell nicht zur Verfügung

● Test im Emulator ersetzt Test in der echten Cloud nicht!

Page 17: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Windows Compute Emulator

• Voraussetzungen

● Windows Azure SDK und Azure-Tools für VS

● Visual Studio 2010

● IIS und SQL Server 2008 R2 (siehe auch MSDN)

• Installation

● Installation von SDK und Tools

● Emulator konfigurieren (siehe auch MSDN)

• Emulatoren unterstützen nur lokalen Zugriff

● Tipp: Verschiedene Blogartikel beschreiben, wie Emulatoren über das

Netzwerk zum Testen verfügbar gemacht werden können (z. B.

Emmanuel's Blog)

Page 18: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo

Windows Compute Emulator

Lokale Entwicklungsumgebung für die Cloud

Page 19: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Cloud Computing ist auch nichts anderes als Hosting – alter Hut!

Com

mon C

reative L

icense

Sourc

e:

htt

p:/

/ww

w.f

lickr.

com

/photo

s/9

6051197@

N00/1

85669

05

7/

Page 20: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

LB

LB

D

N

S

Service Deployment

Your Service

Fabric Controller

Webportal (API)

Service Model Service Service

DNS config

Page 21: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

LB

LB

D

N

S

Service Scaling

Your Service

Fabric Controller

Webportal (API)

Service

Service

Service

Model

Service

Service

Service Service

Service

Page 22: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

LB

LB

D

N

S

Service Monitoring & Recovery

Your Service

Fabric Controller

Webportal (API)

Service

Service

Service

Model

Service

Page 23: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo

Webfarm

Windows Azure Compute Emulator

Page 24: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Cloud Computing ist ein Sicherheitsrisiko!

Com

mon C

reative L

icense

Sourc

e:

htt

p:/

/ww

w.f

lickr.

com

/photo

s/c

olo

dio

/2462089085/

Page 25: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Informationssicherheit

• Datenschutz

● Gesetzliche Rahmenbedingungen beachten

● Mögliche Lösung: Windows Azure Connect

• Datensicherheit

● In der Cloud möglicherweise deutlich besser

● Vertraulichkeit – Zertifikate, Verschlüsselung etc.

● Verfügbarkeit – Cluster, Ausfallszenarien etc.

● Physischer Zugriffsschutz

Page 26: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Windows Azure Connect (in CTP)

Windows Azure

On-Premise

„DMZ in der

Cloud” (VPN)

Firewall/Load

Balancer

An Details interessiert?

http://msdn.microsoft.com/en-us/gg502176

Page 27: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo

Windows Azure Connect

Aus der Cloud auf on-premise Ressourcen zugreifen

Page 28: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Das Deployment in Azure ist so kompliziert –

nicht verwendbar!

Common Creative License

Source: http://www.flickr.com/photos/visualpanic/2312649191/

Page 29: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Trennung in „Production“ und „Staging“

• Production

● http://<myapp>.cloudapp.net

• Staging

● http://<guid>.cloudapp.net

● Zum Testen und zum Vorbereiten einer neuen Version

Page 30: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

• In-Place Update

● Kann auf Production und Staging angewandt werden

● Servicemodell darf sich nicht unterscheiden (z. B. gleiche Anzahl

Rollen)

• VIP Swap (Virtual IP Swap)

● Schaltet um zwischen Prod ↔ Staging

● Servicemodell darf sich ändern; Endpoints müssen ident bleiben

Typen von Deployments

Page 31: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Deployment mit VS Authentifizierung

mit Zertifikat

Deployment über

Azure Store

Deployment-

prozess in VS

Page 32: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Deployment über das Portal

http://windows.azure.com

Page 33: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

VIP Swap

• Prod enthält Vx

• Deploy Vnext nach Staging

● Staging-Umgebung mit Staging-DB verbinden

● Finale QS

● Staging-Umgebung mit Prod-DB verbinden

● Finale QS, Warm-up

• VIP Swap durchführen, jetzt ist Vnext online

• Staging stoppen und löschen

Page 34: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo

VIP Swap

Prod ↔ Staging

Page 35: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Windows Azure SDK-Deployment-Tools

• CSPack.exe ● Deploymentpaket für Emulator oder Azure-Deployment

● Wird typischerweise mit Visual Studio gemacht

• CSRun.exe ● Pakete in Emulator deployen und starten

● Wird typischerweise mit Visual Studio gemacht

● Tipp: Tester können CSRun verwenden, um Anwendungen ohne VS und Source-Code zu starten

• CSUpload.exe – VHDs in Azure laden

• CSManage.exe ● Tool (Sample) zum Automatisieren von Azure-Servicetätigkeiten

● Beispiele: Deployment, Auto-Scaling etc.

Page 36: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo

Anwendung mit CSRun starten

Automatisches Deployment in den Emulator

Page 37: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Für die Profis …

• Generische Rollen, die Assemblies zur Laufzeit z. B. aus dem Blob-Store nachladen

• Möglich mit Web- und Worker-Rolle ● Relativ einfach: Worker-Rolle

● Relativ schwierig: Web-Rolle

• Tipp: eigene AppDomains zum leichteren Entladen der Assemblies

• Weitere Literatur ● Blogartikel von Rainer Stropek

● AppDomain-Klasse

● Assembly-Klasse

Page 38: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Entweder alles in Azure oder nichts –

viel zu hohes Risiko!

Common Creative License

Source: http://www.flickr.com/photos/sk8geek/5501331984/

Page 39: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

„Design to Cost“

• Suchen und nutzen Sie Quick Wins

• Jede Komponente kann einzeln genutzt werden ● Blob-Store für Backup

● Table-Store für Logging

● Queues und AppFabric zur Anwendungsintegration

● Webserver mit On-Premise-DB

● SQL Azure zur Datenintegration über Standorte hinweg

● …

• Kreatives Kombinieren der einzelnen Komponenten ist gefragt

Page 40: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Azure ist proprietär,

nur Windows und .NET!

Common Creative License

Source: http://www.flickr.com/photos/jasonp80/3844987099/

Page 41: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

„Just another IIS“

• Z. B. PHP über FastCGI

• Auch Unterstützung für

Worker-Rollen

• PHP Commandline

Deployment Tool

<system.webServer> <fastCgi> <application fullPath="%RoleRoot%\php\php-cgi.exe"/> </fastCgi> </system.webServer>

<add name="PHP via FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="%RoleRoot%\php\php-cgi.exe" resourceType="Unspecified" />

Windows Azure Command-line Tools for PHP

PHP

Core

Source

Code

Extensions

Page 42: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

• Wrapper Libraries für REST-Services

• Hilfsklassen für Azure-Storage

• SQL Server-Treiber, Diagnostics

• AppFabric-SDK

PHP-SDK für Windows Azure

require_once 'Microsoft/WindowsAzure/Storage/Blob.php'; $storageClient = new Microsoft_WindowsAzure_Storage_Blob(); $result = $storageClient->putBlob('testcontainer', 'example.txt', '/home/maarten/example.txt');

Page 43: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

In Azure kann man

keine Drittkomponenten verwenden!

Com

mon C

reative L

icense

Sourc

e:

htt

p:/

/ww

w.f

lickr.

com

/photo

s/t

wo

-wro

ngs/2

05467442/

Page 45: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Startup Scripts

<ServiceDefinition […]>

<WebRole name="SampleWebApp">

<Startup>

<Task commandLine="Register.cmd"

executionContext="elevated"

taskType="simple" />

</Startup>

</WebRole>

</ServiceDefinition>

Page 46: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo

Unmanaged Code in Azure

Elevated Startup Tasks

Page 47: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Wann VM-Rolle?

• Lange laufende Installationsroutinen

• Installationsroutinen, die nicht automatisiert

werden können

● Manueller Eingriff notwendig

• Instabile Installationsroutinen

Page 48: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Die VM-Rolle ist nicht …

• … Infrastructure as a Service

• … eine Plattform für Servervirtualisierung

• … eine Plattform für Desktopvirtualisierung

Page 49: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Com

mon C

reative L

icense

Sourc

e:

htt

p:/

/ww

w.f

lickr.

com

/photo

s/g

host_

of_

kuji/

395419629/

Azure ist ein schwarzes Loch –

man sieht nicht hinein!

Page 50: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Monitoring On-Premise vs. Cloud

On-Premise

• Statische Umgebung

• Gut bekannte Umgebung

• Meist wenige Server

Cloud

• Dynamische Umgebung

• Viele Instanzen, elastisch

• Viele Knoten

Page 51: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

RDP vs. Diagnostics

• Remote Access mit RDP

● Während der Entwicklung

● Troubleshooting in speziellen Situationen (z. B. Speicher- oder CPU-Bedarf)

• Diagnostics

● Laufendes Monitoring

● Langzeitstatistiken („Telemetrie”)

● Überwachung des Gesamtsystems steht im Vordergrund

Page 52: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Azure Diagnostics

Role

Role Instance

Diagnostic

Monitor

Local Directory Storage

Request Upload

Windows

Azure

Storage

Scheduled or On-Demand

Upload

Windows Data

Sources

Image Source: Microsoft PDC 09, Session SVC15, Matthew Kerner

Page 53: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Mission Impossible?

Page 54: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

demo

RDP in der Worker-Rolle

Import OpenStreetMap in SQL Azure

Page 55: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Top-10-Tipps für den Weg in Azure

1. Beste Voraussetzung: 100 % Managed Code

2. Design To Cost (DTC)

3. PaaS statt IaaS

4. Scale out, not up

5. Asynchrone Verarbeitung

6. Optimieren ist sexy!

7. Load Testing

8. Multi Tenancy

9. Skaleneffekte durch Automatisieren und Standardisieren nutzen

10. Lernen, lernen, lernen

Page 56: Windows Azure Compute Myth Busters€¦ · Windows Compute Emulator • Voraussetzungen Windows Azure SDK und Azure-Tools für VS Visual Studio 2010 IIS und SQL Server 2008 R2 (siehe

Your Feedback is Important

Please fill out a session evaluation form.

Thank you!