kudu voodoo slideshare

25
Kudu Voodoo –Project Kudu Overview & Advanced Azure Web Apps Features Azure Dublin Meetup | Feb 2016

Upload: aidan-casey

Post on 15-Apr-2017

427 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Kudu voodoo   slideshare

Kudu Voodoo–Project Kudu Overview & Advanced Azure Web Apps

Features

Azure Dublin Meetup | Feb 2016

Page 2: Kudu voodoo   slideshare

Aidan Casey |Microsoft Azure MVP| @AIDANJCASEY

Page 3: Kudu voodoo   slideshare

Azure Web Apps• PaaS – fully managed web application hosting• Supports .NET, Java, PHP, Node.js, and Python• Autoscale and load balancing• High availability with auto patching• Continuous deployment with Git, TFS, GitHub, Dropbox, and Visual

Studio Team Services• Many ways to work with the platform - Azure Portal, Azure CLI, Azure

SDK’s

Page 4: Kudu voodoo   slideshare

Project Kudu• Open source .NET Foundation https://github.com/projectkudu/kudu• Powers deployments for

WebApps / WebSites WebJobs Mobile Services

• Can also run outside of Azure• Git deployments• Configurable build steps• Sandboxing• Hosting & Metering• Diagnostic tools & API’s

Page 5: Kudu voodoo   slideshare

Architecture…

http://www.slideshare.net/kashifx/azure-websites-40718659

Page 6: Kudu voodoo   slideshare

Azure LB

Runtime DB

Storage Controller

IIS ARR(LB)

Web Worker

Other databases

1

2

3

4

5

5

5

5

1st request (cold site)

Page 7: Kudu voodoo   slideshare

Storage Controller

IIS ARR(LB)

Web Worker

Other database

s

1 2

3

3

3

3

xth request (hot site)

Azure LB

Page 8: Kudu voodoo   slideshare

Service Plans and Featuresfree shared basic standard Premium

When to use spikes , goofing around

dev - test with SSL

productionlow traffic workloads

productionwith advanced autoscale & traffic management

productionmore advances – biztalk connectors etc

# cores Shared, 60 mins CPU per day

shared, 240 mins CPU per day

1-4 1-4 1-8

RAM 1GB .5GB 1.75-7GB 1.75-7GB 1.75-14GB

SLA 99.95% 99.95% 99.95%custom domain & certs

no yes yes yes yes

Remote profiling

no no no yes yes

Page 9: Kudu voodoo   slideshare

Deployment Slots

• Standard and Premium Mode Only• Hot swap with no requests dropped• Custom warm up application hooks • Rollback• AppSettings can be made slot specific• Can configure auto swapping• % traffic routing via Azure Traffic Routing

Page 10: Kudu voodoo   slideshare

Demo

zero downtime with deployment slots

Page 11: Kudu voodoo   slideshare

Auto Healing• Standard and Premium Mode Only•  Auto detect certain conditions and automatically recover- Recycle based on Request Count- Recycling based on slow requests- If you have multiple instances of your web site, it will only restart the

worker process for the instance that has hit this trigger and not all instances.

Page 12: Kudu voodoo   slideshare

Application Log Streaming• 3 types of logs

Detailed Error Logging Failed Request Tracing  Web Server Logging (W3C extended log format)

• Can log to the file system (rolling files) , table storage or blob storage• When you enable application logging in azure websites its on for 12

hours….

Page 13: Kudu voodoo   slideshare

Demo

log tailing from the Azure CLI

Page 14: Kudu voodoo   slideshare

Kudu Site{yoursite}.scm.azurewebsites.net

• The Kudu site runs in the same sandbox as your real site. This has some important implications

• It cannot do anything that the site itself wouldn't be able to do itself• It shares the same quotas as the site. That is, the CPU/RAM/Disk used

by the Kudu service is counted toward the site's quota• It relies on the security model of the Azure Web Site runtime

Page 15: Kudu voodoo   slideshare

Kudu Console & APIboth command line and file browser access to your sites• Diagnostic dumps• Process Explorer• WebHooks• File Explorer• Site Extensions• Runtime Environment & Variables

Page 16: Kudu voodoo   slideshare

Demo

post deployment webhooks

Page 17: Kudu voodoo   slideshare

Demo

remote profiling a .NET Web App

Page 18: Kudu voodoo   slideshare

Demo

remote debugging a .NET Web App

Page 19: Kudu voodoo   slideshare

Customising the deployment pipeline The Azure CLI command “$ azure site deploymentscript ” generates deployment scripts that are used by kudu, you can customise these files• .deployment file

[config]command=<whatever command>

• Write in batch file, bash script, PHP, JavaScript, …

Can do things like

download extra tools pull in external repos / packages shell out to command line tools ( msbuild, nugget, curl etc)

Page 20: Kudu voodoo   slideshare

Demo

running unit tests in Azure as part of a deployment pipeline

Page 21: Kudu voodoo   slideshare

Site Extensions• Add additional tools to your website• Install site extensions through the portal or the kudu site• Site Extension Gallery : http://www.siteextensions.net• Build & publish your own !

Page 22: Kudu voodoo   slideshare

Demo

Using site extensions -visual studio online monaco code

editor

Page 23: Kudu voodoo   slideshare

Best Practices• Autoscale on & Stick sessions off• Back up your database• Load test before going live• Configure automatic failover using Azure Global Traffic Manager• Automate deployments using slots• Test site recovery• Use azure resource groups• Set billing alerts• Bundle & minify web resources• Use Azure CDN to edge cache static files• Implement the appropriate DB retry policies

Page 24: Kudu voodoo   slideshare

Key Takeaways• Azure Web Apps features- deploy slots, hot swapping, auto scaling, git

deployments , customisable pipeline, remote profiling, site extensions• Your Web App is only loaded into IIS when its in use• Kudu is the open source deployment engine behind web apps• Advanced support for .NET apps via remote profiling and remote

debugging• No SLA availale for basic of free tier offering

Page 25: Kudu voodoo   slideshare

?