Blue-Green Deployment Using Azure DevOps
In every project there comes a time when you need to deploy the latest codebase to the production environment. This may lead to quite a few issues as usually the website needs to be taken down for a while to perform the deployment and sanity tests. Even if everything looks good on a staging environment, all sorts of problems may occur when going live. A proposed solution to this problem is Blue-Green deployment. This strategy is based on maintaining two identical environments, one called Blue and one called Green. At any point in time, one of them is used as a production and the other – as a staging environment.
The advantages of such an approach are plenty, most important of them being no downtime during deployment and simple rollback procedure. Another great reason to use Blue-Green deployment is the possibility to test the soon-to-be production environment before making the switch and warm it up.
Below are the following steps for Blue-Green Deployment:
- Create staging slot for production Azure app service
- Deploy all files from production to staging server and verify staging server up and running same like production
- Once staging server is ready add create new release for Staging
- Update staging server detail and Save changes
- Go to Azure DevOps Pipeline > Releases and select UAT Release Staging
- Once Staging release is ready click on release and deploy files
- Once staging server up and running, swap staging deployment slot to production.
- Now all traffic will be moved on Staging server without any downtime.
I hope this article will help you to configure the DevOps!
Please let me know if you have any specific issue.
Happy Sitecoring and Cloud