SlideShare a Scribd company logo
Christian Trabold
Vinh Duc Bach Sy
Content is licensed under a Creative Commons Attribution 3.0 Unported License
DevOps Training
May 13 Ho Chi Minh City
Who are we?
Christian Trabold
Consultant at ThoughtWorks
Vinh Duc Bach Sy
Developer at ThoughtWorks
How often did you give a gift that made the other person happy?
How often did the gift not make happy?
What makes you feel better?
Before we begin…
DevOps Training - Ho Chi Minh City
DevOps Training - Ho Chi Minh City
DevOps Training - Ho Chi Minh City
60%–90% of ideas do not improve the
metrics they were intended to improve.
Feature & Delivery Pressure
1/3 of ideas created a statistically significant
positive change
1/3 produced no statistically significant difference
1/3 created a statistically significant
negative change
How can we make sure
to get the best gifts?
Empathy
Our highest priority is to satisfy the customer through
early and continuous delivery of valuable software.
1st principle behind the Agile Manifesto
Feedback
DEV CUSTOMER
!
$
DEV
BIZ
CUSTOMER
$
OPS
!
DEV
BIZ
CUSTOMER
OPS
?
?
?
Feedback
Features
= $
!= $Steps to production
aka "the customer"
aka "the delivery pipeline"
DevOps
Classic Definition of DevOps - Part 1
Developers Operators
Classic Definition of DevOps - Part 2
Development Operations
Classic Definition of DevOps - Part 2
Development Operations
DevSecNetQAGovOps
Classic Definition of DevOps - Part 3
https://vimeo.com/165731278
If you mix Sugar, Flour, Cocoa, Salt, Baking Soda and a
few other things together, you don’t get
SugFloCocSalBak, you get a cake.
– Ken Mugrage
Classic Definition of DevOps - Part 3
http://www.kenmugrage.com/post/my-new-definition-of-devops/
DevOps helps to get user feedback faster
https://www.thoughtworks.com/insights/blog/agile-and-user-centered-design
How to start
Crafting the perfect gift
Quiz: Estimate
How long does a
deployment usually
take?
minutes / hours / days?
How often do you
deploy?
Daily / weekly / monthly /
yearly?
Create a Value Stream Map
Understand your process
Production
Each delivery step in the project is a step on the value stream map
How to start drawing a Value Stream Map (VSM)
Highlight "non-value creation time" and "value creation time"
A Value Stream Map - Note down the duration of each step
Build Test
Deploy
DEV
Test
DEV
Deploy
SIT
Test
SIT
Wait for
Approval
Deploy
PROD
Test
PROD
5min 15min 2min 15min 2min 15min 2w 5min 15min
PRODSITDEV
Once you see the full path to production you can identify groups of
steps (= phases)
A Value Stream Map - Group the phases to get 'stages'
Build Test
Deploy
DEV
Test
DEV
Deploy
SIT
Test
SIT
Wait for
Approval
Deploy
PROD
Test
PROD
5min 15min 2min 15min 2min 15min 2w 5min 15min
Time wasted on waiting for ticket approval. Clicking the approval
takes very little time.
A Value Stream Map - Detect "waste"
Build Test
Deploy
DEV
Test
DEV
Deploy
SIT
Test
SIT
Wait for
Approval
Deploy
PROD
Test
PROD
5min 15min 2min 15min 2min 15min 2w 5min 15min
10min
How many times do you have to repeat the steps due to feedback?
= delivery time to SIT x 4
A Value Stream Map - Detect "Redo" and "unplanned" work
Build Test
Deploy
DEV
Test
DEV
Deploy
SIT
Test
SIT
Wait for
Approval
Deploy
PROD
Test
PROD
5min 15min 2min 15min 2min 15min 2w 5min 15min
10min
avg. 2 times "re-do"
avg. 2 times "re-do"
How many teams and regulations are involved in the process?
A Value Stream Map - Get to know the other people involved
Build Test
Deploy
DEV
Test
DEV
Deploy
SIT
Test
SIT
Wait for
Approval
Deploy
PROD
Test
PROD
5min 15min 2min 15min 2min 15min 2w 5min 15min
10min
How long does it take to change
one single line of code in production?
Famous question from the Continuous Delivery Book
DEV
BIZ
CUSTOMER
OPS
Feedback
Features
Continuous Integration
…highest priority is to satisfy the customer…
Continuous Integration
Code
Code
Code
mainline
Quiz / Show hands: How do you get fast feedback?
A. Check if it works manually
B. Write tests
C. Wait for QA to open a ticket
Continuous Integration = Fast feedback
Check all software changes continuously
Continuously = runs on every commit
Does the software still work?
Continuous Integration - Examples
Fail build when script has syntax errors
Fail build when code is invalid
Fail build when content is invalid
Fail build when expectations are not satisfied
https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+Jenkins
Continuous Integration - Build-Radiators
BUILD FAILED
BUILD IN PROGRESS
BUILD OK
http://technology-customink-com.s3.amazonaws.com/images/stoplight.png
Regardless of what we discover, we understand and truly believe that everyone
did the best job they could, given what they knew at the time, their skills and
abilities, the resources available, and the situation at hand.
– The Retrospective Prime Directive
better communication between developers & teams
real time information on process and project status
Feedback reduces risk
Continuous Integration = Fast feedback = Less Risk
Continuous Integration - Fast feedback
Build-Radiators:
- Show cctray (http://ccmenu.org/)
- Show build status monitor (https://nevergreen.io/)
- Chatbot (Slack, Hipchat, IRC…)
- Show notifications (email notifications are not recommended)
Good overview:
https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+Jenkins
You can't get to continuous delivery if you can't do continuous
integration right:
1) commit more often
2) automate, automate, automate
3) trunk based development
Tips for efficient Continuous Integration
https://twitter.com/scottnasello/status/857307874812321792
multiple branches: Continuous Isolation
single branch: Continuous Integration
Continuous Integration & Branches
https://twitter.com/RealGeneKim/status/857306252770201601
Continuous Integration
Code
Code
Code
feature
toggle in
mainline
feature branch
Continuously integrating distributes code
ownership. Not "my precious" branch anymore.
It's "our" code and failure.
– @pm_suzie (Head of Product for @tw_studios @thoughtworks)
Continuous Integration
Code
Code
Code
feature
toggle in
mainline
feature branch
…continuous delivery of valuable software��
Continuous Delivery
Let's convert the VSM into a Delivery Pipeline!
You know now how a Value Stream Map looks like
Build Test
Deploy
DEV
Test
DEV
Deploy
SIT
Test
SIT
Wait for
Approval
Deploy
PROD
Test
PROD
Continuous Delivery: What is a pipeline?
How most people think software gets delivered
https://www.gocd.io/2017/03/01/importance-and-principles-of-cd-pipelines/
Continuous Delivery: Pipeline Example
https://www.thoughtworks.com/insights/blog/architecting-continuous-delivery
https://www.thoughtworks.com/insights/blog/architecting-continuous-delivery
Pipeline Example
Pipelines: Fast feedback
https://www.thoughtworks.com/insights/blog/architecting-continuous-delivery
Create Pipeline in GoCD
Exercise how to build a pipeline based on the notes
Why GoCD?
GoCD allows you to model your delivery pipeline(s)
Easy to convert the Value Stream Map into a working Delivery Pipeline
Core concepts of VSM & Pipelines built in by default
Easy chaining of tasks
Open Source and enterprise support
GoCD or Jenkins? https://www.gocd.io/2017/04/25/gocd-over-jenkins/
https://www.gocd.io/getting-started/part-1/
https://www.gocd.io/getting-started/part-1/
DevOps Training - Ho Chi Minh City
Start VM and create your first pipeline
Demo
GoCD Demo Steps
- Download VM Box: http://192.168.123.34/devops-training.box
- git clone https://gitlab.com/ctrabold/devops-training/
- git checkout 2017-hcmc
- vagrant up devops-training
- vagrant ssh devops-training
- > ifconfig
- # get IP address of the machine
- open http://<IP-ADDRESS>:8153
GoCD Documentation
- https://www.gocd.io/2017/03/01/importance-and-principles-of-cd-pi
pelines/
- https://www.gocd.io/2017/03/29/beginnings-of-a-real-pipeline/
- https://www.gocd.io/2017/04/06/reusing-pipelines/
- https://www.gocd.io/2017/04/17/build-propagation-using-fan-in-fan-
out/
Thank you!
Questions & Answers
Books & other Resources
Recommendations
Read
Read
Read
Survey of more than 25,000 technical
professionals worldwide over the last
five years
Understand how DevOps practices
impact IT and organizational
performance
https://puppet.com/resources/whitepaper/2016-state-of-devops-report
Read
Stay up to date & subscribe to the
ThoughtWorks Tech Radar
http://www.thoughtworks.com/radar
This site attempts to collect all the
related facts, rationale and techniques
for Trunk-Based Development
together in one place, complete with
twenty-five diagrams to help explain
things.
All without using TBD as an acronym
even once twice.
Read
https://trunkbaseddevelopment.com/
Videos
https://www.youtube.com/watch?v=QqpGyycz7Kk
You can win a prize :)
Quiz
❏ An Operation System
❏ A mindset
❏ A data lake
What is UNIX?
❏ A strange person
❏ A tool to manage Virtual Machines
❏ A Rails application
What is Vagrant?
❏ A Forrester IT report for executives
❏ A visual representation of the delivery process
❏ A design pattern for bi-directional value mapping
What is a Value Stream Map?
❏ A npm plugin
❏ A visual representation of the delivery process
❏ A Jenkins Plugin
What is a Delivery Pipeline?
❏ A deployment tool
❏ A configuration management tool
❏ A company name
❏ All of the above
What is Ansible?
❏ TeamRichy
❏ Jenkins
❏ FlowCD
❏ TeamCity
❏ GoCD
❏ Banksy
Which of these tools do you know?
DevOps Training - Ho Chi Minh City
Common shell commands:
UNIX
cp file file-copy
mv file file-renamed
cd <change directory>
ls . list directory content
rm file-to-remove
Windows
dir . list directory content
Cheat Sheet
DevOps Training - Ho Chi Minh City
Installation Checklist
Exercise to verify setup is complete
Open Terminal / Command line
vagrant --version
Vagrant 1.9.2
VBoxManage --version
5.1.2r108956
Installation Checklist
Clone Git repository
git clone https://gitlab.com/ctrabold/devops-training
Get box file (ask for USB stick!)
vagrant box add --name centos/7 
--box-version 1609.01 
~/Downloads/centos-7.box
Installation Checklist
Installation Checklist
Now start the Virtual Machine
cd devops-training
vagrant up

More Related Content

DevOps Training - Ho Chi Minh City