Deploying and Monitoring Windows Azure Application<br />Wely Lau (wely@ncs.com.sg) <br />Microsoft MVP, Windows Azure<br /...
Microsoft Cloud Day<br />Wely Lau Windows Azure MVP / Solutions Architect, NCS Pte Ltd<br />Deploying and Monitoring Windo...
Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task<br />Q & A <br />
Understanding Packaging and Config<br />Windows Azure Services are described by two important artifacts:<br />Service Defi...
Service Definition<br />Contains metadata needed by the Windows Azure environment to understand the requirements of your a...
Service Configuration<br />Sets values for the configuration settings defined in the service definition file and specifies...
Fault and Upgrade Domains<br />Fault Domains<br />Represent groups of resources anticipated to fail together<br />i.e. Sam...
Fault and Upgrade Domains Visualized<br />Fault Domain<br />Fault Domain<br />Rack<br />Rack<br />U/G Domain #1<br />U/G D...
Deployment Environments<br />Two Environments to choose from<br />Nearly Identical…<br /><servicename>.cloudapp.net<br /><...
Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task<br />Q & A <br />
Various Techniques Deploying to the Cloud<br />Windows Azure Portal<br />Visual Studio 2010 <br />Windows Azure Service Ma...
Windows Azure Portal<br /><ul><li>http://windows.azure.com</li></ul>You must create an Azure account, then a service, and ...
Visual Studio<br /><ul><li>Deploy a management certificate
Connect to your service account
Publish inside of VS2010
Easy integration with IntelliTrace and Storage</li></li></ul><li>Windows Azure Service Management Cmdlets<br /><ul><li>Set...
http://archive.msdn.microsoft.com/azurecmdlets
Wraps Management REST API and Diagnostics API
Enables building of sophisticated deployment scripts
Works with rest of .NET CLR</li></li></ul><li>Deploy through Visual Studio<br />Deploy through PowerShell<br />demo<br />
Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task <br />Q & A <br />
Upgrading Windows Azure Application<br />Deployment Consideration<br />Downtime tolerance<br />VIP Address<br />Cost<br />...
Delete & Recreate<br />Down time between deployments<br />You can change almost everything in your app<br />1 X your insta...
In Place Upgrade<br />Reuses existing VMs (Preserves VM state i.e. local cache data)<br />Can update a single role<br />1 ...
In Place Upgrade<br />Rack<br />Rack<br />Web Role<br />Web Role<br />Load Balancer: <br />#1<br />#2<br />#1<br />#2<br /...
Web Deploy<br />Newly built-in in SDK 1.4.1<br />Quickly push incremental changes<br />Caveats:<br />Only applicable for s...
VIP swap <br />Easier to undo<br />Requires 2 identical environments<br />Cannot update endpoints<br />2 X your instance c...
DNS Swap<br />Use DNS as another layer of abstraction<br />Requires your own domain name<br />2 X your instance cost<br />...
Web Deploy<br />VIP Swap<br />demo<br />
Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task<br />Q & A <br />
Diagnostic: Common Task & Challenges<br /><ul><li>Common Diagnostic Task
Performance measurement
Troubleshooting and debugging
Capacity planning
Traffic analysis (users, views, peak times)
Billing & Auditing
Challenges in the Cloud
Many instances
Local storage is not persistence
They move around
Massive amount of data
Upcoming SlideShare
Loading in...5
×

MS Cloud Day - Deploying and monitoring windows azure applications

