Deep Dive into Hidden Gems, Tips and Tricks for Azure Web Sites

Post on 31-Dec-2016

215 views 0 download

Transcript of Deep Dive into Hidden Gems, Tips and Tricks for Azure Web Sites

David Ebbo (@davidebbo)Principal Development LeadMicrosoft

Deep dive into hidden gems, tips and tricks for Azure Web Sites

3-624

Wake you up!Get you excited about Azure Web SitesGet your feedback to make it even better

Session goals

Direct deployment has two primary issues:1. You can’t test it on Azure before it goes

live2. It incurs a site cold start (slow in ASP.NET)

The answer: use a staging slot!

Staged deployment

Staged deployment

Staging

Production

swap

Developer

Continuous deployment with staging

GitHub

Staging

Production

swap

Developer 1

Developer 2

Demo: continuous deployment with staging

https://mysite.scm.azurewebsites.net/

AuthenticatedRuns in same security context as main site

Can access the site files and environment variablesGreat for admin tools!

Kudu – Web Site’s worst kept secret

Demo: Kudu Console

It’s a piece of Azure Web SitesDeveloped as an Open Source project

https://github.com/projectkudu/kuduGit, Mercurial, logging, WebJobs, admin tools, etc…We accepts contributions!It’s a “Site Extension”. More on this later!Some of the UI will become portal UI

What is this “Kudu” thing anyway?

Many ways to manage an Azure Web Site

Azure Portal(s)

IIS Manager

PowerShell

xplat CLI

Visual Studio

Azure API

Azure Web Site

Alternative client to manage your sitesPowerShell cmdlets on WindowsNode-based command line for OS X, Linux, Windows

Azure Command Line Interface (CLI)

Take control over your deployment stepsAnything from small tweaks to complex workflowse.g. can be used to run tests (sample here)

Custom deployment scripts

Demo: CLI and custom deployment scripts

Notification fires after deployment completionPayload contains details about the deploymentCan be hooked up to sites like Zapier

Post deployment notifications

Post deployment notifications

GitHub swap

Developer 1

Developer 2

ZapierStaging

Text message

Production

Demo: post deployment notifications

Powerful tools to debug & manage your siteLog streamingDebuggingFile accessDeployment

Visual Studio integration

Demo: Log streaming, debugging and accessing files from Visual Studio

REST API lets you drills into processes, threads and handlesKudu has UI to visualize itVisual Studio can analyze .NET allocations to find leaks

Processes, threads and memory

Demo: process analysis

Can be deployed by uploading zip files in portalCan also be deployed as part of your web app

WebJobs

Demo: WebJobs

Using VS Online “Monaco”

GitHub swap

Developer 1

Developer 2

ZapierStaging

Text message

Production

VS Online “Monaco”

Developer 3

Demo: Visual Studio Online “Monaco”

NuGet package availableMicrosoft.WindowsAzure.Management.WebSites

Can do the same things as portal and CLI

Using Azure APIs programmatically

Demo: Use the Azure API

Demo: using IIS manager

Only the site owner can access themHave access to the files and environmentWe’ve used some already today!

“Kudu” is a Site ExtensionSo is Visual Studio Online “Monaco”

But you can also write and share your own!

Site Extensions

Site Extensions

Azure Web Site

User Site

Pre-installedSite Extensions

“Kudu”

“Monaco”

Web Jobs

WebDeploy

“Bring your own”Site Extensions

Upload to site

Install from

gallery

foo.azurewebsitesnet

foo.scm.azurewebsitesnet

Demo: Site Extensions

Azure Web Sites come with lots of powerful tools and workflowsSite Extensions are the new hot thingsGive us feedback!

Takeaways

What’s New with Azure Web Sites (3-625)Architecting Massive-Scale Ready-For-Business Web Apps (3-626)

10:30am in hall 1BVisual Studio online “Monaco” (2-646)

2pm in hall 1A

Related sessions

Your Feedback is ImportantFill out an evaluation of this session and help shape future events. Scan the QR code to evaluate this session on your mobile device. You’ll also be entered into a daily prize drawing!

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.