SlideShare uma empresa Scribd logo
1 de 46
Baixar para ler offline
RECIPES FOR
CONTINUOUS DELIVERY
Gurpreet Luthra - Lead Consultant, ThoughtWorks
1
_zenx_
EXPERIMENTATION
2
TOPICS
3
• Continuous Integration (CI)
• Continuous Deployment (CD?) / Continuous Delivery (CD)
• Phoenix Servers
• Branching for Release
• Feature Branches
• Trunk Based Development
• Pull Request Model
• Toggles
• Branch by Abstraction & Strangulation
4
CONTINUOUS INTEGRATION
https://www.thoughtworks.com/continuous-integration
5
https://www.martinfowler.com/articles/continuousIntegration.html
May 2006!
6
From: https://www.youtube.com/watch?v=HnWuIjUw_Q8
THE PRACTICES
7
• Maintain a single source repository
• Automate the build
• Make your build self-testing
• Every commit should build on an integration machine
• Keep the build fast
• Test in a clone of the production environment
• Make it easy for anyone to get the latest executable
• Everyone can see what’s happening
• Automate deployment
HOW TO DO IT
8
• Developers check out code into their private workspaces.
• When done, commit the changes to the repository.
• The CI server monitors the repository and checks out
changes when they occur.
• The CI server builds the system and runs unit and
integration tests.
• The CI server releases deployable artefacts for testing.
• The CI server assigns a build label to the version of the
code it just built.
• The CI server informs the team of the successful build.
TEAM RESPONSIBILITIES
9
• Check in frequently
• Don’t check in broken code
• Don’t check in untested code
• Don’t check in when the build is broken
• Don’t go home after checking in until the system builds
Coffee Cup Story!
Unmesh Joshi
(Head of Tech - TWI)
THE UNDERLYING ASSUMPTION
10
• The quality and impact of your CI processes are solely
dependant on the quality of your TESTS.
• If you don’t write good quality tests, with reasonable
coverage, all the CI infrastructure in the world can’t
protect you.
WRITE GOOD TESTS!!!
11
DELIVERY OR DEPLOYMENT?
12
Image from: http://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment
CONTINUOUS DEPLOYMENT
13
https://www.quora.com/What-are-the-best-examples-of-companies-using-continuous-
deployment
PHOENIX SERVERS
14
• Configuration Drift
• Snowflake servers
• No SSH servers
• Immutable Servers
• Phoenix servers
PLEASE READ: http://martinfowler.com/bliki/PhoenixServer.html
and http://martinfowler.com/bliki/ImmutableServer.html
VM (OR CONTAINERS) AS BUILD AGENTS
15
SLIDE COPIED FROM: http://decks.eric.pe/pantheon-ci
BUILD AGENTS AS PHONEIX SERVERS
16
BUILD AGENTS AS PHONEIX SERVERS
17
BUILD AGENTS AS PHONEIX SERVERS
18
PHOENIX SERVERS
19
Diagram and full article at: https://boxfuse.com/blog/no-ssh
PROMOTE IMAGES
20
BOOKS
21
BRANCHING
22
(Painting by Chitra S)
BRANCHING FOR RELEASE
23
Image from: http://paulhammant.com/blog/branch_by_abstraction.html
BRANCHING FOR RELEASE
24
FOR EACH RELEASE HOW MUCH EFFORT DO YOU PUT
IN TO CREATE CI PIPELINES ?
BRANCHING FOR RELEASE
25From: http://www.bogotobogo.com/DevOps/DevOps_CI_CD_Pipeline_Sample.php
FEATURES BRANCHES
26
Image from: http://blogs.riskotech.com/riskfactor/post/An-Alternate-Branching-Strategy.aspx
THE REALITY OF FEATURE BRANCHES
27
Image from: http://paulhammant.com/blog/branch_by_abstraction.html
Martin Fowler- Promiscuous Integration: https://dzone.com/articles/promiscuous-integration-vs
BRANCH TRACKING
28
A GIT BRANCHING MODEL
29
Image from: http://nvie.com/posts/a-successful-git-branching-model/
TRUNK BASED DEVELOPMENT
30
• Trunk Based Development (TBD) is where all developers
(for a particular deployable unit) commit to one shared
branch under source-control called “trunk” or “mainline”.
• Branches are made only for a release in the shared
repository.
• Trunk always stays GREEN.
• Developers never break the build with any commit.
Alternatively, broken commits are immediately rolled
back. Or such commits may be blocked before being
merged with the trunk.
• Developers don’t work in ISOLATION, in their “happy
branches” for days. Update your workstation daily!
TRUNK BASED DEVELOPMENT
31
Image from: http://paulhammant.com/2014/01/08/googles-vs-facebooks-trunk-based-development/
GOOGLE MONOREPO
32
Rachel Potvin: https://trunkbaseddevelopment.com/game-changers/index.html#google-
revealing-their-monorepo-trunk-2016
Piper + CitC
GOOGLE MONOREPO
33
Rachel Potvin: https://trunkbaseddevelopment.com/game-changers/index.html#google-
revealing-their-monorepo-trunk-2016
Piper + CitC
PULL REQUEST MODEL
34
master
fork’s master
Fork
branch
feature-1 branch
branch
Raise pull request
Update to latest
Raise pull request
feature-2 branch
review + no mergereview + merge
review + merge
PULL REQUEST MODEL
35
Image from: code.tutsplus.com/tutorials/travis-ci-what-why-how--net-34771
TRUNK BASED DEVELOPMENT
36
Feature branching is a poor man’s modular architecture,
instead of building systems with the ability to easily swap in
and out features at runtime/deploy time, you’re coupling
yourself to the source control providing this mechanism
through manual merging.
- Dan Bodart
Mentioned By
http://martinfowler.com/bliki/FeatureBranch.html
AND
http://sethgoings.com/feature-branching
TRUNK BASED DEVELOPMENT
37
OK. I WILL TRY & AVOID FEATURE BRANCHES. HOW DO
I ENSURE I CAN DEVELOP BIG FEATURES, YET, KEEP
TRUNK GREEN & STABLE?
FEATURE TOGGLES
38
FEATURE TOGGLES
39
• Release Toggles
• Business Toggles
• Build Time Toggles
• Run Time Toggles
• A/B Testing
• Canary Releases
• Rollback in production
PLEASE READ
http://martinfowler.com/articles/feature-toggles.html
Pete Hodgson
EXAMPLES
40
1. Introduce a simple search box on your home page
2. Add a new feature to favorite products + My Favorite page (client side
only, nothing on server side)
3. Upgrade from Java7 and Java 8 (slowly across servers)
4. Improve your search algo (in case it returns no results, then apply,
distance algo)
5. Change upload logic for images (earlier each image was assigned a
thread). New logic: Create a queue, perform a de-dup, assign to a thread,
batch size of 5, upload.
6. Add FB Integration (FB Like + Count -- pulled from FB)
7. Change JS code to use Require.JS for dependencies (shim/polyfill/etc)
8. Introduce dependency injection via Spring/Guice
9. Change Repository code from Hibernate to Toplink
IMPLEMENTATION
41
• Simple IF statement (top most layer)
• DB / File / Code based configuration
• Polymorphic Substitution / Injection
• Plugin Based / Dynamic JAR Lookup / Discovery
• Hook based extensions
• Toggle Based Frameworks (Use Google!)
• Many more..
BRANCH BY ABSTRACTION
42
IMAGES AND ARTICLE:
http://martinfowler.com/bliki/BranchByAbstraction.html
BRANCH BY ABSTRACTION
43
• Technique for making large scale changes in a gradual way
• Use an abstraction layer to allow multiple implementations to
co-exist
• Use the notion of one abstraction and multiple
implementations to perform the migration from one
implementation to the other
• Ensure that the system builds and runs correctly at all times
YES. IT’S JUST GOOD OBJECT ORIENTED DESIGN.
STRANGULATION PATTERN
44
• Slowly strangulate one system for another.
• Slow strangulate one model / one component for another.
PLEASE READ
http://agilefromthegroundup.blogspot.in/2011/03/strangulation-pattern-of-choice-for.html
IMAGE FROM:
https://dzone.com/articles/legacy-java-applications
WHERE TO NEXT?
45
• Write good tests. Make them blazing fast. Depend on them!
• Commit & push frequently to Trunk. Build should be ALWAYS
Green.
• Every morning, pull latest code to your machine.
• Consider using Immutable Servers / Phoenix Servers.
• Figure out creative ways to keep software ready-for-release.
• Plan for rollbacks, or for functionality switches.
• Consider strategies like Toggles or Branch-by-Abstraction.
• Don’t work in ISOLATED branches.
• Be thoughtful in your code… and in your design.
AIM FOR Continuous Delivery!
THANK YOU
46
Gurpreet Luthra - Lead Consultant, ThoughtWorks
_zenx_
Thank you for all your thoughts on CI & CD by
Martin Fowler, Paul Hammant, Jez Humble, Pete Hodgson, ThoughtWorkers
and
of course Calvin & Hobbes