3,482

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,482
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
44
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • This session discusses your data and the Windows Azure platform.
  • This session discusses your data and the Windows Azure platform.
  • This session discusses your data and the Windows Azure platform.
  • This session discusses your data and the Windows Azure platform.
  • This session discusses your data and the Windows Azure platform.
  • Twitter template
  • MS Cloud Day - Deploying and monitoring windows azure applications

    1. 1. Deploying and Monitoring Windows Azure Application<br />Wely Lau (wely@ncs.com.sg) <br />Microsoft MVP, Windows Azure<br />Solutions Architect, NCS<br />Blog : http://wely-lau.net<br />
    2. 2. Microsoft Cloud Day<br />Wely Lau Windows Azure MVP / Solutions Architect, NCS Pte Ltd<br />Deploying and Monitoring Windows Azure Application<br />Wely is the first Windows Azure MVP in Southeast Asia.<br />In NCS, he focuses on Cloud Computing, specifically on Windows Azure Platform. Performing cloud consultancy, architecting cloud solution, designing cloud framework, and delivering cloud training are his day-to-day activities. <br />This session learn how we can deploy application to Windows Azure ,install program on Windows Azure, and how do we monitor our application on Windows Azure.<br />
    3. 3. Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task<br />Q & A <br />
    4. 4. Understanding Packaging and Config<br />Windows Azure Services are described by two important artifacts:<br />Service Definition (*.csdef)<br />Service Configuration (*.cscfg)<br />Your code is zipped and packaged with definition (*.cspkg)<br />Encrypted(Zipped(Code + *.csdef)) == *.cspkg<br />Windows Azure consumes just (*.cspkg + *.cscfg)<br />
    5. 5. Service Definition<br />Contains metadata needed by the Windows Azure environment to understand the requirements of your application. <br />Describes the shape of your Windows Azure Service<br />Defines Roles, Ports, Certificates, Configuration Settings, Startup Tasks, IIS Configuration, and more…<br />Can only be changed by upgrades or new deployments<br />
    6. 6. Service Configuration<br />Sets values for the configuration settings defined in the service definition file and specifies the number of instances to run for each role.<br />Supplies Runtime Values (Scale, Config Settings, Certificates to use, VHD, etc.)<br />Can be updated any time through Portal or API<br />
    7. 7. Fault and Upgrade Domains<br />Fault Domains<br />Represent groups of resources anticipated to fail together<br />i.e. Same rack, same server<br />Fabric spreads instances across fault domains<br />Default of 2<br />Upgrade Domains<br />Represents groups of resources that will be upgraded together<br />Specified by upgradeDomainCountin ServiceDefinition<br />Default of 5<br />Fabric splits Upgrade Domains across Fault Domains and Across Roles<br />
    8. 8. Fault and Upgrade Domains Visualized<br />Fault Domain<br />Fault Domain<br />Rack<br />Rack<br />U/G Domain #1<br />U/G Domain #2<br />U/G Domain #1<br />U/G Domain #2<br />Web Role<br />Web Role<br />VM<br />VM<br />VM<br />VM<br />Worker Role<br />Worker Role<br />VM<br />VM<br />VM<br />VM<br />
    9. 9. Deployment Environments<br />Two Environments to choose from<br />Nearly Identical…<br /><servicename>.cloudapp.net<br /><deploymentID>.cloudapp.net<br />VIP Swap between them<br />
    10. 10. Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task<br />Q & A <br />
    11. 11. Various Techniques Deploying to the Cloud<br />Windows Azure Portal<br />Visual Studio 2010 <br />Windows Azure Service Management Cmdlets<br />
    12. 12. Windows Azure Portal<br /><ul><li>http://windows.azure.com</li></ul>You must create an Azure account, then a service, and then you deploy your code.<br />VS builds two files.<br />Encrypted package of your code<br />Your config file <br />
    13. 13. Visual Studio<br /><ul><li>Deploy a management certificate
    14. 14. Connect to your service account
    15. 15. Publish inside of VS2010
    16. 16. Easy integration with IntelliTrace and Storage</li></li></ul><li>Windows Azure Service Management Cmdlets<br /><ul><li>Set of PowerShell cmdlets
    17. 17. http://archive.msdn.microsoft.com/azurecmdlets
    18. 18. Wraps Management REST API and Diagnostics API
    19. 19. Enables building of sophisticated deployment scripts
    20. 20. Works with rest of .NET CLR</li></li></ul><li>Deploy through Visual Studio<br />Deploy through PowerShell<br />demo<br />
    21. 21. Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task <br />Q & A <br />
    22. 22. Upgrading Windows Azure Application<br />Deployment Consideration<br />Downtime tolerance<br />VIP Address<br />Cost<br />Various options<br />Delete & Recreate<br />In Place Upgrade<br />Web Deploy<br />VIP Swap<br />DNS Swap*<br />Sometimes you MUST delete a deployment<br />Changes in endpoints, VM size, and binding<br />Try to minimize by specifying what you might need in advance<br />
    23. 23. Delete & Recreate<br />Down time between deployments<br />You can change almost everything in your app<br />1 X your instance cost<br />New VIP<br />Hosted Service<br />Deployment v2<br />Deployment v1<br />Web Role<br />Web Role<br />Worker Role<br />Worker Role<br />VM<br />VM<br />VM<br />VM<br />VM<br />VM<br />VM<br />VM<br />
    24. 24. In Place Upgrade<br />Reuses existing VMs (Preserves VM state i.e. local cache data)<br />Can update a single role<br />1 X your instance cost<br />Cannot change the service definition<br />size, endpoints, roles, etc.<br />Utilizing Upgrade Domain to avoid downtime<br />
    25. 25. In Place Upgrade<br />Rack<br />Rack<br />Web Role<br />Web Role<br />Load Balancer: <br />#1<br />#2<br />#1<br />#2<br />VM<br />VM<br />Prod<br />VM<br />VM<br />Worker Role<br />Worker Role<br />VM<br />VM<br />VM<br />VM<br />
    26. 26. Web Deploy<br />Newly built-in in SDK 1.4.1<br />Quickly push incremental changes<br />Caveats:<br />Only applicable for single instance web role<br />Changes made will not be persistence<br />Development and testing purpose, not production!<br />
    27. 27. VIP swap <br />Easier to undo<br />Requires 2 identical environments<br />Cannot update endpoints<br />2 X your instance cost<br />Happen very fast<br />Typically within 1 mins<br />Hosted Service<br />Deployment v1<br />Worker Role<br />Web Role<br />VM<br />VM<br />Load Balancer: <br />VM<br />VM<br />Prod<br />Prod<br />Deployment v2<br />Stage<br />Stage<br />Web Role<br />Worker Role<br />VM<br />VM<br />VM<br />VM<br />
    28. 28. DNS Swap<br />Use DNS as another layer of abstraction<br />Requires your own domain name<br />2 X your instance cost<br />Updating the domain record is not immediate<br />New VIP<br />DNS:<br />whatever.com<br />Hosted Service (foo.cloudapp.net)<br />Hosted Service (bar.cloudapp.net)<br />Deployment<br />Deployment<br />Web Role<br />Worker Role<br />Web Role<br />Worker Role<br />VM<br />VM<br />VM<br />VM<br />VM<br />VM<br />VM<br />VM<br />
    29. 29. Web Deploy<br />VIP Swap<br />demo<br />
    30. 30. Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task<br />Q & A <br />
    31. 31. Diagnostic: Common Task & Challenges<br /><ul><li>Common Diagnostic Task
    32. 32. Performance measurement
    33. 33. Troubleshooting and debugging
    34. 34. Capacity planning
    35. 35. Traffic analysis (users, views, peak times)
    36. 36. Billing & Auditing
    37. 37. Challenges in the Cloud
    38. 38. Many instances
    39. 39. Local storage is not persistence
    40. 40. They move around
    41. 41. Massive amount of data
    42. 42. Can’t remote desktop in
    43. 43. now you can do it with SDK >= 1.3 </li></li></ul><li>Windows Azure Diagnostic API<br /><ul><li>Collects diagnostic data from your instances and copies it to a storage account
    44. 44. IIS Logs, Crash Dumps, FREB Logs
    45. 45. Arbitrary log files
    46. 46. Performance Counters
    47. 47. Event Logs
    48. 48. Debug/Trace statements
    49. 49. Infrastructure events
    50. 50. MonAgentHost.exe is started automatically by default.
    51. 51. Listener wired up in app/web.config
    52. 52. Need to define a storage account connection string</li></li></ul><li>How does it work?<br />Role Instance<br /><ul><li>Role Instance Starts
    53. 53. Diagnostic Monitor Starts
    54. 54. Monitor is configured
    55. 55. Imperatively at Start time
    56. 56. Remotely any time
    57. 57. Monitor buffers data locally
    58. 58. User can set a quota (FIFO)
    59. 59. User initiates transfer to storage
    60. 60. Scheduled or On Demand
    61. 61. Where to store?</li></ul>Role<br />Local directory storage<br />Diagnostic Monitor<br />
    62. 62. Sample Results<br />
    63. 63. Visualizing the data<br />
    64. 64. Diagnostics Considerations<br />Volume of Data Storage<br />Standard costs apply for transactions, storage & bandwidth<br />Reaction Time<br />$ Cost<br />Monitoring 5 Performance Counters<br /> every 5 seconds for 100 instances costs > $260 US dollar per month<br />
    65. 65. Remote Desktop<br />
    66. 66. Remote Desktop<br />Role 2<br />Role 1<br />IN_0<br />IN_0<br />IN_1<br />Port 3389<br />LB<br />IN_1<br />IN_2<br />Remote Forwarder<br />Internal Port 3389<br />
    67. 67. Remote Desktop to Windows Azure<br />Installing Program on Windows Azure<br />demo<br />
    68. 68. Agenda<br />Basic Concept<br />Deploying <br />Upgrading <br />Monitoring <br />Start-up Task<br />Q & A <br />
    69. 69. Windows Azure Startup Tasks<br /><ul><li>Includes scripts that automate the preparation and configuration of roles
    70. 70. Scenarios: Perform short, unattended setups on role startup. E.g.
    71. 71. COM Component
    72. 72. Registry Key
    73. 73. Configuring a Windows Server Role, such as IIS
    74. 74. Installation </li></ul>Startup.cmd<br />start /w pkgmgr /iu:IIS-ASP<br />REG ADD "HKEY_LOCAL_MACHINESOFTWAREMicrosoftActive SetupInstalled Components{A509B1A7-37EF-4b3f-8CFC-}" /v "IsInstalled" /t REG_DWORD /d 0 /f<br />winrar-x64-40b7.exe /s<br />
    75. 75. Windows Azure Startup Tasks<br /><WebRolename="foo"><br /> <Startup><br /> <Taskcommandline="relativepathToSetupExecutable"<br />executionContext="limited|elevated" <br />taskType="simple|foreground|background"/><br /> </Startup><br /></WebRole><br />Task Types:<br /><ul><li>Simple [Default] – System waits for the task to exit before any other tasks are launched
    76. 76. Background – System does not wait for the task to exit
    77. 77. Foreground – Similar to background, except role is not restarted until all foreground tasks exit</li></li></ul><li>Installing through Start-up Task<br />demo<br />
    78. 78. Resources<br /><ul><li>Windows Azure Platform Training Course
    79. 79. http://msdn.microsoft.com/en-us/wazplatformtrainingcourse.aspx
    80. 80. Building, deploying, and managing Windows Azure Applications
    81. 81. http://channel9.msdn.com/Events/PDC/PDC10/CS03
    82. 82. Deploying, Troubleshooting, Managing and Monitoring Applications on Windows Azure
    83. 83. http://www.msteched.com/2010/Europe/COS324
    84. 84. Windows Azure CmdLet
    85. 85. http://archive.msdn.microsoft.com/azurecmdlets
    86. 86. Remote Desktop to Windows Azure
    87. 87. http://tinyurl.com/azure-remote-desktop
    88. 88. Custom Domain Name in Windows Azure
    89. 89. http://tinyurl.com/azure-custom-domain</li></li></ul><li>Any questions?<br />Q & A<br />
    90. 90. Thank you!<br />Wely Lau (wely@ncs.com.sg) <br />Microsoft MVP, Windows Azure<br />Solutions Architect, NCS<br />Blog : http://wely-lau.net<br />
    1. A particular slide catching your eye?

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

    ×