简体   繁体   English

Azure 应用服务部署槽 - 应用网关

[英]Azure App Service Deployment Slot - Application Gateway

Working on a project where we are starting to use Deployment Slots in our App Services.在我们开始在我们的应用服务中使用部署槽的项目上工作。

All our Prod apps are located behind Application Gateway, and we would like to also have our Slots located behind Application Gateway.我们所有的 Prod 应用程序都位于应用程序网关后面,我们还希望我们的插槽位于应用程序网关后面。

I understand we can not do this using "App Services" as target type in the Backend Pools as of now, but wondered if it is doable using "IP Address or FQDN" as target type.我知道到目前为止,我们无法在后端池中使用“应用程序服务”作为目标类型来执行此操作,但想知道使用“IP 地址或 FQDN”作为目标类型是否可行。

I have tried to set it up, with various changes in the "HTTP Settings", Probe and so, but haven´t gotten it up spinning.我试图设置它,在“HTTP 设置”、探测等中进行了各种更改,但还没有让它旋转起来。

Can anyone confirm if this is possible, and have any tips on how this should be configured?任何人都可以确认这是否可能,并有关于如何配置的任何提示?

Thanks!谢谢!

I was able to get this working on one of my slots.我能够在我的一个插槽上完成这项工作。

Basically setup the listener with your necessary protocol, port cert, hostname, etc... I'm using multi-site listeners so I can have multiple URLs for the one AppGW/Public IP.基本上使用您必要的协议、端口证书、主机名等设置侦听器...我正在使用多站点侦听器,因此我可以为一个 AppGW/Public IP 设置多个 URL。

The rule points to the listenter, backend pool and appropriate http setting.该规则指向侦听器、后端池和适当的 http 设置。

The HTTP setting should be configured to connect to your app service URL accordingly. HTTP 设置应配置为相应地连接到您的应用服务 URL。 I'm using the azurewebsite.net URL, so I use well known CA cert & override hostname from backend target:我正在使用 azurewebsite.net URL,所以我使用众所周知的 CA 证书并覆盖后端目标的主机名:

http设置

The backend pool then points to the azurewebsites.net URL:然后后端池指向 azurewebsites.net URL:

后端池配置

Make sure that GET / works on your app service and returns 200 - 399 HTTP status codes.确保GET /适用于您的应用服务并返回200 - 399 HTTP 状态代码。 Anything outside that range is a failure and the backend pool will be removed.超出该范围的任何内容都是失败的,后端池将被删除。 If you need to create a custom health probe to a URL that will respond properly, or adjust the acceptable HTTP status code (if 401 or 403 due to required auth, then just override it with that for testing purposes for now).如果您需要为 URL 创建一个将正确响应的自定义运行状况探测,或者调整可接受的 HTTP 状态代码(如果由于所需的身份验证而出现401403 ,那么现在只需将其覆盖以进行测试)。

I'm trying to do it again with a second slot and running into 502 errors from the App Gateway... However, I'm also waiting on DNS changes from my network team.我正在尝试使用第二个插槽再次执行此操作,并从 App Gateway 遇到 502 错误...但是,我也在等待我的网络团队的 DNS 更改。 My first one with my company domain works via hosts file edit, but the 2nd slot (which has 2 different URLs/listeners configured in the AppGW) doesn't want to work the same way for some reason.我在公司域中的第一个通过主机文件编辑工作,但第二个插槽(在 AppGW 中配置了 2 个不同的 URL/侦听器)由于某种原因不想以相同的方式工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM