Publish a bot to Azure

APPLIES TO: Composer v1.x and v2.x

This article describes how to sign in to Azure, provision Azure resources, import existing Azure resources, and publish a basic bot to Azure Web App (Preview), all from within Bot Framework Composer.

Note

If you choose to run scripts to provision Azure resources and publish your bot, follow the instructions in the README file of your bot's project folder, for example, under this directory: C:\Users\UserName\Documents\Composer\BotName.

Prerequisites

Sign in to Azure

  1. In the Composer menu, select Publish.
  2. In the Publish your bots pane, select the Publish tab.
  3. Select the bot you want to publish.
  4. In the Publish target section, select Manage profiles from the drop-down menu.
  1. In the next display pane, select Add new in the Publishing Profile.
  1. In the Add new publishing profile pop-up window, in the Name box enter the name of the profile. In the Publishing target box, select Publish bot to Azure. Then select Next.
  1. You will then see the Sign in into Azure. Enter the required information. After signing, you must select one of the following options:

Create new Azure resources

This section covers steps to provision Azure resources from within Composer. If you already have your Azure resources provisioned or created manually in the Azure portal, follow the instructions in Import existing Azure resources instead.

  1. Once you are signed in to Azure from Composer, select Create new resources. Read the instructions on the right side of the screen and select Next.
  1. In the Configure resources pop-up window, provide the requested information.

configure resources

  1. Select Next.
  1. In the Add resources window, select the resources to create. Then select Next.

Important

If you are provisioning LUIS resources, make sure you select both the LUIS authoring resource and the LUIS prediction resource. If you already have a LUIS authoring or prediction resource configured locally, the provisioning process will create new ones for you.

  1. In the Review & create window, review the resources that will be created. Select Create.

  2. You will see messages in the upper right corner of your Composer. These messages describe the status of the provisioning process. This will take a few minutes to complete.

provision messages

  1. After you see the Provision success message on the upper right corner of the Composer screen, the provisioning process is completed. Go to your Azure portal to see the new resources created.

  2. Follow the instructions covered in the publish section to deploy your bot.

Import existing Azure resources

  1. Select Import existing resources. Read the instructions on the right side of the screen and select Next.

    import existing resource

  2. In the pop-up window Importing existing resources, modify the JSON file content based on your resources information. Then select Import.

    Note

    If you use LUIS, you should author and publish LUIS in the same region. Read more in the Authoring and publishing regions and associated keys article.

  3. After the previous step is completed, follow the instructions described in the publish section below to deploy your bot to Azure.

Hand off to an administrator

When you don't have proper permissions to use Azure or you want to generate resources from any other cloud service, you can ask an administrator to create the required resources on your behalf.

  1. Select Hand off to admin. Read the instructions on the right side of the screen and select Next.

  2. In the Add resources page, select the resources you want the administrator to provision. Select Next.

  3. In the Share resource request page, copy the instructions and securely share them with your Azure admin. You will need your Azure admin to run the provisioning command and create the resources for you.

  4. Your Azure admin should securely send you back a JSON publishing profile file. Save it.

  5. Follow the steps described in import existing resources and replace the content of the related JSON file with the content you saved, sent to you by the administrator.

The figure below shows the two phases of the hand off process. During the first phase you prepare the hand off request and send it to an admin for provisioning resources in the cloud. After the resources have been provisioned, not shown in the figure, the admin sends back the related JSON publishing profile. During the second phase, you use the received profile and import the provisioned resources by performing the steps described in import existing resources.

hand off steps

  1. After the previous step is completed, follow the instructions described in the publish section below to deploy your bot to Azure.

Publish

  1. Select Publish from the Composer menu. In the Publish your bots pane, select the bot to publish, then select a publish profile from the Publish target drop-down list.
  1. In the upper left, select Publish selected bots.
  1. In the Publish pop-up window, select Okay to start the publishing process. It will usually take a few minutes to complete. After the publishing process completes, you should see a Success message.
  1. Test the bot following the steps described in the next section.

Test your bot

  1. Go to your Azure portal
  2. Test the published bot by selecting Test in Web Chat.

Additional information

View and access your published LUIS app

If you publish a bot with LUIS data, your can view and access the published LUIS apps after you publish the bot to Azure. LUIS apps in the LUIS portal are associated with the LUIS authoring resources you created in the Azure portal.

After publishing the bot with LUIS configuration to Azure, you will see the published LUIS resources (both LUIS authoring resource and LUIS prediction resource) from the Azure portal as follows:

Note

The LUIS authoring resource has an luis-authoring suffix. The LUIS authoring resource allows you to create, manage, train, test, and publish your LUIS applications. The LUIS prediction resource has a luis suffix. You use the prediction resource or key to query prediction endpoint requests. Read more in the Create LUIS resources article.

To view and access the LUIS apps from the LUIS portal, make sure you select the matching LUIS authoring resource as shown in your Azure portal.

LUIS resource in LUIS portal

With the correct LUIS authoring resource selected, you will then see the associated LUIS apps from the LUIS portal.

UIS apps in LUIS portal 2