Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HDInsight] Fix a bug #26135

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/HDInsight/HDInsight/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->

## Upcoming Release
* Fixed a bug: Error occurs when setting the same assigned identity for storage and esp configurations.

## Version 6.2.0
* Added new feature: Enable adding public IP tags to clusters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ var storageAccount in
{
clusterIdentity.UserAssignedIdentities.Add(AssignedIdentity, new UserAssignedIdentity());
}
if (StorageAccountManagedIdentity != null)
if (StorageAccountManagedIdentity != null && !clusterIdentity.UserAssignedIdentities.ContainsKey(StorageAccountManagedIdentity))
{
clusterIdentity.UserAssignedIdentities.Add(StorageAccountManagedIdentity, new UserAssignedIdentity());
}
Expand Down
49 changes: 47 additions & 2 deletions src/HDInsight/HDInsight/help/New-AzHDInsightCluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ New-AzHDInsightCluster `
### Example 8: Create an Azure HDInsight cluster with Azure Data Lake Gen2 storage.
```powershell
# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageManagedIdentity = "yourstorageusermanagedidentity"
$storageFileSystem = "filesystem01"
Expand Down Expand Up @@ -412,7 +411,7 @@ New-AzHDInsightCluster `
-SshCredential $clusterCreds
```

### Example 9: Create an Azure HDInsight cluster with Enterprise Security Package(ESP) and Enable HDInsight ID Broker.
### Example 9: Create an Azure HDInsight cluster with Enterprise Security Package(ESP), Enable HDInsight ID Broker and using WASB storage.
```powershell
# Primary storage account info
$storageAccountResourceGroupName = "Group"
Expand Down Expand Up @@ -623,6 +622,52 @@ New-AzHDInsightCluster `
-AmbariDatabase $config.AmbariDatabase -HiveMetastore $config.HiveMetastore -OozieMetastore $config.OozieMetastore -Zone $zones
```

### Example 13: Create an Azure HDInsight cluster with Enterprise Security Package(ESP) and using Azure Data Lake Gen2 storage.
```powershell
# Primary storage account info
$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
# ESP configuration
$domainResourceId = "your Azure AD Domin Service resource id"
$domainUser = "yourdomainuser"
$domainPassword = ConvertTo-SecureString -String "****" -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 `
-StorageAccountManagedIdentity $storageManagedIdentity `
-StorageFileSystem $storageFileSystem `
-StorageAccountType $storageAccountType `
-SshCredential $clusterCreds `
-VirtualNetworkId $vnetId -SubnetName $subnetName `
-AssignedIdentity $assignedIdentity `
-SecurityProfile $config.SecurityProfile
```

## PARAMETERS

### -AadTenantId
Expand Down