Closed archmangler closed 5 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc
Any feedback ?
@archmangler you should use az webapp config appsettings
to configure the App Service hosting your bot.
az bot update
affects the Bot Registration, whether it is a Web App Bot or a Bot Channels Registration. It does not affect the settings on the App Service.
@stevengum - would you be able to provide an example please?
Instead of the commands you used above, you would do the following:
az appservice plan create -g devexp-bot-n devexp-bot-webapp-plan --sku S1
az webapp create -g devexp-bot -n devexp-bot-webapp --plan devexp-bot-webapp-plan
As an example we'll use these keys from the QnAMaker sample. You should use the keys that your bot/app looks for in the Application Settings.
az webapp config appsettings set -g devexp-bot -n devexp-bot-webapp --settings \
QnAKnowledgebaseId=devexp-qnamaker-knowledgebaseid \
QnAEndpointKey=devexp-qnamaker-webapp-PrimaryEndpointKey \
QnAEndpointHostName="https://devexp-qnamaker-webapp.azurewebsites.net" \
Closing issue. If the provided answer does not solve your ask, please @-mention me in this issue.
Hi @stevengum I've tested the command sequence you provided earlier. This does not result in an actual chatbot that can be tested via the webchat feature. It does result in the following resources being created in my resource group:
But no resource of type "Web app Bot". To obtain the web app bot I have to run the command:
az bot create --resource-group "rsg-whatever" \
--appid "xxxxwhatever" \
--display-name "Support-Bot" \
--kind webapp \
--name \"supportbot\" \
--password "somepasword" \
--lang "Csharp" \
--sku "S1"
This creates a resource of type "Web App Bot". However, it also creates along with it the following two new resources:
I did not specify these resources and would like to configure the chat bot to use the separately create app service plan and service. However, as mentioned before looking at the manual for "az bot create" and "az bot update" there is nothing to allow one to specify pre-existing app service or app service plans. This is a problem because:
a) These resources are created in a region we do not operate (West US) and we'd prefer it to operate in the region where the rest of our resources exist (SE Asia) b) Our automation scripting would be more efficient if it could update/delete/destroy only the resource in question instead of the entire set of bot+app-service+app-service-plan
For completeness sake this is the current sequence of commands I'm using to create a bot + search service (I've put the knowledgebase component on hold for now as it seems impossible to automate using the cli):
az search service create --resource-group "rsg-lolcorp-uat-az1-seccode" --name "mybot-search" --sku "standard"
az search admin-key show --resource-group "rsg-lolcorp-uat-az1-seccode" --service-name "mybot-search"
az appservice plan create -g "rsg-lolcorp-uat-az1-seccode" -n "mybot-service-plan" --sku "S1"
az webapp create --resource-group "rsg-lolcorp-uat-az1-seccode" --name "mybot-webapp" --plan "mybot-service-plan"
az webapp config appsettings set \
--resource-group "rsg-lolcorp-uat-az1-seccode" \
--name "mybot-webapp" \
--settings \
AzureSearchName="mybot-search" \
AzureSearchAdminKey="xxxxx" \
PrimaryEndpointKey="mybot-webapp-PrimaryEndpointKey" \
SecondaryEndpointKey="mybot-webapp-SecondaryEndpointKey" \
DefaultAnswer="No good match found in KB." \
QNAMAKER_EXTENSION_VERSION="latest"
az webapp cors add --resource-group "rsg-lolcorp-uat-az1-seccode" --name "mybot-webapp" -a "*"
az cognitiveservices account create \
--resource-group "rsg-lolcorp-uat-az2-seccode" \
--name "mybot-qnamaker" \
--kind QnAMaker \
--sku "S0" \
--location "westus" \
--api-properties qnaRuntimeEndpoint="https://mybot-webapp.azurewebsites.net"
az bot create --resource-group "rsg-lolcorp-uat-az1-seccode" \
--appid "xyz" \
--display-name "mybot-Support-Bot" \
--kind webapp \
--name "mybot" \
--password "yyyyyyy" \
--lang "Csharp" \
--sku "S1"
Describe the bug
Incomplete azure bot cli utility:
We can create the dependent services like qnamaker and web app service for the azure bot service using az cli, but there is no way to create a bot and specify these dependency services at creation time, or even using the "az bot update" command.
To Reproduce
Result: Nothing available in the documentation.
Impact:
No means to completely script bot creation using these elements without resorting to the portal. This means that for our large scale enterprise requirements we cannot smoothly automate bot creation via ci/cd pipelines at speed without substantial manual work in the portal. Due to the high rate of iteration required to develop bots to meet requirements, this is a blocker.
Expected behavior
Environment summary
Additional context