Simplifying chatbot deployment with Dapr on Kubernetes

Published 06-01-2021 11:54 AM 1,596 Views

This blog post talks about simplifying bot deployments especially in scenarios where the root bot and skill bot architecture is implemented.

 

Prerequisites

 

  • Understanding of Azure Bot Framework.
  • Understanding of Dapr on Kubernetes.
  • A kubernetes cluster such as Minikube, Docker-Desktop with Kubernetes or Azure Kuberenetes Service with ingress configured for SSL/TLS termination. 

 

Introduction

In this blog post we are going to focus on simplifying bot deployments especially in scenarios where the root bot and skill bot architecture is implemented. With this type of architecture, bot functionality is extended by using another bot (a skill). skill then is a bot that can perform a set of tasks for another bot and hence a bot can be both a skill and a user-facing bot.

 

The below diagram shows how end users interact with root bot and specific skill bots such as a travel booking bot.

 

 

img1

 

The root bot has a public endpoint but if it needs to be in an isolated network, it can be deployed using Direct Line App Service Extension. This is a topic for another blog post.

The skill bot can have public endpoints or private endpoints( not accessible publicly) depending on how the skill bot is consumed. But in the diagram above the skill bots do not have a public endpoint. 

 

Here are a few considerations:

  • The skills bots are typically developed by different teams and deployed at different milestones in the projects. 
  • Some skill bots will have to be live tested(A/B testing) in production to test usage and adoption.
  • Each Skill bots can have different scale requirements. For. e.g Travel Booking bot can have higher scale requirements than an FAQ bot. 
  • From IT point of view, the bots will have to managed from network isolation, authentication, domain names to name a few. 

With the above considerations, we shall see how Dapr helps to fast track some of the development aspects and also aide IT to manage bot deployment in a more stream lined manner. 

 

Dapr - Distributed application runtime enables developers to build a cloud-native application that can be deployed as microservices on-premises, in the cloud or edge devices. Here we are going to treat skill bots as micro services that can be deployed, updated and managed independently just like any other micro service. 

 

Here is what the bot APIs with Dapr can look like on Kubernetes:

img2

 

Firstly, we have Dapr operator deployed on the Kubernetes. The Dapr operator injects Dapr runtime as sidecar containers whenever a bot api container is deployed. Next, we create kubernetes deployment manifest with Dapr annotation as shown below and deploy the bot APIs as containers. 

 

 

  annotations:
        dapr.io/enabled: "true"
        dapr.io/app-id: "simplerootbotapp"
        dapr.io/app-port: "3978"

 

This essentially instructs Dapr sidecar container to communicate with root bot API on its container port 3978.

This is a huge benefit for hosting Bot APIs as it obviates the need for determining unique ports for the Bot APIs and hence the bot ports can be standardized across the board. 

Now, to communicate with the the Root Bot, the Azure Bot Services can connect to the Dapr Endpoint which is:

 

 

https://root-bot-domain-name/v1.0/invoke/simplerootbotapp/method/api/messages

 

 

Notice that we are using TLS between Azure Bot Service and bot api ensuring end-to-end TLS - from web browser to bot api hosted on kubernetes. 

 

In order for the above endpoint to work, the kubernetes needs have the ssl termination configured using ingress controller with the backend serviceport pointing to the dapr port 3500. 

An example ingress configuration is shown below. 

 

 

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: root-bot-ingress
  namespace: root-bot
  annotations:
    kubernetes.io/tls-acme: "true"
    kubernetes.io/ingress.class: "nginx"
spec:
  tls:
  - hosts:
    - root-bot-domain.com
    secretName: root-bot-ingress-tls
  rules:
  - host: root-bot-domain.com
    http:
      paths:
      - path: /
        backend:
          serviceName: root-bot-service
          servicePort: 3500

 

 

Now, we can test the root bot with bot emulator and you should get a response as shown below. In the example below, we have a simple root bot that communicates with the end user and simple echo skill bot that echoes user input. 

 

img3

 

Great! Now we are able to communicate with the root bot that is configured with Dapr. Notice in the first log message above, that the bot emulator is connected to the rootbot over https. 

 

Now, if we test a skill, we get the below response. 

img4

 

Yes. We are also able to communicate with the skill bot through the root bot. 

Now, if development teams need to create a new skill bot they would just add a skill manifest configuration as shown below. 

 

 

 

