From 7150c06fb7d399fb9a4b8a0d4ef7de7033faabb1 Mon Sep 17 00:00:00 2001 From: Dayenne Souza Date: Thu, 12 Dec 2024 11:22:27 -0300 Subject: [PATCH] fix readme and azure deployment templates --- deploy/azure/README.md | 5 ++--- deploy/azure/createUiDefinition.json | 22 +++++++++++++++++++--- deploy/azure/mainTemplate.json | 9 ++++++--- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/deploy/azure/README.md b/deploy/azure/README.md index fb38b86..c650962 100644 --- a/deploy/azure/README.md +++ b/deploy/azure/README.md @@ -30,9 +30,8 @@ It is recommended that you use Entra ID for authentication. See details on pricing [here](https://azure.microsoft.com/en-us/pricing/details/app-service/linux/) (We default to `Premium v3 P0v3` Plan) 1. **Go to Azure Marketplace**: - - Open your web browser and go to [Azure portal](https://portal.azure.com), search in the top bar for `Marketplace`. - - If you're not logged in, you may need to log in to your Azure account. - - Use the search bar to find the `Intelligence Toolkit` application. + + - In your browser, open [Intelligence Tooklit on Marketplace here](https://portal.azure.com/#create/msr-resilience.itk_app_servicewebapp) 2. **Select the Application**: - Click on the application from the search results to open its details page. diff --git a/deploy/azure/createUiDefinition.json b/deploy/azure/createUiDefinition.json index 77b24e4..64a8a25 100644 --- a/deploy/azure/createUiDefinition.json +++ b/deploy/azure/createUiDefinition.json @@ -9,7 +9,7 @@ "type": "Microsoft.Common.TextBox", "label": "Web app name", "defaultValue": "", - "toolTip": "The App name, to be acessed", + "toolTip": "The App name, to be accessed", "constraints": { "required": true, "regex": "^[a-zA-Z0-9-]{3,60}$", @@ -20,7 +20,8 @@ { "name": "disableAuth", "type": "Microsoft.Common.CheckBox", - "label": "Disable authentication" + "label": "Disable authentication", + "toolTip": "Disable authentication for the app" }, { "name": "authClientId", @@ -64,7 +65,7 @@ "type": "Microsoft.Common.OptionsGroup", "label": "AI type", "defaultValue": "OpenAI", - "toolTip": "", + "toolTip": "The AI service to use", "constraints": { "allowedValues": [ { @@ -84,19 +85,32 @@ "name": "aiManagedIdentity", "type": "Microsoft.Common.CheckBox", "label": "Use Managed Identity", + "toolTip": "Use Managed Identity to authenticate to Azure AI", "visible": "[equals(steps('AISettings').aiType, 'azure')]" }, { "name": "aiEndpoint", "type": "Microsoft.Common.TextBox", "label": "Endpoint", + "toolTip": "The endpoint of the Azure AI service", "defaultValue": "", + "constraints": { + "required": "[equals(steps('AISettings').aiType, 'azure')]", + "regex": "^(https://)([a-zA-Z0-9-]+)(.openai.azure.com)$", + "validationMessage": "Must be a valid Azure AI endpoint" + }, "visible": "[equals(steps('AISettings').aiType, 'azure')]" }, { "name": "openaiApiKey", "type": "Microsoft.Common.TextBox", + "toolTip": "The OpenAI key", "label": "Key", + "constraints": { + "required": false, + "regex": "^[a-zA-Z0-9-]{36}$", + "validationMessage": "Must be a valid OpenAI key" + }, "defaultValue": "", "visible": "[or(equals(steps('AISettings').aiManagedIdentity, false), equals(steps('AISettings').aiType, 'openai'))]" } @@ -106,10 +120,12 @@ "name": "tags", "type": "Microsoft.Common.Section", "label": "Tags", + "toolTip": "Tags to apply to the resources", "elements": [ { "name": "tagsObj", "type": "Microsoft.Common.TagsByResource", + "toolTip": "Tags to apply to the resources", "resources": [ "Microsoft.Web/sites" ] diff --git a/deploy/azure/mainTemplate.json b/deploy/azure/mainTemplate.json index 57fd843..089f62b 100644 --- a/deploy/azure/mainTemplate.json +++ b/deploy/azure/mainTemplate.json @@ -59,6 +59,10 @@ "numberOfWorkers": { "type": "string", "defaultValue": "1" + }, + "openIdIssuerUrl": { + "type": "string", + "defaultValue": "https://login.microsoftonline.com/" } }, "variables": { @@ -125,7 +129,7 @@ "alwaysOn": "[parameters('alwaysOn')]", "ftpsState": "[variables('ftpsState')]" }, - "serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]", + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", "clientAffinityEnabled": false, "httpsOnly": true, "publicNetworkAccess": "Enabled" @@ -178,7 +182,7 @@ "enabled": "[equals(parameters('disableAuth'), 'false')]", "registration": { "clientId": "[parameters('clientId')]", - "openIdIssuer": "[concat('https://login.microsoftonline.com/',subscription().tenantId,'/v2.0')]" + "openIdIssuer": "[concat(parameters('openIdIssuerUrl'),subscription().tenantId,'/v2.0')]" }, "validation": { "allowedAudiences": [ "[parameters('clientId')]" ] @@ -195,7 +199,6 @@ "image": "ghcr.io/microsoft/intelligence-toolkit:latest", "targetPort": "80", "isMain": true, - "startUpCommand": "", "authType": "Anonymous" }, "dependsOn": [