应用服务部署插槽和交换 [英] App Service Deployment Slots and swap

查看:91
本文介绍了应用服务部署插槽和交换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚为我的一个客户在App Service部署位置完成了POC。一切都很顺利,但有一个问题...交换将发生在网站部分,但数据库的变化怎么样......那不会交换..对吗?怎么实现呢?

I had just completed a POC on App Service deployment slots for one of my client. All went fine but one question though... the swap will happen on the website part but what about the database changes..that wont swap..right? how to achieve that?

如果数据库交换没有与网站交换一起发生,如何说服我的客户使用Azure的这个不错的功能。几乎没有数据库更改发生的任何版本。请指教。

How to convince my client to to use this nice feature of Azure if the database swap doesn't happen alongside the website swap. There's hardly any release happen where database changes are not there. Please advice.

谢谢。

推荐答案

您好AtanuG,

Hi AtanuG,

感谢您使用Azure App Service。 应用内容和配置元素可以在两个
之间交换
部署插槽
,包括生产槽。 从其他部署槽克隆配置时,克隆的配置是可编辑的。在交换过程中,Web应用程序的停机时间为零。这是一个列表 设置
,当您更换插槽时会发生变化。

Thanks for using Azure App Service. App content and configurations elements can be swapped between two deployment slots, including the production slot. When you clone configuration from another deployment slot, the cloned configuration is editable. There is zero downtime for your web application during the swapping process. Here is a list of  settings that change when you swap slots.

交换的设置:

- 一般设置 - 例如框架版本,32/64位,Web套接字

-App设置(可配置为固定到插槽)

- 连接字符串(可以配置为坚持插槽)

-Handler映射

- 监控和诊断设置

-公共证书

-WebJobs内容

-Hybrid连接

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
-Monitoring and diagnostic settings
-Public certificates
-WebJobs content
-Hybrid connections

未交换的设置:

- 发布端点

- 自定义域名

- 私有证书和SSL绑定

-Scale设置

-WebJobs调度程序

Settings that aren't swapped:
-Publishing endpoints
-Custom Domain Names
-Private certificates and SSL bindings
-Scale settings
-WebJobs schedulers

所以是的,如果你愿意的话,你可以交换你的数据库。默认情况下,应用程序设置和数据库连接字符串是
粘滞到插槽,并且当测试插槽与生产插槽交换时将跟随Web App。但是,您可以选择配置应用程序设置或连接字符串以粘贴到特定插槽(未交换)。阅读

此博客
了解如何创建stickyslots。 

So yes, you're able to swap your database if you wish to do so. By default, App Settings and database connection strings are not sticky to the slot and will follow the Web App when the test slot is swapped with the production slot. However, you do have the option to configure an app setting or connection string to stick to a specific slot (not swapped). Read this blog to learn how to create stickyslots. 

使用部署插槽,您无需在源代码中对连接字符串进行硬编码。您可以将它们放在应用服务设置的连接字符串部分下,该部分可以在Azure门户中找到。 

With Deployment Slots you do not need to hard code the connecting string in your source code. You can put them under the connecting strings section of your app service settings which can be found in the Azure portal. 





这篇关于应用服务部署插槽和交换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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