Skip to content

Deployment

Vishesh Oberoi edited this page Apr 23, 2019 · 7 revisions

Deploy your bot to Azure from Source Control

This article will walk you through the deployment process to deploy your bot to Azure.

1. Create a bot

  • For C#, follow this doc to create a bot using the VSIX template.
  • For JavaScript/TypeScript, follow this doc to create a bot using yeoman generator.

2. Azure - Create a new Web App

  1. Navigate to https://portal.azure.com

  2. Click on the green + Create a resource sign

  3. Navigate to Web category and create a new Web App. Azure Blade Navbar

  4. Fill all the fields - App name, Subscription, Resource Group, OS, Publish (Code), etc.

Azure Blade Navbar

3. Azure - Create a new Bot Channels Registation Service

  1. On the Azure Portal, click on the green + Create a resource sign
  2. In the search bar type Bot Channels Registation and create a new service. Azure Blade Navbar
  3. Fill in all the details, make sure to create a new Microsoft App Id and Password. Make sure to save the App Id and Password in your .bot or .env or appsettings.json files.

Azure Blade Navbar

4. Setup a git repository

Create a git repository using your favourite git source control provider.

5. Deploy using Azure Deployment Center

Now, you need to connect your git repository with Azure App Services. Follow this doc to setup Continuous Deployment for your bot. Note that it is recommended to build using App Service Kudu build server.

6. Azure App settings

  1. Navigate to the new Web App from 2. Azure - Create a new Web App that you created earlier.

  2. Click on App Settings and update all your app settings with your credentials. Note that if you're using .bot file then you will have to add/update the botFilePath and botFileSecret.

7. Connect to Bot Channels Registation

  1. Navigate to your Bot Channels Registation service from 3. Azure - Create a new Bot Channels Registation Service that you created earlier.

  2. Click on Settings and update the Messaging endpoint with https://<your-web-app-name>.azurewebsites.net/api/messages.

8. Test your deployed bot

Wait for a few seconds after a succesful deployment and optionally restart your Web App to clear any cache. Go back to your Bot Channels Registation service blade and test using the Web Chat provided in the Azure portal or using the emulator on your machine.

Clone this wiki locally