4

Introduction

Bot Framework Composer allows me to design a bot and then deploy it to Azure, all from within the Composer application.

This is great, but manually deploying from a developer's computer is not suitable for a strategy that includes automated builds, testing, and deploying to multiple environments.

Questions

  1. How to implement automated deployments? (preferably from Azure DevOps Pipeline).
  2. To be able to have multiple devs work on a single Composer project:
    1. What parts of solution should be in source control? (like the Composer bot project, .dotnet runtime)
    2. To what parts should developers make changes?
    3. What parts can be built in a pipeline?

Note: I don't expect anyone to come up with a complete solution. It would be great to have a discussion with someone from the Bot Framework team, and people that also want to automate the deployment of their Composer bots


Research I've done

  • I have been searching the documentation for information about CI/CD, but couldn't find any information on that.
  • I did learn some things about the bot's runtime (the .net core project generated by Composer) located at ~/BotFrameworkComposer/hostedBots/xxxxx.xxxxxxxxxxx/runtime/azurewebapp
    • It contains a powershell script (/Scripts/deploy.ps1) which looks promising in terms of automated deployment.
    • When using Composer to make changes to a Dialog, user utterances, and when creating new Dialogs, the only things that seem to change are .dialog, .lg, and .lu files. I don't see any changes to C# classes. This would make it easier to merge changes made by multiple developers.
Edwin Otten
  • 122
  • 9
  • Refer to https://github.com/microsoft/BotFramework-Composer/issues/3339. The Composer team will provide documentation and examples on how to configure Composer to publish into a CI/CD infrastructure in an upcoming release. – ranusharao Sep 23 '20 at 18:50

1 Answers1

1

We can achieve automated build deployments for bot composer using Azure DevOps CI/CD pipelines. Refer MS Documentation. Use git to check in bot code and collaborate with team.

You can start by deploying an empty Bot using CI/CD.

Steps:

  • Create empty Bot in composer and check in Bot code in git
  • Create a deployment yaml file having 2 separate stages. (1. To deploy Bot ARM infrastructure, 2. Deploy Bot code to Web App service)
  • Use ARM templates to provision bot resources. When you Create a bot, the source code generated includes a DeploymentTemplates folder that contains ARM templates. Get the required ARM templates for provisioning bot resources (Bot channel registration, App Service Plan, Web App)
  • Create Bot CI/CD pipeline: MS Documentation

Note: Bot CI/CD applies to: Composer v2.x. For empty Bot deployment LUIS and QnA are not required. So can skip templates/buildAndDeployModels.yaml step.

KaranSingh
  • 460
  • 4
  • 11
  • thanks @KaranSingh for the information, is it feasible to deploy it via gitlab rather then azure devOps – Varun Jun 01 '22 at 12:21