website s azure websites is a robust cloud platform for developing, testing, and running web apps....

Post on 12-Jan-2016

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Websites

Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET, Java, PHP and Node.js.—then deploy them to a load-balanced platform that scales automatically, can be secured with Active Directory, and connects seamlessly to your on-premises resources. Azure Websites handles platform chores like availability, maintenance, and patching, so you have more time for your apps.

Deep Dive into Hidden Gems, Tips and Tricks for Azure Websites

Yochay Kiriatyyochay@microsoft.com@yochay

DEV316

Agenda

Get to know some awesome Azure Websites featuresGet you excited by Azure Websites Get to know how to debug issue with Websties

Demo

Continues Deployment & Integration

Azure Websites Is Awesome!

Deployment Options• The Basic• FTP• WebDeploy

• Source Control / Continues Deployment

• VS Online (git/tfs)• GitHub• BitBucket

• Cool• Dropbox• Debug Console

Deployment

DeveloperWebsit

e

Continuous Integration

GitHub

Website

Developer 1

Developer 2

CI with Post Deployment Hook

GitHub

Website

Phone

Developer 1

Developer 2

• Notification whenever a deployment completes using web hooks.

• Payload contains details about the deployment.

• Integration with Zapier provides email/sms/… on deployment complete.

Deployment Notification

Azure Website as a Dev Machine

Developer 1

Developer 2

GitHub

Visual Studio Online

Developer 3

Website

Phone

• Edit files in the browser• File explorer• Auto complete• Intellisense

• Perform git operations• Test it • go live

Visual Studio Online (codename Monaco)

• Test your website on before pushing it to production

• Get rid of “Cold Start”

Staged Deployment

Staging

Staging

Staging

Staging

Staged Deployment

DeveloperProduction

Swap

Staging

Staged Deployment with CI

Developer 1

Staging

Production

Swap

Developer 2

GitHub

Demo

Stage Deployment

Testing in Prod.

100%

80%

20%

Testing in Production with Staged Deployment & CI

Developer 1Staging Production

Swap

Developer 2

GitHub Stage Branch

Test

Developer 1

Developer 2

GitHub Test Branch

FI / RI

HO

T F

IX

95% of live traffic

0.5% of live traffic

4.5 % of live traffic

Demo

Testing in Production

• Used as a background task• Runs the provided script• Types of scripts supported: .cmd, .bat, .ps1, .exe, .js, .sh, .py and .php

• 2 Different Types• Continuous• Process that should always run (like a Windows service)

• Triggered• Process with finite execution time triggered externally• On Demand• Scheduled

WebJobs

Demo

Deploying WebJob as part of your Website

• Uploaded as zip to the Azure Portal• Or by placing WebJob binaries in right place• Under: wwwroot\App_Data\jobs\{continuous/triggered}\{job name}

• VS supports adding WebJobs as part of the Website• Right click on AppData folder Add WebJob

WebJobs Deployment

Demo

Project Kudu

We LoveAzure Websites

• Each Azure Website has a companion scm site• foo.azurewebsites.net https://foo.scm.azurewebsites.net

• Authentication• oAuth (using Microsoft account same as the Azure Portal)• Basic auth (for automation scenarios)

• Runs in the same context as the main site• Used mainly for admin tools• But also for things like WebJobs

SCM Site

• Hosted on the scm site• Engine behind• git/mercurial/dropbox deployment• WebJobs• Site Extensions management• Process Explorer and more…

• Open source• https://github.com/projectkudu/kudu

Kudu

Demo

Site Extensions - management extensibility for your websites

• Web apps hosted on the scm site with all it’s benefits• Authentication – Only site owner can access it• Has same environment as main site – files / app settings / connection

strings

• Kudu is a site extension• Gallery• Install / Uninstall site extensions• Some are built-in some not• Install your own private extensions• Publish your creations to https://www.siteextensions.net for everyone

to enjoy

Site Extensions

Demo

Logging, Tracing, and Log Browser

• Http Logs• Can be stored to file system or blob storage

• Application Logs• Use System.Diagnostics.Trace for .NET (console.log for node.js)• Can be stored to file system / table storage / blob storage

• More• Detailed error messages and freb• Application Insights

Site Analytics

Demo

Automatic Site Healing

• Induced worker process (w3wp) recycle• Setup via Web.config (API coming real soon)• Based on triggers

• Request count – X number of request over given period of time• Slow requests – (X) requests take over (Y) second, during (Z) second (if I get more

than 20 requests, each, take over 45 second in a 2 minutes window)• HTTP Status Code – (X) requests with status code (Y) during (Z) second (if the

websites return more than 20 HTTP 500 in a 1 minute window)• Memory limits – recycle a process when memory is over X

• Take Action: Recycle, take memory dump, run exe, etc

• http://azure.microsoft.com/blog/2014/02/06/auto-healing-windows-azure-web-sites/

Auto-Heal

Summary

Continues deployment and integration with WebHooksStaging and Testing in Production WebJobsProject KuduSite ExtensionsAuto-HealMany more features – follow the team blog(s) & twitter

Get Startedhttp://{you}.azurewebsites.net

Related contentDEV211 – What’s New with Azure Websites (Yochay Kiriaty)DEV316 Deep Dive into Hidden Gems, Tips and Tricks for Azure Websites (Yochay Kiriaty)DEV320 – Building Web Application at Scale with Azure Websites (James Carpinter)

Thursday 12:30 – 1:30pm @ Expert ZoneThursday 5:30 – 6:30pm @ HUB (Happy hour ) yochay@microsoft.com / @yochayk

Resources

TechNet & MSDN FlashSubscribe to our fortnightly newsletter

http://aka.ms/technetnz http://aka.ms/msdnnz

TechNet Virtual LabsFree Virtual Hands-on Labs

http://aka.ms/ch9nz

Microsoft Virtual AcademyFree Online Learning

http://aka.ms/mva http://aka.ms/technetlabs

Sessions on Demand

Complete your session evaluation now and win!

© 2014 Microsoft Corporation. All rights reserved.Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

top related