Why I can swap some settings between deployment slots and I cannot for other settings?

吃可爱长大的小学妹 提交于 2019-12-31 05:33:06

问题


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?


回答1:


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:

  • 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.

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.

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!

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.




回答2:


We have a number of feature requests in UserVoice for settings to remain sticky to slots and have plans to work on a few of them. Feel free to add your support to the one you're interested in: https://feedback.azure.com/forums/169385-web-apps



来源:https://stackoverflow.com/questions/53539766/why-i-can-swap-some-settings-between-deployment-slots-and-i-cannot-for-other-set

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!