I recently took part in my 2nd Microsoft Openhack, having previously had a good experience with the ‘Containers’ Openhack. I also did an ‘Enterprise Scale’ partner only hack with my company, but that was not strictly a ‘Openhack’, however it should become one eventually!
I can thoroughly recommend it for anyone wanting to further their knowledge on Azure DevOps and general DevOps processes.
We were placed in a small team and given a series of challenges around a given scenario, involving having to update a set of Azure Webapps without incurring any downtime. We were given the source code for each app and some pre-deployed infrastructure in Azure.
Using Azure DevOps, our team implemented the following:
- Branch protection policy to prevent any code changes from being committed to the
masterbranch without being reviewed.
- Require multiple people to review a code change before it can be merged into master.
- Assign a work item using Azure boards to a code change — all code changes need to have a reason, why it was done, who asked for it, who signed it off?
- Creating Azure pipelines (a workflow) to automate the building, unit testing and packaging, only executing when a code change is made. Our team created 4 different pipelines, one for dot net, node.js, java and go applications.
- Using the pipeline to create a bug in the backlog for each failed build.
- Implement continuous deployment to deploy a container image to an Azure App service.
- Implementing a blue / green deployment scenario — this involves two environments (production and staging) and shifting the routing between them to avoid any downtime. If there is an issue with the new version, rolling back simply requires reverting traffic routing to the previous deployment.
- A/B testing for directing different amounts of users to the production or staging web app. This can be useful to test new features in the application, conversion rates etc.
- Implement a monitoring strategy using Azure Monitor.
I wrote some further notes on blue/green and A/B testing in a separate blog post here:
Using Azure webapp slots with CI/CD pipelines — Blue-Green Deployments & A/B testing.
Azure web apps have the concept of slots. These are effectively a copy of the web app with a unique DNS name, which you…
Other Useful links:
- What is Continuous Delivery? — Azure DevOps | Microsoft Docs
- What is Continuous Integration? — Azure DevOps | Microsoft Docs
- Unit testing C# code in .NET Core using dotnet test and xUnit — .NET | Microsoft Docs
- Azure Slot Deployment with Blue-Green Deployment Model | by Sangeeta Sunchu | Medium
If you want to learn more about any of the above topics I would definitely recommend taking the time out to attend the Openhack!