New-AzHDInsightCluster

Membuat kluster Azure HDInsight di grup sumber daya yang ditentukan untuk langganan saat ini.

Sintaks

New-AzHDInsightCluster
   [-Location] <String>
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ClusterSizeInNodes] <Int32>
   [-HttpCredential] <PSCredential>
   [[-StorageAccountResourceId] <String>]
   [[-StorageAccountKey] <String>]
   [-StorageAccountType <StorageType>]
   [-Config <AzureHDInsightConfig>]
   [-OozieMetastore <AzureHDInsightMetastore>]
   [-HiveMetastore <AzureHDInsightMetastore>]
   [-AmbariDatabase <AzureHDInsightMetastore>]
   [-AdditionalStorageAccounts <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
   [-Configurations <System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]>]
   [-ScriptActions <System.Collections.Generic.Dictionary`2[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightScriptAction]]>]
   [-StorageContainer <String>]
   [-StorageRootPath <String>]
   [-StorageFileSystem <String>]
   [-Version <String>]
   [-HeadNodeSize <String>]
   [-WorkerNodeSize <String>]
   [-EdgeNodeSize <String>]
   [-KafkaManagementNodeSize <String>]
   [-ZookeeperNodeSize <String>]
   [-ClusterType <String>]
   [-ComponentVersion <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
   [-VirtualNetworkId <String>]
   [-SubnetName <String>]
   [-OSType <String>]
   [-ClusterTier <String>]
   [-SshCredential <PSCredential>]
   [-SshPublicKey <String>]
   [-RdpCredential <PSCredential>]
   [-RdpAccessExpiry <DateTime>]
   [-ObjectId <Guid>]
   [-ApplicationId <Guid>]
   [-CertificatePassword <String>]
   [-AadTenantId <Guid>]
   [-SecurityProfile <AzureHDInsightSecurityProfile>]
   [-DisksPerWorkerNode <Int32>]
   [-MinSupportedTlsVersion <String>]
   [-AssignedIdentity <String>]
   [-StorageAccountManagedIdentity <String>]
   [-EncryptionAlgorithm <String>]
   [-EncryptionKeyName <String>]
   [-EncryptionKeyVersion <String>]
   [-EncryptionVaultUri <String>]
   [-EncryptionInTransit <Boolean>]
   [-EncryptionAtHost <Boolean>]
   [-AutoscaleConfiguration <AzureHDInsightAutoscale>]
   [-EnableIDBroker]
   [-KafkaClientGroupId <String>]
   [-KafkaClientGroupName <String>]
   [-ResourceProviderConnection <String>]
   [-PrivateLink <String>]
   [-EnableComputeIsolation]
   [-ComputeIsolationHostSku <String>]
   [-Zone <String[]>]
   [-PrivateLinkConfiguration <AzureHDInsightPrivateLinkConfiguration[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzHDInsightCluster
   [-Location] <String>
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ClusterSizeInNodes] <Int32>
   [-HttpCredential] <PSCredential>
   [[-StorageAccountResourceId] <String>]
   [[-StorageAccountKey] <String>]
   [-StorageAccountType <StorageType>]
   [-Config <AzureHDInsightConfig>]
   [-OozieMetastore <AzureHDInsightMetastore>]
   [-HiveMetastore <AzureHDInsightMetastore>]
   [-AmbariDatabase <AzureHDInsightMetastore>]
   [-AdditionalStorageAccounts <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
   [-Configurations <System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]>]
   [-ScriptActions <System.Collections.Generic.Dictionary`2[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightScriptAction]]>]
   [-StorageContainer <String>]
   [-StorageRootPath <String>]
   [-StorageFileSystem <String>]
   [-Version <String>]
   [-HeadNodeSize <String>]
   [-WorkerNodeSize <String>]
   [-EdgeNodeSize <String>]
   [-KafkaManagementNodeSize <String>]
   [-ZookeeperNodeSize <String>]
   [-ClusterType <String>]
   [-ComponentVersion <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
   [-VirtualNetworkId <String>]
   [-SubnetName <String>]
   [-OSType <String>]
   [-ClusterTier <String>]
   [-SshCredential <PSCredential>]
   [-SshPublicKey <String>]
   [-RdpCredential <PSCredential>]
   [-RdpAccessExpiry <DateTime>]
   [-ObjectId <Guid>]
   [-ApplicationId <Guid>]
   [-CertificateFilePath <String>]
   [-CertificatePassword <String>]
   [-AadTenantId <Guid>]
   [-SecurityProfile <AzureHDInsightSecurityProfile>]
   [-DisksPerWorkerNode <Int32>]
   [-MinSupportedTlsVersion <String>]
   [-AssignedIdentity <String>]
   [-StorageAccountManagedIdentity <String>]
   [-EncryptionAlgorithm <String>]
   [-EncryptionKeyName <String>]
   [-EncryptionKeyVersion <String>]
   [-EncryptionVaultUri <String>]
   [-EncryptionInTransit <Boolean>]
   [-EncryptionAtHost <Boolean>]
   [-AutoscaleConfiguration <AzureHDInsightAutoscale>]
   [-EnableIDBroker]
   [-KafkaClientGroupId <String>]
   [-KafkaClientGroupName <String>]
   [-ResourceProviderConnection <String>]
   [-PrivateLink <String>]
   [-EnableComputeIsolation]
   [-ComputeIsolationHostSku <String>]
   [-Zone <String[]>]
   [-PrivateLinkConfiguration <AzureHDInsightPrivateLinkConfiguration[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzHDInsightCluster
   [-Location] <String>
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ClusterSizeInNodes] <Int32>
   [-HttpCredential] <PSCredential>
   [[-StorageAccountResourceId] <String>]
   [[-StorageAccountKey] <String>]
   [-StorageAccountType <StorageType>]
   [-Config <AzureHDInsightConfig>]
   [-OozieMetastore <AzureHDInsightMetastore>]
   [-HiveMetastore <AzureHDInsightMetastore>]
   [-AmbariDatabase <AzureHDInsightMetastore>]
   [-AdditionalStorageAccounts <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
   [-Configurations <System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]>]
   [-ScriptActions <System.Collections.Generic.Dictionary`2[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightScriptAction]]>]
   [-StorageContainer <String>]
   [-StorageRootPath <String>]
   [-StorageFileSystem <String>]
   [-Version <String>]
   [-HeadNodeSize <String>]
   [-WorkerNodeSize <String>]
   [-EdgeNodeSize <String>]
   [-KafkaManagementNodeSize <String>]
   [-ZookeeperNodeSize <String>]
   [-ClusterType <String>]
   [-ComponentVersion <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
   [-VirtualNetworkId <String>]
   [-SubnetName <String>]
   [-OSType <String>]
   [-ClusterTier <String>]
   [-SshCredential <PSCredential>]
   [-SshPublicKey <String>]
   [-RdpCredential <PSCredential>]
   [-RdpAccessExpiry <DateTime>]
   [-ObjectId <Guid>]
   [-ApplicationId <Guid>]
   [-CertificateFileContents <Byte[]>]
   [-CertificatePassword <String>]
   [-AadTenantId <Guid>]
   [-SecurityProfile <AzureHDInsightSecurityProfile>]
   [-DisksPerWorkerNode <Int32>]
   [-MinSupportedTlsVersion <String>]
   [-AssignedIdentity <String>]
   [-StorageAccountManagedIdentity <String>]
   [-EncryptionAlgorithm <String>]
   [-EncryptionKeyName <String>]
   [-EncryptionKeyVersion <String>]
   [-EncryptionVaultUri <String>]
   [-EncryptionInTransit <Boolean>]
   [-EncryptionAtHost <Boolean>]
   [-AutoscaleConfiguration <AzureHDInsightAutoscale>]
   [-EnableIDBroker]
   [-KafkaClientGroupId <String>]
   [-KafkaClientGroupName <String>]
   [-ResourceProviderConnection <String>]
   [-PrivateLink <String>]
   [-EnableComputeIsolation]
   [-ComputeIsolationHostSku <String>]
   [-Zone <String[]>]
   [-PrivateLinkConfiguration <AzureHDInsightPrivateLinkConfiguration[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Deskripsi

New-AzHDInsightCluster membuat kluster Azure HDInsight dengan menggunakan parameter yang ditentukan atau dengan menggunakan objek konfigurasi yang dibuat dengan menggunakan cmdlet New-AzHDInsightClusterConfig.

Cmdlet dapat memanggil di bawah ini Microsoft Graph API sesuai dengan parameter input:

  • GET /servicePrincipals/{id}

Contoh

Contoh 1: Membuat kluster Azure HDInsight

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds

Perintah ini membuat kluster dalam langganan saat ini.

Contoh 2: Membuat kluster dengan enkripsi disk kunci yang dikelola pelanggan

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-cmk-cluster"
$clusterCreds = Get-Credential

# Customer-managed Key info
$assignedIdentity = "your-ami-resource-id"
$encryptionKeyName = "new-key"
$encryptionVaultUri = "https://MyKeyVault.vault.azure.net"
$encryptionKeyVersion = "00000000000000000000000000000000"

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Spark `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -AssignedIdentity $assignedIdentity `
    -EncryptionKeyName $encryptionKeyName `
    -EncryptionVaultUri $encryptionVaultUri `
    -EncryptionKeyVersion $encryptionKeyVersion

Contoh 3: Membuat kluster Azure HDInsight yang memungkinkan enkripsi saat transit

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -EncryptionInTransit $true
# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Virtual network info
$virtualNetworkId="yourvnetresourceid"
$subnetName="yoursubnetname"

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -VirtualNetworkId $virtualNetworkId -SubnetName $subnetName `
    -ResourceProviderConnection Outbound -PrivateLink Enabled

Contoh 5: Membuat kluster Azure HDInsight yang memungkinkan enkripsi di host

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -EncryptionAtHost $true

Contoh 6: Buat kluster Azure HDInsight yang memungkinkan skala otomatis.

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create autoscale configuration
$autoscaleConfiguration=New-AzHDInsightClusterAutoscaleConfiguration `
    -MinWorkerNodeCount 3 -MaxWorkerNodeCount 5

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -AutoscaleConfiguration $autoscaleConfiguration

Contoh 7: Buat kluster Azure HDInsight dengan Kafka Rest Proxy.

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Kafka Rest Proxy configuration info
$kafkaClientGroupName = "yourclientgroupname"
$kafkaClientGroupId = "yourclientgroupid"
$kafkaManagementNodeSize = "Standard_D4_v2"
$disksPerWorkerNode = 2

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Kafka `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -KafkaClientGroupId  $kafkaClientGroupId -KafkaClientGroupName $kafkaClientGroupName `
    -KafkaManagementNodeSize $kafkaManagementNodeSize -DisksPerWorkerNode $disksPerWorkerNode

Contoh 8: Membuat kluster Azure HDInsight dengan penyimpanan Azure Data Lake Gen2.

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageManagedIdentity = "yourstorageusermanagedidentity"
$storageFileSystem = "filesystem01"
$storageAccountType = "AzureDataLakeStorageGen2"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 3 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountManagedIdentity $storageManagedIdentity `
    -StorageFileSystem $storageFileSystem `
    -StorageAccountType $storageAccountType `
    -SshCredential $clusterCreds

Contoh 9: Buat kluster Azure HDInsight dengan Paket Keamanan Perusahaan (ESP) dan Aktifkan HDInsight ID Broker.

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountKey = "yourstorageaccountaccesskey"
$storageContainer = "yourcontainer01"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# ESP configuration
$domainResourceId = "your Azure AD Domin Service resource id"
$domainUser = "yourdomainuser"
$domainPassword = "yourdoaminpasswd"
$domainPassword = ConvertTo-SecureString $domainPassword -AsPlainText -Force
$domainCredential = New-Object System.Management.Automation.PSCredential($domainUser, $domainPassword)
$clusterUserGroupDns = "dominusergroup"
$ldapUrls = "ldaps://{your domain name}:636"

$clusterTier = "Premium"
$vnetId = "yourvnetid"
$subnetName = "yoursubnetname"
$assignedIdentity = "your user managed assigned identity resourcee id"

#Create security profile
$config= New-AzHDInsightClusterConfig|Add-AzHDInsightSecurityProfile -DomainResourceId $domainResourceId -DomainUserCredential $domainCredential -LdapsUrls $ldapUrls -ClusterUsersGroupDNs $clusterUserGroupDns

# Create the cluster
New-AzHDInsightCluster `
    -ClusterTier $clusterTier `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 3 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -VirtualNetworkId $vnetId -SubnetName $subnetName `
    -AssignedIdentity $assignedIdentity `
    -SecurityProfile $config.SecurityProfile -EnableIDBroker

Contoh 10: Membuat kluster Azure HDInsight yang memungkinkan isolasi komputasi.

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential
$workerNodeSize="Standard_E16S_V3" # here is just an example
$headNodeSize="Standard_E8S_V3"
$zookeeperNodeSize="Standard_E2S_V3"

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 4 `
    -WorkerNodeSize $workerNodeSize `
    -HeadNodeSize $headNodeSize `
    -ZookeeperNodeSize $zookeeperNodeSize `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -EnableComputeIsolation

Contoh 11: Membuat kluster Azure HDInsight dengan fitur konfigurasi tautan privat

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Virtual network info
$virtualNetworkId="yourvnetresourceid"
$subnetName="yoursubnetname"

$ipConfigName="ipconfig"
$privateIPAllocationMethod="dynamic" # the only supported IP allocation method for private link IP configuration is dynamic
$subnetId=$vnetId+"/subnets/"+$subnetName
# Create Private IP configuration
$ipConfiguration= New-AzHDInsightIPConfiguration -Name $ipConfigName -PrivateIPAllocationMethod $privateIPAllocationMethod -SubnetId $subnetId -Primary

$privateLinkConfigurationName="plconfig"
$groupId="headnode"
# Create private link configuration
$privateLinkConfiguration= New-AzHDInsightPrivateLinkConfiguration -Name $privateLinkConfigurationName -GroupId $groupId -IPConfiguration $ipConfiguration

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -VirtualNetworkId $virtualNetworkId -SubnetName $subnetName `
    -ResourceProviderConnection Outbound -PrivateLink Enabled -PrivateLinkConfiguration $privateLinkConfiguration

Contoh 12: Membuat fitur ketersediaan kluster Azure HDInsight

# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
    -ResourceGroupName $storageAccountResourceGroupName `
    -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Virtual network info
$virtualNetworkId="yourvnetresourceid"
$subnetName="yoursubnetname"

$databaseUserName="yourusername"
$databasePassword="******"
$databasePassword=ConvertTo-SecureString $databasePassword -AsPlainText -Force

$sqlserverCredential=New-Object System.Management.Automation.PSCredential($databaseUserName, $databasePassword)
$sqlserver="yoursqlserver.database.windows.net"
$ambariDatabase="ambaridb"
$hiveDatabase ="hivedb"
$oozieDatabase = "ooziedb"

# availability zone feature requires customer ambari database, hive metatastore and oozie metastore
# Create Ambari database
$config=New-AzHDInsightClusterConfig|Add-AzHDInsightMetastore `
-SqlAzureServerName $sqlserver -DatabaseName $ambariDatabase `
-Credential $sqlserverCredential -MetastoreType AmbariDatabase

# Create Hive metastore
$config=$config|Add-AzHDInsightMetastore `
-SqlAzureServerName $sqlserver -DatabaseName $hiveDatabase `
-Credential $sqlserverCredential -MetastoreType HiveMetastore

# Create Oozie metastore
$config=$config|Add-AzHDInsightMetastore `
-SqlAzureServerName $sqlserver -DatabaseName $oozieDatabase `
-Credential $sqlserverCredential -MetastoreType OozieMetastore

# availability zones
$zones="1"

# Create the cluster
New-AzHDInsightCluster `
    -ClusterType Hadoop `
    -ClusterSizeInNodes 4 `
    -ResourceGroupName $clusterResourceGroupName `
    -ClusterName $clusterName `
    -HttpCredential $clusterCreds `
    -Location $location `
    -StorageAccountResourceId $storageAccountResourceId `
    -StorageAccountKey $storageAccountKey `
    -StorageContainer $storageContainer `
    -SshCredential $clusterCreds `
    -VirtualNetworkId $virtualNetworkId -SubnetName $subnetName `
    -AmbariDatabase $config.AmbariDatabase -HiveMetastore $config.HiveMetastore -OozieMetastore $config.OozieMetastore -Zone $zones

Parameter

-AadTenantId

Menentukan ID Penyewa Azure AD yang akan digunakan saat mengakses Azure Data Lake Store.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-AdditionalStorageAccounts

Menentukan akun Azure Storage tambahan untuk kluster. Anda dapat menggunakan cmdlet Add-AzHDInsightStorage.

Type:Dictionary<TKey,TValue>[System.String,System.String]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-AmbariDatabase

Mendapatkan atau mengatur database untuk ambari.

Type:AzureHDInsightMetastore
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ApplicationId

Mendapatkan atau mengatur Id Aplikasi Perwakilan Layanan untuk mengakses Azure Data Lake.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-AssignedIdentity

Mendapatkan atau mengatur identitas yang ditetapkan.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-AutoscaleConfiguration

Mendapatkan atau mengatur konfigurasi skala otomatis

Type:AzureHDInsightAutoscale
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-CertificateFileContents

Menentukan konten file sertifikat yang akan digunakan saat mengakses Azure Data Lake Store.

Type:Byte[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-CertificateFilePath

Menentukan jalur file ke sertifikat yang akan digunakan untuk mengautentikasi sebagai Perwakilan Layanan. Kluster akan menggunakan ini saat mengakses Azure Data Lake Store.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-CertificatePassword

Menentukan kata sandi untuk sertifikat yang akan digunakan untuk mengautentikasi sebagai Perwakilan Layanan. Kluster akan menggunakan ini saat mengakses Azure Data Lake Store.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ClusterName

Menentukan nama kluster.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ClusterSizeInNodes

Menentukan jumlah simpul Pekerja untuk kluster.

Type:Int32
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ClusterTier

Menentukan tingkat kluster HDInsight. Secara default, ini adalah Standar. Tingkat Premium hanya dapat digunakan dengan kluster Linux, dan memungkinkan penggunaan beberapa fitur baru.

Type:String
Accepted values:Standard, Premium
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ClusterType

Menentukan jenis kluster yang akan dibuat. Opsinya adalah: Hadoop, HBase, Storm, Spark, INTERACTIVEHIVE, Kafka, dan RServer

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ComponentVersion

Type:Dictionary<TKey,TValue>[System.String,System.String]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ComputeIsolationHostSku

Mendapatkan atau mengatur sku host khusus untuk isolasi komputasi.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Config

Menentukan objek kluster yang akan digunakan untuk membuat kluster. Objek ini dapat dibuat dengan menggunakan cmdlet New-AzHDInsightClusterConfig.

Type:AzureHDInsightConfig
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-Configurations

Menentukan konfigurasi kluster HDInsight ini. Anda dapat menggunakan cmdlet Add-AzHDInsightConfigValues.

Type:Dictionary<TKey,TValue>[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-DisksPerWorkerNode

Menentukan jumlah disk untuk peran simpul pekerja dalam kluster.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EdgeNodeSize

Menentukan ukuran komputer virtual untuk simpul tepi. Gunakan Get-AzVMSize untuk ukuran VM yang dapat diterima, dan lihat halaman harga HDInsight. Parameter ini hanya valid untuk kluster RServer.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EnableComputeIsolation

Mengaktifkan fitur isolasi komputasi HDInsight.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EnableIDBroker

Mengaktifkan fitur HDInsight Identity Broker.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionAlgorithm

Mendapatkan atau mengatur algoritma enkripsi.

Type:String
Accepted values:RSA-OAEP, RSA-OAEP-256, RSA1_5
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionAtHost

Mendapatkan atau mengatur bendera yang menunjukkan apakah mengaktifkan enkripsi di host atau tidak.

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionInTransit

Mendapatkan atau mengatur bendera yang menunjukkan apakah mengaktifkan enkripsi saat transit atau tidak.

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionKeyName

Mendapatkan atau mengatur nama kunci enkripsi.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionKeyVersion

Mendapatkan atau mengatur versi kunci enkripsi.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionVaultUri

Mendapatkan atau mengatur uri brankas enkripsi.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-HeadNodeSize

Menentukan ukuran komputer virtual untuk simpul Kepala. Gunakan Get-AzVMSize untuk ukuran VM yang dapat diterima, dan lihat halaman harga HDInsight.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-HiveMetastore

Menentukan SQL Database untuk menyimpan metadata Apache Hive. Anda dapat menggunakan cmdlet Add-AzHDInsightMetastore.

Type:AzureHDInsightMetastore
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-HttpCredential

Menentukan kredensial masuk kluster (HTTP) untuk kluster.

Type:PSCredential
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-KafkaClientGroupId

Mendapatkan atau mengatur id grup klien untuk akses Kafka Rest Proxy.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-KafkaClientGroupName

Mendapatkan atau mengatur nama grup klien untuk akses Kafka Rest Proxy.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-KafkaManagementNodeSize

Mendapatkan atau mengatur ukuran Kafka Management Node.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Location

Menentukan lokasi untuk kluster.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-MinSupportedTlsVersion

Mendapatkan atau mengatur versi TLS minimal yang didukung.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ObjectId

Menentukan ID objek Azure AD (GUID) dari Perwakilan Layanan Azure AD yang mewakili kluster. Kluster akan menggunakan ini saat mengakses Azure Data Lake Store.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-OozieMetastore

Menentukan SQL Database untuk menyimpan metadata Oozie. Anda dapat menggunakan cmdlet Add-AzHDInsightMetastore.

Type:AzureHDInsightMetastore
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-OSType

Menentukan sistem operasi untuk kluster. Opsinya adalah: Windows, Linux

Type:String
Accepted values:Linux
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-PrivateLink

Mendapatkan atau mengatur jenis tautan privat.

Type:String
Accepted values:Enabled, Disabled
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-PrivateLinkConfiguration

Mendapatkan atau mengatur konfigurasi tautan privat.

Type:AzureHDInsightPrivateLinkConfiguration[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-RdpAccessExpiry

Menentukan kedaluwarsa, sebagai objek DateTime, untuk akses Protokol Desktop Jarak Jauh (RDP) ke kluster.

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-RdpCredential

Menentukan kredensial Desktop Jauh (RDP) untuk kluster. Ini hanya untuk kluster Windows.

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Menentukan nama grup sumber daya.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ResourceProviderConnection

Mendapatkan atau mengatur jenis koneksi penyedia sumber daya.

Type:String
Accepted values:Inbound, Outbound
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ScriptActions

Menentukan tindakan skrip yang akan dijalankan pada kluster di akhir pembuatan kluster. Anda dapat menggunakan Add-AzHDInsightScriptAction.

Type:Dictionary<TKey,TValue>[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Collections.Generic.List`1[AzureHDInsightScriptAction]]
Accepted values:HeadNode, WorkerNode, ZookeeperNode, EdgeNode
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SecurityProfile

Menentukan properti terkait keamanan yang digunakan untuk membuat kluster aman. Anda dapat menggunakan cmdlet Add-AzHDInsightSecurityProfile.

Type:AzureHDInsightSecurityProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SshCredential

Menentukan kredensial SSH yang akan digunakan untuk koneksi SSH. Ini hanya untuk kluster Linux.

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SshPublicKey

Menentukan kunci publik yang akan digunakan untuk koneksi SSH. Ini hanya untuk kluster Linux.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountKey

Mendapatkan atau mengatur Kunci Akses Akun Penyimpanan untuk Akun Penyimpanan.

Type:String
Position:6
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountManagedIdentity

Mendapatkan atau mengatur identitas terkelola akun penyimpanan.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountResourceId

Mendapatkan atau mengatur Id Sumber Daya Penyimpanan untuk Akun Penyimpanan.

Type:String
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountType

Mendapatkan atau mengatur jenis akun penyimpanan.

Type:Nullable<T>[StorageType]
Accepted values:AzureStorage, AzureDataLakeStore, AzureDataLakeStorageGen2
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-StorageContainer

Mendapatkan atau mengatur nama StorageContainer untuk Akun Azure Storage default

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-StorageFileSystem

Mendapatkan atau mengatur sistem file untuk akun Azure Data Lake Storage Gen2 default.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-StorageRootPath

Mendapatkan atau mengatur jalur ke akar kluster di Akun Data Lake Store default.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SubnetName

Mendapatkan atau mengatur nama subnet untuk kluster HDInsight ini.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Version

Menentukan versi HDI kluster HDInsight.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-VirtualNetworkId

Menentukan ID jaringan virtual untuk menyediakan kluster.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-WorkerNodeSize

Menentukan ukuran komputer virtual untuk simpul Pekerja. Gunakan Get-AzVMSize untuk ukuran VM yang dapat diterima, dan lihat halaman harga HDInsight.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Zone

Mendapatkan atau mengatur zona ketersediaan.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ZookeeperNodeSize

Menentukan ukuran komputer virtual untuk simpul Zookeeper. Gunakan Get-AzVMSize untuk ukuran VM yang dapat diterima, dan lihat halaman harga HDInsight. Parameter ini hanya berlaku untuk kluster HBase atau Storm.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Input

AzureHDInsightConfig

Output

AzureHDInsightCluster

Catatan

Kata kunci: azure, azurerm, arm, sumber daya, manajemen, manajer, hadoop, hdinsight, hd, insight