Building services running on Microsoft Azure

34
Building Services on Microsoft Azure

description

this is the slides from the talk i gave at DevGeekWeek2014 further details are in my blog: http://blogs.microsoft.co.il/iblogger/2014/06/25/devgeekweek-2014-slides-and-demos/

Transcript of Building services running on Microsoft Azure

Page 1: Building services running on Microsoft Azure

Building Services on Microsoft Azure

Page 2: Building services running on Microsoft Azure

About Me

• Software architect, consultant and instructor• Software Engineering Lecturer @ Ruppin Academic Center• Technology addict• .NET and Native Windows Programming

@[email protected]://www.TamirDresher.com.

Page 3: Building services running on Microsoft Azure

Agenda

• Why Cloud?

• Azure Cloud

• Services, Roles and instances

• Packaging and Deployment

• Testing and Debugging

• Configurations

Page 4: Building services running on Microsoft Azure

Why Cloud?

A Game Changing Technology•Infinite shared resources & services

– Infrastructure is not a limiting factor– No need to equip for peak-load requirements

•Elasticity on demand– Anytime, anywhere

•Efficient scalability and high availability•Suitable pricing models

– Pay for what you use

Page 5: Building services running on Microsoft Azure

Cloud Architecture Challenges5

hardware

software Acquisition cost is 10% of IT spend

facilities

power/cooling

IT labor

support

network

security

maintenance

management tools

Disaster Recovery

backup

Operating cost is 90%

of IT spendSource: IDC

Page 6: Building services running on Microsoft Azure

Cloud Computing

Evolution of Computing - The Next (Current) Big Thing•Virtualization and Abstraction

– Details are abstracted from consumers• Reduces complexity

•Not necessarily the Internet, can be on premises– Private cloud

•Automation, Monitoring, Deployment– Reduce cost, shift risk, shorten time-to-market, focus on business functionality

Page 7: Building services running on Microsoft Azure

The Benefits of the Cloud

cheap, on-demand capacity

Cloud Architecture Challenges

= Managed for you

StandaloneServers

IaaS PaaS SaaS

Applications

Runtimes

Database

Operating System

Virtualization

Server

Storage

Networking

We Are

Here

Page 8: Building services running on Microsoft Azure

• Weddings are a tough thing to manage– Invitations, RSVPs, received greetings, etc.

He and

She are

getting

Married

Our For Today

Page 9: Building services running on Microsoft Azure

• Enter “Best Man”– Manage your weddings– Invite your friends and family– Receive RSVP notifications– Receive greetings including wedding images

from friends

Our For Today

Page 10: Building services running on Microsoft Azure

“Best Man” Conceptual Architecture

WeddingsWeddings InvitationsInvitations GreetingsGreetings ImagesImages

Page 11: Building services running on Microsoft Azure

RUNNING LOCAL

Page 12: Building services running on Microsoft Azure

Solution Structure

• WebApi Controllers• Repositories Interfaces• Services Interfaces

Page 13: Building services running on Microsoft Azure

Solution Structure

• Repositories Implementations• Services Implementations• Domain Classes - POCO

Page 14: Building services running on Microsoft Azure

Solution Structure

• Data Transfer Objects (DTOs)

Page 15: Building services running on Microsoft Azure

Solution Structure

• WPF Client Application

Page 16: Building services running on Microsoft Azure

Solution Structure

• ASP.NET Host Application

Page 17: Building services running on Microsoft Azure

Developing with Azure Cloud

• Azure SDK – http://azure.microsoft.com/en-us/downloads/

• Azure Nuget Packages - http://www.nuget.org/profiles/azure-sdk/

• Azure API is RESTfulMethod Request URI

GET https://management.core.windows.net/<subscription-id>/services/hostedservices

Page 18: Building services running on Microsoft Azure

“Best Man” Conceptual Architecture - Cloud

QueueQueue

WeddingsWeddings InvitationsInvitations GreetingsGreetings ImagesImages

Page 19: Building services running on Microsoft Azure

Scaling the “Best Man” Application

QueueQueue

WeddingsWeddings InvitationsInvitations GreetingsGreetings ImagesImages

Page 20: Building services running on Microsoft Azure

Roles

• Cloud Services are represented by roles– Worker Role

• General Application that will run in the cloud• Ideal for long running background processing

– Web Role• Customized for web application programming as

supported by IIS 7 and ASP.NET. • IIS setup is done for you.

Page 21: Building services running on Microsoft Azure

Roles and Instances

Role D

efinition

Development Provisioning Runtime

Page 22: Building services running on Microsoft Azure

WEB ROLE

Roles and Instances

WORKER ROLE

VM1 VM2 VM3 VM4

VM5 VM6 VM7 VM8

Page 23: Building services running on Microsoft Azure

1. Write an amazing service

2. Service Definition

3. Service Configuration

4. Package

Creating azure service

.csdef

cscfg

Page 24: Building services running on Microsoft Azure

CREATING CLOUD PROJECT

Page 25: Building services running on Microsoft Azure

1. Write an amazing service

2. Service Definition

3. Service Configuration

4. Package -

Creating azure service

ZIP

Code + *.csdefZIP ()

Encrypt ()

cspkg

.csdef

cscfg

Page 26: Building services running on Microsoft Azure

PACKAGING AND DEPLOYING

Page 27: Building services running on Microsoft Azure

Working Local

• Running on the cloud costs you

• Azure Compute and Storage Emulator Lets you test your solution locally

Page 28: Building services running on Microsoft Azure

DEBUGGING

Page 29: Building services running on Microsoft Azure

Fault and Update Domains

Page 30: Building services running on Microsoft Azure

1. RDP and update

2. Redploy

3. Service Configuration

Configuration changes

::

web.config

web.config

web.config

Page 31: Building services running on Microsoft Azure

CHANGING CONFIGURATIONS

Page 32: Building services running on Microsoft Azure

Summary

• Azure Cloud

• Services, Roles and instances

• Packaging and Deployment

• Testing and Debugging

• Configurations

Page 33: Building services running on Microsoft Azure

Whats next

• Azure Websites

• Azure Tables

• Authentication and Authorization

• Monitoring

• Automation

Page 34: Building services running on Microsoft Azure