From 757ac1d4aab9d90cb6a37012deb4f26a906e3bb7 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Fri, 4 Dec 2020 16:15:40 -0800 Subject: [PATCH] Add descriptions and validation to connected mode (#13676) --- .../deploy.arc.data.controller.ipynb | 9 ++- extensions/arc/package.json | 64 +++++++++++++------ extensions/arc/package.nls.json | 37 ++++++----- 3 files changed, 71 insertions(+), 39 deletions(-) diff --git a/extensions/arc/notebooks/arcDeployment/deploy.arc.data.controller.ipynb b/extensions/arc/notebooks/arcDeployment/deploy.arc.data.controller.ipynb index 23941d73fc..cc92ef010e 100644 --- a/extensions/arc/notebooks/arcDeployment/deploy.arc.data.controller.ipynb +++ b/extensions/arc/notebooks/arcDeployment/deploy.arc.data.controller.ipynb @@ -134,11 +134,10 @@ " if arc_admin_password != confirm_password:\n", " sys.exit(f'Passwords do not match.')\n", "\n", - "os.environ[\"SPN_CLIENT_ID\"] = spn_client_id\n", - "os.environ[\"SPN_CLIENT_TENANTID\"] = spn_client_tenantid\n", - "if \"AZDATA_NB_VAR_SPN_CLIENT_SECRET\" in os.environ:\n", - " os.environ[\"SPN_CLIENT_SECRET\"] = os.environ[\"AZDATA_NB_VAR_SPN_CLIENT_SECRET\"]\n", - " print(os.environ[\"SPN_CLIENT_TENANTID\"])\n", + "os.environ[\"SPN_CLIENT_ID\"] = sp_client_id\n", + "os.environ[\"SPN_CLIENT_TENANTID\"] = sp_client_tenantid\n", + "if \"AZDATA_NB_VAR_SP_CLIENT_SECRET\" in os.environ:\n", + " os.environ[\"SPN_CLIENT_SECRET\"] = os.environ[\"AZDATA_NB_VAR_SP_CLIENT_SECRET\"]\n", "os.environ[\"SPN_AUTHORITY\"] = \"https://login.microsoftonline.com\"" ], "metadata": { diff --git a/extensions/arc/package.json b/extensions/arc/package.json index ada6de770b..c3cb30183c 100644 --- a/extensions/arc/package.json +++ b/extensions/arc/package.json @@ -200,7 +200,7 @@ ] }, { - "title": "%arc.data.controller.data.controller.create.azureconfig.title%", + "title": "%arc.data.controller.create.azureconfig.title%", "sections": [ { "title": "%arc.data.controller.project.details.title%", @@ -218,7 +218,7 @@ }, { "type": "azure_locations", - "label": "%arc.data.controller.arc.data.controller.location%", + "label": "%arc.data.controller.location%", "defaultValue": "eastus", "required": true, "locationVariableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_LOCATION", @@ -244,7 +244,7 @@ "fields": [ { "type": "readonly_text", - "label": "%arc.data.controller.data.controller.connectivitymode.description%", + "label": "%arc.data.controller.connectivitymode.description%", "labelWidth": "600px" }, { @@ -268,19 +268,38 @@ } }, { - "label": "%arc.data.controller.spnclient%", - "variableName": "AZDATA_NB_VAR_SPN_CLIENT_ID", + "type": "readonly_text", + "label": "%arc.data.controller.serviceprincipal.description%", + "labelWidth": "600px", + "links": [ + { + "text": "%arc.data.controller.readmore%", + "url": "https://docs.microsoft.com/azure/azure-arc/data/upload-metrics" + } + ] + }, + { + "label": "%arc.data.controller.spclientid%", + "description": "%arc.data.controller.spclientid.description%", + "variableName": "AZDATA_NB_VAR_SP_CLIENT_ID", "type": "text", "required": true, "defaultValue": "", + "placeHolder": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "enabled": { "target": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE", "value": "direct" - } + }, + "validations" : [{ + "type": "regex_match", + "regex": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$", + "description": "%arc.data.controller.spclientid.validation.description%" + }] }, { - "label": "%arc.data.controller.spnclientsecret%", - "variableName": "AZDATA_NB_VAR_SPN_CLIENT_SECRET", + "label": "%arc.data.controller.spclientsecret%", + "description": "%arc.data.controller.spclientsecret.description%", + "variableName": "AZDATA_NB_VAR_SP_CLIENT_SECRET", "type": "password", "required": true, "defaultValue": "", @@ -290,38 +309,45 @@ } }, { - "label": "%arc.data.controller.spntenant%", - "variableName": "AZDATA_NB_VAR_SPN_CLIENT_TENANTID", + "label": "%arc.data.controller.sptenantid%", + "description": "%arc.data.controller.sptenantid.description%", + "variableName": "AZDATA_NB_VAR_SP_CLIENT_TENANTID", "type": "text", "required": true, "defaultValue": "", + "placeHolder": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "enabled": { "target": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE", "value": "direct" - } + }, + "validations" : [{ + "type": "regex_match", + "regex": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$", + "description": "%arc.data.controller.sptenantid.validation.description%" + }] } ] } ] }, { - "title": "%arc.data.controller.data.controller.create.controllerconfig.title%", + "title": "%arc.data.controller.create.controllerconfig.title%", "sections": [ { - "title": "%arc.data.controller.data.controller.details.title%", + "title": "%arc.data.controller.details.title%", "fields": [ { "type": "readonly_text", - "label": "%arc.data.controller.data.controller.details.description%", + "label": "%arc.data.controller.details.description%", "labelWidth": "600px" }, { "type": "text", - "label": "%arc.data.controller.arc.data.controller.namespace%", + "label": "%arc.data.controller.namespace%", "validations" : [{ "type": "regex_match", "regex": "^[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?$", - "description": "%arc.data.controller.arc.data.controller.namespace.validation.description%" + "description": "%arc.data.controller.namespace.validation.description%" }], "defaultValue": "arc", "required": true, @@ -329,11 +355,11 @@ }, { "type": "text", - "label": "%arc.data.controller.arc.data.controller.name%", + "label": "%arc.data.controller.name%", "validations" : [{ "type": "regex_match", "regex": "^[a-z0-9]([-.a-z0-9]{0,251}[a-z0-9])?$", - "description": "%arc.data.controller.arc.data.controller.name.validation.description%" + "description": "%arc.data.controller.name.validation.description%" }], "defaultValue": "arc-dc", "required": true, @@ -374,7 +400,7 @@ ] }, { - "title": "%arc.data.controller.data.controller.create.summary.title%", + "title": "%arc.data.controller.create.summary.title%", "isSummaryPage": true, "fieldHeight": "16px", "sections": [ diff --git a/extensions/arc/package.nls.json b/extensions/arc/package.nls.json index f9cde30c40..62ddb51095 100644 --- a/extensions/arc/package.nls.json +++ b/extensions/arc/package.nls.json @@ -20,18 +20,18 @@ "arc.data.controller.kube.cluster.context": "Cluster context", "arc.data.controller.cluster.config.profile.title": "Choose the config profile", "arc.data.controller.cluster.config.profile": "Config profile", - "arc.data.controller.data.controller.create.azureconfig.title": "Azure and Connectivity Configuration", - "arc.data.controller.data.controller.connectivitymode.description": "Select the connectivity mode for the controller.", - "arc.data.controller.data.controller.create.controllerconfig.title": "Controller Configuration", + "arc.data.controller.create.azureconfig.title": "Azure and Connectivity Configuration", + "arc.data.controller.connectivitymode.description": "Select the connectivity mode for the controller.", + "arc.data.controller.create.controllerconfig.title": "Controller Configuration", "arc.data.controller.project.details.title": "Azure details", "arc.data.controller.project.details.description": "Select the subscription to manage deployed resources and costs. Use resource groups like folders to organize and manage all your resources.", - "arc.data.controller.data.controller.details.title": "Data controller details", - "arc.data.controller.data.controller.details.description": "Provide a namespace, name and storage class for your Azure Arc data controller. This name will be used to identify your Arc instance for remote management and monitoring.", - "arc.data.controller.arc.data.controller.namespace": "Data controller namespace", - "arc.data.controller.arc.data.controller.namespace.validation.description": "Namespace must consist of lower case alphanumeric characters or '-', start/end with an alphanumeric character, and be 63 characters or fewer in length.", - "arc.data.controller.arc.data.controller.name": "Data controller name", - "arc.data.controller.arc.data.controller.name.validation.description": "Name must consist of lower case alphanumeric characters, '-' or '.', start/end with an alphanumeric character and be 253 characters or less in length.", - "arc.data.controller.arc.data.controller.location": "Location", + "arc.data.controller.details.title": "Data controller details", + "arc.data.controller.details.description": "Provide a namespace, name and storage class for your Azure Arc data controller. This name will be used to identify your Arc instance for remote management and monitoring.", + "arc.data.controller.namespace": "Data controller namespace", + "arc.data.controller.namespace.validation.description": "Namespace must consist of lower case alphanumeric characters or '-', start/end with an alphanumeric character, and be 63 characters or fewer in length.", + "arc.data.controller.name": "Data controller name", + "arc.data.controller.name.validation.description": "Name must consist of lower case alphanumeric characters, '-' or '.', start/end with an alphanumeric character and be 253 characters or less in length.", + "arc.data.controller.location": "Location", "arc.data.controller.admin.account.title": "Administrator account", "arc.data.controller.admin.account.name": "Data controller login", "arc.data.controller.admin.account.password": "Password", @@ -39,10 +39,16 @@ "arc.data.controller.connectivitymode": "Connectivity Mode", "arc.data.controller.direct": "Direct", "arc.data.controller.indirect": "Indirect", - "arc.data.controller.spnclient": "SPN Client ID", - "arc.data.controller.spnclientsecret": "SPN Client Secret", - "arc.data.controller.spntenant": "SPN Tenant ID", - "arc.data.controller.data.controller.create.summary.title": "Review your configuration", + "arc.data.controller.serviceprincipal.description": "When deploying a controller in direct connected mode a Service Principal is required for uploading metrics to Azure. {0} about how to create this Service Principal and assign it the correct roles.", + "arc.data.controller.spclientid": "Service Principal Client ID", + "arc.data.controller.spclientid.description": "The Application (client) ID of the created Service Principal", + "arc.data.controller.spclientid.validation.description": "The client ID must be a GUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "arc.data.controller.spclientsecret": "Service Principal Client Secret", + "arc.data.controller.spclientsecret.description": "The password generated during creation of the Service Principal", + "arc.data.controller.sptenantid": "Service Principal Tenant ID", + "arc.data.controller.sptenantid.description": "The Tenant ID of the Service Principal. This must be the same as the Tenant ID of the subscription selected to create this controller for.", + "arc.data.controller.sptenantid.validation.description": "The tenant ID must be a GUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "arc.data.controller.create.summary.title": "Review your configuration", "arc.data.controller.summary.arc.data.controller": "Azure Arc data controller", "arc.data.controller.summary.estimated.cost.per.month": "Estimated cost per month", "arc.data.controller.summary.arc.by.microsoft" : "by Microsoft", @@ -65,7 +71,8 @@ "arc.data.controller.summary.data.controller.namespace": "Data controller namespace", "arc.data.controller.summary.controller": "Controller", "arc.data.controller.summary.location": "Location", - "arc.data.controller.arc.data.controller.agreement": "I accept {0} and {1}.", + "arc.data.controller.agreement": "I accept {0} and {1}.", + "arc.data.controller.readmore": "Read more", "microsoft.agreement.privacy.statement":"Microsoft Privacy Statement", "deploy.script.action":"Script to notebook", "deploy.done.action":"Deploy",