24
Windows Azure Cloud Services Anton Boyko .NET developer

Windows Azure Cloud Services Anton Boyko.NET developer

Embed Size (px)

Citation preview

Page 1: Windows Azure Cloud Services Anton Boyko.NET developer

Windows AzureCloud Services

Anton Boyko.NET developer

Page 2: Windows Azure Cloud Services Anton Boyko.NET developer

• A brief overview of Windows Azure Compute Services and application scenarios

• Windows Azure Cloud Services basics

• Windows Azure Cloud Service lifecycle

• Windows Azure Cloud Services communication capabilities

Agenda

Page 3: Windows Azure Cloud Services Anton Boyko.NET developer

Azure Compute

Page 4: Windows Azure Cloud Services Anton Boyko.NET developer

ManagementComplexity

Azure compute

Web Sites

Cloud Services Virtual Machines

ControlFlexibility

Page 5: Windows Azure Cloud Services Anton Boyko.NET developer

Your Datacenter

Virtualization

O/S

Hardware

Network

Data

Applications

Firewall

Web Sites

Applications

Data

Cloud Services

Applications

Firewall Rules

Data

Virtual Network

Virtual Machines

Virtual Network

Data

Applications

Firewall Rules

O/S

Focus on the Application

Windows Azure

Page 6: Windows Azure Cloud Services Anton Boyko.NET developer

Popular open source appsLaunch a professional looking site with a few clicks using apps like WordPress, Joomla!, Drupal, DotNetNuke and Umbraco

Continuous developmentDeploy directly from your source code repository, using Git or Team Foundation Service.

Modern web appsPerfect if your app consists of client side markup and scripting, server side scripting and a database. Powerful capability to scale out and up as needed.

Application ScenariosWeb Sites

Apps that require advanced administrationCloud-based applications that require admin access, remote desktop access or elevated permissions

Cloud Services

Multi-tier applicationsCloud-based applications that separate application logic into multiple tiers (i.e. caching middle tier, asynchronous background processes like order processing) using both Web and Worker Roles

Apps that require advanced networkingCloud-based applications that require network isolation for use with Windows Azure Connect or Windows Azure Virtual Network

Porting existing line of business appsChoose an image from the library or upload your own VHD.

Enterprise server applicationsRun your existing enterprise applications in the cloud, such as SQL Server, SharePoint Server or Active Directory.

Windows or Linux operating system Support for Windows Server, along with community and commercial versions of Linux. Connect virtual machines with cloud services to take full advantage of PaaS services.

Virtual Machines

Page 7: Windows Azure Cloud Services Anton Boyko.NET developer

Cloud Service Overview

Page 8: Windows Azure Cloud Services Anton Boyko.NET developer

What is a Cloud Service?

A collection of related service roles

Web Role Worker Role

Page 9: Windows Azure Cloud Services Anton Boyko.NET developer

What Can It Run?

Page 10: Windows Azure Cloud Services Anton Boyko.NET developer

Web Role and Worker Role

Windows Server (+ IIS 7, 7.5 or IIS 8.0* for Web Role)ASP.NET 3.5 SP1, 4.0 or 4.5* – 64bitHostsWebforms or MVCFastCGI applications (e.g. PHP)

Http(s)Web/Worker HybridCan optionally implement RoleEntryPoint

*for Windows Server 2012

Page 11: Windows Azure Cloud Services Anton Boyko.NET developer

Worker Role Patterns

Queue Polling WorkerPush and Pop Messages within while(true) loopE.g. Map/Reduce pattern, background image processing

Listening Worker RoleCreate TcpListener or WCF Service HostE.g. Run a .NET SMTP server or WCF Service

External Process Worker RoleOnStart or Run method executes Process.Start()Startup Task installs or executes background/foreground processCustom Role Entry Point (executable or .Net assembly)E.g. Run a database server, web server, distributed cache

Page 12: Windows Azure Cloud Services Anton Boyko.NET developer

Roles and Instances

At runtime each Role will execute on one or more instances A role instance is a set of code, configuration, and local data, deployed in a dedicated VM

Roles are defined in a Hosted ServiceA role definition specifies:Virtual machine sizeCommunication endpointsLocal storage resourcesetc.

Page 13: Windows Azure Cloud Services Anton Boyko.NET developer

Roles and Instances

Instance

Role

Environment

Deployment (anton.cloudapp.net)

Hosted Service

Production

Web Role 1

Web 1 Instance

0

Web 1 Instance

1

Web 1 Instance

2

Web Role 2

Web 2 Instance

0

Worker Role 1

Worker 1 Instance

0

Worker 1 Instance

1

Staging

6 × VM

Page 14: Windows Azure Cloud Services Anton Boyko.NET developer

Cloud Service Availability

Page 15: Windows Azure Cloud Services Anton Boyko.NET developer

Fault Domains

99.95% Uptime GuaranteeRequires 2 or more instance per role

Role instance are isolated by fault domainFault domains isolate VMsFault domains provide redundancyAt least two fault domains per role

Page 16: Windows Azure Cloud Services Anton Boyko.NET developer

Roles and InstancesExample role with nine virtual machines distributed across three fault domains

ROLE

VM1 VM3

VM5 VM8

VM2 VM4

VM6 VM9

VM6 VM9

Page 17: Windows Azure Cloud Services Anton Boyko.NET developer

Fault Domain

Rack

Fault and Update DomainsFault Domain

Rack

INSTANCE

INSTANCE

INSTANCE

INSTANCE

INSTANCE

INSTANCE

INSTANCE

INSTANCE

UD #1

UD #1

UD #2

UD #2

Page 18: Windows Azure Cloud Services Anton Boyko.NET developer

Cloud Service Lifecycle

Page 19: Windows Azure Cloud Services Anton Boyko.NET developer

Understanding Packaging and ConfigWindows Azure Services are described by two artifacts:Service Definition (*.csdef)Service Configuration (*.cscfg)

Your code is zipped and packaged with definition (*.cspkg)Encrypted(Zipped(Code + *.csdef)) == *.cspkg

Windows Azure consumes just (*.cspkg + *.cscfg)

Page 20: Windows Azure Cloud Services Anton Boyko.NET developer

Role Lifecycle

All roles may extend RoleEntryPointRoles report status via RoleEnvironment

StatusCheck

StatusCheck

StatusCheck

Stopping

METHODS EVENTS STATUS

Page 21: Windows Azure Cloud Services Anton Boyko.NET developer

Upload to Windows Azure

Packaging & Deployment

Microsoft Visual Studio

Web Role

Worker Role

Page 22: Windows Azure Cloud Services Anton Boyko.NET developer

Cloud ServiceCommunication

Page 23: Windows Azure Cloud Services Anton Boyko.NET developer

Cloud Service – inter-role communicationInput Endpoint• Load-balanced• HTTP/HTTPS/TCP/UDP

Internal Endpoint• Not load-balanced• HTTP/TCP/UDP/ANY

Instance Input Endpoint• Route traffic to specific instance based on port• TCP/UPD

Other options• Queue• Storage• Database• …

Page 24: Windows Azure Cloud Services Anton Boyko.NET developer

Azure Cloud ServicesDemo