diff --git a/extensions/resource-deployment/src/localizedConstants.ts b/extensions/resource-deployment/src/localizedConstants.ts index 75f5f4b29e..1f9f1fe13e 100644 --- a/extensions/resource-deployment/src/localizedConstants.ts +++ b/extensions/resource-deployment/src/localizedConstants.ts @@ -19,5 +19,6 @@ export const signIn = localize('azure.signin', "Sign in…"); export const refresh = localize('azure.refresh', "Refresh"); export const createNewResourceGroup = localize('azure.resourceGroup.createNewResourceGroup', "Create a new resource group"); export const NewResourceGroupAriaLabel = localize('azure.resourceGroup.NewResourceGroupAriaLabel', "New resource group name"); +export const realm = localize('deployCluster.Realm', "Realm"); diff --git a/extensions/resource-deployment/src/services/bigDataClusterDeploymentProfile.ts b/extensions/resource-deployment/src/services/bigDataClusterDeploymentProfile.ts index c96b229515..32bd38756d 100644 --- a/extensions/resource-deployment/src/services/bigDataClusterDeploymentProfile.ts +++ b/extensions/resource-deployment/src/services/bigDataClusterDeploymentProfile.ts @@ -26,6 +26,7 @@ export interface ActiveDirectorySettings { domainControllerFQDNs: string; dnsIPAddresses: string; domainDNSName: string; + realm?: string; clusterUsers: string; clusterAdmins: string; appReaders?: string; @@ -284,7 +285,7 @@ export class BigDataClusterDeploymentProfile { activeDirectoryObject.domainDnsName = adSettings.domainDNSName; activeDirectoryObject.subdomain = adSettings.subdomain; activeDirectoryObject.accountPrefix = adSettings.accountPrefix; - activeDirectoryObject.realm = adSettings.domainDNSName.toUpperCase(); + activeDirectoryObject.realm = adSettings.realm ?? adSettings.domainDNSName.toUpperCase(); activeDirectoryObject.clusterAdmins = this.splitByComma(adSettings.clusterAdmins); activeDirectoryObject.clusterUsers = this.splitByComma(adSettings.clusterUsers); if (adSettings.appReaders) { diff --git a/extensions/resource-deployment/src/ui/deployClusterWizard/deployClusterWizardModel.ts b/extensions/resource-deployment/src/ui/deployClusterWizard/deployClusterWizardModel.ts index f2216791c7..edcb9a83d7 100644 --- a/extensions/resource-deployment/src/ui/deployClusterWizard/deployClusterWizardModel.ts +++ b/extensions/resource-deployment/src/ui/deployClusterWizard/deployClusterWizardModel.ts @@ -128,6 +128,7 @@ export class DeployClusterWizardModel extends Model { organizationalUnit: this.getStringValue(VariableNames.OrganizationalUnitDistinguishedName_VariableName)!, domainControllerFQDNs: this.getStringValue(VariableNames.DomainControllerFQDNs_VariableName)!, domainDNSName: this.getStringValue(VariableNames.DomainDNSName_VariableName)!, + realm: this.getStringValue(VariableNames.Realm_VariableName), dnsIPAddresses: this.getStringValue(VariableNames.DomainDNSIPAddresses_VariableName)!, clusterAdmins: this.getStringValue(VariableNames.ClusterAdmins_VariableName)!, clusterUsers: this.getStringValue(VariableNames.ClusterUsers_VariableName)!, diff --git a/extensions/resource-deployment/src/ui/deployClusterWizard/pages/clusterSettingsPage.ts b/extensions/resource-deployment/src/ui/deployClusterWizard/pages/clusterSettingsPage.ts index d4e77f7689..f8d114abb8 100644 --- a/extensions/resource-deployment/src/ui/deployClusterWizard/pages/clusterSettingsPage.ts +++ b/extensions/resource-deployment/src/ui/deployClusterWizard/pages/clusterSettingsPage.ts @@ -13,6 +13,7 @@ import { WizardPageBase } from '../../wizardPageBase'; import * as VariableNames from '../constants'; import { DeployClusterWizard } from '../deployClusterWizard'; import { AuthenticationMode } from '../deployClusterWizardModel'; +import * as localizedConstants from '../../../localizedConstants'; const localize = nls.loadMessageBundle(); const ConfirmPasswordName = 'ConfirmPassword'; @@ -148,6 +149,12 @@ export class ClusterSettingsPage extends WizardPageBase { label: localize('deployCluster.DomainDNSName', "Domain DNS name"), required: true, variableName: VariableNames.DomainDNSName_VariableName + }, { + type: FieldType.Text, + label: localizedConstants.realm, + required: false, + variableName: VariableNames.Realm_VariableName, + description: localize('deployCluster.RealmDescription', "If not provided, the domain DNS name will be used as the default value.") }, { type: FieldType.Text, label: localize('deployCluster.ClusterAdmins', "Cluster admin group"), diff --git a/extensions/resource-deployment/src/ui/deployClusterWizard/pages/summaryPage.ts b/extensions/resource-deployment/src/ui/deployClusterWizard/pages/summaryPage.ts index 34e98801f8..0c169926ce 100644 --- a/extensions/resource-deployment/src/ui/deployClusterWizard/pages/summaryPage.ts +++ b/extensions/resource-deployment/src/ui/deployClusterWizard/pages/summaryPage.ts @@ -10,6 +10,7 @@ import { createSection, createGroupContainer, createFlexContainer, createLabel } import { WizardPageBase } from '../../wizardPageBase'; import * as VariableNames from '../constants'; import { AuthenticationMode } from '../deployClusterWizardModel'; +import * as localizedConstants from '../../../localizedConstants'; const localize = nls.loadMessageBundle(); export class SummaryPage extends WizardPageBase { @@ -53,6 +54,7 @@ export class SummaryPage extends WizardPageBase { { type: FieldType.ReadonlyText, label: localize('deployCluster.ClusterContext', "Cluster context"), + defaultValue: this.wizard.model.getStringValue(VariableNames.ClusterContext_VariableName), labelCSSStyles: { fontWeight: FontWeight.Bold } }] } @@ -151,13 +153,13 @@ export class SummaryPage extends WizardPageBase { { type: FieldType.ReadonlyText, label: localize('deployCluster.AppOwners', "App owners"), - defaultValue: this.wizard.model.getStringValue(VariableNames.AppOwners_VariableName), + defaultValue: this.wizard.model.getStringValue(VariableNames.AppOwners_VariableName, ''), labelCSSStyles: { fontWeight: FontWeight.Bold } }, { type: FieldType.ReadonlyText, label: localize('deployCluster.AppReaders', "App readers"), - defaultValue: this.wizard.model.getStringValue(VariableNames.AppReaders_VariableName), + defaultValue: this.wizard.model.getStringValue(VariableNames.AppReaders_VariableName, ''), labelCSSStyles: { fontWeight: FontWeight.Bold } }] }); @@ -166,13 +168,13 @@ export class SummaryPage extends WizardPageBase { { type: FieldType.ReadonlyText, label: localize('deployCluster.Subdomain', "Subdomain"), - defaultValue: this.wizard.model.getStringValue(VariableNames.Subdomain_VariableName), + defaultValue: this.wizard.model.getStringValue(VariableNames.Subdomain_VariableName, ''), labelCSSStyles: { fontWeight: FontWeight.Bold } }, { type: FieldType.ReadonlyText, label: localize('deployCluster.AccountPrefix', "Account prefix"), - defaultValue: this.wizard.model.getStringValue(VariableNames.AccountPrefix_VariableName), + defaultValue: this.wizard.model.getStringValue(VariableNames.AccountPrefix_VariableName, ''), labelCSSStyles: { fontWeight: FontWeight.Bold } }] }); @@ -183,6 +185,11 @@ export class SummaryPage extends WizardPageBase { label: localize('deployCluster.DomainServiceAccountUserName', "Service account username"), defaultValue: this.wizard.model.getStringValue(VariableNames.DomainServiceAccountUserName_VariableName), labelCSSStyles: { fontWeight: FontWeight.Bold } + }, { + type: FieldType.ReadonlyText, + label: localizedConstants.realm, + defaultValue: this.wizard.model.getStringValue(VariableNames.Realm_VariableName, ''), + labelCSSStyles: { fontWeight: FontWeight.Bold } }] }); }