deep dive into hidden gems, tips and tricks for azure web sites

35

Upload: lemien

Post on 31-Dec-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Deep Dive into Hidden Gems, Tips and Tricks for Azure Web Sites
Page 2: 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

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

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

Session goals

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

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

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

Staged deployment

Staging

Production

swap

Developer

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

Continuous deployment with staging

GitHub

Staging

Production

swap

Developer 1

Developer 2

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

Demo: continuous deployment with staging

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

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

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

Demo: Kudu Console

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

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?

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

Many ways to manage an Azure Web Site

Azure Portal(s)

IIS Manager

PowerShell

xplat CLI

Visual Studio

Azure API

Azure Web Site

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

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

Azure Command Line Interface (CLI)

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

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

Custom deployment scripts

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

Demo: CLI and custom deployment scripts

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

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

Post deployment notifications

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

Post deployment notifications

GitHub swap

Developer 1

Developer 2

ZapierStaging

Text message

Production

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

Demo: post deployment notifications

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

Powerful tools to debug & manage your siteLog streamingDebuggingFile accessDeployment

Visual Studio integration

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

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

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

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

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

Demo: process analysis

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

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

WebJobs

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

Demo: WebJobs

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

Using VS Online “Monaco”

GitHub swap

Developer 1

Developer 2

ZapierStaging

Text message

Production

VS Online “Monaco”

Developer 3

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

Demo: Visual Studio Online “Monaco”

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

NuGet package availableMicrosoft.WindowsAzure.Management.WebSites

Can do the same things as portal and CLI

Using Azure APIs programmatically

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

Demo: Use the Azure API

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

Demo: using IIS manager

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

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

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

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

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

Demo: Site Extensions

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

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

Takeaways

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

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

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

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!

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

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