Skip to content

Commit d08ff19

Browse files
author
Zhenyu Zhou
committed
Support Relay Outbound and Private Link
1 parent fe35aca commit d08ff19

File tree

14 files changed

+4244
-4179
lines changed

14 files changed

+4244
-4179
lines changed

src/HDInsight/HDInsight.Test/HDInsight.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.5" />
15-
<PackageReference Include="Microsoft.Azure.Management.HDInsight" Version="5.6.0" />
15+
<PackageReference Include="Microsoft.Azure.Management.HDInsight" Version="6.0.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.HDInsight.Job" Version="2.0.7" />
1717
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.1.0-preview.2" />
1818
<PackageReference Include="Microsoft.Azure.Management.ManagedServiceIdentity" Version="0.11.0" />

src/HDInsight/HDInsight.Test/ScenarioTests/HDInsightClusterTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,12 @@ public void TestCreateClusterWithKafkaRestProxy()
7777
{
7878
TestController.NewInstance.RunPowerShellTest(_logger, "Test-CreateClusterWithKafkaRestProxy");
7979
}
80+
81+
[Fact]
82+
[Trait(Category.AcceptanceType, Category.CheckIn)]
83+
public void TestCreateClusterWithRelayOutoundAndPrivateLink()
84+
{
85+
TestController.NewInstance.RunPowerShellTest(_logger, "Test-CreateClusterWithRelayOutoundAndPrivateLink");
86+
}
8087
}
8188
}

src/HDInsight/HDInsight.Test/ScenarioTests/HDInsightClusterTests.ps1

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,41 @@ function Test-CreateClusterWithKafkaRestProxy{
275275
Remove-AzResourceGroup -ResourceGroupName $cluster.ResourceGroup
276276
}
277277
}
278+
279+
<#
280+
.SYNOPSIS
281+
Test Create Azure HDInsight Cluster with Relay Outbound and Private Link
282+
#>
283+
284+
function Test-CreateClusterWithRelayOutoundAndPrivateLink{
285+
286+
# Create some resources that will be used throughout test
287+
try
288+
{
289+
# prepare parameter for creating parameter
290+
$params= Prepare-ClusterCreateParameter -location "South Central US"
291+
292+
# Private Link requires vnet has firewall, this is difficult to create dynamically, just hardcode here
293+
$vnetId="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/fakevnet"
294+
$subnetName="default"
295+
296+
# create cluster
297+
$cluster = New-AzHDInsightCluster -Location $params.location -ResourceGroupName $params.resourceGroupName `
298+
-ClusterName $params.clusterName -ClusterSizeInNodes $params.clusterSizeInNodes -ClusterType $params.clusterType `
299+
-StorageAccountResourceId $params.storageAccountResourceId -StorageAccountKey $params.storageAccountKey `
300+
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential `
301+
-MinSupportedTlsVersion $params.minSupportedTlsVersion `
302+
-VirtualNetworkId $vnetId -SubnetName $subnetName -Version 3.6 `
303+
-ResourceProviderConnection Outbound -PrivateLink Enabled
304+
305+
Assert-AreEqual $cluster.NetworkProperties.ResourceProviderConnection Outbound
306+
Assert-AreEqual $cluster.NetworkProperties.PrivateLink Enabled
307+
308+
}
309+
finally
310+
{
311+
# Delete cluster and resource group
312+
Remove-AzHDInsightCluster -ClusterName $cluster.Name
313+
Remove-AzResourceGroup -ResourceGroupName $cluster.ResourceGroup
314+
}
315+
}

0 commit comments

Comments
 (0)