better delivery with devops driven development
TRANSCRIPT
Better Deliverywith
DevOps Driven Development
Jirayut Nimsaeng (Dear)
Thailand PracticalSoftware EngineeringConference (TPSE 2015)
August 22, 2015 @ Software Park
https://en.wikipedia.org/wiki/DevOps#/media/File:Devops.svg
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
#whoami● Jirayut Nimsaeng (Dear)● The Builder at ● Interested in Cloud and
Open Source Technology● Agile Practitioner
Jirayut NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Problem
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Classic Release
Requirement
Design
Implementation
Testing
Release
Waterfall
Jirayut NimsaengTPSE 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 NimsaengTPSE 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 NimsaengTPSE 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 devsDevs who think like ops
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
How to start?
There's no silver bullet
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
DevOps Driven DevelopmentDDD 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Process1) DDD Planning Process
2)DDD Operation Process
3)DDD Scaling Process
Jirayut NimsaengTPSE 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 NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Ops who think like devsor
Devs who think like ops
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Dev
Local Dev
GitCI/CDServer
Feature TestServer
Pre-ProductionServers
ProductionServers
MonitorServer
Docker Registry
DataServer
BuilderServer
QA U
Automated TestServer
CI/CDAgents
Ideal Development Process Flow
Jirayut NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Practice that DevOps needs to know
Jirayut NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
http://www.chau.cc/the-deploy-button/
Jirayut NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Benefit
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Reduce the Risk
Jirayut NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Supported Culture
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Agile
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Cross-functional Team
DevOps Team
Server Team
Dev Team
Tester Team
User needs
Specialize Tasks
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Failure Avoidance Failure Recovery
Fail fast and recovery
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Celebrate failure
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Task flow
100% resource utilization
= 0% flow
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
QA
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
DevOps Practice
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Jirayut NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Git Flow
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
GitHub Flow
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Jirayut NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Build Pipeline
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Robot Framework
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Cloud
Learn how to
Automated it
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Centralize Log System
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Monitoring System
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Visualizer
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Developer Problems
Developer Local Test QA
Production
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
What Developer needs
Production-like Quick Repeatable
Jirayut NimsaengTPSE 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 NimsaengTPSE 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 NimsaengTPSE 2015
August 22, 2015 @ Software Park
Containers vs. VMs
Server
Host OS
Hypervisor
GuestOS
GuestOS
GuestOS
Bins/Libs
AppA1
Bins/Libs
AppB1
Bins/Libs
AppA2
VM
Server
Host OS
Bins/Libs Bins/Libs
App A
1
App A
2
App B
1
App B
2
App B
3
Docker daem
o n
Container
Containers are isolated,but share OS and, whereappropriate, bins/libraries
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
Continuous Delivery with DockerDockerRegistry
DBBackupServer
GitlabServer
Gitlab CIServer
Gitlab CI Runner
Docker Engine
Test/Prod Server
Docker Engine
MySQLDockerfile
JoomlaDockerfile
MyS
QL Im
ageM
ySQ
L Image
Joomla Im
ageJoom
la Image
Joomla C
ontainer
MyS
QL C
ontainer
1. Push Code
2. Trigger
3. Trigger
4. Get
5. Build5.1. Get
6. Push Joomla Docker Image
7. Build7.1. Import
8. Push MySQL Docker Image
9. Trigger
10. PullDocker Image
12. Acceptance Test3.5. Unit Test
11. Deploy
Jirayut NimsaengTPSE 2015
August 22, 2015 @ Software Park
“DevOps isn’t something you can buyit’s something you have to do, and youhave to do it yourself. “
John Michelsen, CTO, CA Technologies