Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Windows Azure Web Sites - Things they don’t teach kids in school - Comunity Day 2013


Published on

Microsoft has a cloud platform which runs .NET, NodeJS and PHP. All 101 talks out there will show you the same: it’s easy to deploy, it scales out on demand and it runs WordPress. Great! But what about doing real things? In this session, we’ll explore the things they don’t teach kids in school. How about trying to find out the architecture of this platform? What about the different deployment options for Windows Azure Web Sites, the development flow and some awesome things you can do with the command line tools? Did you know you can modify the automated build process? Join me in this exploration of some lesser known techniques of the platform.

Published in: Technology, Design
  • Login to see the comments

Windows Azure Web Sites - Things they don’t teach kids in school - Comunity Day 2013

  1. 1. Windows Azure Web SitesThings they don’t teach kids in schoolMaarten Balliauw@maartenballiauw#comdaybe
  2. 2. Who am I?Maarten BalliauwTechnical Evangelist, JetBrainsAZUGFocus on webASP.NET MVC, Windows Azure, SignalR, ...MVP Windows Azure & ASPInsiderBig passion: Windows Azure self promotion: Pro NuGet -
  3. 3. AgendaWindows Azure Web SitesArchitectureProject KuduKudu kung-fu
  4. 4. Windows Azure Web Sites
  5. 5. Start Simplestart free, scale up and outas you go, friction-freeand without the headachesYour waywith, php ornode.js, develop onWindows, OSX orLinuxGo Livedeploy live in seconds,easily monitorperformance, rapidlydiagnose andfix issuesWeb Sites in Seconds
  6. 6. demoWindows AzureWeb Sites
  7. 7. Architecture
  8. 8. Load balancerLayers1st layer: Windows Azure load balancer2nd layer: IIS + ARRARR“Reverse proxy”Verifies hosting database (plans, quotas, …)Negotiates best node to run your site onSite not used much? Put it on a highly loaded machine
  9. 9. Web servers%SYSTEM32%inetsrvconfigapplicationHost.config is taken out of the loopSQL AzureNo refreshing of all app pools when file is savedStorage“File share” hosted on other machinesUsing “WA drive” on blob storageDynamic website activation serviceVerifies runtime database (plans, quotas, …)Site not used for a while? Remove it from the server
  10. 10. Web Sites are not in IIS. They onlyare when a request comes in!
  11. 11. AzureLBRuntimeDBStorageControllerIIS ARR(LB)Web WorkerOtherdatabases1st request (cold site)
  12. 12. StorageControllerIIS ARR(LB)Web WorkerOtherdatabasesxth request (hot site)AzureLB
  13. 13. Your app not being used for a while?
  14. 14. Provisioning, publishing, meteringProvisioning and publishingStorage and database!= launching a website on web farmMeteringBy web servers once a site is loadedReported back to runtime database
  15. 15. RuntimeDBAzureLBStorageControllerIIS ARR(LB)Web WorkerX-DriveDeploymentServerOtherdatabasesSQL AzureBlob storageWindows Azure WorkerRoleProvisioning /API FrontendMeteringDWASSite(W3WP.exe)Site(W3WP.exe)Site(W3WP.exe)Provisioning, publishing, metering
  16. 16. demoLet’s find someproof…
  17. 17. Need moreproof?Windows Azure Pack(
  18. 18. Project Kudu
  19. 19. Project Kudu“The engine behind git deployments on Windows Azure”Open source ( git deploymentsProvides buildsProvides sandboxingProvides hosting
  20. 20. demoProject Kudu
  21. 21. Pointers from the Kudu repositoryMore API operationsFile browser“KuduCalf”(A Kudu is an Antelope. Its baby is a calf. A Kudu Calf is deployed fromKudu.)
  22. 22. Kudu kung-fu
  23. 23. demoApplication logstreaming
  24. 24. Log streamingAll logs from the LogFiles/Application folderOr configure it when querying: azure log tail <site> -p httpSettingsDIAGNOSTICS_LASTRESORTFILE -> file to log to when diagnostics gowrongDIAGNOSTICS_LOGGINGSETTINGSFILE -> settings file (json)DIAGNOSTICS_TEXTTRACELOGDIRECTORY -> default folderDIAGNOSTICS_TEXTTRACEMAXLOGFILESIZEBYTES-> log rotation(bytes)DIAGNOSTICS_TEXTTRACEMAXLOGFOLDERSIZEBYTES -> max logsize (bytes)
  25. 25. demoManaging settingsand secrets!
  26. 26. demoStaging andproduction
  27. 27. demoMulti-tierDeploying a specific project file
  28. 28. Multi-tier remarks…One .deployment file per branch[config]project=MultiTier.WebApi/MultiTier.WebApi.csprojHow do I deploy all tiers in a separate website?.deployment file per branch and every tier in a branchor customize the build
  29. 29. Customizing the build processCheck file[config]command=<whatever command>Write in batch file, bash script, PHP, JavaScript, …
  30. 30. demoCustomizingdeploymentsAn introduction
  31. 31. What can I do in scripts?A lot :-) (but not too much… there’s a sandbox)Environment variables:DEPLOYMENT_SOURCEDEPLOYMENT_TARGETDEPLOYMENT_TEMPWEBROOT_PATHMSBUILD_PATH+ everything you feed it through the management portal
  32. 32. demoCustomizingdeploymentsSample deployment script
  33. 33. Great… but why?We’ve seen the multi-tier scenarioWe can download stuff (NuGet package restore, pull in external Git reposbefore build)We can run stuff (msbuild, nuget.exe, curl, php, node, …)
  34. 34. demoCustomizingdeploymentsWhat about running unit tests?
  35. 35. Need. Moar!
  36. 36. Moar out of the boxREST API a custom handler
  37. 37. Need. MOAR!!!
  38. 38. A private Kudu build in web sites?
  39. 39. Build and FTP the artifacts/debug/KuduService to your websiteAdd USE_PRIVATE_KUDU=1 app settingEnjoy the ride! (but don’t call support, you’re on your own)See private Kudu build in web sites?
  40. 40. Conclusion
  41. 41. Key takeawaysWindows Azure Web Sites are high densityHosted on Cloud ServicesKudu is our best friendSettings and secretsMuliple environmentsMultiple tiersBuild customizationUnit testsKudu-in-Kudu
  42. 42. Thank you!