错误:“在为机器学习服务Workpsace部署Azure ARM模板时,请确保使用支持MSI的客户端创建工作区”
我目前正在尝试使用ARM模板编写Azure机器学习基础架构的脚本,并在Terraform中运行。为了确保模板正常工作,我首先使用azcli从一个文件运行它 我在Ubuntu上运行此程序,使用以下版本的Az CLI:-错误:“在为机器学习服务Workpsace部署Azure ARM模板时,请确保使用支持MSI的客户端创建工作区”,azure,terraform,azure-resource-manager,terraform-provider-azure,azure-machine-learning-service,Azure,Terraform,Azure Resource Manager,Terraform Provider Azure,Azure Machine Learning Service,我目前正在尝试使用ARM模板编写Azure机器学习基础架构的脚本,并在Terraform中运行。为了确保模板正常工作,我首先使用azcli从一个文件运行它 我在Ubuntu上运行此程序,使用以下版本的Az CLI:- azure-cli 2.0.78 command-modules-nspkg 2.0.3 core 2.0.78 nspkg
azure-cli 2.0.78
command-modules-nspkg 2.0.3
core 2.0.78
nspkg 3.0.4
telemetry 1.0.4
Python location '/opt/az/bin/python3'
Extensions directory '/home/blah/.azure/cliextensions'
Python (Linux) 3.6.5 (default, Dec 12 2019, 11:11:33)
[GCC 8.3.0]
我已经使用terraform创建了存储帐户、应用程序洞察和密钥库
尝试使用Az CLI和以下命令运行模板时:-
az group deployment create --name MachineLearning --resource-group data-science --template-file ML_ARM.json --parameters appInsightsName=machine-learning-dev storageAccountName=machinelearningdev keyVaultName=data-science-dev mlApiVersion=2018-11-19 mlWorkspaceName=machine-learning-dev location=uksouth
我收到以下错误:-
确保使用支持MSI的客户端创建工作区
ARM模板如下所示:-
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"type": "string",
"metadata": {
"description": "The name of the storage account"
}
},
"appInsightsName" : {
"type": "string",
"metadata": {
"description": "The name of the app insights account"
}
},
"keyVaultName": {
"type": "string",
"metadata": {
"description": "The name of the keyvault resource"
}
},
"mlApiVersion": {
"type": "string",
"metadata": {
"description": "The api version of the ML workspace"
}
},
"mlWorkspaceName": {
"type": "string",
"metadata": {
"description": "The name of the Machine Learning Workspace"
}
},
"location": {
"type": "string",
"metadata": {
"description": "Resource location"
}
}
},
"resources": [
{
"apiVersion": "[parameters('mlApiVersion')]",
"type": "Microsoft.MachineLearningServices/workspaces",
"name": "[parameters('mlWorkspaceName')]",
"location": "[parameters('location')]",
"sku": {
"tier": "enterprise",
"name": "enterprise"
},
"properties": {
"storageAccount": "[resourceId('Microsoft.Storage/storageAccounts',parameters('storageAccountName'))]",
"applicationInsights": "[resourceId('Microsoft.Insights/components',parameters('appInsightsName'))]",
"keyVault": "[resourceId('Microsoft.KeyVault/vaults',parameters('keyVaultName'))]"
}
}
]
}
一些初步的谷歌搜索并没有真正揭示出这可能是什么问题;机器学习服务的文档和指南模板链接如下:-
知道问题是什么吗?提前感谢您的指点 我不熟悉Terraform,也不熟悉ML服务;但是,您提供的错误导致需要在您提供的链接中配置MSI身份验证 尝试更新您的ARM以包含以下标识部分:
... },
"identity": {
"type": "systemAssigned"
},
"properties": {
"storageAccount": "[resourceId('Microsoft.Storage/storageAccounts',parameters('storageAccountName'))]",
"applicationInsights": "[resourceId('Microsoft.Insights/components',parameters('appInsightsName'))]",
"keyVault": "[resourceId('Microsoft.KeyVault/vaults',parameters('keyVaultName'))]"
}
这将创建。谢谢,它解决了这个错误。我在创建工作区的文章中错过了它;奇怪的是,它没有列在模板参考中!我现在有另一个错误,但我想我应该能够解决这个问题;vault是在其他资源组中创建的。