Deploying and Monitoring Windows Azure Application Wely Lau (email@example.com) Microsoft MVP, Windows Azure Solutions Architect, NCS Blog : http://wely-lau.net
Microsoft Cloud Day Wely Lau Windows Azure MVP / Solutions Architect, NCS Pte Ltd Deploying and Monitoring Windows Azure Application Wely is the first Windows Azure MVP in Southeast Asia. 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. 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.
Understanding Packaging and Config Windows Azure Services are described by two important artifacts: Service Definition (*.csdef) Service Configuration (*.cscfg) Your code is zipped and packaged with definition (*.cspkg) Encrypted(Zipped(Code + *.csdef)) == *.cspkg Windows Azure consumes just (*.cspkg + *.cscfg)
Service Definition Contains metadata needed by the Windows Azure environment to understand the requirements of your application. Describes the shape of your Windows Azure Service Defines Roles, Ports, Certificates, Configuration Settings, Startup Tasks, IIS Configuration, and more… Can only be changed by upgrades or new deployments
Service Configuration Sets values for the configuration settings defined in the service definition file and specifies the number of instances to run for each role. Supplies Runtime Values (Scale, Config Settings, Certificates to use, VHD, etc.) Can be updated any time through Portal or API
Fault and Upgrade Domains Fault Domains Represent groups of resources anticipated to fail together i.e. Same rack, same server Fabric spreads instances across fault domains Default of 2 Upgrade Domains Represents groups of resources that will be upgraded together Specified by upgradeDomainCountin ServiceDefinition Default of 5 Fabric splits Upgrade Domains across Fault Domains and Across Roles
Fault and Upgrade Domains Visualized Fault Domain Fault Domain Rack Rack U/G Domain #1 U/G Domain #2 U/G Domain #1 U/G Domain #2 Web Role Web Role VM VM VM VM Worker Role Worker Role VM VM VM VM
Deployment Environments Two Environments to choose from Nearly Identical… <servicename>.cloudapp.net <deploymentID>.cloudapp.net VIP Swap between them
Upgrading Windows Azure Application Deployment Consideration Downtime tolerance VIP Address Cost Various options Delete & Recreate In Place Upgrade Web Deploy VIP Swap DNS Swap* Sometimes you MUST delete a deployment Changes in endpoints, VM size, and binding Try to minimize by specifying what you might need in advance
Delete & Recreate Down time between deployments You can change almost everything in your app 1 X your instance cost New VIP Hosted Service Deployment v2 Deployment v1 Web Role Web Role Worker Role Worker Role VM VM VM VM VM VM VM VM
In Place Upgrade Reuses existing VMs (Preserves VM state i.e. local cache data) Can update a single role 1 X your instance cost Cannot change the service definition size, endpoints, roles, etc. Utilizing Upgrade Domain to avoid downtime
In Place Upgrade Rack Rack Web Role Web Role Load Balancer: #1 #2 #1 #2 VM VM Prod VM VM Worker Role Worker Role VM VM VM VM
Web Deploy Newly built-in in SDK 1.4.1 Quickly push incremental changes Caveats: Only applicable for single instance web role Changes made will not be persistence Development and testing purpose, not production!
VIP swap Easier to undo Requires 2 identical environments Cannot update endpoints 2 X your instance cost Happen very fast Typically within 1 mins Hosted Service Deployment v1 Worker Role Web Role VM VM Load Balancer: VM VM Prod Prod Deployment v2 Stage Stage Web Role Worker Role VM VM VM VM
DNS Swap Use DNS as another layer of abstraction Requires your own domain name 2 X your instance cost Updating the domain record is not immediate New VIP DNS: whatever.com Hosted Service (foo.cloudapp.net) Hosted Service (bar.cloudapp.net) Deployment Deployment Web Role Worker Role Web Role Worker Role VM VM VM VM VM VM VM VM
Diagnostics Considerations Volume of Data Storage Standard costs apply for transactions, storage & bandwidth Reaction Time $ Cost Monitoring 5 Performance Counters every 5 seconds for 100 instances costs > $260 US dollar per month