Partager via


Publish a bot to Azure from Composer

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.

Note

Azure QnA Maker will be retired on 31 March 2025. Beginning 1 October 2022, you won't be able to create new QnA Maker resources or knowledge bases. A newer version of the question and answering capability is now available as part of Azure AI Language.

Custom question answering, a feature of Azure AI Language, is the updated version of the QnA Maker service. For more information about question-and-answer support in Composer, see Natural language processing.

Note

Language Understanding (LUIS) will be retired on 1 October 2025. Beginning 1 April 2023, you won't be able to create new LUIS resources. A newer version of language understanding is now available as part of Azure AI Language.

Conversational language understanding (CLU), a feature of Azure AI Language, is the updated version of LUIS. For more information about question-and-answer support in Composer, see Natural language processing.

Prerequisites

Sign in to Azure

  1. Select Publish in the navigation pane.

  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.

  5. In the next display pane, select Add new in the Publishing Profile.

  6. 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.

    Screenshot displaying the Name and Publishing target fields.

    You'll then see the Sign in into Azure window. Enter the required information. After signing, you must select one of the following options:

Create 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're signed in to Azure from Composer, select Create new resources. Read the instructions on the right side of the screen and select Next.

  2. In the Configure resources pop-up window, provide the requested information. Remember to select the operating system (Windows or Linux). Based on your template selection when creating the project, runtime (.NET, or Node JS) and your App Service, a default OS selection is assigned.

    configure resources

  3. Select Next.

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

    Important

    If you're 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.

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

  5. You'll 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

  6. 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.

  7. Follow the instructions covered in the publish your bot 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 your bot 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.

Note

If you're an Azure administrator, read the How to provision Azure resources article for more details.

  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'll 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

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

Publish your bot

  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.

  2. In the upper left, select Publish selected bots.

  3. 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.

  4. 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 published a bot with LUIS data, you can view and access the published LUIS apps. 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'll 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.

Screenshot of the Azure portal showing the name of the LUIS authoring resource.

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

Screenshot of the LUIS portal showing the LUIS apps.