使用VSTS版本定义的蓝色/绿色部署 [英] Blue/Green Deployment using VSTS Release Definitions

本文介绍了使用VSTS版本定义的蓝色/绿色部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还没有看到有关如何在VSTS版本定义上进行蓝/绿部署的任何信息.

I haven't seen any information how to do a Blue/Green deployment on VSTS Release Definitions.

我有一个VSTS版本定义,当在源代码中完成新签入时,该更改将自动将新更改部署到我们的Prod环境中.

I have a VSTS Release Definition that deploys new changes automatically into our Prod environment as new check-ins are done in our source code.

现在,该项目正在使用Azure Traffic Manager,并且已添加了两个位于不同区域/数据中心的终结点.

Now, the project is using Azure Traffic Manager and it has added two endpoints which are on different regions/data centers.

现在我们已经配置了Azure Traffic Manager,我想知道如何在VSTS上进行更改,以及在部署时如何在部署第二个区域时Azure Traffic Manager将流量重新路由到一个区域,以及在第一个区域部署后进行反向操作完成.

Now that we have the Azure Traffic Manager configured, I was wondering how can I change on VSTS and at deployment time how Azure Traffic Manager reroutes the traffic to one region while the second is deploying and the reverse operation after the first region's deployment is completed.

我看过有关蓝/绿部署概念的文档,但没有看到有关使用Azure Traffic Manager和VSTS发行定义时如何执行此操作的任何文档/示例.

I've seen documentation about the concept of Blue/Green deployments but haven't seen any documentation/example on how to do this when you use Azure Traffic Manager and VSTS Release Definitions.

推荐答案

正如@ 4c74356b41所说,Azure DevOps中没有直接任务来调用蓝色/绿色部署.实际上,这是部署/发布的策略.

As @4c74356b41 said, there is no direct task to called blue/green deployments in Azure DevOps. It's actually a strategy for deployment/release.

蓝/绿部署是一种在不停机的情况下将代码部署在环境中的方法,理想情况下将流量转向另一个URL.

Blue/Green deployment is a way to deploy a code in an environment without downtime, ideally turn the traffic towards another URL.

这是我们使用流量管理器.

在将代码部署到Azure应用程序中作为第一项任务时,可以停止azure应用程序服务.这样Azure Traffic Manager将停止路由到该应用程序服务.完成部署后,您可以启动应用程序,这将使该应用程序在Azure Traffic Manager中重新联机. (请注意,Azure流量管理器将每30秒检查/命中一次,以确保该应用程序运行正常)

When you deploy the code in the Azure app as a first task you can stop the azure app service. So that Azure Traffic manager will stop route to that app service. Once you did with the deployment you can start the app which will bring back the app online in Azure Traffic manager. (note that Azure traffic manager will check/hit every 30 sec to make sure the app is working fine)

如果要在VM中部署代码,则可能需要查看此

If you are going to deploy your code in VM then you probably need to look at this link

这篇关于使用VSTS版本定义的蓝色/绿色部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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