Introduction To DevOps Slides PDF
Introduction To DevOps Slides PDF
Spring 2016
Course Description
Course Description
The simultaneous needs for IT to 1) deploy new features and 2) keep systems up and running
creates a core conflict that challenges development, operations to the respond to business
needs customers in a timely manner. DevOps represents practices, tools, and a culture that
seeks to resolve this core conflict by enabling operations and development engineers to
participate together in the entire service life cycle, from design through the development
process to production support. This class will explore these practices, tools, and culture using
Gene Kim's "Three Ways of DevOps" as guideposts.
Course Audience
Newcomers to Agile and DevOps will find this class a welcoming environment to learn the
basics on the DevOps mindset, The Three Ways, automation pipelines, common DevOps
systems and tools, and continuous integration / continuous delivery (CI/CD)
Operations Engineers will appreciate the class focus on using DevOps to effectively
manage the large quantity and frequency of changes demanded in modern IT operations
while keeping systems stable
Agile Teams already developing software using agile methods will find this class to be a
logical extension toward achieving synchronicity with operations and business using DevOps
2
Learning Goals
Today
Tomorrow
Weeks/Months
USCIS Agile
Projects/Portfolios
kanban
We applied the agile empirical mindset and agile methods and observed
these results:
Early and continuous delivery of Emergent design
valuable software Technical excellence
Rapid feedback Empowered self-organizing teams
Empirical decision-making Personal safety
Satisfied customers Sustainable pace
Business people and technical High trust environments
people working together
Measurement-based forecasting Lean processes
Harnessing change for competitive Continuous improvement
advantage
The Agile Manifesto and the agile methods that followed focused on software
development – DevOps is a logical evolution of a maturing agile process
5
DevOps: Key Concepts
6
The Basics
What is DevOps?
7
Traditional Development
The Inventors
Create new features
and functionality in
“dev” environment
Occasionally deliver
new product to
operators, along with
instructions
May incorporate
feedback from
operators in future
deliveries
Rewarded for
delivering new
features
8
The inventors are responsible for changing the system
Traditional Operations
The Mechanics
Receive new product from
developers to be installed and
operated
9
The mechanics are responsible for keeping the system in operation
Differing Views on Change
Hero
Obstacle
Logical extremes
10
We Have A LOT of Changes
12
Nobody can be an expert in everything – your enterprise can’t rely on Brent!
The Reunification of Dev + Ops
13
DevOps in a Nutshell
Automated
Systems
What if we built a
bunch of great tools to
Monitoring,
Feedback, and
help us?
Action
14
Breaking the Silos:
Communication, Collaboration, Integration
Communication
Collaboration Integration
Development Operations
How can dev help system stability? How can ops help accelerate feature
delivery?
Ops can
anticipate
how new Development
functionality
will effect
production Dev can respond
to bugs and
deployment
failures quickly
Ops trusts dev will provide good
code
Dev and Ops can
work together to Dev trusts ops will put code in
Operations permanently prod quickly
remove root causes
of bugs and failures Visibility enables “trust but verify”
16
Dev and Ops Working Together
Cross-functional teams
collaborate to deliver whole
working systems including all
infrastructure, software code, and
configurations
18
Breaking the Silos:
Communication, Collaboration, Integration
Communication
Operations Business
19
Breaking the Silos: Dev, Ops, and Business
Business
better
understands
capability for
Development changes to
features and
functionality
20
Breaking the Silos: Dev, Ops, and Business
Development
Business
better understands
Operations Business
operational
capabilities
Mobile devices
Social media
Accessibility tools
Mission alignment
DOES14 - Mark Schwartz
Risk aversion
Well run companies are expected to maintain very low MTTR (mean-time
to repair) times – delays in fixing problems can be catastrophic
Beware! Pain
Ahead!
1st Way
Emphasize entire system
performance versus a specific
silo of work
DevOps: The First Way
31
The First Way: Systems Thinking
Barriers build up
Different incentives
Different objectives
Bad handoffs
Lack of understanding
Lack of empathy
Visualize work
Measure the flow of work (cycle time, lead
time, wait times)
Think about software production as a value stream similar to a 34
manufacturing value stream
Organizations are Complex Systems
Communication patterns
Locations
Work styles
Personalities
Roles and responsibilities
Skill sets
Programming Languages
Tools
Networks
Configurations
Interconnections
37
The First Way:
Never Consciously Pass Defects Downstream
Create quality at the source
Make rework visible
Understand the origination point of defects in order to avoid recurrence
“This is legacy code, I’ll just make
the change for my story, I don’t
have time to fix the rest of this”
“That issue is a doozy… leave
it to fix in the hardening sprint”
Dev
Business
capability to build it
and maintain it?
End Users
Ops 40
DevOps: The First Way – Practices
Communication
Collaboration Integration
41
Communication
DevOps Practice:
Deploy Shippable Environments Collaboration Integration
SHIPPABLE CODE
AND SHIPPABLE
ENVIRONMENT
Traditionally, dev is responsible for applications while ops is responsible
for environments
“Programmable infrastructure”
DevOps Practice:
One Step Environment Creation Collaboration Integration
44
Everyone uses a consistent environment
Communication
DevOps Practice:
The Daily Build Collaboration Integration
45
Communication
DevOps Practice:
Deploy Early, Often, and Quickly Collaboration Integration
Small deployments mean Fast deployments mean more deployments mean easier
46
deployments mean lower cycle times means faster time to market
Communication
DevOps Practice:
Classify Ops Work by Four Types Collaboration Integration
Systematically allocating time to the 4 types enables all the work to get
done and becomes routine
Types of
work
Use a single USCIS repository for source code, test code, and environment
configuration scripts
49
The Second Way: Amplify Feedback Loops
50
The goal of any process improvement is to shorten and amplify feedback loops
The Second Way:
Shorten and Amplify Feedback Loops
Commit
Manual tester
Test Build
overloaded due
Develop to end of sprint
Operations
10 steps to get
feedback & VERY long
delay
Product Backlog
End Users
Test Build
Commit
5 steps to get
feedback
Develop
Manual Test
Issue Tracker
52
The Second Way:
Shorten and Amplify Feedback Loops (cont)
Most users won’t call… some may just quit being customers
Many defects remain latent for a long time
By the time defects come back, dev forgets how the code works
Commit
4 Steps to get
feedback – automated Test Build
and quick!
Develop
Failed
Automated Test 53
The Second Way:
Use Feedback to Create Quality at the Source
DevOps extends the service model to Dev and Ops treating each other as
customers
Customer
Service
Provider
Communication
Collaboration Integration
57
Communication
DevOps Practice:
Deployment Automation Collaboration Integration
58
DevOps Practice:
Communication
Monitoring gives us continuous, live feedback about how the system is running
“Tell me what is happening before the phone rings”
User Feedback Approach Monitored Approach
Field user calls Automatic alert about a problem when
it happens
Multiple people call Monitoring tools show me how
widespread the problem is
Users can’t tell me the real source of I can see which component of the
the problem application is generating errors
59
Operations Monitoring – Needs and Challenges
Monitoring Challenges
DevOps Practice:
Operations Monitoring Dashboard Collaboration Integration
Application
Performance
Index (User
Application
Satisfaction)
Response
Time
Application
Throughput
Transaction
Timings (drill down
capability to code
level, transaction Alerts
level)
Communication
DevOps Practice:
Operations Monitoring Drives Dev & Ops Priorities
Collaboration Integration
Communication
DevOps Practice:
Prioritize Fixing Production Defects Collaboration Integration
DevOps Practice:
Reusable Ops and Security User Stories Collaboration Integration
User Story
User Story
As security I want cross-site
As an ops engineer I
scripting attacks prevented so that
want to monitor how many people
access controls cannot be
are listening to audio feeds so I
bypassed
can tune playback quality during
Estimate Priority spikes in demand
5 points 1 (High) Estimate Priority
3 points 2 (Med)
Acceptance Criteria On back…
• Verify all input is filtered as Acceptance Criteria On back…
potentially malicious • Verify the count of active audio
• Verify all output of the page is sessions is displayed in the
encoded to the explicitly defined application’s admin dashboard
character set • Verify the count is accurate as
• Verify output is sanitized by escaping playback sessions are added or
dynamic content to properly enforce completed
separation of code and data
64
DevOps Practice:
Communication
DevOps Practice:
Track Dev & Ops Business Impact Collaboration Integration
Maintainability – prompt restoration No more than 10 hours No more than 8 hours 5 hours
of service after outage Exceeded Objective
Doing DevOps at USCIS – Second Way
67
Automating an
Integrated DevOps
System
Systems to Make Software
Communication
System U l Version
Control
(CM)
A good method of enabling DevOps
Monitoring
System is to simply begin connecting and
automation the systems you use to ^ Requirements
make software.
Code
Issue
Tracking i Review
System
69
Version Control
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Version Control
Deploy
System
R Ensures you’re working on the right
version of something
A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
70
Requirements System
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Requirements System
Deploy
System
R Houses project requirements in a
prioritized list and allows for item
A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
71
Build System
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Build System
Deploy
System
R Software tools designed to
automate the process of program
A Build
System
compilation to create a
deployable package
Documentation
System a Test System
Code
Issue
Tracking i Review
System
72
Test System
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Test System
A
manual and automated that Build
Deploy
System
R ensure the functionality and
accuracy of code
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
73
Code Review System
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Documentation
System a Test System
Code
Issue
Tracking i Review
System
74
Issue Tracking System
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Deploy
System
R
Collects issues throughout the
cycle of the project and track A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
75
Documentation System
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Documentation System
Deploy
System
R Repository of system information
throughout the lifecycle
A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
76
Deploy System
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Deploy System
Deploy
System
R Installs and configures the
package created by the build
A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
77
Monitoring
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Monitoring System
Deploy
System
R Collects current-state data to
determine health of all
A Build
System
environments
Documentation
System a Test System
Code
Issue
Tracking i Review
System
78
Communication System
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Communication System
Deploy
System
R Method for conveying information
between systems
A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
79
Automate All the Connections!
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Deploy
System
R A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
80
Orchestrating Integration with a Pipeline
Pipelines
Unit
User Commits Merge code Build Code Review Log Issues Deploy
test/coverage
82
We Need Something to Integrate the Systems
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Pipeline
Orchestration
Deploy
System
R A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
83
Development Pipeline Example
Communication
System U l Version
Control
(CM)
Monitoring
System ^ Requirements
Pipeline
Orchestration
Deploy
System
R A Build
System
Documentation
System a Test System
Code
Issue
Tracking i Review
System
84
Development Pipeline Example with Integration
System Commit code
Communication
System U l Version
Control
(CM)
Monitoring
System Code is
committed and
Merged
^ Requirements
Pipeline
Orchestration
Deploy
System
R
Initiate Build
Initiate
A Build
System
Testing
Documentation
System a Test System
Code
Issue
Tracking i Review
System
85
Pipeline Stages
Continuous Integration
Auto Auto
Continuous Delivery
Acceptance Deploy to
Code Done Unit Tests Integrate
Testing Production
Continuous Deployment
Acceptance Deploy to
Code Done Unit Tests Integrate
Testing Production
CI Pipeline
Commit
Build gate Staging gate Integration
gate
New Feature
CM Repository
Integration
Gates Applied Tests Merge with
Staging
Commit
Master
Master
Smoke Tests If Successful,
Legacy Feature If Successful, Merge with Fortify Scans
(LF) Merge with Integration
Staging Branch Release is
Commit packaged
Bad Feature
(BF)
87
Using a CI/CD Pipeline for Team-Managed
Deployments at USCIS
Approval:
CI/CD Pipeline:
DevOps:
Development Operations
Team Managed Deployment (TMD) provides the approval step for a CI/CD
Pipeline. The CI/CD Pipeline provides the forward link from Development to
Operations.
Using a CI/CD Pipeline for Team-Managed
Deployments at USCIS (cont)
Deployment Scripts
Source Code File List
List of Changes
Version
Deployment Control
Source Code File List
Instructions
List of Changes
TAS
Test Results Test Tools
Test Results
Test History
Test History
90
DevOps is Not…
A tool
A role
A team
92
The Third Way:
Experimentation, Risk-Taking, and Learning
• Automate!!!
94
DevOps: The Third Way - Practices
Communication
Collaboration Integration
95
Communication
DevOps Practice:
Inject Failures Collaboration Integration
DevOps Practice:
Make Your Improvement Work Visible Collaboration Integration
97
Communication
DevOps Practice:
Regularly Improve Technical Debt Collaboration Integration
DevOps Practice:
Regularly Improve Tools Collaboration Integration
99
Communication
DevOps Practice:
Reward Contributions to a DevOps Culture Collaboration Integration
100
Communication
DevOps Practice:
Conduct Deliberate Culture Change Experiments Collaboration Integration
Decentralized,
emergent
Protected,
Boss’ orders dedicated
team
Org
Change
Patterns
Champions / Organizational
advocates baby steps
Versioned code base Poling builds Auto triggered builds Zero downtime deploy Zero touch continuous
Scripted builds Build are stored Automated tag & Multiple build machines deployments
Basic scheduled builds Manual Tag & Versioning versioning Full automated DB
Dedicated build server First step towards Automated bulk of DB deploys
Documented manual standardized deploys changes
Build / Deploy deploy Basic pipeline with
deploy to prod
Scripted configuration
changes
Standard process for all
environments
Automated Unit Tests Automated Unit Tests Automated Functional Automated acceptance All tests automated
(Coverage <50%) (Coverage >50% & < tests criteria (80%) Coverage 100%
Separate test 80%) Automated acceptance Automated performance
environment Automated Integration criteria (<40%) tests
Test & Verification Tests (Coverage ??) Automated Security
Tests
Automated Section 508
tests
Baseline process metrics Static code analysis History of reports Report trend analysis Reports accessible via
Collaboration & Manual reporting Quality reports available Graphing as a service common dashboard
Information Traceability built into Dynamic graphing
pipeline
Sharing 103
Wrap Up
How much more productive, effective, and enjoyable might our work be? How much
business value is left on the table due to unmatched demand and capacity?
Questions
104