Mais conteúdo relacionado

Mais procurados

Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Ravikanth Chaganti
 
Paint it blue with PowerShell
Paint it blue with PowerShellPaint it blue with PowerShell
Paint it blue with PowerShellJaap Brasser
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDRavikanth Chaganti
 
Using PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationUsing PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationRavikanth Chaganti
 
Apply chat automation today - work smarter tomorrow
Apply chat automation today - work smarter tomorrowApply chat automation today - work smarter tomorrow
Apply chat automation today - work smarter tomorrowJaap Brasser
 
KnowledgeHut - Switching On DevOps
KnowledgeHut - Switching On DevOpsKnowledgeHut - Switching On DevOps
KnowledgeHut - Switching On DevOpsShaw Innes
 
Engage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPagesEngage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPagesJesse Gallagher
 
Digital Success Stack for DCBKK 2018
Digital Success Stack for DCBKK 2018Digital Success Stack for DCBKK 2018
Digital Success Stack for DCBKK 2018Kyvio
 
The 7 deadly sins of micro services
The 7 deadly sins of micro servicesThe 7 deadly sins of micro services
The 7 deadly sins of micro servicesAidan Casey
 
미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기jbugkorea
 
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsCome Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsEric Nograles
 
Automation: PowerShell & DSC
Automation: PowerShell & DSCAutomation: PowerShell & DSC
Automation: PowerShell & DSCJosh Gillespie
 
Secure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEASecure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEAJaap Brasser
 
DevOps Engineer [Arabic]
DevOps Engineer [Arabic]DevOps Engineer [Arabic]
DevOps Engineer [Arabic]ahmadezzeir
 
Hidden Gems of Azure Websites: The Secret of Kudu
Hidden Gems of Azure Websites: The Secret of KuduHidden Gems of Azure Websites: The Secret of Kudu
Hidden Gems of Azure Websites: The Secret of KuduJuv Chan
 
Building your own JEA Configuration
Building your own JEA ConfigurationBuilding your own JEA Configuration
Building your own JEA ConfigurationJaap Brasser
 
Kudu voodoo slideshare
Kudu voodoo   slideshareKudu voodoo   slideshare
Kudu voodoo slideshareAidan Casey
 
Deploying IIS and ASP.NET with Puppet
Deploying IIS and ASP.NET with PuppetDeploying IIS and ASP.NET with Puppet
Deploying IIS and ASP.NET with PuppetPuppet
 
The 7 deadly sins of micro services
The 7 deadly sins of micro servicesThe 7 deadly sins of micro services
The 7 deadly sins of micro servicesAidan Casey
 

Mais procurados (20)

Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016
 
Paint it blue with PowerShell
Paint it blue with PowerShellPaint it blue with PowerShell
Paint it blue with PowerShell
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CD
 
Using PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationUsing PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormation
 
Apply chat automation today - work smarter tomorrow
Apply chat automation today - work smarter tomorrowApply chat automation today - work smarter tomorrow
Apply chat automation today - work smarter tomorrow
 
KnowledgeHut - Switching On DevOps
KnowledgeHut - Switching On DevOpsKnowledgeHut - Switching On DevOps
KnowledgeHut - Switching On DevOps
 
Engage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPagesEngage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPages
 
Digital Success Stack for DCBKK 2018
Digital Success Stack for DCBKK 2018Digital Success Stack for DCBKK 2018
Digital Success Stack for DCBKK 2018
 
The 7 deadly sins of micro services
The 7 deadly sins of micro servicesThe 7 deadly sins of micro services
The 7 deadly sins of micro services
 
미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기
 
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsCome Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
 
Automation: PowerShell & DSC
Automation: PowerShell & DSCAutomation: PowerShell & DSC
Automation: PowerShell & DSC
 
Secure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEASecure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEA
 
DevOps Engineer [Arabic]
DevOps Engineer [Arabic]DevOps Engineer [Arabic]
DevOps Engineer [Arabic]
 
Hidden Gems of Azure Websites: The Secret of Kudu
Hidden Gems of Azure Websites: The Secret of KuduHidden Gems of Azure Websites: The Secret of Kudu
Hidden Gems of Azure Websites: The Secret of Kudu
 
Building your own JEA Configuration
Building your own JEA ConfigurationBuilding your own JEA Configuration
Building your own JEA Configuration
 
Kudu voodoo slideshare
Kudu voodoo   slideshareKudu voodoo   slideshare
Kudu voodoo slideshare
 
Cake
CakeCake
Cake
 
Deploying IIS and ASP.NET with Puppet
Deploying IIS and ASP.NET with PuppetDeploying IIS and ASP.NET with Puppet
Deploying IIS and ASP.NET with Puppet
 
The 7 deadly sins of micro services
The 7 deadly sins of micro servicesThe 7 deadly sins of micro services
The 7 deadly sins of micro services
 

Semelhante a Recipes for Continuous Delivery (ThoughtWorks Geeknight)

Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Mike McGarr
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery appliedMike McGarr
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery AppliedExcella
 
Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)Mike McGarr
 
Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Mike McGarr
 
Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Mike McGarr
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CDPatryk Bandurski
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous IntegrationZahra Golmirzaei
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsBrad Williams
 
Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5Marcin Grzejszczak
 
Version Control and Continuous Integration
Version Control and Continuous IntegrationVersion Control and Continuous Integration
Version Control and Continuous IntegrationGeff Henderson Chang
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAppDynamics
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGroup
 
Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Codemotion
 
Bring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdfBring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdfLiang Yan
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodologylaeshin park
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable productJulian Simpson
 
Using Jenkins with iOS projects
Using Jenkins with iOS projectsUsing Jenkins with iOS projects
Using Jenkins with iOS projectsAppsDojo
 
Continuous Deployment of your Application - SpringOne Tour Dallas
Continuous Deployment of your Application - SpringOne Tour DallasContinuous Deployment of your Application - SpringOne Tour Dallas
Continuous Deployment of your Application - SpringOne Tour DallasVMware Tanzu
 

Semelhante a Recipes for Continuous Delivery (ThoughtWorks Geeknight) (20)

Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery Applied
 
Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery Applied
 
Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)
 
Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CD
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
 
Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5
 
Version Control and Continuous Integration
Version Control and Continuous IntegrationVersion Control and Continuous Integration
Version Control and Continuous Integration
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...
 
Bring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdfBring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdf
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodology
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
Using Jenkins with iOS projects
Using Jenkins with iOS projectsUsing Jenkins with iOS projects
Using Jenkins with iOS projects
 
Continuous Deployment of your Application - SpringOne Tour Dallas
Continuous Deployment of your Application - SpringOne Tour DallasContinuous Deployment of your Application - SpringOne Tour Dallas
Continuous Deployment of your Application - SpringOne Tour Dallas
 

Último

If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...Maxim Salnikov
 
Revolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridRevolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridMathew Thomas
 
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...telebusocialmarketin
 
User Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeUser Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeKaylee Miller
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startMaxim Salnikov
 
renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energyjeyasrig
 
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...MyFAA
 
Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easymichealwillson701
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements SolutionsIQBG inc
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityRandy Shoup
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJpolinaucc
 
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...jackiepotts6
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial FrontiersRaphaël Semeteys
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfICS
 
8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.Ritesh Kanjee
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleShane Coughlan
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdfOffsiteNOC
 
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurPriyadarshini T
 
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
BusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptxBusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptx
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptxAGATSoftware
 

Último (20)

If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
 
Revolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridRevolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM Grid
 
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
 
User Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeUser Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller Resume
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to start
 
renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energy
 
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
 
Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easy
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements Solutions
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJ
 
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdf
 
8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.
 
20140812 - OBD2 Solution
20140812 - OBD2 Solution20140812 - OBD2 Solution
20140812 - OBD2 Solution
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scale
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf
 
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
 
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
BusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptxBusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptx
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
 

Recipes for Continuous Delivery (ThoughtWorks Geeknight)

  • 1. RECIPES FOR CONTINUOUS DELIVERY Gurpreet Luthra - Lead Consultant, ThoughtWorks 1 _zenx_
  • 3. TOPICS 3 • Continuous Integration (CI) • Continuous Deployment (CD?) / Continuous Delivery (CD) • Phoenix Servers • Branching for Release • Feature Branches • Trunk Based Development • Pull Request Model • Toggles • Branch by Abstraction & Strangulation
  • 7. THE PRACTICES 7 • Maintain a single source repository • Automate the build • Make your build self-testing • Every commit should build on an integration machine • Keep the build fast • Test in a clone of the production environment • Make it easy for anyone to get the latest executable • Everyone can see what’s happening • Automate deployment
  • 8. HOW TO DO IT 8 • Developers check out code into their private workspaces. • When done, commit the changes to the repository. • The CI server monitors the repository and checks out changes when they occur. • The CI server builds the system and runs unit and integration tests. • The CI server releases deployable artefacts for testing. • The CI server assigns a build label to the version of the code it just built. • The CI server informs the team of the successful build.
  • 9. TEAM RESPONSIBILITIES 9 • Check in frequently • Don’t check in broken code • Don’t check in untested code • Don’t check in when the build is broken • Don’t go home after checking in until the system builds Coffee Cup Story! Unmesh Joshi (Head of Tech - TWI)
  • 10. THE UNDERLYING ASSUMPTION 10 • The quality and impact of your CI processes are solely dependant on the quality of your TESTS. • If you don’t write good quality tests, with reasonable coverage, all the CI infrastructure in the world can’t protect you. WRITE GOOD TESTS!!!
  • 11. 11
  • 12. DELIVERY OR DEPLOYMENT? 12 Image from: http://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment
  • 14. PHOENIX SERVERS 14 • Configuration Drift • Snowflake servers • No SSH servers • Immutable Servers • Phoenix servers PLEASE READ: http://martinfowler.com/bliki/PhoenixServer.html and http://martinfowler.com/bliki/ImmutableServer.html
  • 15. VM (OR CONTAINERS) AS BUILD AGENTS 15 SLIDE COPIED FROM: http://decks.eric.pe/pantheon-ci
  • 16. BUILD AGENTS AS PHONEIX SERVERS 16
  • 17. BUILD AGENTS AS PHONEIX SERVERS 17
  • 18. BUILD AGENTS AS PHONEIX SERVERS 18
  • 19. PHOENIX SERVERS 19 Diagram and full article at: https://boxfuse.com/blog/no-ssh
  • 23. BRANCHING FOR RELEASE 23 Image from: http://paulhammant.com/blog/branch_by_abstraction.html
  • 24. BRANCHING FOR RELEASE 24 FOR EACH RELEASE HOW MUCH EFFORT DO YOU PUT IN TO CREATE CI PIPELINES ?
  • 25. BRANCHING FOR RELEASE 25From: http://www.bogotobogo.com/DevOps/DevOps_CI_CD_Pipeline_Sample.php
  • 26. FEATURES BRANCHES 26 Image from: http://blogs.riskotech.com/riskfactor/post/An-Alternate-Branching-Strategy.aspx
  • 27. THE REALITY OF FEATURE BRANCHES 27 Image from: http://paulhammant.com/blog/branch_by_abstraction.html Martin Fowler- Promiscuous Integration: https://dzone.com/articles/promiscuous-integration-vs
  • 29. A GIT BRANCHING MODEL 29 Image from: http://nvie.com/posts/a-successful-git-branching-model/
  • 30. TRUNK BASED DEVELOPMENT 30 • Trunk Based Development (TBD) is where all developers (for a particular deployable unit) commit to one shared branch under source-control called “trunk” or “mainline”. • Branches are made only for a release in the shared repository. • Trunk always stays GREEN. • Developers never break the build with any commit. Alternatively, broken commits are immediately rolled back. Or such commits may be blocked before being merged with the trunk. • Developers don’t work in ISOLATION, in their “happy branches” for days. Update your workstation daily!
  • 31. TRUNK BASED DEVELOPMENT 31 Image from: http://paulhammant.com/2014/01/08/googles-vs-facebooks-trunk-based-development/
  • 32. GOOGLE MONOREPO 32 Rachel Potvin: https://trunkbaseddevelopment.com/game-changers/index.html#google- revealing-their-monorepo-trunk-2016 Piper + CitC
  • 33. GOOGLE MONOREPO 33 Rachel Potvin: https://trunkbaseddevelopment.com/game-changers/index.html#google- revealing-their-monorepo-trunk-2016 Piper + CitC
  • 34. PULL REQUEST MODEL 34 master fork’s master Fork branch feature-1 branch branch Raise pull request Update to latest Raise pull request feature-2 branch review + no mergereview + merge review + merge
  • 35. PULL REQUEST MODEL 35 Image from: code.tutsplus.com/tutorials/travis-ci-what-why-how--net-34771
  • 36. TRUNK BASED DEVELOPMENT 36 Feature branching is a poor man’s modular architecture, instead of building systems with the ability to easily swap in and out features at runtime/deploy time, you’re coupling yourself to the source control providing this mechanism through manual merging. - Dan Bodart Mentioned By http://martinfowler.com/bliki/FeatureBranch.html AND http://sethgoings.com/feature-branching
  • 37. TRUNK BASED DEVELOPMENT 37 OK. I WILL TRY & AVOID FEATURE BRANCHES. HOW DO I ENSURE I CAN DEVELOP BIG FEATURES, YET, KEEP TRUNK GREEN & STABLE?
  • 39. FEATURE TOGGLES 39 • Release Toggles • Business Toggles • Build Time Toggles • Run Time Toggles • A/B Testing • Canary Releases • Rollback in production PLEASE READ http://martinfowler.com/articles/feature-toggles.html Pete Hodgson
  • 40. EXAMPLES 40 1. Introduce a simple search box on your home page 2. Add a new feature to favorite products + My Favorite page (client side only, nothing on server side) 3. Upgrade from Java7 and Java 8 (slowly across servers) 4. Improve your search algo (in case it returns no results, then apply, distance algo) 5. Change upload logic for images (earlier each image was assigned a thread). New logic: Create a queue, perform a de-dup, assign to a thread, batch size of 5, upload. 6. Add FB Integration (FB Like + Count -- pulled from FB) 7. Change JS code to use Require.JS for dependencies (shim/polyfill/etc) 8. Introduce dependency injection via Spring/Guice 9. Change Repository code from Hibernate to Toplink
  • 41. IMPLEMENTATION 41 • Simple IF statement (top most layer) • DB / File / Code based configuration • Polymorphic Substitution / Injection • Plugin Based / Dynamic JAR Lookup / Discovery • Hook based extensions • Toggle Based Frameworks (Use Google!) • Many more..
  • 42. BRANCH BY ABSTRACTION 42 IMAGES AND ARTICLE: http://martinfowler.com/bliki/BranchByAbstraction.html
  • 43. BRANCH BY ABSTRACTION 43 • Technique for making large scale changes in a gradual way • Use an abstraction layer to allow multiple implementations to co-exist • Use the notion of one abstraction and multiple implementations to perform the migration from one implementation to the other • Ensure that the system builds and runs correctly at all times YES. IT’S JUST GOOD OBJECT ORIENTED DESIGN.
  • 44. STRANGULATION PATTERN 44 • Slowly strangulate one system for another. • Slow strangulate one model / one component for another. PLEASE READ http://agilefromthegroundup.blogspot.in/2011/03/strangulation-pattern-of-choice-for.html IMAGE FROM: https://dzone.com/articles/legacy-java-applications
  • 45. WHERE TO NEXT? 45 • Write good tests. Make them blazing fast. Depend on them! • Commit & push frequently to Trunk. Build should be ALWAYS Green. • Every morning, pull latest code to your machine. • Consider using Immutable Servers / Phoenix Servers. • Figure out creative ways to keep software ready-for-release. • Plan for rollbacks, or for functionality switches. • Consider strategies like Toggles or Branch-by-Abstraction. • Don’t work in ISOLATED branches. • Be thoughtful in your code… and in your design. AIM FOR Continuous Delivery!
  • 46. THANK YOU 46 Gurpreet Luthra - Lead Consultant, ThoughtWorks _zenx_ Thank you for all your thoughts on CI & CD by Martin Fowler, Paul Hammant, Jez Humble, Pete Hodgson, ThoughtWorkers and of course Calvin & Hobbes