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>]
[-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>]
[-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>]
[-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 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
Contoh 4: Membuat kluster Azure HDInsight dengan fitur relai outbound dan private link
# 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: Buat 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: Buat 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 Microsoft Entra yang akan digunakan saat mengakses Azure Data Lake Store.
Jenis: | Guid |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AdditionalStorageAccounts
Menentukan akun Azure Storage tambahan untuk kluster. Anda juga dapat menggunakan cmdlet Add-AzHDInsightStorage.
Jenis: | Dictionary<TKey,TValue>[System.String,System.String] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AmbariDatabase
Mendapatkan atau mengatur database untuk ambari.
Jenis: | AzureHDInsightMetastore |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ApplicationId
Mendapatkan atau mengatur Id Aplikasi Perwakilan Layanan untuk mengakses Azure Data Lake.
Jenis: | Guid |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AssignedIdentity
Mendapatkan atau mengatur identitas yang ditetapkan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AutoscaleConfiguration
Mendapatkan atau mengatur konfigurasi skala otomatis
Jenis: | AzureHDInsightAutoscale |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-CertificateFileContents
Menentukan konten file sertifikat yang akan digunakan saat mengakses Azure Data Lake Store.
Jenis: | Byte[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | 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.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | 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.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ClusterName
Menentukan nama kluster.
Jenis: | String |
Position: | 2 |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ClusterSizeInNodes
Menentukan jumlah simpul Pekerja untuk kluster.
Jenis: | Int32 |
Position: | 3 |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | 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.
Jenis: | String |
Nilai yang diterima: | Standard, Premium |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ClusterType
Menentukan jenis kluster yang akan dibuat. Opsinya adalah: Hadoop, HBase, Storm, Spark, INTERACTIVEHIVE, Kafka, dan RServer
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ComponentVersion
Jenis: | Dictionary<TKey,TValue>[System.String,System.String] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ComputeIsolationHostSku
Mendapatkan atau mengatur sku host khusus untuk isolasi komputasi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Config
Menentukan objek kluster yang akan digunakan untuk membuat kluster. Objek ini dapat dibuat dengan menggunakan cmdlet New-AzHDInsightClusterConfig.
Jenis: | AzureHDInsightConfig |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | True |
Terima karakter wildcard: | False |
-Configurations
Menentukan konfigurasi kluster HDInsight ini. Anda juga dapat menggunakan cmdlet Add-AzHDInsightConfigValues.
Jenis: | Dictionary<TKey,TValue>[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DefaultProfile
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan azure
Jenis: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DisksPerWorkerNode
Menentukan jumlah disk untuk peran simpul pekerja dalam kluster.
Jenis: | Int32 |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | 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 berlaku untuk kluster RServer.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EnableComputeIsolation
Mengaktifkan fitur isolasi komputasi HDInsight.
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EnableIDBroker
Mengaktifkan fitur HDInsight Identity Broker.
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EncryptionAlgorithm
Mendapatkan atau mengatur algoritma enkripsi.
Jenis: | String |
Nilai yang diterima: | RSA-OAEP, RSA-OAEP-256, RSA1_5 |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EncryptionAtHost
Mendapatkan atau mengatur bendera yang menunjukkan apakah mengaktifkan enkripsi di host atau tidak.
Jenis: | Nullable<T>[Boolean] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EncryptionInTransit
Mendapatkan atau mengatur bendera yang menunjukkan apakah mengaktifkan enkripsi saat transit atau tidak.
Jenis: | Nullable<T>[Boolean] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EncryptionKeyName
Mendapatkan atau mengatur nama kunci enkripsi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EncryptionKeyVersion
Mendapatkan atau mengatur versi kunci enkripsi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EncryptionVaultUri
Mendapatkan atau mengatur uri brankas enkripsi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-HeadNodeSize
Menentukan ukuran komputer virtual untuk simpul Head. Gunakan Get-AzVMSize untuk ukuran VM yang dapat diterima, dan lihat halaman harga HDInsight.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-HiveMetastore
Menentukan SQL Database untuk menyimpan metadata Apache Hive. Anda juga dapat menggunakan cmdlet Add-AzHDInsightMetastore.
Jenis: | AzureHDInsightMetastore |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-HttpCredential
Menentukan kredensial masuk kluster (HTTP) untuk kluster.
Jenis: | PSCredential |
Position: | 4 |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-KafkaClientGroupId
Mendapatkan atau mengatur id grup klien untuk akses Kafka Rest Proxy.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-KafkaClientGroupName
Mendapatkan atau mengatur nama grup klien untuk akses Kafka Rest Proxy.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-KafkaManagementNodeSize
Mendapatkan atau mengatur ukuran Simpul Manajemen Kafka.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Location
Menentukan lokasi untuk kluster.
Jenis: | String |
Position: | 0 |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-MinSupportedTlsVersion
Mendapatkan atau mengatur versi TLS minimal yang didukung.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ObjectId
Menentukan ID objek Microsoft Entra (GUID) dari perwakilan layanan Microsoft Entra yang mewakili kluster. Kluster akan menggunakan ini saat mengakses Azure Data Lake Store.
Jenis: | Guid |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-OozieMetastore
Menentukan SQL Database untuk menyimpan metadata Oozie. Anda juga dapat menggunakan cmdlet Add-AzHDInsightMetastore.
Jenis: | AzureHDInsightMetastore |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-OSType
Menentukan sistem operasi untuk kluster. Opsinya adalah: Windows, Linux
Jenis: | String |
Nilai yang diterima: | Linux |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-PrivateLink
Mendapatkan atau mengatur jenis tautan privat.
Jenis: | String |
Nilai yang diterima: | Enabled, Disabled |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-PrivateLinkConfiguration
Mendapatkan atau mengatur konfigurasi tautan privat.
Jenis: | AzureHDInsightPrivateLinkConfiguration[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ResourceGroupName
Menentukan nama grup sumber daya.
Jenis: | String |
Position: | 1 |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ResourceProviderConnection
Mendapatkan atau mengatur jenis koneksi penyedia sumber daya.
Jenis: | String |
Nilai yang diterima: | Inbound, Outbound |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScriptActions
Menentukan tindakan skrip untuk dijalankan pada kluster di akhir pembuatan kluster. Anda dapat menggunakan Add-AzHDInsightScriptAction.
Jenis: | Dictionary<TKey,TValue>[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Collections.Generic.List`1[AzureHDInsightScriptAction]] |
Nilai yang diterima: | HeadNode, WorkerNode, ZookeeperNode, EdgeNode |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SecurityProfile
Menentukan properti terkait keamanan yang digunakan untuk membuat kluster aman. Anda juga dapat menggunakan cmdlet Add-AzHDInsightSecurityProfile.
Jenis: | AzureHDInsightSecurityProfile |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SshCredential
Menentukan kredensial SSH yang akan digunakan untuk koneksi SSH. Ini hanya untuk kluster Linux.
Jenis: | PSCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SshPublicKey
Menentukan kunci publik yang akan digunakan untuk koneksi SSH. Ini hanya untuk kluster Linux.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-StorageAccountKey
Mendapatkan atau mengatur Kunci Akses Akun Penyimpanan untuk Akun Penyimpanan.
Jenis: | String |
Position: | 6 |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-StorageAccountManagedIdentity
Mendapatkan atau mengatur identitas terkelola akun penyimpanan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-StorageAccountResourceId
Mendapatkan atau mengatur Id Sumber Daya Penyimpanan untuk Akun Penyimpanan.
Jenis: | String |
Position: | 5 |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-StorageAccountType
Mendapatkan atau mengatur jenis akun penyimpanan.
Jenis: | Nullable<T>[StorageType] |
Nilai yang diterima: | AzureStorage, AzureDataLakeStore, AzureDataLakeStorageGen2 |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-StorageContainer
Mendapatkan atau mengatur nama StorageContainer untuk Akun Azure Storage default
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-StorageFileSystem
Mendapatkan atau mengatur sistem file untuk akun Azure Data Lake Storage Gen2 default.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-StorageRootPath
Mendapatkan atau mengatur jalur ke akar kluster di Akun Data Lake Store default.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SubnetName
Mendapatkan atau mengatur nama subnet untuk kluster HDInsight ini.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Version
Menentukan versi HDI kluster HDInsight.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-VirtualNetworkId
Menentukan ID jaringan virtual untuk menyediakan kluster.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-WorkerNodeSize
Menentukan ukuran komputer virtual untuk simpul Pekerja. Gunakan Get-AzVMSize untuk ukuran VM yang dapat diterima, dan lihat halaman harga HDInsight.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Zone
Mendapatkan atau mengatur zona ketersediaan.
Jenis: | String[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | 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.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
Input
Output
Catatan
Kata kunci: azure, azurerm, lengan, sumber daya, manajemen, manajer, hadoop, hdinsight, hd, wawasan
Link Terkait
Azure PowerShell
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk