Using WAPPS Cmdlets, I’m trying to find out programmatically the moment I can use a service after it was deployed. The last action my Powershell script does in the deployment process:
$hostedService | Get-Deployment -Slot Staging | Set-DeploymentStatus
-Status Running | Get-OperationStatus -WaitToComplete
It works fine, but in fact the deployment is not ready to use after this point. It seems that concrete instances still have to start. No more than 4 or 5 minutes I have to wait until the webrole is accessible via browser.
How can I find out the moment the service is ready?
I thought of a polling mechanism, but I’m not able to realize it via the WAPPS Cmdlets. Either I’m stupid or I don’t get the documentation of the Cmdlets concerning return values of functions. I can’t find a function that returns, among other things, the status of instances. GetRoleInstanceStatus sounds nice, but imho it’s useless for my concern?
Thanks!
There isn’t a direct way to tell from the Powershell cmdlets when the service is ready for use, as you need to wait for the operating system to finish starting, IIS to initialize, and your service to populate any local cache it uses.
Possible options might include:
Polling a “status” operation on the service, as outlined here: How to find out if Azure service is running
Something in the
WebRole.csOnStartmethod that calls the service, then writes out to (say) table storage or notifies interested parties through an Azure Service Bus notification when the service is available