How to develop and deploy several different bots in Azure? - azure

I have developed a bot using Microsoft Bot Framework v3 and C#.Net. I have also deployed the bot in Azure with in a resource group having necessary resources like App Service Plan, App Service, Bot Service etc. Now there is a requirement to create a new bot for different workflow. I want to know what are my chances to use my existing Azure resources. Should I create a new Bot service & App Service in same App Service Plan?
If anyone have created and deployed various different bots in Azure please share the strategy.

It highly depends on your scenarios.
But considering that your different bots must run in parallel:
App Service Plan can be reused, if its pricing is high enough to size to the demands of both bots
Storage account can also be reused as it uses bot Id in its keys (but it would be better to specify different tables for each bot in your dependency injection if using Table Storage)
App Service (where you are exposing your /api/messages endpoint) must be specific if you don't manage a special configuration
App Bot Service (which is linked to this endpoint) must be specific also, as Bot Channel Registration is specific to each bot

Related

How to create Microsoft Teams Apps with bots dynamically?

We would like to have an ability to programmatically create Microsoft Teams apps so that they can be installed into the same Microsoft Teams tenant. Since there is no way to pass any data from the app manifest to the bot endpoint we have to create separate bot for each app which will have an endpoint like so /api/messages/:id. This way we can differentiate between the apps/bots on the backend.
We weren't able to find bot Azure APIs to accomplish this easily, aside from low level resource APIs or Azure CLI to create app registry and the bot.
Is this the best way to approach this problem? Any suggestions?

How to get an accurate cost of deploying a bot solution?

Before moving from prototype to production phase, I want to calcualte accurate cost of production solution for getting better understanding of ROI.
i have built and deploy a bot which is based on enterprise bot template which is deployed using msbot deployment script which creates following services:Web App Bot, Azure Cosmos DB Account, App Service Plan, App Service, Storage Account, Application Insights, Cognitive Services (LUIS), App Service (QNA Host), Cognitive Services (QnA Maker), Search Service.
Azure portal allows to get pricing (https://azure.microsoft.com/en-us/pricing/calculator/), however, i am not sure whether i should include Cosmos DB as well as Storage Account? or is it a deployment script problem,
Any pointers is appreciated!
This is a process i followed to get the correct cost of the production solution.
First, there are two ways you can build a bot (a) using VS studio template (VSIX) and build the bot and deploy using msbot script. (b) Create a bot on Azure and download the code and make changes.
(a) is a recommended option from MSFT.
With option (a) I have used msbot script to deploy the solution, that creates list of services in your Azure subscription. If you look closely, it creates Cosmos DB as well as Storage Account, Cosmos DB is mainly used for storing bot state and storage account is used for storing log and app insights, etc.
Also there are two app service are included, but if you look closely, both app service shares the same app service plan meaning one app service is used for both services, however, it depends on your need.
Most of the services are allowed to scale-up, but azure search can not be scale-up, it must be re-created and re-configured.
Finally you need to include following services for calculating price using the azure price calculator:App Service,QnA Maker Service,LUIS Service,Cosmos DB, Storage Account, and Bot

Multiple QnA makers on one azure app service

I would like to create multiple knowledge bases using https://www.qnamaker.ai. On the UI when I create a new qnamaker service using my azure subscription it actually creates 3 things/services for 1 qnamaker which are as follows
qnamaker as Cognitive service
Azure app service to provision qnamaker
Azure Search service to power qnamaker search
Based on the documentation it makes sense to have this created. But, I would like to see if it's possible to combine all qnamaker's on one single strong , highly scaled azure app service. ?
You are able to create multiple knowledgebases on one Azure app service.
The only thing you would need to change if using APIs is the knowledgebase ID while the subscription key would remain the same.
You can either create new knowledgebases using its API here https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/create-new-kb-csharp
Or log into their QnA Portal https://www.qnamaker.ai/ into my knowledgebases, creating a new one and adding in the HTTP Request info to the API method. https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/how-to/metadata-generateanswer-usage

Difference between Functions Bot, Web App Bot & Bot Channels Registration in Microsoft Azure?

What's the difference?
I couldn't find specific information about all three services here or on Microsoft Azure or on Azure Bot Service...
Function and Web App bots are essentially the same thing. The core difference is that most of the business logic for a functions bot is contained in one or more Azure functions which are c# scripts, while the business logic for a WebApp bot is contained in an WebAPI running as an App Service.
Now, a Bot Channels Regstration is an entirely different beast. This resource is what you use when you want to use the Bot Service functionality in Azure. It is the middle piece to connect your bot to the various channels that it supports. A channel is an external 'client application' such as Facebook Messenger, Twitter, twillio, web chat, etc.
This is the basics but there is plenty of information in the Bot Framework documentation.
Registration of Web App Bot and Bot Channels is deprecated as of 9/1/2021. Azure Bot takes the place of both the Web App Bot resource and Bot Channels resource types.
https://learn.microsoft.com/en-us/learn/modules/intro-to-bot-service-bot-framework-composer/2-what-is-azure-bot-service

Can I create and deploy Microsoft bot with LUIS but without azure services?

Can I create and deploy Microsoft bot without azure services?
I want to use LUIS services without azure services.
Is it possible? Alternatives for azure?
Thank you for replies in advance
To answer your question - it is possible to create a bot which uses LUIS without using the Microsoft Bot Framework -
Using LUIS: LUIS expose their service via HTTP endpoint. If you create an application in LUIS and create a model, you can get the intents by issuing a request to the provided endpoint. It is not directly associated with Azure. Note that in order to allow unlimited traffic to your endpoint, you will need to associate it with an Azure subscription, but you do not have to use any Azure resources.
Microsoft Bot Framework - In order to create a bot without using the bot framework, first let's understand what services the framework provides you with. you need:
Somewhere to host your bot as a service. You can use any cloud provider for this or even host it on your machine
Build your bot - you bot will have to implement a conversation protocol, depending on the channel for which you are writing your bot
Integrate with the channel for which you are building your bot for - bots for Facebook, Telegram or Skype have different protocols and need to be connected differently with these platforms. The Bot Framework simplifies this process for you. But you can just create a specific bot for your desired platform. For that, you should check the documentation for the channel which you develop for.

Resources