简体   繁体   English

我们如何将整个 web.config 从 staging slot 转换为 azure 中的 production slot?

[英]how can we transform entire web.config from staging slot to production slot in azure?

I have created multiple slots(test, stage and prod) in my azure app service.我在我的 azure 应用服务中创建了多个插槽(测试、阶段和生产)。 Similarly I have created respective web.config files for each environment.同样,我为每个环境创建了各自的 web.config 文件。 I am deploying my application through octopus deployment tool in test environment slot, so initially it's picking web.test.config file and it's working fine.我正在通过测试环境槽中的章鱼部署工具部署我的应用程序,所以最初它选择 web.test.config 文件并且它工作正常。

But, I want to swap complete transformation section of web.config file when I swap it to stage or Prod slot while doing swapping through azure portal.但是,当我在通过 azure 门户进行交换时将其交换到舞台或 Prod 插槽时,我想交换 web.config 文件的完整转换部分。 Is there any way to do ?有什么办法吗?

using application setting and connection string of configuration setting, I am able to segregate the setting of each slot.使用应用程序设置和配置设置的连接字符串,我可以隔离每个插槽的设置。 But I am not sure how can I do it for other section like system.identityModel,system.web system.identityModel.services, etc. Therefore I want to replace complete transformation section according to environment while doing swapping.但我不确定如何为 system.identityModel、system.web system.identityModel.services 等其他部分执行此操作。因此我想在进行交换时根据环境替换完整的转换部分。

When I talked with the app service team, they said slots are not meant for this purpose.当我与应用服务团队交谈时,他们说插槽不适用于此目的。 The main purpose of slots is to allow deployment of new versions with little or no downtime.插槽的主要目的是允许在很少或没有停机时间的情况下部署新版本。 Or to test new features with a small percentage of the traffic.或者用一小部分流量测试新功能。 Not really for different environments, you should use have separate app services for that, to which you deploy separately.并不是真的针对不同的环境,您应该为此使用单独的应用程序服务,并分别部署到这些应用程序服务中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM