Better Delivery
with
DevOps Driven Development
Jirayut Nimsaeng (Dear)
Thailand Practical
Software Engineering
Conference (TPSE 2015)
August 22, 2015 @ Software Park
https://en.wikipedia.org/wiki/DevOps#/media/File:Devops.svg
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
#whoami
● Jirayut Nimsaeng (Dear)
● The Builder at
● Interested in Cloud and
Open Source Technology
● Agile Practitioner
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Who are you?
● Developer
● Tester
● Infrastructure
● Manager
https://www.flickr.com/photos/aperturismo/4488250788/in/photostream/
Product Manager
http://www.slideshare.net/realgenekim/why-everyone-needs-devops-now
Developer
https://gigaom.com/2011/04/26/facts-and-figures-behind-greenpeace%E2%80%99s-green-data-center-report/
Operation
https://en.wikipedia.org/wiki/Brock_Lesnar#/media/File:Lesnar_kimura_lock.jpg
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Problem
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Classic Release
Requirement
Design
Implementation
Testing
Release
Waterfall
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Symptoms
● Always have defects in production
● Couldn't fix defect quickly
● Blaming/finger pointing
● Blocker between team
● No manual
● Quality of life
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Good Problem
● We have some clients and revenue
● We use FTP to setup product for client
● We have to customize code for each client
What happen if we have
a lot of client coming at the same time?
https://commons.wikimedia.org/wiki/File:Nanyang_Walk_slow_lettering_20060317.JPG
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
So what exactly is
DevOps
https://commons.wikimedia.org/wiki/File:US_Navy_070829-N-4965F-
015_Flames_push_water_from_a_fire_hose_back_as_a_federal_firefighter_assigned_to_Navy_Region_Hawaii_Federal_Fire_Department_
combats_a_fire_during_an_aircraft_firefighting_training_evolution_with_the_Mobile.jpg
Developments Operations
Source: John Allspaw (@allspaw) and Paul Hammond (@ph)
Ops who think like devs
Devs who think like ops
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
How to start?
There's no silver bullet
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
DevOps Driven Development
DDD is the way to improve technical
practice and process in your company
to get better product delivery by make
DevOps focus on doing DevOps then
improve and scale it
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Process
1) DDD Planning Process
2)DDD Operation Process
3)DDD Scaling Process
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
1) DDD planning process
● Find dedicated DevOps person
● Make DevOps to understand business from
developer develop software to release to
production
● Spike and plan the ideal development process
flow
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
How to find a DevOps
● From DevOps Consulting company
● Hire experienced DevOps
● Build one from your team
– From Developer or Operation?
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Ops who think like devs
or
Devs who think like ops
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Dev
Local Dev
Git
CI/CD
Server
Feature Test
Server
Pre-Production
Servers
Production
Servers
Monitor
Server
Docker Registry
Data
Server
Builder
Server
QA U
Automated Test
Server
CI/CD
Agents
Ideal Development Process Flow
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
2) DDD operation process
● Find the pilot project. Should be smallest as
possible
● Focus on doing DevOps on pilot project
● Make it fast, show it early, get feedback and
continually improve it
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Practice that DevOps needs to know
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
3) DDD scaling process
● Get team to use and understand it. It don't have to
all done.
● Make it transparent
● Do knowledge sharing and delegate DevOps task
to the other people to do with other projects
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
http://www.chau.cc/the-deploy-button/
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Habit of DevOps
● Find ways to collaborate – involve others early
● Communicate
● Find ways to automate and make self-service
● Become metrics driven
● Learn new things, continually improve
● Understand the larger business goals
● Experiment – choose a test case as a pilot
● Then document and spread best practices
http://www.slideshare.net/mxyzplk/devops-101
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Benefit
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Reduce the Risk
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Release it frequently
Split your product
Optimize business value
$$$
$
Split time
January April
https://www.flickr.com/photos/kb35/349762358/sizes/o/
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Supported Culture
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Agile
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Cross-functional Team
DevOps Team
Server Team
Dev Team
Tester Team
User needs
Specialize Tasks
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Failure Avoidance Failure Recovery
Fail fast and recovery
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Celebrate failure
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Task flow
100% resource utilization
= 0% flow
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
QA
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
DevOps Practice
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
What is Git?
● It is version control for any plain text
● Distributed version control
● The most important thing to use git is planning
branch strategy
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Git Flow
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
GitHub Flow
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
What is Jenkins?
● Continuous Integration and Delivery tool
● A lot of features and very flexible
● Can integrate with a lot of third party
● A lot of plug-ins
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Build Pipeline
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Robot Framework
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Cloud
Learn how to
Automated it
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Centralize Log System
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Monitoring System
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Visualizer
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Developer Problems
Developer Local Test QA
Production
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
What Developer needs
Production-like Quick Repeatable
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Docker can
● Deploy reliably & consistently
● Everything will be exactly the same
– Distros
– Software versions
– Library dependencies
● If it works locally, it will work everywhere
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Docker can
● Deploy efficiently
– Laptop can run 10-100 containers easily
– Server can run 10-1000 containers
● Containers can run at native speeds
– http://www.slideshare.net/BodenRussell/kvm-and-
docker-lxc-benchmarking-with-openstack
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Containers vs. VMs
Server
Host OS
Hypervisor
Guest
OS
Guest
OS
Guest
OS
Bins/
Libs
App
A1
Bins/
Libs
App
B1
Bins/
Libs
App
A2
VM
Server
Host OS
Bins/Libs Bins/Libs
AppA1
AppA2
AppB1
AppB2
AppB3
Dockerdaemon
Container
Containers are isolated,
but share OS and, where
appropriate, bins/libraries
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
Continuous Delivery with Docker
Docker
Registry
DB
Backup
Server
Gitlab
Server
Gitlab CI
Server
Gitlab CI Runner
Docker Engine
Test/Prod Server
Docker Engine
MySQL
Dockerfile
Joomla
Dockerfile
MySQLImageMySQLImage
JoomlaImageJoomlaImage
JoomlaContainer
MySQLContainer
1. Push Code
2. Trigger
3. Trigger
4. Get
5. Build
5.1. Get
6. Push Joomla Docker Image
7. Build
7.1. Import
8. Push MySQL Docker Image
9. Trigger
10. Pull
Docker Image
12. Acceptance Test
3.5. Unit Test
11. Deploy
Jirayut Nimsaeng
TPSE 2015
August 22, 2015 @ Software Park
“DevOps isn’t something you can buy
it’s something you have to do, and you
have to do it yourself. “
John Michelsen, CTO, CA Technologies

Better delivery with DevOps Driven Development