Setting unique deployment names using the Windows Azure Powershell

I'm attempt to upgrade an Azure Web Role running node.js using the Windows Azure PowerShell (December 2012). I've successfully deployed this Web Role once using the PowerShell. According to their instructions, I should be able to execute Publish-AzureServiceProject to upgrade the project. When attempting to execute that command I receive the following error:

The deployment name 'deploymentName' already exists under service 'serviceName'

I can't find where I can set a deployment name using the PowerShell. I've added a DeploymentName setting to the deploymentSettings.json file generated by the PowerShell and tried passing DeploymentName as a parameter. Am I approaching upgrading the service correctly or is there a parameter that anyone has run across that allows you to set this?

Update (1/16/2013)

As @AvkashChauhan suggested I did a vanilla deployment. I initially published to Staging and then ran Publish-AzureServiceProject and was able to upgrade the project.

The problem is when I promoted that Staging deployment to production using the Swap VIP feature of Azure. After swapping the deployments, I have an empty staging slot without deployment. If I attempt to run Publish-AzureServiceProject to publish to the staging slot again (I did not change any deployment settings in between). The deployment fails with the error message above.

Update (1/22/2013)

I've still yet to find a way around this. I reported an issue on the azure-sdk-tools repo in hopes of getting a response there. You can read more or follow here: https://github.com/WindowsAzure/azure-sdk-tools/issues/892

I'll report back any updates to this question.


I am really interested to know why Update cloud service is failing with your. Here is I just tried to check if there is any issue with service setup which is done with "Set-AzureServiceProject" settings as below:

> Set-AzureServiceProject -Location "East US" -Slot "Production"

Based on above setting my deploymentSettings.json looks as below (Subscription ID is set at first based on publish settings, and storage name is same as service name):

{"Slot":"Production","Location":"East US","Subscription":"","StorageAccountName":""}

Now when I do update my service with Publish-AzureServiceProject, it just works:

PS C:nodeAvkashSvc> Publish-AzureServiceProject


Publishing  to Windows Azure. This may take several minutes...

4:27:57 PM - Preparing runtime deployment for service 'AvkashSvc'
4:27:57 PM - Preparing deployment for AvkashSvc with Subscription ID: ***...
4:28:01 PM - Connecting...
4:28:02 PM - Uploading Package...
4:28:05 PM - Upgrading...
4:30:29 PM - Created Deployment ID: **********.
4:30:29 PM - Starting...
4:30:29 PM - Initializing...
4:30:29 PM - Instance WebRole1_IN_0 of role WebRole1 is ready.
4:30:30 PM - Created Website URL: http://AvkashSvc.cloudapp.net.
4:30:30 PM - Complete.

May i suggest try changing slot to "staging" and perform first deployment and then update to see if you hit the same problem. What is you just try to do the same with vanila node.js app?

链接地址: http://www.djcxy.com/p/68488.html

上一篇: Azure部署ID和URL

下一篇: 使用Windows Azure Powershell设置唯一的部署名称