Created
November 24, 2015 15:42
-
-
Save gbellmann/8e6860fc441529403f5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$subscriptionName = "<AzureSubscriptionName>" # La suscripción de Azure usada para la creación del clúster HDInsight | |
$storageAccountName = "<AzureStorageAccountName>" # El clúster HDInsight necesita de una cuenta de Azure Storage para el sistema de archivos por defecto | |
$clusterName = "<HDInsightClusterName>" # El nombre del clúster HDInsight a crear | |
$clusterNodes = <ClusterSizeInNodes> # El número de nodos del clúster HDInsight | |
$hadoopUserName = "<HadoopUserName>" # Nombre de usuario para Hadoop. Es el usuario que se utilizará para conectarse al clúster y correr trabajos en él. | |
$hadoopUserPassword = "<HadoopUserPassword>" | |
$secPassword = ConvertTo-SecureString $hadoopUserPassword -AsPlainText -Force | |
$credential = New-Object System.Management.Automation.PSCredential($hadoopUserName,$secPassword) | |
# Obtener la cuenta de Storage primaria a partir del nombre | |
Select-AzureSubscription $subscriptionName | |
$storageAccountKey = Get-AzureStorageKey $storageAccountName | %{ $_.Primary } | |
$containerName = $clusterName # Contenedor de Azure Blob usado como sistema de archivos por defecto del clúster HDInsight | |
# La ubicación del clúster HDInsight. Debe ser el mismo data center que la cuenta de Storage. | |
$location = Get-AzureStorageAccount -StorageAccountName $storageAccountName | %{$_.Location} | |
# Crear un nuevo clúster HDInsight | |
New-AzureHDInsightCluster -Name $clusterName -Credential $credential -Location $location -DefaultStorageAccountName "$storageAccountName.blob.core.windows.net" -DefaultStorageAccountKey $storageAccountKey -DefaultStorageContainerName $containerName -ClusterSizeInNodes $clusterNodes -ClusterType Hadoop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment