Add-​Azure​Rm​HD​Insight​Component​Version

Adds a version for a service running in a cluster to a cluster configuration object.

Syntax

Add-AzureRmHDInsightComponentVersion
   [-Config] <AzureHDInsightConfig>
   [-ComponentName] <String>
   [-ComponentVersion] <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Add-AzureRmHDInsightComponentVersion cmdlet adds a version for a service running in a cluster to the Azure HDInsight configuration object created by the New-AzureRmHDInsightClusterConfig cmdlet.

Examples

-------------------------- Example 1: Add a version for Spark to the cluster configuration object. --------------------------

@{paragraph=PS C:\>}

PS C:\> # Primary storage account info
        $storageAccountResourceGroupName = "Group"
        $storageAccountName = "yourstorageacct001"
        $storageAccountKey = Get-AzureStorageAccountKey `
            -ResourceGroupName $storageAccountResourceGroupName `
            -Name $storageAccountName | %{ $_.Key1 }
        $storageContainer = "container001"

        # Cluster configuration info
        $location = "East US 2"
        $clusterResourceGroupName = "Group"
        $clusterName = "your-spark-001"
        $clusterCreds = Get-Credential
        $sshClusterCreds = Get-Credential

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

        # Create the cluster
        New-AzureRmHDInsightClusterConfig `
            | Add-AzureRmHDInsightComponentVersion `
                -ComponentName "Spark" `
                -ComponentVersion "2.0" `
            | New-AzureRmHDInsightCluster `
                -ClusterType Spark `
                -OSType Linux `
                -ClusterSizeInNodes 4 `
                -ResourceGroupName $clusterResourceGroupName `
                -ClusterName $clusterName `
                -HttpCredential $clusterCreds `
                -Location $location `
                -DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
                -DefaultStorageAccountKey $storageAccountKey `
                -DefaultStorageContainer $storageContainer `
                -SshCredential $sshCredentials `
                -Version "3.5"

This command adds the version of Spark to the HDInsight cluster named 'your-spark-001'.

Required Parameters

-ComponentName
Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ComponentVersion
Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Config
Type:AzureHDInsightConfig
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf
Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig