Blue/Green Deployment using VSTS Release Definitions

懵懂的女人 提交于 2020-08-05 07:29:12

问题


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

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.

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

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.

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.


回答1:


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

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

Here is the way how we can do this using traffic manager.

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)

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



来源:https://stackoverflow.com/questions/53418132/blue-green-deployment-using-vsts-release-definitions

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