Sie sind auf Seite 1von 36

Dezvoltarea

aplicaiilor de tip
Cloud
COMPUTE

s.l. dr. ing. Daniel Iercan

Ce este Windows Azure


Compute?

Website

DEMO - website
create a new web site
deploy an ASP.NET MVC application
explore various configurations

retrieve application settings


enable diagnostic
simulate error

download diagnostics using azure command

Cloud Services

Cloud Services
General purpose host for executing code or an executable
Implement code in a Run method

WORKER ROLE

Similar to a Windows Service

Host your own web server, encoder, etc.


Typically used for background processing

Designed for web sites/services accessible using HTTP

WEB ROLE

Provides all features of a worker role


and IIS
Execute ASP.NET, WCF, PHP, etc.
Can include multiple web sites in the same role
Optionally implement RoleEntryPoint

Ce se poate rula?

Rol vs. Instanta

Roles and Instances

Fault Domain vs. Upgrade


Domain
Fault
Domain #1

Upgrade Domain #1

Upgrade Domain #2

Upgrade Domain #3

Fault
Domain #2

Fault
Domain #3

Instance #1

Instance #2

Instance #3

Fault Domain #2
Fault Domain #1

Upgrade Domain #1

Instance #1

Upgrade Domain #2
Upgrade Domain #3

Instance #2
Instance #3

Role Environment API


RoleEnvironment:
- var settingValue =
RoleEnvironment.GetConfigurationSettingValue("MySetting");
- LocalResource localResource =
RoleEnvironment.GetLocalResource("localStoreTwo");
- RoleEnvironment.CurrentRoleInstance
- RoleEnvironment.Changed += RoleEnvironmentChanged
private void RoleEnvironmentChanged(object sender,
RoleEnvironmentChangedEventArgs e) {}

The High Scale Application Archetype

Out of date see: http://azure.microsoft.com/en-us/pricing/details/cloud-services/

Local Storage

DEMO
create a cloud service only web role with two instances

show fault domain and upgrade domain


Production vs. staging
local storage
remote desktop

create a cloud service with web and worker role, worker role will host a WCF
(share session using Cache)

IaaS

What is Infrastructure as a
Service (IaaS)
hardware as a programmable resource
server
network
storgae

Why use IaaS


hard to predict costs
dynamically allocate hardware resources
agility (develop based on business needs)

fault tolerance

IaaS use scenario


extend storage
use VMs
deploy apps

move existing apps


disaster recovery

IaaS on Windows Azure


Virtual Machines
Blobs
Virtual Networks

Demo create a VM from UI

Disks and Images


VHD (Virtual Hard Disk)

Image read-only template, generic vhd

Discs vhd that can be mounted


os disk 127GB max
data disk max 1TB
local cache (enabled for OS disabled for data disk)

VM Costs
compute cost (includes OS license)
storage costs (space + # of operations)
1cent / 100000 operations

boot Windows Server 2008 = 20000 operations

Demo create an Image

Demo persisted vs. transient


storage

Availability set and load


balance set
machine in the same cloud service can be deployed in separate
availability sets
public endpoints are load balanced (round robin)
VIP and load balancer
port mapping

Import/Export configuration
data to XML
recreate the machine in a different data centre

Virtual network
connect VMs
separate VMs - create subnets
DNS resolve

Extend private network (enterprise network) - Hybrid networks

Azure PowerShell
scripting language that can be used to manage IaaS on Azure
CmdLets
Pipe Operator

.Include
Variables
Scope

http://msdn.microsoft.com/en-us/library/jj156055.aspx

Azure IaaS object model


CloudService
Deployment
Role

NetworkConfigurationSet
InputEndPoin
OSVirtualHardDisk

DataVirtualHardDisks
WindowsProvisioningConfiguratioSet
LinuxProvisioningConfigurationSet

Deploy a VM using PowerShell


http://msdn.microsoft.com/enus/library/windowsazure/jj835085.aspx#bk_Custom

Das könnte Ihnen auch gefallen