{
  "MicrosoftAppId": "",
  "MicrosoftAppPassword": "",
  "SkillHostEndpoint": "http://localhost:3500/v1.0/invoke/simplerootbotapp/method/api/skills/",
  "BotFrameworkSkills": [
    {
      "Id": "travelbot",
      "AppId": "85be21ea-3bbf-4ae6-a9bc-084718be67fb",
      "SkillEndpoint": "http://localhost:3500/v1.0/invoke/travelbot/method/api/messages"
    },
    {
      "Id": "HRSkillBot",
      "AppId": "85be21ea-3bbf-4ae6-a9bc-084718be67fb",
      "SkillEndpoint": "http://localhost:3500/v1.0/invoke/hrskillbot/method/api/messages"
    },
    {
      "Id": "DepartmentBot",
      "AppId": "85be21ea-3bbf-4ae6-a9bc-084718be67fb",
      "SkillEndpoint": "http://localhost:3500/v1.0/invoke/departmentbot/method/api/messages"
    }
  ]
}

 

 

 

Notice that the SkillHostEndpoint and SkillEndpoint are both pointing to localhost:3500 which is dapr runtime(sidecar container) injected by Dapr operator. 

 

Thus for the development teams, they don't need to worry about conflicting ports. They just need to provide a unique skill bot api url and dapr runtime would route to the correct skill endpoint. 

For IT, they would expose 443/TLS on kubernetes thus making sure the communication channel is encrypted end-to-end. 

 

In summary, dapr simplifies chatbot deployment comprising of root bot and multiple skill bots and kubernetes provides the scaling capabilities for bot APIs through node pools autoscaling and A/B testing through ingress controllers. 

 

Getting Started

