The DevOps Handbook and the three ways of DevOps
If you are working for an IT company, think about your daily work for a minute. Do you perform everyday firefighting fixing production bugs? Or undergo rigorous approval processes to push your changes to production ? Do you find the work you do energy sapping and exhausting? 'The DevOps Handbook' may offer the answers you need.
Written by Gene Kim, Jez Humble, Patrick Debois and John Willis who are all advocates of the DevOps culture, this book widely discusses how DevOps can drive businesses towards profitability and employees towards a better standard of work. I will try to summarize the key points in the book and how we can apply them in our day today work.
The three ways of DevOps
Today's businesses are fast paced and to stay on top organizations should adapt and continuously change. There were many organizations that were once on top of the food chain yet gradually lost foothold of the market. Some examples would be mobile handset manufacturers such as Nokia and motor car manufacturers such as Hummer.
With the evolution of digitization of ,businesses , IT has become an integral part of every business to promote and sell their product and gone are the days where software is built once and delivered in a silo spanning years. Instead software should change as the business needs change and be delivered quickly to the market.
The book states that "In almost every IT organization, there is an inherent conflict between Development and IT Operations which creates a downward spiral, resulting in ever-slower time to market for new products and features, reduced quality, increased outages, and, worst of all, an ever-increasing amount of technical debt" because the operations team is concerned about keeping the infrastructure and data centers stable while the development team is concerned about pushing more features to production.
The book introduces the concept of 'The three ways of DevOps' as a set of principles from which all the observed DevOps behaviors and patterns are derived to helps bridge the gap between IT and Operations
First Way: The Principles of Flow
The first way is ensuring the work flows smoothly from development to operations.
Making the Work Visible - To ensure a smooth flow we have to make our work visible but the challenge in software development is that work is not tangible as opposed to a manufacturing plant. We should use a visualization technique such as a Kanban board to make our work visible.
Limit Work in Process- Limiting Work in Process makes it easier to see problems that prevent the completion of work. Also if a worker is assigned multiple tasks, then they must switch between tasks, incurring all the costs of having to re-establish context, as well as cognitive rules and goals.
Reduce the number of hand offs - Even under the best circumstances, some knowledge is inevitably lost when the work is handed off from one set of workers to another. With enough hand offs, the work can completely lose the context of the problem being solved or the organizational goal being supported.
Continually identify and elevate our constraints - "In any value stream, there is always a direction of flow, and there is always one and only constraint; any improvement not made at that constraint is an illusion" states Dr. Goldratt in his book 'Beyond the Goal'. In software development the constraint can be lack of environments (Create environments that are on demand and completely self-serviced), Code deployments taking a long time(automate our deployments as much as possible), Testing takes a long time (automate testing) or overly tight architecture (Create loosely coupled architecture).
Eliminate hardships and waste in value stream - In software development waste can be defined as partially done work, extra processes that do not add value to customer, extra features that are not needed by the customer, unnecessary waiting , nonstandard manual work and last minute heroics. We should eliminate such activity as much as possible.
Second Way: The Principles of Feedback
Feedback loops are important because they help us detect problems as soon as it occurs , to fix the problem and to improve our processes. The following practices are associated with the second way.
Working safely in complex systems - A complex system is a system that defies any single person's ability to see the system as a whole and understand how all the pieces fit together and most of the enterprise software fall into this category. We need to document knowledge about the complex systems and develop mechanisms to detect problems wherever they occur in the system.
See problems as they occur - This includes the creation of automated build, integration, and test processes, so that we can immediately detect any problems that occur due to a code change pushed to the central code repository. We should then take the system out of the deploy-able state to prevent faulty deployments. We can also include mechanisms to monitor the system in production (telemetry) and then we can quickly detect when the system is not performing as expected.
Swarm and solve problems to build new knowledge - At Toyota, the workers were given a 'Andon cord' to pull whenever they see a problem in the manufacturing plant. Then all the workers will swarm together and fix the problem which will prevent the problem from flowing further down the line. Continuous build and integration tests help us to do the same in software systems.
Keep pushing quality closer to the source - Quality checks should be done by people who are working actively in the software system than the people who are working in management via 'change approvals' because they are distant from the work, forcing them to make decisions without an adequate knowledge of the work or the potential implications. It is the developer's responsibility to add quality checks (via unit tests) and detect errors as early as possible.
Enable optimizing for downstream work centers - We optimize for downstream work centers by designing for operations, where operational non-functional requirements (e.g.,architecture, performance, stability, testability, configurability, and security) are prioritized as highly as user features.
The Third Way: The Principles of Continual Learning and Experimentation
For organizations to strive and grow, they should promote a culture which encourages learning and improvement of work. The third way discusses the technical practices associated with it.
Enable organizational learning and a safety culture - When accidents and failures occur, instead of looking for human error, we should look for how we can redesign the system to prevent the accident from happening again. By doing this, we create organizational learning.
Institutionalize the improvement of daily work - Teams are often not able or not willing to improve the processes they operate within. The result is not only that they continue to suffer from their current problems, but their suffering also grows worse over time. We should improve daily work by explicitly reserving time to pay down technical debt, fix defects, and refactor and improve problematic areas of our code and environments.
Transform local dependencies into global improvements - When we discover and add new knowledge to our organizations, it should be documented so that any engineer can refer to them when needed. Organizational wiki pages are one such example.
Inject resilience patterns into our daily work - To improve our processes we should inject tension to our daily work. This can be done to our systems by seeking to always reduce deployment lead times, increase test coverage, decrease test execution times, and even by re-architecting if necessary to increase developer productivity or increase reliability.
I hope that you got a brief idea on the three ways of DevOps and the message it tries to convey. Built on these ideas, there are many processes, practices and tools that are being used today. You can get a complete idea of the principles and develop an interest on DevOps if you read the 'The DevOps Handbook'. It has helped organizations to be successful in their businesses and can help your organization grow and succeed.
Find Akila Weeratunga on Medium for more tutorials and articles