Thursday, August 27, 2015

DevOps using VSTS 2013

The World in this century is moving very fast and especially software Development. The advent of Social Media has further made this complicated, as the Customer Expectation as well as Interactions is Intense. An increased focus of User Experience and Expectation for Quicker Change implementation is evident. The changes here include both the changes proposed by the Customers as well as the changes, which the process requires such as the process itself being flexible enough to be changed quickly. The traditional development practices are unable to cater to such a massive change in the Mind-set and Expectations. Another important aspect to deal with is the performance of the Applications should be competitive so that it leads to an actual adoption of the software product.  

With all these challenges in place, any change in the process becomes next to impossible, as there are barriers to adoption.

This need of rapid delivery applies to both type of projects which are in Development or which are in Operations. In projects which are in Development, the changes are frequent as well as the deadlines are aggressive.  Any changes in the later phases can pose serious threats to successful delivery. In Operations, there is a strong concern of introducing minimum changes. Although the changes are less, however they need to checked rigorously that they should not hamper the existing product being used by Customer on a daily basis. Further, the change should be quick and prompt as per customer expectation. These demand a complete revamp in the process as well as the mind-set to own such a process, which did not exist before.

Some of the Critical Questions in Industry regarding to this are:

  •           How can we Release on time and in less time?

  •      Is there a way in which the Operations are happy to have frequent changes?

  •         Is it Possible to Deploy Simultaneously and frequently on multiple Servers?

  •         Can we Develop and Test in Parallel in as Good as Production Environment?

  •         Is there a way to avoid last minute surprises aka Pandora’s Box?

  •          How can we perpetually reduce IT Costs and control any effort or resource wastage?

  •         I have adopted agile practices.  How can I Extend them further?


And, the List goes on. The Solution to the above problems is by implementing DevOps.
DevOps is not about technology, but a cultural phenomenon. Hence, it is important to communicate effectively with the IT and delivery teams. Building Such DevOps Culture would require a top down approach in organization where leaders would lead by example so that the flow is imbibed all across. This can be more effective with enablers such as Continuous Delivery and Continuous Testing. 

Continuous Delivery employs Continuous Integration. It also demands the use of agile and lean principles across the Software Delivery chain. This means that the speed of Delivery with an equal focus on quality should be there from Inception to production release and Customer Satisfaction.
It is the need of this hour where commitments to ship reliable deliveries is even stronger. DevOps can be implemented using Team Foundation Server effectively. TFS allows us to construct a release pipeline to implement DevOps. Since Visual Studio 2012, there has an increased focus on Combined Engineering and DevOps. The following features employ quicker implementation of DevOps using TFS:

1.       Creating Product Backlog – DevOps needs interaction of all the stakeholders like Business Analysts, Testers and Developers on a frequent basis so that we can implement changes. To start with this, we need a product backlog ready and accessible to all. This enables us to know what all is pending and to be dealt with. TFS in the enhancement after VS 2012 introduced the enhanced templates for Scrum as well as Agile processes.  These are specifically designed to optimally create product backlog.



Additionally, the Kanban board is of great importance to visualize the Progress in a centralized manner across all the Stakeholders. Board in TFS allows us to implement this across phases and stages.  The communication is loud and clear so that there is no gap in understanding of teams.

Customization of stages supports the lean thinking and changing the process easily and efficiently leads to Continuous Improvement.



An important aspect of this is to avoid any kind of Over Development or Under Development.  Hence, anomalies are critically analysed in the Initial Phase by multiple Stakeholders. This supports the cultural movement as required in DevOps as there is complete collaboration as well as Visibility to evaluate the adoption amongst teams.

2.       Building a Release workflow: Continuous Integration, Continuous Testing and Continuous Delivery are pillars required for DevOps implementation.  Furthermore, whatever can be and thereby should be automated. This would allow minimum hindrance to the Process Changes and would rather facilitate it.

“Continuous Integration is a software development practice where members of a team integrate their work frequently; usually each person integrates at least daily - leading to multiple integrations per day. An automated build (including test) to detect integration errors as quickly as possible verifies each integration. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.”  - Martin Fowler

TFS has the provision for implementing Continuous Integration by customizing the Build Definitions.  It heavily relies on Build only Once strategy. This in simple words means that once a Developer checks in code that the Code is built simultaneously to check that the code submitted by the Developer is not interfering with the existing code. In case there are errors, the Code check-in is unsuccessful.   This further is an automated process.




The Next Step to this is to have Simultaneous deployments across multiple environments.  This again is automated depending on the Success of Previous Step. Along with this data for monitoring this is gathered to closely watch the success per stage.  DevOps Workbench express allows us to create Orchestrations.  This has support for multiple Microsoft Technologies including SharePoint, MSSQL, Azure, .NET Applications, ASP.Net Applications. We can create Deployment Orchestrations for performing different Steps in order to enable Continuous Integration and Delivery.





Creating this kind of a Build workflow is a complex activity. To reduce this complexity, DevOps Workbench Express is a rescue. Such Customized orchestrations aka Build Definitions can be readily used to create the Build Pipeline using this.



Until now, we have an orchestration to handle Building the Source Code and deploying it to target environments simultaneously. The Next Big Step is to adhere to Continuous Testing. Unit Test is effective to do this. Employing Automated BVT in the form of Unit Tests can sanitize a Build. Any failure of the tests would lead to subsequent rollback of the build and thereby ascertain fool proof Regression Testing. This necessarily is automated and automatically triggered with a build. Using Visual Studio 2013, we create unit tests and add them to the project so that they are automatically invoked with the build using some basic Settings in the build definition.



Unit Test Generator is as Add on for VS 2015 and provides facility to quickly add unit tests. These Unit tests are tightly couple to the projects and are an efficient mechanism to maintain regression testing. Continuous testing can be achieved by this.




4.       Continuous Monitoring: We all want progress, but if we are on the wrong road, progress means doing an about-turn and walking back to the right road; in that case, the man who turns back soonest is the most progressive. Continuous monitoring thereby becomes extremely important to identify issues and act upon them at the earliest.

TFS provides reports at various levels to cater these needs. Some of these reports for constant monitoring are:

a.       Project Management Dashboard
b.      Progress Dashboard
c.       Quality Dashboard
d.      Test Dashboard
e.      Bug Dashboard
f.        Build Quality Indicator Reports
g.       Bug Backlog Reports
h.      Burn down and Burn Rate Reports

Using these reports provides a holistic approach with complete end to end visibility for all the stakeholders.

Having said all of this, it should be clearly understood that enablers to change could only help if the DevOps culture is in place. Leads of the organization must stress on the implementation of such culture and should be open to feedback for further process improvement. It Might take time to adopt this but the results are very satisfactory.

To Sum it up, the following are the vital benefits of DevOps:
*      Minimized Conflicts between Development and Operations
*      Greater Scale ability and Flexibility in Process Implementation
*      Collaborative and Integrated Development among st Teams
*      Frequent and Faster time to Delivery
*      More Stable and reliable Releases
*      Continuous Monitoring for Complete Visibility across Stakeholders
*      Reduced Outages and minimal errors to Operations


Hence, these are the steps for Implementing DevOps using TFS 2013.

No comments:

Post a Comment