You can test this if you like to see this in action. The artifacts are available in this git repo. This repo has a simple root bot and and an echo bot configured with Dapr. You just to build the containers, publish them to container registry and deploy kubernetes manifest files that describe the bots. 

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2389543%22%20slang%3D%22en-US%22%3ESimplifying%20chatbot%20deployment%20with%20Dapr%20on%20Kubernetes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2389543%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20blog%20post%20talks%20about%20simplifying%20bot%20deployments%20especially%20in%20scenarios%20where%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Fskills-conceptual%3Fview%3Dazure-bot-service-4.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eroot%20bot%20and%20skill%20bot%20architecture%3C%2FA%3E%20is%20implemented.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-226518292%22%20id%3D%22toc-hId-2034623450%22%20id%3D%22toc-hId-2033972755%22%3EPrerequisites%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EUnderstanding%20of%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Fbot-builder-basics%3Fview%3Dazure-bot-service-4.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Bot%20Framework.%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EUnderstanding%20of%20%3CA%20href%3D%22https%3A%2F%2Fdocs.dapr.io%2Foperations%2Fhosting%2Fkubernetes%2Fkubernetes-deploy%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EDapr%20on%20Kubernetes.%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EA%20kubernetes%20cluster%20such%20as%20Minikube%2C%20Docker-Desktop%20with%20Kubernetes%20or%20Azure%20Kuberenetes%20Service%20with%20ingress%20configured%20for%20SSL%2FTLS%20termination.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-226518292%22%20id%3D%22toc-hId-227168987%22%20id%3D%22toc-hId-226518292%22%3EIntroduction%3C%2FH3%3E%0A%3CP%3EIn%20this%20blog%20post%20we%20are%20going%20to%20focus%20on%20simplifying%20bot%20deployments%20especially%20in%20scenarios%20where%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Fskills-conceptual%3Fview%3Dazure-bot-service-4.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eroot%20bot%20and%20skill%20bot%20architecture%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20implemented.%20With%20this%20type%20of%20architecture%2C%26nbsp%3B%3CSPAN%3Ebot%20functionality%20is%20extended%20by%20using%20another%20bot%20(a%20skill).%26nbsp%3B%3C%2FSPAN%3EA%26nbsp%3B%3CEM%3Eskill%3C%2FEM%3E%26nbsp%3Bthen%20is%20a%20bot%20that%20can%20perform%20a%20set%20of%20tasks%20for%20another%20bot%20and%20hence%20a%20bot%20can%20be%20both%20a%20skill%20and%20a%20user-facing%20bot.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20below%20diagram%20shows%20how%20end%20users%20interact%20with%20root%20bot%20and%20specific%20skill%20bots%20such%20as%20a%20travel%20booking%20bot.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorAnil%20Dwarakanath_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22img1%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284127iAF6EA5B17CD67EA1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22img1%22%20alt%3D%22img1%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20root%20bot%20has%20a%20public%20endpoint%20but%20if%20it%20needs%20to%20be%20in%20an%20isolated%20network%2C%20it%20can%20be%20deployed%20using%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Fbot-service-channel-directline-extension%3Fview%3Dazure-bot-service-4.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDirect%20Line%20App%20Service%20Extension%3C%2FA%3E.%20This%20is%20a%20topic%20for%20another%20blog%20post.%3C%2FP%3E%0A%3CP%3EThe%20skill%20bot%20can%20have%20public%20endpoints%20or%20private%20endpoints(%20not%20accessible%20publicly)%20depending%20on%20how%20the%20skill%20bot%20is%20consumed.%20But%20in%20the%20diagram%20above%20the%20skill%20bots%20do%20not%20have%20a%20public%20endpoint.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20are%20a%20few%20considerations%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20skills%20bots%20are%20typically%20developed%20by%20different%20teams%20and%20deployed%20at%20different%20milestones%20in%20the%20projects.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3ESome%20skill%20bots%20will%20have%20to%20be%20live%20tested(A%2FB%20testing)%20in%20production%20to%20test%20usage%20and%20adoption.%3C%2FLI%3E%0A%3CLI%3EEach%20Skill%20bots%20can%20have%20different%20scale%20requirements.%20For.%20e.g%20Travel%20Booking%20bot%20can%20have%20higher%20scale%20requirements%20than%20an%20FAQ%20bot.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EFrom%20IT%20point%20of%20view%2C%20the%20bots%20will%20have%20to%20managed%20from%20network%20isolation%2C%20authentication%2C%20domain%20names%20to%20name%20a%20few.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EWith%20the%20above%20considerations%2C%20we%20shall%20see%20how%20Dapr%20helps%20to%20fast%20track%20some%20of%20the%20development%20aspects%20and%20also%20aide%20IT%20to%20manage%20bot%20deployment%20in%20a%20more%20stream%20lined%20manner.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.dapr.io%2Fconcepts%2Foverview%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EDapr%20-%20Distributed%20application%20runtime%3C%2FA%3E%20enables%20developers%20to%20build%20a%20cloud-native%20application%20that%20can%20be%20deployed%20as%20microservices%20on-premises%2C%20in%20the%20cloud%20or%20edge%20devices.%20Here%20we%20are%20going%20to%20treat%20skill%20bots%20as%20micro%20services%20that%20can%20be%20deployed%2C%20updated%20and%20managed%20independently%20just%20like%20any%20other%20micro%20service.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20what%20the%20bot%20APIs%20with%20Dapr%20can%20look%20like%20on%20Kubernetes%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22img2%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284206iFDDE54C7EDBC6051%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22img2%22%20alt%3D%22img2%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirstly%2C%20we%20have%20Dapr%20operator%20deployed%20on%20the%20Kubernetes.%20The%20Dapr%20operator%20injects%20Dapr%20runtime%20as%20sidecar%20containers%20whenever%20a%20bot%20api%20container%20is%20deployed.%20Next%2C%20we%20create%20kubernetes%20deployment%20manifest%20with%20Dapr%20annotation%20as%20shown%20below%20and%20deploy%20the%20bot%20APIs%20as%20containers.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-yaml%22%3E%3CCODE%3E%20%20annotations%3A%0A%20%20%20%20%20%20%20%20dapr.io%2Fenabled%3A%20%22true%22%0A%20%20%20%20%20%20%20%20dapr.io%2Fapp-id%3A%20%22simplerootbotapp%22%0A%20%20%20%20%20%20%20%20dapr.io%2Fapp-port%3A%20%223978%22%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20essentially%20instructs%20Dapr%20sidecar%20container%20to%20communicate%20with%20root%20bot%20API%20on%20its%20container%20port%203978.%3C%2FP%3E%0A%3CP%3EThis%20is%20a%20huge%20benefit%20for%20hosting%20Bot%20APIs%20as%20it%20obviates%20the%20need%20for%20determining%20unique%20ports%20for%20the%20Bot%20APIs%20and%20hence%20the%20bot%20ports%20can%20be%20standardized%20across%20the%20board.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%2C%20to%20communicate%20with%20the%20the%20Root%20Bot%2C%20the%20Azure%20Bot%20Services%20can%20connect%20to%20the%20Dapr%20Endpoint%20which%20is%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markdown%22%3E%3CCODE%3Ehttps%3A%2F%2Froot-bot-domain-name%2Fv1.0%2Finvoke%2Fsimplerootbotapp%2Fmethod%2Fapi%2Fmessages%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENotice%20that%20we%20are%20using%20TLS%20between%20Azure%20Bot%20Service%20and%20bot%20api%20ensuring%20end-to-end%20TLS%20-%20from%20web%20browser%20to%20bot%20api%20hosted%20on%20kubernetes.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20order%20for%20the%20above%20endpoint%20to%20work%2C%20the%20kubernetes%20needs%20have%20the%20ssl%20termination%20configured%20using%20ingress%20controller%20with%20the%20backend%20serviceport%20pointing%20to%20the%20dapr%20port%203500.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAn%20example%20ingress%20configuration%20is%20shown%20below.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-yaml%22%3E%3CCODE%3EapiVersion%3A%20extensions%2Fv1beta1%0Akind%3A%20Ingress%0Ametadata%3A%0A%20%20name%3A%20root-bot-ingress%0A%20%20namespace%3A%20root-bot%0A%20%20annotations%3A%0A%20%20%20%20kubernetes.io%2Ftls-acme%3A%20%22true%22%0A%20%20%20%20kubernetes.io%2Fingress.class%3A%20%22nginx%22%0Aspec%3A%0A%20%20tls%3A%0A%20%20-%20hosts%3A%0A%20%20%20%20-%20root-bot-domain.com%0A%20%20%20%20secretName%3A%20root-bot-ingress-tls%0A%20%20rules%3A%0A%20%20-%20host%3A%20root-bot-domain.com%0A%20%20%20%20http%3A%0A%20%20%20%20%20%20paths%3A%0A%20%20%20%20%20%20-%20path%3A%20%2F%0A%20%20%20%20%20%20%20%20backend%3A%0A%20%20%20%20%20%20%20%20%20%20serviceName%3A%20root-bot-service%0A%20%20%20%20%20%20%20%20%20%20servicePort%3A%203500%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%2C%20we%20can%20test%20the%20root%20bot%20with%20bot%20emulator%20and%20you%20should%20get%20a%20response%20as%20shown%20below.%20In%20the%20example%20below%2C%20we%20have%20a%20simple%20root%20bot%20that%20communicates%20with%20the%20end%20user%20and%20simple%20echo%20skill%20bot%20that%20echoes%20user%20input.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22img3%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284213i5CFBCE8D21D6FBB2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22img3%22%20alt%3D%22img3%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGreat!%20Now%20we%20are%20able%20to%20communicate%20with%20the%20root%20bot%20that%20is%20configured%20with%20Dapr.%20Notice%20in%20the%20first%20log%20message%20above%2C%20that%20the%20bot%20emulator%20is%20connected%20to%20the%20rootbot%20over%20https.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%2C%20if%20we%20test%20a%20skill%2C%20we%20get%20the%20below%20response.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22img4%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284216i2EE7ADA3E1625E27%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22img4%22%20alt%3D%22img4%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes.%20We%20are%20also%20able%20to%20communicate%20with%20the%20skill%20bot%20through%20the%20root%20bot.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%2C%20if%20development%20teams%20need%20to%20create%20a%20new%20skill%20bot%20they%20would%20just%20add%20a%20skill%20manifest%20configuration%20as%20shown%20below.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%22MicrosoftAppId%22%3A%20%22%22%2C%0A%20%20%22MicrosoftAppPassword%22%3A%20%22%22%2C%0A%20%20%22SkillHostEndpoint%22%3A%20%22http%3A%2F%2Flocalhost%3A3500%2Fv1.0%2Finvoke%2Fsimplerootbotapp%2Fmethod%2Fapi%2Fskills%2F%22%2C%0A%20%20%22BotFrameworkSkills%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22Id%22%3A%20%22travelbot%22%2C%0A%20%20%20%20%20%20%22AppId%22%3A%20%2285be21ea-3bbf-4ae6-a9bc-084718be67fb%22%2C%0A%20%20%20%20%20%20%22SkillEndpoint%22%3A%20%22http%3A%2F%2Flocalhost%3A3500%2Fv1.0%2Finvoke%2Ftravelbot%2Fmethod%2Fapi%2Fmessages%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22Id%22%3A%20%22HRSkillBot%22%2C%0A%20%20%20%20%20%20%22AppId%22%3A%20%2285be21ea-3bbf-4ae6-a9bc-084718be67fb%22%2C%0A%20%20%20%20%20%20%22SkillEndpoint%22%3A%20%22http%3A%2F%2Flocalhost%3A3500%2Fv1.0%2Finvoke%2Fhrskillbot%2Fmethod%2Fapi%2Fmessages%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22Id%22%3A%20%22DepartmentBot%22%2C%0A%20%20%20%20%20%20%22AppId%22%3A%20%2285be21ea-3bbf-4ae6-a9bc-084718be67fb%22%2C%0A%20%20%20%20%20%20%22SkillEndpoint%22%3A%20%22http%3A%2F%2Flocalhost%3A3500%2Fv1.0%2Finvoke%2Fdepartmentbot%2Fmethod%2Fapi%2Fmessages%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENotice%20that%20the%20SkillHostEndpoint%20and%20SkillEndpoint%20are%20both%20pointing%20to%20localhost%3A3500%20which%20is%20dapr%20runtime(sidecar%20container)%20injected%20by%20Dapr%20operator.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThus%20for%20the%20development%20teams%2C%20they%20don't%20need%20to%20worry%20about%20conflicting%20ports.%20They%20just%20need%20to%20provide%20a%20unique%20skill%20bot%20api%20url%20and%20dapr%20runtime%20would%20route%20to%20the%20correct%20skill%20endpoint.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20IT%2C%20they%20would%20expose%20443%2FTLS%20on%20kubernetes%20thus%20making%20sure%20the%20communication%20channel%20is%20encrypted%20end-to-end.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20summary%2C%20dapr%20simplifies%20chatbot%20deployment%20comprising%20of%20root%20bot%20and%20multiple%20skill%20bots%20and%20kubernetes%20provides%20the%20scaling%20capabilities%20for%20bot%20APIs%20through%20node%20pools%20autoscaling%20and%20A%2FB%20testing%20through%20ingress%20controllers.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-226518292%22%20id%3D%22toc-hId--1580285476%22%20id%3D%22toc-hId--1580936171%22%3EGetting%20Started%3C%2FH3%3E%0A%3CP%3EYou%20can%20test%20this%20if%20you%20like%20to%20see%20this%20in%20action.%20The%20artifacts%20are%20available%20in%20this%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fanildwarepo%2Fchatbot-with-dapr%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20git%20repo%3C%2FA%3E.%20This%20repo%20has%20a%20simple%20root%20bot%20and%20and%20an%20echo%20bot%20configured%20with%20Dapr.%20You%20just%20to%20build%20the%20containers%2C%20publish%20them%20to%20container%20registry%20and%20deploy%20kubernetes%20manifest%20files%20that%20describe%20the%20bots.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2389543%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20are%20looking%20to%20build%20and%20implement%20chatbots%20in%20enterprise%20or%20to%20their%20end%20users%2C%20you%20can%20simplify%20the%20bot%20deployment%20by%20leveraging%20Dapr%20capabilities%20and%20host%20the%20bots%20on%20Azure%20Kubernetes%20or%20any%20other%20kubernetes%20plane.%20Then%2C%20you%20can%20leverage%20benefits%20such%20as%20decoupling%20bot%20development%20and%20hosting%2C%20accelerating%20bot%20deployment%20and%20ongoing%20maintenance.%20For%20bot%20developers%20there%20are%20also%20several%20benefits%20as%20they%20can%20focus%20on%20bot%20functionality%20while%20not%20worrying%20about%20bot%20authentication%2C%20hosting%2C%20scaling%20etc.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20blog%20we%20will%20look%20at%20building%20a%20deploying%20bot%20using%20Azure%20Bot%20Framework%20to%20kubernetes%20and%20leverage%20Dapr%20Capabilities.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22img2%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284205iFD600C7CA103DCFB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22img2%22%20alt%3D%22img2%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Jun 01 2021 09:31 AM
Updated by: