为什么我可以在部署插槽之间交换某些设置,而不能交换其他设置? [英] Why I can swap some settings between deployment slots and I cannot for other settings?

查看:76
本文介绍了为什么我可以在部署插槽之间交换某些设置,而不能交换其他设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以注意到,Azure应用程序服务的某些部署插槽设置可以交换,而其他一些则不能交换. 你知道为什么吗?

I can note that some of the deployment slots settings of Azure app services can be swapped, but others cannot be swapped. Do you know why?

推荐答案

首先,我们应该了解,广告位主要是用于真正快速地部署网站的新版本.建议不要在插槽上运行(例如)登台环境.

First we should understand that slots are primarily meant to be used to deploy new versions of a website real quick. Running (for instance) a staging environment on a slot is not recommended.

根据文档,这些设置不会被交换:

These are the settings that, according to the documentation, don't get swapped:

  • 发布端点
  • 自定义域名
  • SSL证书和绑定
  • 比例设置
  • WebJobs调度程序
  • Publishing endpoints
  • Custom Domain Names
  • SSL certificates and bindings
  • Scale settings
  • WebJobs schedulers

如果其中任何一个 将被交换,则意味着您的应用程序将中断.在不止一种方式上.

If any of these would be swapped, that would mean that your application would break. In more ways than one.

例如,您将不得不更改部署的发布端点,因为它们将与插槽交换.这意味着每次交换插槽时都会更新您的CI/CD环境.

For instance, you would have to change the publishing endpoints for your deployments, since they would have swapped with the slots. This means updating your CI/CD environment every time you swap slots.

连接到 production 插槽的自定义域名现在将指向辅助插槽,从而使交换无效.因为您的域仍然指向旧版本!

The custom domain name that is connected to your production slot would now point to the secondary slot, rendering the swap useless. Because your domain still points to the old version!

如果有人设法获得新版本(这很困难,因为自定义域名仍指向另一个插槽),则SSL证书(和绑定)将不存在.提供 HSTS标头的网站上发生的图像.

If someone managed to reach the new version (which would be hard because the custom domain name still points to the other slot), the SSL certificate (and binding) wouldn't be there. Image that happening to a website that provides a HSTS header.

您可以为交换插槽中的这些设置中的每个设置至少指定一个很好的理由,以进行交换.

You can name at least one good reason for each of these settings to not be swapped when swapping slots.

这篇关于为什么我可以在部署插槽之间交换某些设置,而不能交换其他设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