Self-learning: Upgrade Azure Web Role

http://msdn.microsoft.com/en-us/library/windowsazure/ee517253.aspx November 22, 2010

You can upgrade your service by deploying a new package to the staging environment and then swapping the staging and production deployments. This type of upgrade is called a Virtual IP or VIP swap,as it swaps the addresses of the two deployments. Both deployments remain online during the swap process.

If you are upgrading your service with a new service definition file, you must swap VIPs; youcannotperform an in-place upgrade.However, youcan swap VIPs only if thenumber of endpoints specified by the service definition is identical for both deployments. For example, if you add an HTTPS endpoint to a web role that previously exposed only an HTTP endpoint, you cannot upgrade your service using a VIP swap;you'll need to delete your production deployment and redeploy instead.

http://blogs.msdn.com/b/windowsazure/archive/2011/10/19/announcing-improved-in-place-updates.aspx 19 Oct 2011 9:00 AM

Based on your feedback, today we are making some helpful updates to Windows Azure that provide developers flexibility for making in-place updates to deployed services. Best of all, these updates are easily made without changing the public IP of the service.

Windows Azure nowsupports a wider range of changes to a deployed servicewithout requiring the use of a VIP swap or a complete delete and re-deploy of the service. With the following changes permitted through an in-place update, you will now be allowed to make almost all possible updates without requiring a VIP swap or a re-deploy!

The newly allowed in-place updates are:

  • Change the virtual machine size (scale-up or scale-down)
  • Increase local storage
  • Add or remove roles to a deployment
  • Change the number or type of endpoints
Summary of changes allowed

Changes permitted to hosting, services, and roles

In-place update

Staged (VIP swap)

Delete and

re-deploy

Operating system version

Yes

Yes

Yes

.NET trust level

Yes

Yes

Yes

Virtual machine size

Yes

Warning

Changing virtual machine size will destroy local data. When making this change using the service management APIs, the force flag is required

Note

Requires Windows Azure SDK 1.5 or later

Yes

Yes

Local storage settings

Yes

Increase only.

Note

Requires Windows Azure SDK 1.5 or later

Yes

Yes

Add or remove roles in a service

Yes

Yes

Yes

Number of instances of a particular role

Yes

Yes

Yes

Number or type of endpoints for a service

Yes

Note

Requires Windows Azure SDK 1.5 or later.

 

Note

Availability may be temporarily lost as endpoints are updated

No

Yes

Names and values of configuration settings

Yes

Yes

Yes

Values (but not names) of configuration settings

Yes

Yes

Yes

Add new certificates

Yes

Yes

Yes

Change existing certificates

Yes

Yes

Yes

Deploy new code

Yes

Yes

Yes

 
Changing Virtual Machine Size example

The following example shows how to change the virtual machine size through the Windows Azure portal.

Figure 1: Initial state of the deployment

When attempting to change the size of the VM without checking the box for “Allow VM size or role count to be updated” the following error will be shown:

Figure 2: Error message when attempting to change role count

Now when the same operation is attempted with the “Allow VM size or role count to be updated” checkbox checked the VM size will be updated:

Figure 3: Update with the checkbox checked

 

Figure 4: Deployment after update has completed

More Control over in-place updates

In addition to the wider applicability of an in-place update, you now have greater control over the update process itself by being able to rollback an update that is in progress or even starting a second update. While an update is in progress (defined by at least one instance of the service not yet updated to the new version) you can roll back the update by using theRollback Update Or Upgrade operation.

If the rollback operation is specified to be in automatic mode, the rollback will begin immediately in the first upgrade domain without waiting for all instances in the upgrade domain that is currently offline to return to the Ready state. To prevent multiple upgrade domains from being offline simultaneously the rollback can be done in manual mode. In manual mode the first upgrade domain will not be rolled back until Walk Upgrade Domain is called for the first upgrade domain.

Multiple Update Operations

Initiating a second update operation while the first update is ongoing will perform similar to the rollback operation. If the second update is in automatic mode, the first upgrade domain will be upgraded immediately, possibly leading to instances from multiple upgrade domains being offline at the same point in time. Further details on using the rollback operation or initiating multiple mutating operations can be found here.

Summary of Update Options

Now that most modification can be performed using any of the three options for updating a hosted service, it is worth taking some time to describe when each option is most appropriate. This is best described by the following table of advantages and disadvantages:

Update option

Description

Advantages

Disadvantages

In-place update

The new package is uploaded and applied to the running instances of the service.

Only a single running deployment is required.

 

Service availability can be maintained as long as there are at least two instances for each role.

Service capacity is limited while instances are brought down, updated and then restarted.

Service code must be able to support multiple versions of the code running on different instances as the instances are updated

Staged (VIP swap)

Upload the new package and swap it with the existing production version. This is referred to as a VIP swap because it simply swaps the visible IP addresses of the services

No service downtime or loss of capacity.

Two deployments are required to be running at least during the update.

Redeploy the service

Suspend and then delete the service, and then deploy the new version.

Only a single running deployment is required.

Service will be down between deleting the service and redeploying the service.

 

Virtual IP (VIP) will often change when the service is redeployed.

Further details on updating a Windows Azure service can be found here



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值