Azure is “my” cloud with a lot of platform services allowing users, programmers, and DevOps building powerful and scalable solutions. One of my favorite ones is Azure OMS Log Analytics – a big data platform with a great query language and professional dashboards.
In the past, I build a custom agent to collect data from Microsoft RDS and Citrix environment to provide a deep insight into the user experiences and resource usage http://loganalytics.sepago.com/. Additionally, I have built four dashboards and a lot of views to visualize the data:
To make it easier to deploy an OMS Log Analytics workspace including my tiles and views I decided to offer a “Deploy to Azure” solution via GitHub. Finally, an ARM template for an Azure deployment.
One ARM template including all resources (doesn’t work well)
First, I built an ARM template including the workspace definition and four definitions of the tiles (including their views). But I got some weird effects: Sometimes I got only 2 tiles with a deployment, sometimes 3 and rarely the four I expected.
What happens – or what I thought what happened? The tile definition in the ARM files is independent of each other’s, so the ARM engine tried to deploy them parallel. And here is a problem: This didn’t (and don’t) work with the current API. The API didn’t wait for the full deployment and finished after the first tile is deployed.
One ARM template for the deployment and one for each tile (works well)
It took days to find a reliable solution. The solution I use now works differently: I have one ARM template for each tile and one ARM template for the workspace itself. The ARM template for the workspace references all the four tile ARM templates using the resource type “Microsoft.Resources/deployments”. This deployment type allows a special trick to avoid the parallel processing of all linked templates: A serial mode!
The serial mode controls the ARM processing and avoids parallel processing. With this trick, the deployment works reliably.
See the ARM templates at GitHub: https://github.com/MarcelMeurer/LogAnalytics-for-Citrix-and-RDS/
To help the community to find this workaround some keywords:
“Azure OMS Log Analytics Deployment with ARM some tiles are missing”