Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
update deployment template:
Browse files Browse the repository at this point in the history
Split the deployment of appservcice and azurebot
Add AzureBotRegion
  • Loading branch information
fangyangci committed Jun 27, 2022
1 parent 4029851 commit e368aa0
Show file tree
Hide file tree
Showing 36 changed files with 2,778 additions and 1,656 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"azureBotId": {
"value": ""
},
"azureBotSku": {
"value": "S1"
},
"azureBotRegion": {
"value": "global"
},
"botEndpoint": {
"value": ""
},
"appType": {
"value": "MultiTenant"
},
"appId": {
"value": ""
},
"UMSIName": {
"value": ""
},
"UMSIResourceGroupName": {
"value": ""
},
"tenantId": {
"value": ""
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appServiceName": {
"value": ""
},
"existingAppServicePlanName": {
"value": ""
},
"existingAppServicePlanLocation": {
"value": ""
},
"newAppServicePlanName": {
"value": ""
},
"newAppServicePlanLocation": {
"value": ""
},
"newAppServicePlanSku": {
"value": {
"name": "S1",
"tier": "Standard",
"size": "S1",
"family": "S",
"capacity": 1
}
},
"appType": {
"value": "MultiTenant"
},
"appId": {
"value": ""
},
"appSecret": {
"value": ""
},
"UMSIName": {
"value": ""
},
"UMSIResourceGroupName": {
"value": ""
},
"tenantId": {
"value": ""
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Need deploy BotAppService before AzureBot
---
az login
az deployment group create --resource-group <group-name> --template-file <template-file> --parameters @<parameters-file>
---

# parameters-for-template-BotApp-with-rg:

**appServiceName**:(required) The Name of the Bot App Service.

(choose an existingAppServicePlan or create a new AppServicePlan)
**existingAppServicePlanName**: The name of the App Service Plan.
**existingAppServicePlanLocation**: The location of the App Service Plan.
**newAppServicePlanName**: The name of the App Service Plan.
**newAppServicePlanLocation**: The location of the App Service Plan.
**newAppServicePlanSku**: The SKU of the App Service Plan. Defaults to Standard values.

**appType**: Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. **Allowed values are: MultiTenant(default), SingleTenant, UserAssignedMSI.**
**appId**:(required) Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings.
**appSecret**:(required for MultiTenant and SingleTenant) Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings.
**UMSIName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource used for the Bot's Authentication.
**UMSIResourceGroupName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource Group used for the Bot's Authentication.
**tenantId**: The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to <Subscription Tenant ID>.
-- MoreInfo: https://docs.microsoft.com/en-us/azure/bot-service/tutorial-provision-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Cnewgroup#create-an-identity-resource



# parameters-for-template-AzureBot-with-rg:

**azureBotId**:(required) The globally unique and immutable bot ID.
**azureBotSku**: The pricing tier of the Bot Service Registration. **Allowed values are: F0, S1(default)**.
**azureBotRegion**: Specifies the location of the new AzureBot. **Allowed values are: global(default), westeurope**.
**botEndpoint**: Use to handle client messages, Such as https://<botappServiceName>.azurewebsites.net/api/messages.

**appType**: Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. **Allowed values are: MultiTenant(default), SingleTenant, UserAssignedMSI.**
**appId**:(required) Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings.
**UMSIName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource used for the Bot's Authentication.
**UMSIResourceGroupName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource Group used for the Bot's Authentication.
**tenantId**: The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to <Subscription Tenant ID>.
-- MoreInfo: https://docs.microsoft.com/en-us/azure/bot-service/tutorial-provision-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Cnewgroup#create-an-identity-resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"azureBotId": {
"type": "string",
"metadata": {
"description": "The globally unique and immutable bot ID."
}
},
"azureBotSku": {
"defaultValue": "S1",
"type": "string",
"metadata": {
"description": "The pricing tier of the Bot Service Registration. Allowed values are: F0, S1(default)."
}
},
"azureBotRegion": {
"type": "string",
"defaultValue": "global",
"metadata": {
"description": "Specifies the location of the new AzureBot. Allowed values are: global(default), westeurope."
}
},
"botEndpoint": {
"type": "string",
"metadata": {
"description": "Use to handle client messages, Such as https://<botappServiceName>.azurewebsites.net/api/messages."
}
},
"appType": {
"type": "string",
"defaultValue": "MultiTenant",
"allowedValues": [
"MultiTenant",
"SingleTenant",
"UserAssignedMSI"
],
"metadata": {
"description": "Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"."
}
},
"appId": {
"type": "string",
"metadata": {
"description": "Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings."
}
},
"UMSIName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication."
}
},
"UMSIResourceGroupName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The User-Assigned Managed Identity Resource Group used for the Bot's Authentication."
}
},
"tenantId": {
"type": "string",
"defaultValue": "[subscription().tenantId]",
"metadata": {
"description": "The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to \"Subscription Tenant ID\"."
}
}
},
"variables": {
"tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]",
"msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]",
"appTypeDef": {
"MultiTenant": {
"tenantId": "",
"msiResourceId": ""
},
"SingleTenant": {
"tenantId": "[variables('tenantId')]",
"msiResourceId": ""
},
"UserAssignedMSI": {
"tenantId": "[variables('tenantId')]",
"msiResourceId": "[variables('msiResourceId')]"
}
},
"appType": {
"tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]",
"msiResourceId": "[variables('appTypeDef')[parameters('appType')].msiResourceId]"
}
},
"resources": [
{
"apiVersion": "2021-05-01-preview",
"type": "Microsoft.BotService/botServices",
"name": "[parameters('azureBotId')]",
"location": "[parameters('azureBotRegion')]",
"kind": "azurebot",
"sku": {
"name": "[parameters('azureBotSku')]"
},
"properties": {
"displayName": "[parameters('azureBotId')]",
"iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png",
"endpoint": "[parameters('botEndpoint')]",
"msaAppId": "[parameters('appId')]",
"msaAppTenantId": "[variables('appType').tenantId]",
"msaAppMSIResourceId": "[variables('appType').msiResourceId]",
"msaAppType": "[parameters('appType')]",
"luisAppIds": [],
"schemaTransformationVersion": "1.3",
"isCmekEnabled": false,
"isIsolated": false
},
"dependsOn": []
}
]
}
Loading

0 comments on commit e368aa0

Please sign in to comment.