Forum Discussion
Auto Scaling of Power BI embedded using ARM templates
We are designing SaaS Azure-based application and for analytics visualization, we have decided to use Power BI Embedded.
We can't predict the service load precisely so we would like to scale up or downsize of Power BI Embedded instances on demand.
Now the question is how to do this correctly using ARM templates?
When I go into Azure Portal Power BI Embedded configuration blade and switch "Automation script" section in the script there is a property called "scale": null. But looks like this property just ignored.
What we figured out when we try to run deploy into existing resource(Power BI embedded) with different than current SKU name than actually, Power BI Embedded will start to scale up/down which is what we are trying to achieve. But the drawback is that the scripts end with an error, which is the undesirable outcome, as we can't distinguish the real error situation and if our scaling attempt was successful.
New-AzureRmResourceGroupDeployment : 18:34:47 - Resource Microsoft.PowerBIDedicated/capacities 'ndaxxxx' failed with message '{
"error": {
"code": "ResourceDeploymentFailure",
"message": "The response for resource had empty or invalid content."
}
}'
At line:12 char:2
+ New-AzureRmResourceGroupDeployment -TemplateParameterFile $powerB ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzureRmResourceGroupDeployment : 18:34:47 - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please se
e https://aka.ms/arm-debug for usage details.
At line:12 char:2
+ New-AzureRmResourceGroupDeployment -TemplateParameterFile $powerB ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzureRmResourceGroupDeployment : 18:34:47 - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please se
e https://aka.ms/arm-debug for usage details.
At line:12 char:2
+ New-AzureRmResourceGroupDeployment -TemplateParameterFile $powerB ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
=========================================================================================================
DeploymentName : Deploy_PowerBI
ResourceGroupName : PowerBITest
ProvisioningState : Failed
Timestamp : 22.02.2018 16:34:25
Mode : Incremental
TemplateLink :
Parameters :
Name Type Value
=============== ========================= ==========
env_name String Dev
powerbiinstanceName String ndaxxxx
Outputs :
DeploymentDebugLogLevel :
Deployment PowerBI instance to Azure is finished
==============================================================================================================================
#Deployment script
$resourceGroupName = "PowerBITest"
#PowerBI Deployment
$powerBIParameterFilePath = 'C:\Temp\azure_templates\powerbi_parameters.json'
$powerBITemplateFilePath = 'C:\Temp\azure_templates\powerbi_template.json'
$newDeploymentName = "Deploy_PowerBI"
Write-Host "Deploying Resources from Template - $powerBITemplateFilePath"
New-AzureRmResourceGroupDeployment -TemplateParameterFile $powerBIParameterFilePath -TemplateFile $powerBITemplateFilePath -ResourceGroupName $resourceGroupName -Name $newDeploymentName
Write-Host "Deployment PowerBI instance to Azure is finished"
##########
8 Replies
- v-ljerr-msft
Microsoft Employee
Hi Anonymous,
A scaling operation can take about a minute. During this time, the capacity will not be available. Embedded content may fail to load. So this could be a limitation currently. :smileyhappy:
Reference:
https://docs.microsoft.com/en-us/azure/power-bi-embedded/scale-capacity
Regards
- AnonymousNot applicable
I understand that we may face unavailability during scaling, but Power BI Embedded should support API as first class citizen.
It should be scalable via ARM template otherwise I do not understand why such service even exist in Azure.
- AnonymousNot applicable
Taking into account that in your response you even didn't tried to answer to my question and provided a guide for scaling PBI instances via portaI I assume that manipulating Power BI Embedded instances via ARM is a "grey" area which don't receive support from Power BI team at least at this moment.
Is it true?- AnonymousNot applicable
I have a PowerShell runbook scheduled in Azure that does what you are trying to do, but based on a schedule created by me in a JSON config object in the runbook. I haven't figured out yet how to check/test the current memory usage in our capacity yet though. I would love to make my runbook more of a true "auto-scale", but the scheduling mechanism works beautifully.