Skip to content
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
10 changes: 10 additions & 0 deletions src/azure-cli/azure/cli/command_modules/hdinsight/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@
--assign-identity "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyMsiRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyMSI" \\
--cluster-admin-account [email protected] \\
--cluster-users-group-dns MyGroup
- name: Create a cluster with the Enterprise Security Package (ESP) and enable HDInsight ID Broker.
text: |-
az hdinsight create --esp --idbroker -t spark -g MyResourceGroup -n MyCluster \\
-p "HttpPassword1234!" \\
--storage-account MyStorageAccount \\
--subnet "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1" \\
--domain "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.AAD/domainServices/MyDomain.onmicrosoft.com" \\
--assign-identity "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyMsiRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyMSI" \\
--cluster-admin-account [email protected] \\
--cluster-users-group-dns MyGroup
- name: Create a Kafka cluster with disk encryption. See https://docs.microsoft.com/azure/hdinsight/kafka/apache-kafka-byok.
text: |-
az hdinsight create -t kafka -g MyResourceGroup -n MyCluster \\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def load_arguments(self, _):
c.argument('esp', arg_group='Cluster', action='store_true',
help='Specify to create cluster with Enterprise Security Package. If omitted, '
'creating cluster with Enterprise Security Package will not not allowed.')
c.argument('idbroker', arg_group='Cluster', action='store_true',
help='Specify to create ESP cluster with HDInsight ID Broker. If omitted, '
'creating ESP cluster with HDInsight ID Broker will not not allowed.')
c.argument('minimal_tls_version', arg_type=get_enum_type(['1.0', '1.1', '1.2']),
arg_group='Cluster', help='The minimal supported TLS version.')

Expand Down
11 changes: 10 additions & 1 deletion src/azure-cli/azure/cli/command_modules/hdinsight/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
outbound_public_network_access_type=None, encryption_in_transit=None,
autoscale_type=None, autoscale_min_workernode_count=None, autoscale_max_workernode_count=None,
timezone=None, days=None, time=None, autoscale_workernode_count=None,
encryption_at_host=None, esp=False, no_validation_timeout=False):
encryption_at_host=None, esp=False, idbroker=False, no_validation_timeout=False):
from .util import build_identities_info, build_virtual_network_profile, parse_domain_name, \
get_storage_account_endpoint, validate_esp_cluster_create_params
from azure.mgmt.hdinsight.models import ClusterCreateParametersExtended, ClusterCreateProperties, OSType, \
Expand Down Expand Up @@ -257,6 +257,15 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
)
)

if esp and idbroker:
roles.append(
Role(
name="idbrokernode",
target_instance_count=2,
virtual_network_profile=virtual_network_profile
)
)

storage_accounts = []
if storage_account:
# Specify storage account details only when storage arguments are provided
Expand Down