Megosztás a következőn keresztül:


New-AzHDInsightCluster

Létrehoz egy Azure HDInsight-fürtöt az aktuális előfizetés megadott erőforráscsoportjában.

Syntax

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>]

Description

A New-AzHDInsightCluster létrehoz egy Azure HDInsight-fürtöt a megadott paraméterek vagy a New-AzHDInsightClusterConfig parancsmaggal létrehozott konfigurációs objektum használatával.

A parancsmag a bemeneti paramétereknek megfelelően meghívhatja a Microsoft Graph API-t:

  • GET /servicePrincipals/{id}

Példák

1. példa: Azure HDInsight-fürt létrehozása

# 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

Ez a parancs létrehoz egy fürtöt az aktuális előfizetésben.

2. példa: Fürt létrehozása ügyfél által felügyelt kulcs lemeztitkosítással

# 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

3. példa: Azure HDInsight-fürt létrehozása, amely lehetővé teszi az átvitel közbeni titkosítást

# 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

4. példa: Azure HDInsight-fürt létrehozása kimenő továbbítási és privát kapcsolat funkcióval

# 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

5. példa: Azure HDInsight-fürt létrehozása, amely lehetővé teszi a titkosítást a gazdagépen

# 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

6. példa: Hozzon létre egy Azure HDInsight-fürtöt, amely lehetővé teszi az automatikus skálázást.

# 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

7. példa: Azure HDInsight-fürt létrehozása Kafka Rest Proxyval.

# 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

8. példa: Azure HDInsight-fürt létrehozása az Azure Data Lake Gen2 Storage használatával.

# 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

9. példa: Azure HDInsight-fürt létrehozása az Enterprise Security Package (ESP) használatával és a HDInsight ID Broker engedélyezése.

# 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

10. példa: Azure HDInsight-fürt létrehozása, amely lehetővé teszi a számítási elkülönítést.

# 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

11. példa: Azure HDInsight-fürt létrehozása privát kapcsolat konfigurációs funkcióval

# 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

12. példa: Azure HDInsight-fürt rendelkezésre állási funkció létrehozása

# 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

Paraméterek

-AadTenantId

Az Azure Data Lake Store elérésekor használt Microsoft Entra-bérlőazonosítót adja meg.

Típus:Guid
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-AdditionalStorageAccounts

Megadja a fürt további Azure Storage-fiókjait. Használhatja az Add-AzHDInsightStorage parancsmagot is.

Típus:Dictionary<TKey,TValue>[System.String,System.String]
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-AmbariDatabase

Lekéri vagy beállítja az ambari adatbázisát.

Típus:AzureHDInsightMetastore
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ApplicationId

Lekéri vagy beállítja a szolgáltatásnév alkalmazásazonosítóját az Azure Data Lake eléréséhez.

Típus:Guid
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-AssignedIdentity

Lekéri vagy beállítja a hozzárendelt identitást.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-AutoscaleConfiguration

Lekéri vagy beállítja az automatikus skálázási konfigurációt

Típus:AzureHDInsightAutoscale
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-CertificateFileContents

Megadja annak a tanúsítványnak a fájltartalmát, amelyet az Azure Data Lake Store elérésekor fog használni.

Típus:Byte[]
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-CertificateFilePath

Megadja a szolgáltatásnévként való hitelesítéshez használt tanúsítvány elérési útját. A fürt ezt fogja használni az Azure Data Lake Store elérésekor.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-CertificatePassword

Megadja a szolgáltatásnévként való hitelesítéshez használt tanúsítvány jelszavát. A fürt ezt fogja használni az Azure Data Lake Store elérésekor.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ClusterName

Megadja a fürt nevét.

Típus:String
Position:2
alapértelmezett érték:None
Kötelező:True
Accept pipeline input:False
Accept wildcard characters:False

-ClusterSizeInNodes

A fürt feldolgozó csomópontjainak számát adja meg.

Típus:Int32
Position:3
alapértelmezett érték:None
Kötelező:True
Accept pipeline input:False
Accept wildcard characters:False

-ClusterTier

A HDInsight-fürtszintet adja meg. Alapértelmezés szerint ez a Standard. A Prémium szint csak Linux-fürtökkel használható, és lehetővé teszi néhány új funkció használatát.

Típus:String
elfogadott értékek:Standard, Premium
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ClusterType

Megadja a létrehozni kívánt fürt típusát. A lehetőségek a következők: Hadoop, HBase, Storm, Spark, INTERACTIVEHIVE, Kafka és RServer

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ComponentVersion

Típus:Dictionary<TKey,TValue>[System.String,System.String]
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ComputeIsolationHostSku

Lekéri vagy beállítja a dedikált gazdagép-termékváltozatot a számítási elkülönítéshez.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-Config

Megadja a fürt létrehozásához használandó fürtobjektumot. Ez az objektum a New-AzHDInsightClusterConfig parancsmaggal hozható létre.

Típus:AzureHDInsightConfig
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:True
Accept wildcard characters:False

-Configurations

A HDInsight-fürt konfigurációit adja meg. Az Add-AzHDInsightConfigValues parancsmagot is használhatja.

Típus:Dictionary<TKey,TValue>[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Az Azure-ral való kommunikációhoz használt hitelesítő adatok, fiók, bérlő és előfizetés

Típus:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-DisksPerWorkerNode

A fürt feldolgozó csomóponti szerepköréhez tartozó lemezek számát adja meg.

Típus:Int32
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EdgeNodeSize

Megadja a peremcsomópont virtuális gépének méretét. A Get-AzVMSize használatával elfogadható virtuálisgép-méreteket érhet el, és tekintse meg a HDInsight díjszabási oldalát. Ez a paraméter csak RServer-fürtökre érvényes.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableComputeIsolation

Engedélyezi a HDInsight számítási elkülönítési funkcióját.

Típus:SwitchParameter
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableIDBroker

Engedélyezi a HDInsight Identity Broker szolgáltatást.

Típus:SwitchParameter
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionAlgorithm

Lekéri vagy beállítja a titkosítási algoritmust.

Típus:String
elfogadott értékek:RSA-OAEP, RSA-OAEP-256, RSA1_5
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionAtHost

Lekéri vagy beállítja a jelzőt, amely jelzi, hogy engedélyezi-e a titkosítást a gazdagépen.

Típus:Nullable<T>[Boolean]
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionInTransit

Lekéri vagy beállítja a jelzőt, amely jelzi, hogy engedélyezi-e a titkosítást az átvitel során.

Típus:Nullable<T>[Boolean]
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionKeyName

Lekéri vagy beállítja a titkosítási kulcs nevét.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionKeyVersion

Lekéri vagy beállítja a titkosítási kulcs verzióját.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionVaultUri

Lekéri vagy beállítja a titkosítási tároló uri-t.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-HeadNodeSize

Megadja a fejcsomópont virtuális gépének méretét. A Get-AzVMSize használatával elfogadható virtuálisgép-méreteket érhet el, és tekintse meg a HDInsight díjszabási oldalát.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-HiveMetastore

Megadja a Hive-metaadatok tárolására használt SQL Database-adatbázist. Az Add-AzHDInsightMetastore parancsmagot is használhatja.

Típus:AzureHDInsightMetastore
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-HttpCredential

Megadja a fürthöz tartozó fürt bejelentkezési (HTTP-) hitelesítő adatait.

Típus:PSCredential
Position:4
alapértelmezett érték:None
Kötelező:True
Accept pipeline input:False
Accept wildcard characters:False

-KafkaClientGroupId

Lekéri vagy beállítja a Kafka Rest Proxy-hozzáférés ügyfélcsoport-azonosítóját.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-KafkaClientGroupName

Lekéri vagy beállítja a Kafka Rest Proxy-hozzáférés ügyfélcsoportjának nevét.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-KafkaManagementNodeSize

Lekéri vagy beállítja a Kafka felügyeleti csomópont méretét.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Megadja a fürt helyét.

Típus:String
Position:0
alapértelmezett érték:None
Kötelező:True
Accept pipeline input:False
Accept wildcard characters:False

-MinSupportedTlsVersion

Lekéri vagy beállítja a minimálisan támogatott TLS-verziót.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ObjectId

A fürtöt képviselő Microsoft Entra szolgáltatásnév Microsoft Entra objektumazonosítóját (GUID) adja meg. A fürt ezt fogja használni az Azure Data Lake Store elérésekor.

Típus:Guid
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-OozieMetastore

Megadja az Oozie-metaadatok tárolására használt SQL Database-adatbázist. Az Add-AzHDInsightMetastore parancsmagot is használhatja.

Típus:AzureHDInsightMetastore
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-OSType

Megadja a fürt operációs rendszerét. A lehetőségek a következők: Windows, Linux

Típus:String
elfogadott értékek:Linux
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

Lekéri vagy beállítja a privát kapcsolat típusát.

Típus:String
elfogadott értékek:Enabled, Disabled
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-PrivateLinkConfiguration

Lekéri vagy beállítja a privát kapcsolat konfigurációját.

Típus:AzureHDInsightPrivateLinkConfiguration[]
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Megadja az erőforráscsoport nevét.

Típus:String
Position:1
alapértelmezett érték:None
Kötelező:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceProviderConnection

Lekéri vagy beállítja az erőforrás-szolgáltató kapcsolattípusát.

Típus:String
elfogadott értékek:Inbound, Outbound
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ScriptActions

Megadja a fürtön a fürt létrehozásakor futtatandó szkriptműveleteket. Alternatív megoldásként használhatja az Add-AzHDInsightScriptAction parancsot.

Típus:Dictionary<TKey,TValue>[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Collections.Generic.List`1[AzureHDInsightScriptAction]]
elfogadott értékek:HeadNode, WorkerNode, ZookeeperNode, EdgeNode
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-SecurityProfile

Megadja a biztonságos fürt létrehozásához használt biztonsági tulajdonságokat. Az Add-AzHDInsightSecurityProfile parancsmagot is használhatja.

Típus:AzureHDInsightSecurityProfile
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-SshCredential

Megadja az SSH-kapcsolatokhoz használandó SSH-hitelesítő adatokat. Ez csak Linux-fürtökre vonatkozik.

Típus:PSCredential
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-SshPublicKey

Megadja az SSH-kapcsolatokhoz használandó nyilvános kulcsot. Ez csak Linux-fürtökre vonatkozik.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountKey

Lekéri vagy beállítja a tárfiók tárfiókhoz tartozó hozzáférési kulcsát.

Típus:String
Position:6
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountManagedIdentity

Lekéri vagy beállítja a tárfiók felügyelt identitását.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountResourceId

Lekéri vagy beállítja a tárfiók tárolási erőforrás-azonosítóját.

Típus:String
Position:5
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountType

Lekéri vagy beállítja a tárfiók típusát.

Típus:Nullable<T>[StorageType]
elfogadott értékek:AzureStorage, AzureDataLakeStore, AzureDataLakeStorageGen2
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageContainer

Lekéri vagy beállítja a StorageContainer nevét az alapértelmezett Azure Storage-fiókhoz

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageFileSystem

Lekéri vagy beállítja az alapértelmezett Azure Data Lake Storage Gen2-fiók fájlrendszerét.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageRootPath

Lekéri vagy beállítja a fürt gyökerének elérési útját az alapértelmezett Data Lake Store-fiókban.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-SubnetName

Lekéri vagy beállítja a HDInsight-fürt alhálózatának nevét.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-Version

A HDInsight-fürt HDI-verzióját adja meg.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-VirtualNetworkId

Annak a virtuális hálózatnak az azonosítóját adja meg, amelybe a fürtöt kiépíteni szeretné.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkerNodeSize

Megadja a feldolgozó csomópont virtuális gépének méretét. A Get-AzVMSize használatával elfogadható virtuálisgép-méreteket érhet el, és tekintse meg a HDInsight díjszabási oldalát.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-Zone

Lekéri vagy beállítja a rendelkezésre állási zónákat.

Típus:String[]
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

-ZookeeperNodeSize

A Zookeeper-csomópont virtuális gépének méretét adja meg. A Get-AzVMSize használatával elfogadható virtuálisgép-méreteket érhet el, és tekintse meg a HDInsight díjszabási oldalát. Ez a paraméter csak HBase- vagy Storm-fürtökre érvényes.

Típus:String
Position:Named
alapértelmezett érték:None
Kötelező:False
Accept pipeline input:False
Accept wildcard characters:False

Bevitelek

AzureHDInsightConfig

Kimenetek

AzureHDInsightCluster

Jegyzetek

Kulcsszavak: azure, azurerm, arm, erőforrás, felügyelet, vezető, hadoop, hdinsight, hd, megállapítás