我的应用程序有两个应用程序服务计划:非产品和产品。我们使用 NonProd 进行开发和测试。并且,用于生产的产品。然而,我们发现,Prod 只有一个插槽(即没有暂存插槽)。
我读到了这个:https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots并建议基础设施在 Prod 应用服务计划中创建一个暂存槽。然而,得到的答案是,如果他们要制作暂存槽,则必须更改多项内容。例如,在交换期间,阶段 URL 将替换生产 URL,并且他们需要更改 DNS 来映射这些 URL。是否需要更改 DNS?
据我所知,情况不应如此。
我的问题是,在交换期间(由于某些不同的配置)生产 URL 是否会被阶段 URL 替换?另外,是否有任何文档可以澄清和确认哪些内容会改变,哪些不会?考虑将真实的客户应用程序转移到产品中,所有团队的参与需要什么?
据我所知,最好的推荐方法是创建一个阶段并交换,这并不困难,应该在 5 分钟内完成(如果有适当的访问权限)。
最佳答案
For example, during swap the stage URL will replace the Production URL and they need to change DNS to map those. - Are DNS change required?
无需更改 DNS。 生产 URL 将指向交换后的新版本。
配置是您必须检查的一件事,默认情况下配置设置将随插槽移动。 因此,您想要保留在插槽中的任何设置,都需要标记为“粘性”/插槽特定。
如果您转到“应用服务”->“配置”,您可以单击“编辑”进行设置:
然后,如果您希望设置特定于该插槽并且在交换期间不移动,则可以检查部署插槽设置:
您可以在此处查看交换期间发生的情况:https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots#what-happens-during-a-swap .
交换了哪些设置:https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots#which-settings-are-swapped
Settings that are swapped:
General settings, such as framework version, 32/64-bit, web sockets App settings (can be configured to stick to a slot) Connection strings (can be configured to stick to a slot) Handler mappings Public certificates WebJobs content Hybrid connections * Virtual network integration * Service endpoints * Azure Content Delivery Network *
Features marked with an asterisk (*) are planned to be unswapped.
Settings that aren't swapped:
Publishing endpoints Custom domain names Non-public certificates and TLS/SSL settings Scale settings WebJobs schedulers IP restrictions Always On Diagnostic settings Cross-origin resource sharing (CORS)
关于azure - 登台与生产插槽 - Azure Web 应用程序部署,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62257936/