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.
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:
- A subscription to Microsoft Azure.
- A basic bot built using Composer v1.3 or later.
- Supported OS versions.
Sign in to Azure
- Select Publish in the navigation pane.
- In the Publish your bots pane, select the Publish tab.
- Select the bot you want to publish.
- In the Publish target section, select Manage profiles from the drop-down menu.
- In the next display pane, select Add new in the Publishing Profile.
- 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.
You will then see the Sign in into Azure. 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.
- 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.
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.
- In the Add resources window, select the resources to create. Then select Next.
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.
In the Review & create window, review the resources that will be created. Select Create.
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.
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.
Follow the instructions covered in the publish your bot section to deploy your bot.
Import existing Azure resources
Select Import existing resources. Read the instructions on the right side of the screen and select Next.
In the pop-up window Importing existing resources, modify the JSON file content based on your resources information. Then select Import.
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.
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.
If you're an Azure administrator, read the How to provision Azure resources article for more details.
Select Hand off to admin. Read the instructions on the right side of the screen and select Next.
In the Add resources page, select the resources you want the administrator to provision. Select Next.
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.
Your Azure admin should securely send you back a JSON publishing profile file. Save it.
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.
- 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
- 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.
- In the upper left, select Publish selected bots.
- 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.
- Test the bot following the steps described in the next section.
Test your bot
- Go to your Azure portal
- Test the published bot by selecting Test in Web Chat.
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:
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.