0
如何使用ARM模板和Ambari API获取边缘节点的私有IP?如何在Azure中使用ARM模板或Ambari API获取边缘节点的私有IP
我正在使用ARM模板的以下edgenode部分安装Edge节点。我想为我的自定义应用程序获取专用IP边缘节点。如何使用ARM模板或使用edgenodeName来使用Ambari?
{
'name': '[concat(parameters('clusterName'),'/', parameters('edgenodeName'))]',
'type': 'Microsoft.HDInsight/clusters/applications',
'apiVersion': '2015-03-01-preview',
'dependsOn': [
'[concat('Microsoft.HDInsight/clusters/', parameters('clusterName'))]'
],
'properties': {
'marketPlaceIdentifier': 'EmptyEdgeNode',
'computeProfile': {
'roles': [{
'name': 'edgenode',
'targetInstanceCount': 1,
'hardwareProfile': {
'vmSize': '[parameters('edgenodeSize')]'
}
}]
},
'installScriptActions': [],
'uninstallScriptActions': [],
'httpsEndpoints': [],
'applicationType': 'CustomApplication'
}
}
更新1: -
这里是resources.azure.com
{
"id": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.HDInsight/clusters/$clusterName",
"name": "$clusterName",
"type": "Microsoft.HDInsight/clusters",
"location": "Central US",
"etag": "33908087-88d4-43e6-bad4-7668bb90fa39",
"tags": null,
"properties": {
"clusterVersion": "3.5.1000.0",
"osType": "Linux",
"clusterDefinition": {
"blueprint": "https://blueprints.azurehdinsight.net/spark-3.5.1000.0.9988582.json",
"kind": "SPARK",
"componentVersion": {
"Spark": "1.6"
}
},
"computeProfile": {
"roles": [
{
"name": "headnode",
"targetInstanceCount": 2,
"hardwareProfile": {
"vmSize": "Standard_D12_V2"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "$userName"
}
},
"virtualNetworkProfile": {
"id": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$vnetName",
"subnet": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$vnetName/subnets/default"
}
},
{
"name": "workernode",
"targetInstanceCount": 1,
"hardwareProfile": {
"vmSize": "Standard_D12_V2"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "$userName"
}
},
"virtualNetworkProfile": {
"id": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$vnetName",
"subnet": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$vnetName/subnets/default"
}
},
{
"name": "zookeepernode",
"targetInstanceCount": 3,
"hardwareProfile": {
"vmSize": "Medium"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "$userName"
}
},
"virtualNetworkProfile": {
"id": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$vnetName",
"subnet": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$vnetName/subnets/default"
}
},
{
"name": "edgenode1",
"targetInstanceCount": 1,
"hardwareProfile": {
"vmSize": "Standard_D3_v2"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "$userName"
}
},
"virtualNetworkProfile": {
"id": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$vnetName",
"subnet": "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$vnetName/subnets/default"
}
}
]
},
"provisioningState": "Succeeded",
"clusterState": "Running",
"createdDate": "2017-04-26T07:44:54.4",
"quotaInfo": {
"coresUsed": 16
},
"connectivityEndpoints": [
{
"name": "SSH",
"protocol": "TCP",
"location": "$clusterName-ssh.azurehdinsight.net",
"port": 22
},
{
"name": "HTTPS",
"protocol": "TCP",
"location": "$clusterName.azurehdinsight.net",
"port": 443
}
],
"tier": "standard"
}
}
驾驶室粘贴集群JSON表示?转到resources.azure.com并导航到群集,然后将json粘贴到问题 – 4c74356b41
@ 4c74356b41我现在没有群集。我需要创建一个集群。现在我只有ARM模板 – karan
祝你好运;) – 4c74356b41