Introduction to DevOps
It has following modules…
It has following modules…
“Tools are not the solution to a cultural problem.”
– Gartner
“Team culture makes a large difference to a team’s ability to deliver software and meet or exceed their organizational goals.”
– Accelerate State of DevOps 2021
Think Differently
Work Differently
Team culture makes a large difference to a team’s ability to deliver software and meet or exceed their organizational goals.
Organize Differently
Measure Differently
Disruptive Business model:
52% of the Fortune 500 have disappeared since the year 2000.
When disruption happen, businesses need to adopt according no matter what, and this adaptation should be agile and lean.
Digitization + Business Model:
Technology is the enabler of innovation, not the driver of innovation.
The Businesses, who adapt to new tech, survive.
The refusal to change according to the digital ages makes it susceptible to bankruptcy.
The term (development and operations) is an extension of agile development environments that aims to enhance the process of software delivery as a whole. — Patrick Debois, 2009
Agility is the goal:
“DevOps starts with learning how to work differently. It embraces cross-functional teams with openness, transparency, and respect as pillars.” — Tony Stafford, Shadow Soft.
DevOps has three dimensions:
Responsibility, transparency, feedback:
“Culture is the #1 success factor in DevOps. Building a culture of shared responsibility, transparency, and faster feedback is the foundation of every high-performing DevOps team.” — Atlassian
Culture, culture, culture:
While tools and methods are important; … it’s the culture that has the biggest impact.
-Change thinking patterns of people
We have come to value:
That is, while there is value in the items on the right, we value the items on the left more.
Agile alone is not good enough:
2 Speed IT:
2007 Patrick Debois:
He recognized Dev and Ops worked ineffectively and not together.
2008 Agile Conference:
Andrew Clay Shafer – Agile Conference 2008 BoF (Birds of a Feather) meeting “Agile Infrastructure”
2009 Velocity 10+ deploys per day:
John Allspaw – Velocity 2009 “10+ Deploys Per Day: Dev and Ops Cooperation at Flickr”
DevOpsDays – Patrick Debois started the first DevOpsDays conference Ghent, Belgium, October 2009
2010 Continuous Delivery:
Continuous Delivery – by Jez Humble and David Farley
2013 The Phoenix Project:
The Phoenix Project – by Gene Kim, Kevin Behr and George Spafford
2015 State of DevOps Report:
State of DevOps Reports – from DevOps Research and Assessment (DORA), founded by Dr. Nicole Forsgren, Gene Kim, and Jez Humble
2016 The DevOps Handbook:
The DevOps Handbook – by Gene Kim, Jez Humble, Patrick Debois, and John Willis
2019 10 Years of DevOpsDays:
DevOpsDays – 40 events in 21 countries are scheduled for 2019 (10 years later) Patrick Debois (lead 2009-15) Bridget Kromhout (lead 2015-2020)
It reminds us that DevOps is:
What is social coding?
Open source practice
All repos are public
Everyone is encouraged to contribute
Anarchy is controlled via Pull Requests
Code reuse dilemma:
Code has 80% of what you need, but 20% is missing
How do you add 20% missing features?
Social Coding Solution:
Discuss with the repo owner
Agree to develop it
Open an Issue and assign it to yourself
Fork the code and make your changes
Issue a Pull Request to review and merge back
Pair Programming:
Two programmers on one workstation
The driver is typing
The navigator is reviewing
Every 20 minutes they switch roles
Pair programming benefits:
Higher code quality
Defects found earlier
Lower maintenance costs
Skills transfer
Two set of eyes on every line of codebase
Create a separate Git repository for every component
Create a new branch for every Issue
Use PRs to merge to master
Every PR is an opportunity for a code review
Git feature branch workflow:
Concept from Lean Manufacturing
Faster feedback
Supports experimentation
Minimize waste
Deliver faster
Small batch example:
You need to mail 1000 brochures:
Step 1: Fold brochures
Step 2: Insert brochures into envelopes
Step 3: Seal the envelopes
Step 4: Stamp the envelopes with postage
Batch of 50 brochures:
Single Piece Flow:
Minimum Viable Product Example:
The importance of testing:
“If it’s worth building, it’s worth testing. If it’s not worth testing, why are you wasting your time working on it?” — Scott Ambler
Test cases drive the design
You write the tests first then you write the code to make the test pass
This keeps you focused on the purpose of the code
Code is of no use if your client can’t call it
Why devs don’t test:
I already know my code works
I don’t write broken code
I have no time
Why is TDD important for DevOps?
BDD vs. TDD:
Explore the problem domain and describe the behavior
Document the behavior using Gherkin syntax
Use BDD tools to run those scenarios
One document that’s both the specification and the tests
Gherkin:
An easy-to-read natural language syntax
Given … When… Then…
Understandable by everyone
Gherkin Syntax:
Given (some context)
When (some event happens)
Then (some testable outcome)
And (more context, events, or outcomes)
Retail BDD example
Gherkin for acceptance criteria:
Think differently about application design:
Think cloud native:
Think microservices:
“The microservices architectural style is an approach to developing a single application as a suit of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery.” — Martin Fowler and James Lewis
Failure happens:
Retry pattern:
Circuit Breaker pattern:
Bulkhead pattern:
Chaos engineering:
Working DevOps:
Culture of teaming and collaboration
Agile development as a shared discipline
Automate relentlessly
Push smaller releases faster
Taylorism:
Adoption of command and control management
Organizations divided into functional silos
Decision-making is separated from work
Impact of Taylorism on IT:
Software development is bespoke:
Software development is NOT like assembling automobiles
Most of the parts don’t exist, yet
Software development is craft work
Taylorism is not appropriate for craft work
Abandon Command and Control:
Command and control is not Agile
Stop working in silos
Let your people amaze you
Software engineering is organic:
Software stack is constantly updated
New features are being added
System behavior changes over time
Yet we treat software engineering like a civil engineering project
The project model is flawed:
The project model doesn’t work for software development
Treat software development like product development
Encourage ownership and understanding
Software engineering is not civil engineering
Maintain stable, lasting teams
Diametrically opposed views:
A clash of work culture:
The no-win scenario:
Operations view of development:
Development teams throw dead cats over the wall
Manually implemented changes
Lack of back-out plans
Lack of testing
Environments that don’t look like production
Development view of operations:
All-or-nothing changes
Change windows in the dead of night
Implemented by people furthest away from the application
Ops just cuts and pastes from “runbooks”
No-win scenario:
If the website works, the developers get the praise!
If the website is down, operations gets the blame!
Required DevOps behaviors:
Described an executable textual format
Configure using that description
Configuration Management Systems to make this possible (Ansible, puppet etc.)
Never perform configurations manually
Use version control
Ephemeral immutable infrastructure:
Server drift is a major source of failure
Servers are cattle not pets
Infrastructure is transient
Build through parallel infrastructure
Immutable delivery via containers:
Applications are packaged in containers
Same container that runs in production can be run locally
Dependencies are contained
No variance limits side effects
Rolling updates with immediate roll-back
Immutable way of working:
You never make changes to a running container
You make changes to the image
Then redeploy a new container
Keep images up-to-date
CI vs. CD:
Continuously deploying to a production-like environment
Traditional Development:
Changes are kept small:
Working in small batches
Committing regularly
Using pull requests
Committing all changes daily
CI automation:
Build and test every pull request
Use CI tools that monitor version control
Test should run after each build
Never merge a PR with failing tests
Benefits of CI:
Faster reaction times to changes
Reduced code integration risk
Higher code quality
The code in version control works
Master branch is always deployable
“Continuous Delivery is a software development discipline where you build software in such a way that the software can be released to production at any time.” — Martin Fowler
Release to production at any time:
A CI/CD pipeline needs:
Continuous integration and delivery:
Five key principles:
CI/CD + Continuous deployment:
How DevOps manages risk:
How does organization affect DevOps?
Is the culture of your organization agile?
Conway’s Law:
“Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization’s communication structure.” — Melvin Conway, Datamation, 1968
Traditional organization around technology:
Organized around business domains:
Align teams with the business:
DevOps is often misunderstood:
Perspectives on DevOps:
DevOps is not a team:
“The DevOps movement addresses the dysfunction that results from organizations composed of functional silos. Thus, creating another functional silo that sits between Dev and Ops is clearly a poor (and ironic) way to try, and solve these problems.” — Jez Humble, The DevOps Handbook
Working in silos doesn’t work:
A DevOps team means we’re DevOps, right?
DevOps is not a job title:
Bad behavior:
“Bad behavior arises when you abstract people from the consequences of their actions.” — Jez Humble, Continuous Delivery
Functional silos breed bad behavior:
Actions have consequences:
DevOps organizational objective:
Shared consciousness
…with
distributed (local) control
On the folly of rewarding for A, while hoping for B
“Whether dealing with monkeys, rats, or human beings, it is hardly controversial to state that most organisms seek information concerning what activities are rewarded, and then seek to do (or at least pretend to do) those things, often to the virtual exclusion of activities not rewarded. The extent to which this occurs, of course, will depend on the perceived attractiveness of the rewards offered, but neither operant nor expectancy theorists would quarrel with the essence of this notion.” — Steven Kerr, The Ohio State University
Measure what matters:
Social metrics:
DevOps metrics:
DevOps changes the objective:
Vanity metrics:
We had 10,000 daily hits to our website!
Now what? (What does a hit represent?)
What actions drove those visitors to you?
Which actions to take next?
Actionable metrics:
Actionable metric examples:
Top four actionable metrics:
Culture measurements:
You can rate statements developed by Dr. Nicole Forsgren to measure your team’s culture, including statements about information, failures, collaboration, and new ideas.
Strongly agree or disagree?
What is SRE?
“…what happens when a software engineer is tasked with what used to be called operations.” —Ben Treynor Sloss
Goal: Automate yourself out of a job.
Tenets of SRE:
Hire only software engineers
Site reliability engineers work on reducing toil through automation
SRE teams are separate from development teams
Stability is controlled through error budgets
Developers rotate through operations
Team differences:
SRE maintains separate development and operations silos with one staffing pool
DevOps breaks down the silos into one team with one business objective
Maintaining stability:
Commonality:
Both seek to make both Dev and Ops work visible to each other
Both require a blameless culture
The objective of both is to deploy software faster with stability
DevOps + SRE:
SRE maintains the infrastructure
DevOps uses infrastructure to maintain their applications