2016-06-04 2 views
0

Azure에서 HDInsight Storm Cluster를 만들고 가상 네트워크에 추가하려고합니다.가상 네트워크 내 Azure에서 HDInsight 클러스터를 만들 수 없습니다.

사전 클러스터 생성 유효성 검사 실패 : 가상 네트워크 검증으로 인해 사용자 errorValidation 보고서에 클러스터 XXXXXXX 실패 : 사용자 가입 XXXXXXX는 가상 네트워크를 사용하지 않습니다하지만 어떤 이유로 나는 항상 다음과 같은 오류 메시지를 받았습니다.

-VirtualNetworkId $ VNET -SubnetName $ : 나는 다음과 같은 매개 변수없이 스크립트를 실행하면

#################################### 
# Set these variables 
#################################### 
$nameToken = "xxxxxx" 

$httpUserName = "xxxxxx" 
$httpPassword = "xxxxxx" 

$ClusterTyp = "Storm" 
$namePrefix = $nameToken.ToLower() 

$resourceGroupName = $namePrefix 
$hdinsightClusterName = $namePrefix +"storm" 
$defaultStorageAccountName = $namePrefix +"storm" 
$defaultBlobContainerName = $hdinsightClusterName 

$location = "North Europe" 
$clusterSizeInNodes = 1 

#Virtual Network 
$NetworkName = "xxxxxx" 
$subnetName = "xxxxxx" 

# Treat all errors as terminating 
$ErrorActionPreference = "Stop" 

########################################### 
# Connect to Azure 
########################################### 
#region - Connect to Azure subscription 
Write-Host "`nConnecting to your Azure subscription ..." -ForegroundColor Green 
try{Get-AzureRmContext} 
catch{Login-AzureRmAccount} 
#endregion 

########################################### 
# Preapre default storage account and container 
########################################### 
New-AzureRmStorageAccount -ResourceGroupName $resourceGroupName -Name $defaultStorageAccountName -Type Standard_GRS -Location $location 

$defaultStorageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $resourceGroupName -Name $defaultStorageAccountName).Key1 


$defaultStorageContext = New-AzureStorageContext -StorageAccountName $defaultStorageAccountName -StorageAccountKey $defaultStorageAccountKey 
New-AzureStorageContainer -Name $hdinsightClusterName -Context $defaultStorageContext 

########################################### 
# Create the cluster 
########################################### 

$vnet = (Get-AzureRmVirtualNetwork -ResourceGroupName $ResourceGroupName -Name $NetworkName).Id 
$httpPW = ConvertTo-SecureString -String $httpPassword -AsPlainText -Force 
$httpCredential = New-Object System.Management.Automation.PSCredential($httpUserName,$httpPW) 
Write-Host "Create HDInsight Cluster" -ForegroundColor Yellow 

New-AzureRmHDInsightCluster -ResourceGroupName $resourceGroupName -ClusterName $hdinsightClusterName -Location $location -ClusterSizeInNodes $clusterSizeInNodes -ClusterType $ClusterTyp -OSType Windows -Version "3.2" -HttpCredential $httpCredential -DefaultStorageAccountName "$defaultStorageAccountName.blob.core.windows.net" -DefaultStorageAccountKey $defaultStorageAccountKey -DefaultStorageContainer $hdinsightClusterName -VirtualNetworkId $vnet -SubnetName $subnetName 

Write-Host "HDInsight Cluster Created" -ForegroundColor Green 
#################################### 
# Verify the cluster 
#################################### 
Get-AzureRmHDInsightCluster -ClusterName $hdinsightClusterName 

가 제대로 작동하는 것 같다 : 예외 : 다음과 같이

파워 쉘 스크립트 보인다 서브넷 이름

물론 클러스터는 가상 네트워크에 추가되지 않습니다. ork. 포털에서 클러스터를 수동으로 추가하면 해당 가상 네트워크에 가상 네트워크를 추가 할 수 있으므로 가상 네트워크가 있는지 확인하십시오.

이미 도움을 주셔서 감사합니다.

종류 관련 안부

답변

0

ARM 템플릿을 사용하는 것이 훨씬 쉽습니다. Portal, Azure PowerShell 또는 CLI에서 ARM 템플릿을 호출 할 수 있습니다. 다음은 가상 네트워크 내에 HBase 클러스터를 생성하는 샘플입니다. 당신은 쉽게 대신 폭풍 클러스터를 만들 템플릿을 수정할 수 있습니다

https://azure.microsoft.com/en-us/documentation/articles/hdinsight-hbase-provision-vnet/

참고 : 리눅스 기반 클러스터는 V2를 필요로한다

Windows 기반 클러스터를하는 V1 (클래식) 가상 네트워크를 필요로 (Azure Resource Manager) 가상 네트워크. 올바른 유형의 네트워크가 없으면 클러스터를 만들 때이 네트워크를 사용할 수 없습니다. https://azure.microsoft.com/documentation/articles/hdinsight-extend-hadoop-virtual-network/

+0

멋진 멋진 작품은 ARM 템플릿으로 잘 작동합니다. 감사합니다. – Andreas

관련 문제