我正尝试使用下面的链接https://github.com/Azure/azure-quickstart-templates/tree/master/cloudera-on-centos在azure上安装cloudera,这给了我错误“消息”: 模板函数“ copyIndex”在此位置不可用。该功能只能在指定了副本的资源中使用。 enter image description here 我运行下面的代码(部分代码)
"name": "master-node",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-09-01",
"dependsOn": [
"Microsoft.Resources/deployments/shared-resources"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/cloudera-on-centos/master-node.json",
"contentVersion": "1.0.0.1",
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json"
},
"parameters": {
"vnetID": {
"value": "[variables('VNetId')]"
},
"resourceAPIVersion": {
"value": "[variables('resourceAPIVersion')]"
},
"dnsNamePrefix": {
"value": "[parameters('dnsNamePrefix')]"
},
"scriptsUri": {
"value": "[variables('scriptsUri')]"
},
"storageAccount": {
"value": "[variables('masterStorageAccount')]"
},
"vmCount": {
"value": "[variables('clusterSpec').masterNodeCount]"
},
"vmSpec": {
"value": "[variables('vmSpec')]"
},
"networkSpec": {
"value": "[variables('networkSpec')]"
},
"clusterSpec": {
"value": "[variables('clusterSpec')]"
}
}
}
},
{
"name": "data-node",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-09-01",
"dependsOn": [
"Microsoft.Resources/deployments/shared-resources"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/cloudera-on-centos/data-node-ds13.json",
"contentVersion": "1.0.0.1",
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json"
},
"parameters": {
"vnetID": {
"value": "[variables('VNetId')]"
},
"templateAPIVersion": {
"value": "[variables('templateAPIVersion')]"
},
"resourceAPIVersion": {
"value": "[variables('resourceAPIVersion')]"
},
"dnsNamePrefix": {
"value": "[parameters('dnsNamePrefix')]"
},
"scriptsUri": {
"value": "[variables('scriptsUri')]"
},
"storageAccount": {
"value": "[variables('workerStorageAccount')]"
},
"vmCount": {
"value": "[variables('clusterSpec').dataNodeCount]"
},
"vmSpec": {
"value": "[variables('vmSpec')]"
},
"networkSpec": {
"value": "[variables('networkSpec')]"
},
"clusterSpec": {
"value": "[variables('clusterSpec')]"
}
}
}
},
{
"name": "setup-cloudera",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-09-01",
"dependsOn": [
"Microsoft.Resources/deployments/data-node",
"Microsoft.Resources/deployments/master-node"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/cloudera-on-centos/setup-cloudera.json",
"contentVersion": "1.0.0.1",
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json"
},
"parameters": {
"resourceAPIVersion": {
"value": "[variables('resourceAPIVersion')]"
},
"dnsNamePrefix": {
"value": "[parameters('dnsNamePrefix')]"
},
"scriptsUri": {
"value": "[variables('scriptsUri')]"
},
"vmSpec": {
"value": "[variables('vmSpec')]"
},
"networkSpec": {
"value": "[variables('networkSpec')]"
},
"clusterSpec": {
"value": "[variables('clusterSpec')]"
},
"fqdn": {
"value": "[reference('master-node').outputs.fqdn.value]"
},
"cmUsername": {
"value": "[parameters('cmUsername')]"
},
"cmPassword": {
"value": "[parameters('cmPassword')]"
},
"company": {
"value": "[parameters('Company')]"
},
"emailAddress": {
"value": "[parameters('emailAddress')]"
},
"businessPhone": {
"value": "[parameters('businessPhone')]"
},
"firstName": {
"value": "[parameters('firstName')]"
},
"lastName": {
"value": "[parameters('lastName')]"
},
"jobRole": {
"value": "[parameters('jobRole')]"
},
"jobFunction": {
"value": "[parameters('jobFunction')]"
},
"installCDH": {
"value": "[variables('installCDH')]"
}
}
}
}
]
}