3
votes

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
there is nothing built-in so use a azure powershell task and script it4c74356b41
Oh I see. Thanks a lot!user3587624

1 Answers

3
votes

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