Windows Azure Web SitesThings they don’t teach kids in schoolMaarten Balliauw@maartenballiauw#comdaybe
Who am I?Maarten BalliauwTechnical Evangelist, JetBrainsAZUGFocus on webASP.NET MVC, Windows Azure, SignalR, ...MVP Window...
AgendaWindows Azure Web SitesArchitectureProject KuduKudu kung-fu
Windows Azure Web Sites
Start Simplestart free, scale up and outas you go, friction-freeand without the headachesYour waywith asp.net, php ornode....
demoWindows AzureWeb Sites
Architecture
Load balancerLayers1st layer: Windows Azure load balancer2nd layer: IIS + ARRARR“Reverse proxy”Verifies hosting database (...
Web servers%SYSTEM32%inetsrvconfigapplicationHost.config is taken out of the loopSQL AzureNo refreshing of all app pools w...
Web Sites are not in IIS. They onlyare when a request comes in!
AzureLBRuntimeDBStorageControllerIIS ARR(LB)Web WorkerOtherdatabases1st request (cold site)
StorageControllerIIS ARR(LB)Web WorkerOtherdatabasesxth request (hot site)AzureLB
Your app not being used for a while?
Provisioning, publishing, meteringProvisioning and publishingStorage and database!= launching a website on web farmMeterin...
RuntimeDBAzureLBStorageControllerIIS ARR(LB)Web WorkerX-DriveDeploymentServerOtherdatabasesSQL AzureBlob storageWindows Az...
demoLet’s find someproof…
Need moreproof?Windows Azure Pack(http://www.microsoft.com/en-us/server-cloud/windows-azure-pack.aspx)Or:http://blog.maart...
Project Kudu
Project Kudu“The engine behind git deployments on Windows Azure”Open source (www.github.com/projectkudu/kudu)Provides git ...
demoProject Kudu
Pointers from the Kudu repositoryMore API operationsFile browser“KuduCalf”(A Kudu is an Antelope. Its baby is a calf. A Ku...
Kudu kung-fu
demoApplication logstreaming
Log streamingAll logs from the LogFiles/Application folderOr configure it when querying: azure log tail <site> -p httpSett...
demoManaging settingsand secrets!
demoStaging andproduction
demoMulti-tierDeploying a specific project file
Multi-tier remarks…One .deployment file per branch[config]project=MultiTier.WebApi/MultiTier.WebApi.csprojHow do I deploy ...
Customizing the build processCheck https://github.com/projectkudu/kudu/wiki/Deployment-hooks.deployment file[config]comman...
demoCustomizingdeploymentsAn introduction
What can I do in scripts?A lot :-) (but not too much… there’s a sandbox)Environment variables:DEPLOYMENT_SOURCEDEPLOYMENT_...
demoCustomizingdeploymentsSample deployment script
Great… but why?We’ve seen the multi-tier scenarioWe can download stuff (NuGet package restore, pull in external Git reposb...
demoCustomizingdeploymentsWhat about running unit tests?
Need. Moar!
Moar out of the boxREST APIhttps://github.com/projectkudu/kudu/wiki/REST-APICreating a custom handlerhttp://www.windowsazu...
Need. MOAR!!!
A private Kudu build in web sites?
Build and FTP the artifacts/debug/KuduService to your websiteAdd USE_PRIVATE_KUDU=1 app settingEnjoy the ride! (but don’t ...
Conclusion
Key takeawaysWindows Azure Web Sites are high densityHosted on Cloud ServicesKudu is our best friendSettings and secretsMu...
Thank you!http://blog.maartenballiauw.be@maartenballiauwhttp://amzn.to/pronuget
Windows Azure Web Sites- Things they don’t teach kids in school - Comunity Day 2013
Upcoming SlideShare
Loading in...5
×

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

1,875

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
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,875
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
15
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • Maarten
  • Launch PhpStorm, create new websiteExplain command line toolsazure site create WAWSdeepdive --location &quot;North Europe&quot; --gitConfigure gitAdd index.php &lt;phpphpinfo();Commit and pushDisplay in browser and go through “environment”COMPUTERNAME “RD….”NUMBER_OF_PROCESSORS -&gt; x-large instancesAll ARR___ variables (cookies for affinity and so on)WAWebSiteSID for determining the website SIDApparently C:\\DWASFiles\\Sites\\WAWSdeepdive seems “da bomb”Browse through the portal and note:All URLS for FTP and SCM are different hostnames and thus potentially a different group of serversazure site delete WAWSdeepdive
  • Clone from git, run buildWhile build runs, explain what’s happening (NPM stage, …)Run Kudu.Webas administratorCreate a site, show folders, …KuduExec! – browse the filesystem and so onExplore someCd .. Until no more is possible and dir – show \\\\10,x,x,x
  • Show logging applicationExplain nothing special configuredEnable through portalShow stream: azure site log tailstackedlogging(other options are download)Configure verbosity
  • Create an application and use ConfigurationManager.AppSettings[&quot;MyKey&quot;] tospecify a ‘dev’ variable or somethingShow environment variable printingUpdate setting in portalFTP into the system and note that the web.config is UNTOUCHED!We can use this for storing secrets
  • Show Hg repository in which I have created two branches: the default one and a “staging” oneConfigure one production websiteConfigure one staging websiteExplain hostnames, scaling, configuration and so on
  • Explain solution structure: two web projectsCreate .deployment fileAdd:[config]project = MultiTier.WebApi/MultiTier.WebApi.csproj
  • Create .deployment fileAdd:[config]command=deploy.cmdAdd deploy.cmd@echo offecho Comday is TEH AWESOME!echo We are deploying to %MYENV%- Set environment variable in portal
  • Too long for slides!Run azure site deploymentscript --basicOr azure site deploymentscript –aspWAPRun through script
  • Explain unit test projectDeploy with successDeploy with failure
  • 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 Azurehttp://blog.maartenballiauw.be@maartenballiauwShameless self promotion: Pro NuGet -http://amzn.to/pronuget
    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 asp.net, 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(http://www.microsoft.com/en-us/server-cloud/windows-azure-pack.aspx)Or:http://blog.maartenballiauw.be/post/2012/07/24/Hands-on-Windows-Azure-Services-for-Windows.aspx
    18. 18. Project Kudu
    19. 19. Project Kudu“The engine behind git deployments on Windows Azure”Open source (www.github.com/projectkudu/kudu)Provides 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 https://github.com/projectkudu/kudu/wiki/Deployment-hooks.deployment 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 APIhttps://github.com/projectkudu/kudu/wiki/REST-APICreating a custom handlerhttp://www.windowsazure.com/en-us/develop/python/tutorials/web-sites-with-django/
    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 http://blog.davidebbo.com/2012/06/developing-kudu-locally-and-on-azure.htmlA 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!http://blog.maartenballiauw.be@maartenballiauwhttp://amzn.to/pronuget
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×