3
votes

I'm trying to automate our deployment to Azure process. I've gone through various pages from google with powershell scripts examples.

I've narrowed down the problem to this part:

# publish - here I get 500 server error -(
New-AzureDeployment -Slot "Staging" -Package $package -Configuration $configuration -ServiceName $service

And I get error message: error message

Looking at $Error variable (specifically at this $Error[0].Exception.InnerException.Response) I can see that the request timed out: Error request

Operation could not be completed within the specified time

I have tried uploading package file (4 Mb - plain vanilla MVC4 app from Empty template) to azure and in in $package variable giving the url:

New-AzureDeployment -Slot "Staging" -Package "https://blah.blob.core.windows.net/shared/blah.cspkg" -Configuration $configuration -ServiceName $service

And the publish went almost instantly and now I can access the staging instance with the latest changes.

Does this mean that Azure publishing service has timeout period and my shady internet connection speed does not allow to push the file within this timeout? It took me 4 minutes to upload the file via CoudXplorer and this is the plain vanilla app with nothing in it. The real app is 10 times larger.

Is there anything can be done for that? Or I'll just have to upload packages to Azure storage first and publish from there?

Update Confirmed - that is the internet connection. I have spinned up a virtual machine in Azure cloud, set up all the required scripts there and tried to deploy a package as a local file and it worked fine - deployed as expected, no error messages. Azure, why can't you specify a timeout? some people still live with ADSL and 0.3Mbit upload speed -(

1
Thanks for the update. It helped me a lot.Guy

1 Answers

3
votes

We use the API for the Management Service - see answer here. We had lots of similar issues deploying from PS, so we ended up copying the deployment package to the BLOB on build and then running PS or REST API commands from there to deploy. There is a build & copy to BLOB example in this SO answer.