Botframework-solutions: Does not create knowledge base if select operating system as Linux

Created on 17 Feb 2021  ·  11Comments  ·  Source: microsoft/botframework-solutions

/virtual-assistant/tutorials/create-assistant/typescript/4-provision-you-azure-resources/

I have tried creating and configuring QnA based Chatbot both in C# & Typescript version, for Windows (default) configuration it works well and create all the resources and knowledgebase in qnamaker without fail.
But when i try to host infrastructure (App Service Plan & Bot Service) on Linux Operating System (by simply changing kind to Linux)
"kind": "linux" for App Service plan, it though create all required (App Service Plan, Cognitive Service, Web app Bot Service, Search service etc) but does not create knowledgebase.
It seems VA template or overall deployment does not support Linux version deployment , as i tried in both C# & Typescript Version
Even after creating all service if i try to create knowledge base manually it throws error as No Endpoint keys found
NoEndpoint

Bot Services Kobuk Docs customer-replied-to customer-reported

Most helpful comment

This is the link I got from QnA Maker that tells how to deploy it directly in the Azure Portal. I will look at how this can be translated into an ARM template tomorrow and add those details here. https://techcommunity.microsoft.com/t5/azure-ai/introducing-qna-maker-managed-now-in-public-preview/ba-p/1845575

All 11 comments

Hi @pravinambekar, on which file are you changing the kind to Linux?
We will be taking a look at this and will let you know as soon as we have an update :slightly_smiling_face:.

Hello @VictorGrycuk, The ARM template used for creating resources, here while defining App Service Plan.

{ "comments": "app service plan", "type": "Microsoft.Web/serverFarms", "apiVersion": "2018-02-01", "name": "[parameters('appServicePlanName')]", "location": "[parameters('location')]", "kind": "linux", "sku": "[parameters('appServicePlanSku')]", "properties": {"reserved": true}, "tags": { "[parameters('resourceTagName')]": "[parameters('resourceTagValue')]" }

Hi @pravinambekar, sorry for the delay. We successfully reproduced the issue following these steps that you mentioned using a Virtual Assistant:

  1. Go to template.json
  2. Replace the app service plan with the configuration you attached:
    json { "comments": "app service plan", "type": "Microsoft.Web/serverFarms", "apiVersion": "2018-02-01", "name": "[parameters('appServicePlanName')]", "location": "[parameters('location')]", "kind": "linux", "sku": "[parameters('appServicePlanSku')]", "properties": {"reserved": true}, "tags": { "[parameters('resourceTagName')]": "[parameters('resourceTagValue')]" }
  3. Execute the deploy.ps1
  4. Check that the deploy finished generating the App Service Plan using Linux as Operating System
  5. Check that the deploy finished without generating the Knowledge Bases

Also, we tried creating them using the qnamaker portal and we received the same error of No Endpoint keys found.

As soon as we have any update, we will back to you here 😊.

_App Service Plan using Linux_
image

_Knowledge Bases are not generated using the deploy.ps1_
image

_Issue reproduced_
image

@pravinambekar - after researching and finding the Azure/azure-cli#9004 issue in which you commented, we think that this is not a limitation of the Virtual Assistant itfself but related to the compatibility between QnAMaker Cognitive Service and App Service Plan in Linux, so the issue is not related to botframework-solutions.

@lauren-mills do you know if the QnAMaker Cognitive Service is compatible with Linux App Service Plan?

Last but not least, we noticed that in BotBuilder-Samples repository the team is working on adding the template.json for Linux in the samples, however, we didn't find a template.json for Linux which contains a Knowledge Base.

Hello @Batta32 , I completely agree with you, over the past few day i have been trying different approach and i was able to host / configure all the resources based on Linux platform using VA based template.json and deployment script,
My primary understanding is QnAMaker cognitive service does not support Linux based services and does not automate creating Knowledgebase, giving "No Endpoint Keys Found" error even in manual creation process.
May be @lauren-mills can shade some light on this.

Hi @pravinambekar, I reached out to the QnA Maker team and they confirmed that QnA Maker v1 does not support Linux due to its deployment via a site extension. They recommended switching to QnA Maker v2 which does not require a separate runtime app service. Could you try updating your ARM template and let us know if that works for you?

Realizing there doesn't appear to be clear instructions for deploying a v2 instance so I'm following up with the QnA Maker team for more information.

Thanks @lauren-mills for the follow-up text,
That is exactly i was looking for since yesterday, as i was bit confused about using QnAMaker V2 API's in ARM as it is merely a definition of resources.

This is the link I got from QnA Maker that tells how to deploy it directly in the Azure Portal. I will look at how this can be translated into an ARM template tomorrow and add those details here. https://techcommunity.microsoft.com/t5/azure-ai/introducing-qna-maker-managed-now-in-public-preview/ba-p/1845575

I deployed a qnamaker v2 instance and this is the ARM template that corresponds. Can you try adding this to your ARM template in the deployment script in place of the existing qna services and see if it works? I'm not sure if the kb deployment will be the same but it is worth trying:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "name": {
            "defaultValue": "<your-service-name>",
            "type": "String"
        },
        "search-name": {
            "defaultValue": "<your-service-name>-search",
            "type": "String"
        }
    },
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.CognitiveServices/accounts",
            "apiVersion": "2017-04-18",
            "name": "[parameters('name')]",
            "location": "southcentralus",
            "sku": {
                "name": "S0"
            },
            "kind": "QnAMaker.v2",
            "properties": {
                "apiProperties": {},
                "customSubDomainName": "[parameters('name')]",
                "privateEndpointConnections": [],
                "publicNetworkAccess": "Enabled"
            }
        },
        {
            "type": "Microsoft.Search/searchServices",
            "apiVersion": "2020-08-01",
            "name": "[parameters('search-name')]",
            "location": "West US",
            "sku": {
                "name": "standard"
            },
            "properties": {
                "replicaCount": 1,
                "partitionCount": 1,
                "hostingMode": "Default",
                "publicNetworkAccess": "Enabled",
                "networkRuleSet": {
                    "ipRules": []
                }
            }
        }
    ]
}

Thank you @lauren-mills and to everyone who contributed in this discussion thread, at last, I am now able to run fully functional QnAMaker based ChatBot, based on Linux plan,

Its not just the issue about Linux that was addressed, but the way QnAMaker cognitive service works, it allows multi-lingual KB support and there is no need for additional app service.

Although, new QnAMaker API version brought few changes in the way ARM resource used to configure.

Thank you and Cheers :)

Was this page helpful?
0 / 5 - 0 ratings