[英]Azure Web App deployment slots, can I swap a slot app for the main production, then delete the old one?
I think I misunderstood Azure Web App deployment slots and have used them incorrectly.我想我误解了 Azure Web 应用程序部署槽并错误地使用了它们。
We have a .NET Core 2.1 Web App that we wanted to upgrade to Core 3.1.我们有一个 .NET Core 2.1 Web 应用程序,我们想升级到 Core 3.1。 Rather than upgrade the existing we wrote a new one from the ground up so we could refactor it a little at the same time.
我们没有升级现有的,而是从头开始编写了一个新的,以便我们可以同时对其进行一些重构。
So I created a new deployment slot in Azure and added the new Web App via its (different) GitHub repo.因此,我在 Azure 中创建了一个新的部署槽,并通过其(不同的)GitHub 存储库添加了新的 Web 应用程序。 That's fine, the new slot Web App loaded fine and after testing we decided to switch to the new version.
没关系,新插槽 Web 应用程序加载正常,经过测试我们决定切换到新版本。
On the go-live I removed all the custom domains from the 2.1 version, and added them to the 3.1 version, along with SSL (there are lots of domains that use the same web app via DNS mappings, which I updated to point to the new slot's CNAME), tested this and it all worked fine.在上线时,我从 2.1 版本中删除了所有自定义域,并将它们与 SSL 一起添加到 3.1 版本中(有很多域使用相同的 web 应用程序,通过 ZED5F2BDECBD4BD6349D09412 映射更新到 IDFF 点到 AFF1新插槽的 CNAME),对此进行了测试,一切正常。 I hit 'swap slots' and essentially nothing happened - the 2.1 app stays as 'Production', and 3.1 is still the a 'slot app'.
我点击了“交换插槽”,但基本上什么也没发生 - 2.1 应用程序保持“生产”状态,而 3.1 仍然是“插槽应用程序”。
Now I've stopped the 2.1 app, and all our traffic is flowing to the 3.1 slot version, but this strikes me as a problem.现在我已经停止了 2.1 应用程序,我们所有的流量都流向了 3.1 插槽版本,但这让我觉得是个问题。 I need to get rid of the 2.1 version!
我需要摆脱2.1版本!
Any ideas how to solve this?任何想法如何解决这个问题? ie how to make (from the pic) 'eadgen-GenV2' the main/production slot, so I can delete the original 'eadgen'?
即如何使(从图片)“eadgen-GenV2”成为主要/生产槽,所以我可以删除原来的“eadgen”?
eadgen is your default slot and eadgen-GenV2 is a temporary slot, I think you can only delete the temporary slot. eadgen 是您的默认插槽,而 eadgen-GenV2 是临时插槽,我认为您只能删除临时插槽。 You can try to use this:
你可以尝试使用这个:
What will be swapped is:将被交换的是:
General settings, such as framework version, 32/64-bit, web sockets App settings (can be configured to stick to a slot)
通用设置,如框架版本,32/64位,web sockets 应用设置(可配置为粘到插槽)
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
Azure 内容分发网络
From the description of the documentation it seems to be able to change the framework version.从文档的描述看来,它似乎能够更改框架版本。
This is the doc:这是文档:
https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#swap-two-slots https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#swap-two-slots
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.