Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

[Documentation] Add How to configure an Azure Application Gateway #3694

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/_docs/help/known-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,18 @@ The workaround at this time is to run this ahead of any of the Virtual Assistant
```
$env:PATH += ":/users/YOUR_USER_NAME/.dotnet/tools"
```

## Configuring a Gateway's health probe with a TypeScript bot
The TypeScript bot samples do not have a welcome page, therefore when the gateway tries to check its backend pool's health will result in an error 404 causing the health validation to fail, which in turn will cause an error 502 when trying to access the resource through the public IP.

To workaround this:
1. In the Azure portal, select your application gateway.
1. Under **Health Probes**, select to add a new one
1. Enter a name for your probe, such as *MyHealthProbe*
1. In **Protocol**, select *HTTP*
1. In **Host** enter your resource host, it has to be the same host you selected as target in the backend pool
1. In **Path** enter `/api/messages`, to validate the response of the bot
1. In **HTTP response status code match**, enter *405* which is the expected response for the TypeScript Virtual Assistant bot
1. Finally, test and save the configuration

![help_known_issues_gateway_typescript]({{site.baseurl}}/assets/images/help_known_issues_gateway_typescript.jpg)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
category: Virtual Assistant
subcategory: Handbook
title: Configure an Azure Application Gateway
description: This explains how to configure and use a bot sample through the public IP of an Azure Application Gateway.
order: 14
toc: true
---

# {{ page.title }}
{:.no_toc}
{{ page.description }}

## Prerequisites

- Have a deployed [Virtual Assistant]({{site.baseurl}}/overview/virtual-assistant-solution/)
- The [BotFramework Emulator](https://github.com/microsoft/BotFramework-Emulator)

## Create an Azure Application Gateway

Follow the document [Tutorial: Create an application gateway with a Web Application Firewall using the Azure portal](https://docs.microsoft.com/en-us/azure/web-application-firewall/ag/application-gateway-web-application-firewall-portal) up to *Review + create tab* section.

You should end up with the following resources in your Azure resource group:

![]({{site.baseurl}}/assets/images/virtualassistant-gateway-resources.png)

## Configure the Gateway's backend pool

Now it is necessary to link your deployed bot to the backend pool of your application gateway. For this follow the steps detailed in [Add App service as backend pool](https://docs.microsoft.com/en-us/azure/application-gateway/configure-web-app-portal#add-app-service-as-backend-pool) and in [Edit HTTP settings for App Service](https://docs.microsoft.com/en-us/azure/application-gateway/configure-web-app-portal#edit-http-settings-for-app-service).

> If you are using a TypeScript bot sample, check [How to configure a TypeScript bot with an Application Gateway]({{site.baseurl}}/help/known-issues#configuring-a-gateway's-health-probe-with-a-typescript-bot).

After overriding the hostname, you can use the gateway's public IP to access your bot.

![]({{site.baseurl}}/assets/images/virtualassistant-gateway-emulator.png)

## Further Reading

- [Deploying a Virtual Assistant](https://microsoft.github.io/botframework-solutions/virtual-assistant/tutorials/deploy-assistant/cli/1-intro/)
- [Troubleshoot backend health issues in Application Gateway](https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-backend-health-troubleshooting)
- [Troubleshooting bad gateway errors in Application Gateway](https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-troubleshooting-502)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.