使用VSTS和Azure时正确管理应用程序设置 [英] Proper management of application settings when using VSTS and Azure

查看:100
本文介绍了使用VSTS和Azure时正确管理应用程序设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果使用VSTS和Azure,则有两种不同的方法来管理应用程序设置。请记住,这只是用于连续部署的工具的一个示例。

There are two different ways how to manage the application settings if you use VSTS and Azure. Please keep in mind this is only an example of tools used for continuous deployment.

您可以在VSTS或CD管道中覆盖JSON文件(旧系统中的Web配置)。您可以覆盖Azure应用程序设置部分中的设置。我只是在想应该在哪里管理什么设置?
我的想法是在Azure应用程序设置部分中管理依赖于第三方模块的设置,例如数据库(连接字符串),外部服务(例如Application Insights)。如果第三方系统中出现某些更改,这可以让您灵活地快速更改某些设置。

You can override JSON files(Web config in older systems) in the CD pipeline in VSTS or you can override the settings in Azure ‘Application Setting’ section. I’m just thinking what setting should be managed where? My idea is to manage settings which depend on 3rd party modules like databases (connection strings), external services (e.g. Application Insights) in the Azure Application Settings section. This can give you the flexibility to change some setting very quickly if some changes appear in the 3rd party system.

这些内容仅取决于我将在其中管理的应用程序VSTS。
功能切换如何?
假设您有一个股票市场,并且正在构建一个模块,该模块管理销售/购买称为Blah的新加密货币。在完成所有测试之后,您决定释放该功能并使用负责启用/禁用新功能的标志。您会在哪里删除Azure或VSTS中CD管道中的应用程序设置中的标记?

The stuff which depends only on the app I would manage in the VSTS. What about feature toggles? Let’s say you have a stock Market and you are building a module which manages selling/buying new cryptocurrency called Blah. After all the tests you decide to make a release of the feature and take of the flag which is responsible to enable/disable the new feature. Where would you take off the flag- in App Settings in Azure or in the CD pipeline in the VSTS?

也许还有更多其他类型的设置我没有提及,哪些问题需要管理?我问这个问题的主要原因是,当应用程序增长时,设置管理会出现问题,这很容易在配置文件中造成混乱。
请告诉我在Web应用程序中管理应用程序设置的正确方法是什么?

Maybe there are more other types of settings which I didn’t mention, and which are problematic to manage? The main reason I am asking this question is the settings management becomes problematic when the application growths, it is very easy to cause a mess in the config files. Please tell me what is the proper way of management of the app settings in the Web Application?

推荐答案

管理应用程序设置的一种非常不错的现代替代方法: Azure-Resource-Manager

I found a very nice and modern alternatives for managing app settings: the Azure-Resource-Manager


应用程序的基础结构通常由许多
组件组成–可能是虚拟机,存储帐户和虚拟
网络,或者是Web应用程序,数据库,数据库服务器和第三方
服务。您不会将这些组件视为单独的实体,而是
会将它们视为单个实体的相关和相互依存的部分。
您想将它们作为一个组进行部署,管理和监视。 Azure
资源管理器使您可以将
解决方案中的资源作为一组来使用。您可以通过一个协调的操作来部署,更新或删除解决方案的所有
资源。您
使用一个模板进行部署,并且该模板可以用于不同的
环境,例如测试,登台和生产。资源
Manager提供安全性,审核和标记功能,以帮助您
在部署后管理资源。

The infrastructure for your application is typically made up of many components – maybe a virtual machine, storage account, and virtual network, or a web app, database, database server, and third-party services. You don't see these components as separate entities, instead you see them as related and interdependent parts of a single entity. You want to deploy, manage, and monitor them as a group. Azure Resource Manager enables you to work with the resources in your solution as a group. You can deploy, update, or delete all the resources for your solution in a single, coordinated operation. You use a template for deployment and that template can work for different environments such as testing, staging, and production. Resource Manager provides security, auditing, and tagging features to help you manage your resources after deployment.

请记住,资源可以是独立的。
我还发现亚马逊创建了非常相似的东西,称为 CloudFormation

Keep in mind that resources can be independent. I also found that Amazon created very similar thing called CloudFormation:


AWS CloudFormation为您提供了一种通用语言来描述和
提供云环境中的所有基础架构资源。
CloudFormation允许您使用一个简单的文本文件来建模和
设置,以自动化和安全的方式,遍及所有区域和帐户的应用程序所需的所有资源

文件是您的云环境的唯一事实来源。 AWS
CloudFormation是免费提供的,您只需为运行应用程序所需的AWS资源支付

AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment. CloudFormation allows you to use a simple text file to model and provision, in an automated and secure manner, all the resources needed for your applications across all regions and accounts. This file serves as the single source of truth for your cloud environment. AWS CloudFormation is available at no additional charge, and you pay only for the AWS resources needed to run your applications.

这篇关于使用VSTS和Azure时正确管理应用程序设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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