Skip to content

Latest commit

 

History

History
82 lines (54 loc) · 4.38 KB

exercise5-Deployment.md

File metadata and controls

82 lines (54 loc) · 4.38 KB

Exercise 5: Deploying Your Bot to the Cloud

In this exercise you will learn how to register your bot and deploy it to Azure so others can use it.

Goals

To successfully complete this exercise you should be able to perform the following actions:

  • Register your bot in the Bot Framework Portal
  • Create an Azure Web App and publish your bot code there

Prerequisites

Register the Bot with the Bot Framework

Before others can use your bot, you must register it with the Bot Framework. Registration is a simple process. You are prompted to provide some information about your bot and then the portal generates the app ID and password that your bot will use to authenticate with the Bot Framework.

exercise5-botchannels

Publish your Bot to Azure

Before others can use your bot, you must deploy it to the cloud. You can deploy it to Azure or to any other cloud service.

Node.js

You need to add App Settings keys to your Web App like follows:

Key Description
AZURE_SEARCH_ACCOUNT Use the Azure Search account name
AZURE_SEARCH_INDEX Use the Azure Search index name
AZURE_SEARCH_KEY Use the Azure Search key
MICROSOFT_APP_ID Use the Bot App ID
MICROSOFT_APP_PASSWORD Use the Bot Password
LUIS_MODEL_URL Use the LUIS model URL
TICKET_SUBMISSION_URL Use your Web App URL (eg. https://help-desk-bot.azurewebsites.net/)

You need to configure the Web App to support deployments from a local git repository and setup your deployment credentials. Next, you need to add that local git repository to your project. When you push your changes to the repository the code is automatically published to the Web app.

C#

You should publish your bot directly from Visual Studio to a Web App. If you don't have any created, you can create one. Otherwise, you can pick an existing one.

exercise5-vs-publish

You need to add App Settings keys to your Web App like follows:

Key Description
AzureSearchAccount Use the Azure Search account name
AzureSearchIndex Use the Azure Search index name
AzureSearchKey Use the Azure Search key
MicrosoftAppId Use the Bot App ID
MicrosoftAppPassword Use the Bot Password
TicketsAPIBaseUrl Use your Web App URL (eg. https://help-desk-bot.azurewebsites.net/)

Update Your Bot Configuration

You need to update the App Service URL for your bot in the Bot Framework Portal with the URL of the Web App. Remember to put the /api/messages at the end of the URL and ensure the protocol is https.

exercise5-botconfiguration

NOTE: At this point you can test your published bot in the Web Channel Control in the Bot Framework Portal and Skype also (you will need to install Skype).

Further Challenges

Resources