0
我已经创建了template1,它将部署HDI群集和template2,它将单独部署Azure VM。如何使用ARM模板获取HDI群集的私有IP
现在我想从集群中获取头节点专用IP,并将其传递给Azure VM模板以使用ARM模板进行处理。
我该怎么做?
我已经创建了template1,它将部署HDI群集和template2,它将单独部署Azure VM。如何使用ARM模板获取HDI群集的私有IP
现在我想从集群中获取头节点专用IP,并将其传递给Azure VM模板以使用ARM模板进行处理。
我该怎么做?
考虑到这是你从HDcluster获取对象:
{
"id": "xxx",
"name": "xxx",
"type": "Microsoft.HDInsight/clusters",
"location": "East US",
"etag": "xxx",
"tags": null,
"properties": {
"clusterVersion": "3.5.1000.0",
"osType": "Linux",
"clusterDefinition": {
"blueprint": "https://blueprints.azurehdinsight.net/spark-3.5.1000.0.9865375.json",
"kind": "SPARK",
"componentVersion": {
"Spark": "1.6"
}
},
"computeProfile": {
"roles": [
{
"name": "headnode",
"targetInstanceCount": 2,
"hardwareProfile": {
"vmSize": "ExtraLarge"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "sshuser"
}
}
},
{
"name": "workernode",
"targetInstanceCount": 1,
"hardwareProfile": {
"vmSize": "Large"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "sshuser"
}
}
},
{
"name": "zookeepernode",
"targetInstanceCount": 3,
"hardwareProfile": {
"vmSize": "Medium"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "sshuser"
}
}
}
]
},
"provisioningState": "Succeeded",
"clusterState": "Running",
"createdDate": "2017-04-11T09:07:44.68",
"quotaInfo": {
"coresUsed": 20
},
"connectivityEndpoints": [
{
"name": "SSH",
"protocol": "TCP",
"location": "xxx.azurehdinsight.net",
"port": 22
},
{
"name": "HTTPS",
"protocol": "TCP",
"location": "xxx.azurehdinsight.net",
"port": 443
}
],
"tier": "standard"
}
}
我猜这是你可以得到最佳的输出,这样你就可以使用类似:
"outputs": {
"test": {
"type": "Object",
"value": "[reference(parameters('clusterName'),'2015-03-01-preview').connectivityEndpoints[0].location]"
}
}
这会得到一个输出xxx.azurehdinsight.net
然后你可以用这个数据创建一个新的部署,或者(就像我说的)添加RHEL VM到同一个模板并使它在HDCluster部署上使用dependOn
,并参考与VMextension的输入相同的内容。
1.我将xxx.azurehdinsight.net作为输出。但我想获得内部IP。有没有办法得到它。 2.通过获取IP后创建新部署意味着什么? 3.我可以使用VM的链接模板吗? 4.为了测试这个,我需要创建需要20分钟的集群,有没有更简单的方法来测试这需要更少的时间? – karan
1.这就是你得到的。 2.创建新的部署意味着创建新的部署。 3.你可以,链接模板并不重要,或者只是将其部署在同一个模板中,或者只是创建另一个部署。 4. No. – 4c74356b41
3.如何在虚拟机模板中传递或使用群集IP? – karan