42
Websit es 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.

Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Embed Size (px)

Citation preview

Page 1: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

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.

Page 2: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

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

Yochay [email protected]@yochay

DEV316

Page 3: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Agenda

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

Page 4: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Demo

Continues Deployment & Integration

Page 5: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Azure Websites Is Awesome!

Page 6: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Deployment Options• The Basic• FTP• WebDeploy

• Source Control / Continues Deployment

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

• Cool• Dropbox• Debug Console

Page 7: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Deployment

DeveloperWebsit

e

Page 8: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Continuous Integration

GitHub

Website

Developer 1

Developer 2

Page 9: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

CI with Post Deployment Hook

GitHub

Website

Phone

Developer 1

Developer 2

Page 10: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• 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

Page 11: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Azure Website as a Dev Machine

Developer 1

Developer 2

GitHub

Visual Studio Online

Developer 3

Website

Phone

Page 12: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

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

• Perform git operations• Test it • go live

Visual Studio Online (codename Monaco)

Page 13: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• Test your website on before pushing it to production

• Get rid of “Cold Start”

Staged Deployment

Page 14: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Staging

Page 15: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Staging

Page 16: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Staging

Page 17: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Staging

Page 18: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Staged Deployment

DeveloperProduction

Swap

Staging

Page 19: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Staged Deployment with CI

Developer 1

Staging

Production

Swap

Developer 2

GitHub

Page 20: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Demo

Stage Deployment

Page 21: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Testing in Prod.

100%

80%

20%

Page 22: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

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

Page 23: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Demo

Testing in Production

Page 24: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• 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

Page 25: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Demo

Deploying WebJob as part of your Website

Page 26: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• 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

Page 27: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Demo

Project Kudu

Page 28: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

We LoveAzure Websites

Page 29: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• 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

Page 30: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• 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

Page 31: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Demo

Site Extensions - management extensibility for your websites

Page 32: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• 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

Page 33: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Demo

Logging, Tracing, and Log Browser

Page 34: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• 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

Page 35: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Demo

Automatic Site Healing

Page 36: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

• 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

Page 37: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Summary

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

Page 38: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

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

Page 39: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.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 ) [email protected] / @yochayk

Page 40: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

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

Page 41: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

Complete your session evaluation now and win!

Page 42: Website s Azure Websites is a robust cloud platform for developing, testing, and running web apps. Build apps using your favorite tools and languages—.NET,

© 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.