blog-texh-Lixar-Technical-Team-Lead

Francois Boucher – Lixar Technical Team Lead – Cloud, Microsoft Azure.

Shelley Fraser Tech

Recently, with my team, we needed to upgrade a web solution to Azure SDK from 2.4 to 2.5.1. The upgrade was much longer and complex than expected. I decide to share what we learned so maybe others could benefit from our experience.

 

The problem

The upgrade of the code and library was not really a problem. The documentation is available on MSDN and it’s easy to follow. Few breaking changes were part of the version 2.5. One is the reasons of this post: Diagnostics configuration must be applied separately after deployment. Once again, the documentation on MSDN is very helpful, once the service is deployed, we needed to execute a PowerShell script:

[center]blog-texh-Lixar-Technical-Team-Lead[/center]

However, when we executed the script, we got some error for one of the roles.
Set-AzureServiceDiagnosticsExtension : BadRequest: The extension ID FakeVeryLongNameViewProcessorWorkerRole-PaaSDiagnostics-Production-Ext-0 is invalid. The problem is far simple; the generated extension ID is too long. This bug is well known and is identified in the azure-pwershell github project. The solution could be as simple as rename the role name, but this solution was not a good option in our context.

 

The solution

We decide to call directly the Azure REST API. This is where things were a bit less obvious. The documentation was present, but less accurate.

[center]blog-texh-Lixar-Technical-Team-Lead[/center]

The solution was simple in fact. First, we needed to add the extension calling the POST method. It’s in this call that you pass the WadCfg.xmlfile and that we can specify a shorter ExtensionId. Then invoking another POST method, we update the deployment configuration.

 

A little extra

Our solution contains many roles. Looping through all the roles one by one was taking too long for the time frame we had when deploying in a production environment. We re-factorized our script to add all the extensions then only called the Upgrade Deployment once. This way, the execution was three times faster.

 

References

[center]Azure SDK for .NET 2.5 Release Notes  |  Azure SDK for .NET 2.5.1 Release Notes

Github – azure-powershell – issues #387  |  Service Management REST API Reference[/center]

 


 

LIXAR

Mobile . Data . Proximity . IoT . Wearables . Concepts . Cloud

Air . Auto . Telco . Emerging Tech