SlideShare a Scribd company logo
Continuously serving the developer
community with
Continuous Integration and Delivery
Akshay Karle
Fernando Júnior
“How long would it take your
organization to deploy a change that
involves just one single line of code?”
Mary and Tom Poppendieck
“(…) build software in such a way that
the software can be released to
production at any time.”
Martin Fowler
CONTINUOUS INTEGRATION
CONTINUOUS DELIVERY
CONTINUOUS DELIVERY
▫︎ Continuous Integration
▫︎ Automated tasks
▫︎ Repeatable/reliable process
CONTINUOUS DELIVERY
frequent, reliable releases
of high quality valuable
software
THERE’S MORE…
CONTINUOUS DELIVERY
CONTINUOUS DELIVERY
DEPLOYING YOUR APPLICATION
▫︎ Database migrations
▫︎ Infrastructure update
▫︎ Restarting services
ZERO DOWNTIME DEPLOYMENTS
Deployment process of your application
has got to be transparent for end users
WHO WE ARE?
Developer,
ThoughtWorks
@nandopaf
fernando-alves
nand0paf
Developer,
ThoughtWorks
@akshay_karle
akshaykarle
akshay_ka
WHAT WE DO?
▫︎Continuous Integration and Delivery for repositories on
GitHub
▫︎Cloud Hosted
SNAP INSIDE-OUT
LIFECYCLE OF A BUILD
head
repository
commit
LIFECYCLE OF A BUILD
head
repository
commit
Babysitters
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
LIFE CYCLE
▫︎ Prepare the container
▫︎ Starts database
▫︎ Sets PATH for languages
▫︎ Download artifacts
▫︎Git clone
▫︎Runs each pipeline stage
▫︎Upload artifacts
DATABASE
Babysitters
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
ARCHITECTURE OVERVIEW
L
B
Database
web server
ARCHITECTURE OVERVIEW
▫︎ Rails app fronted by
nginx
▫︎ Receives the hooks from
GitHub
Database
web server
ARCHITECTURE OVERVIEW
L
B
Build Server
web server
Database
ARCHITECTURE OVERVIEW
▫︎ Background jobs
▫︎ Babysitters
▫︎ Build Queue
▫︎ Artifacts
▫︎ OpenVZ Containers
▫︎ Virtual machines where the
pipeline runs
Build Server
ARCHITECTURE OVERVIEW
L
B
Build Server
web server
Database
OUR DEPLOYMENT
▫︎ Do have automated scripts
▫︎ Deployment pipeline
▫︎ 1-click deploy
▫︎ Sort of…
Babysitters
DATABASE
L
B
Build Server
Database
web server
OUR DEPLOYMENT
▫︎ Wait for all builds to finish
▫︎ Put app on maintenance
mode
▫︎ No new requests picked up
▫︎ Deploy and wait for
migrations
Babysitters
DATABASE
L
B
Database
VZHOSTBuild Server
web server
ZERO DOWNTIME
DEPLOYMENTS
BLUE-GREEN DEPLOYMENT
Web Server App Server Database
App ServerApp ServerWeb Server Database
BLUE-GREEN DEPLOYMENTS FOR SNAP
VZHOSTBuild Server
web server
VZHOSTBuild Server
web server
L
B
DATABASE
CHALLENGES IN SNAP
Long running builds
Running multiple versions of your app at the
same time
Database migrations
LONG RUNNING BUILDS
▫︎ Builds should continue
to run
▫︎ Artifacts should continue
to be served
COLOR AWARE BABYSITTERS
Build Server
Green Stack
Build Server
Blue Stack
web server
BUILD LIFECYCLE
head
repository
commit
DATABASEDATABASE
L
B
THE SWITCH
L
B
THE SWITCH
L
B
CHALLENGES IN SNAP
Long running builds
Running multiple versions of your app at the
same time
Database migrations
FEATURE TOGGLES
Hide unfinished UI elements
Control backend behaviour
Test with feature toggles
Avoid multi-component feature toggles
http://martinfowler.com/bliki/FeatureToggle.html
FRONTEND
<% if feature_enabled?(:parallel_stage) %>

<!-- show new html -->

<% else %>

<!-- show old html -->

<% end %>
BACKEND
if feature_enabled?(:parallel_stage)

# new logic

else

# old logic

end
TESTING WITH FEATURE TOGGLES
describe "multiple jobs" do

describe "feature enabled" do

before(:each) do

with_feature_enabled(:parallel_stage)

end



it 'should not show the job tabs when there is only one job' do

end

end



describe "feature disabled" do

before(:each) do

with_feature_disabled(:parallel_stage)

end



it 'should not show the job tabs but should show the logs' do

end

end

end
CHALLENGES IN SNAP
Long running builds
Running multiple versions of your app at the
same time
Database migrations
MIGRATION OF DATA
Consider existing schema as well as data
Incremental changes
Rollbacks
INTRODUCING JOBS
jobs
id
…
INTRODUCING JOBS
stages
id
started_at
completed_at
result
…
jobs
id
…
POPULATE ALL EXISTING STAGES
stages
id
started_at
completed_at
result
…
jobs
id
stage_id
…
COPY ATTRIBUTES TO JOB
stages
…
started_at
completed_at
result
…
jobs
…
started_at
completed_at
result
…
SWITCH THE APPLICATION TO START USING
THE JOB MODEL
# After switch

class Stage

def result

results = jobs.collect { |job| job.result }

return :failed if results.any?(:failed)

:passed

end

end
# Before switch

class Stage

attr_reader :result

end
# in transition

class Stage

def result

if feature_enabled?(:parallel_stage)

results = jobs.collect { |job| job.result }

return :failed if results.any?(:failed)

:passed

else

result

end

end

end
REMOVE UNUSED ATTRIBUTES
stages
id
started_at
completed_at
result
…
jobs
…
started_at
completed_at
result
…
LESSONS LEARNT
LESSONS LEARNT
Zero downtime is not easy
Having reliability, automation, frequent releases helped
Watch out your data
Things will go wrong, but we keep learning and keep improving
THANK YOU
Questions?
https://snap-ci.com

More Related Content

PDF
Getting out of the Job Jungle with Jenkins
PDF
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
PDF
Bay Area Chef Meetup February
PDF
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
PDF
Jenkins Reviewbot
PDF
Infrastructure and Compliance Delight with Chef Automate
PDF
Continuous Performance Testing: The New Standard
PPT
Continuous integration
Getting out of the Job Jungle with Jenkins
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Bay Area Chef Meetup February
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
Jenkins Reviewbot
Infrastructure and Compliance Delight with Chef Automate
Continuous Performance Testing: The New Standard
Continuous integration

What's hot (17)

PDF
Continuous Testing
PDF
Transform Digital Business with DevOps
PDF
Microservices Testing at Scale
PDF
Introduction to CICD
PPTX
Continuous delivery applied (RJUG)
PPTX
Effective Testing with Ansible and InSpec
PPTX
SkyBase - a Devops Platform for Hybrid Cloud
PPTX
Michigan IT Symposium 2017 - CI/CD Workflow Tutorial
PDF
Software Delivery at Warp Speed: Five Essential Techniques
PDF
Continuous Delivery in the Cloud with Bitbucket Pipelines
PDF
Cooking Up Windows with Chef Automate
PPTX
Anatomy of a Build Pipeline
PDF
How To Be a Java Automated Testing Superstar
PPTX
From Continuous Integration to DevOps
PDF
Continuous Delivery at Netflix, and beyond
PDF
CI/CD (DevOps) 101
PDF
Webinar: Continuous Deployment with MongoDB at Kitchensurfing
Continuous Testing
Transform Digital Business with DevOps
Microservices Testing at Scale
Introduction to CICD
Continuous delivery applied (RJUG)
Effective Testing with Ansible and InSpec
SkyBase - a Devops Platform for Hybrid Cloud
Michigan IT Symposium 2017 - CI/CD Workflow Tutorial
Software Delivery at Warp Speed: Five Essential Techniques
Continuous Delivery in the Cloud with Bitbucket Pipelines
Cooking Up Windows with Chef Automate
Anatomy of a Build Pipeline
How To Be a Java Automated Testing Superstar
From Continuous Integration to DevOps
Continuous Delivery at Netflix, and beyond
CI/CD (DevOps) 101
Webinar: Continuous Deployment with MongoDB at Kitchensurfing
Ad

Viewers also liked (20)

PDF
Leaner and Smarter: How Enterprises Can Develop Better Digital Products
PDF
Lean Enterprise - Enabling Innovative Culture
PDF
Enabling CD in Enterprises with Testing - Anand Bagmar
PDF
Mobile-Driven Transformation at Target
PDF
You Can't be Agile When you are Knee Deep in Mud
PDF
#DigitalNudge - Tendências entre Psicologia Cognitiva, Behavioral Economics e...
PDF
7 Dimensions of Agile Analytics by Ken Collier
PDF
The New Strategy
PDF
Rewiring Your Organization for Customer Engagement
PDF
Resilient Loyalty by Dan McClure
PDF
E-commerce innovations in China
PDF
Presentación Rails Girls Santiago, Chile (diciembre de 2015)
PDF
Building a Data Driven Future | Jonas Jaanimagi, Head of Media Strategy & Ope...
PDF
ThoughtWorks Technology Radar Roadshow - Melbourne
PDF
ThoughtWorks Technology Radar Roadshow - Sydney
PDF
Beyond Permission - Will Critchlow
PPT
12 Interview Tips for Young Designers
PPTX
Liderando a transformação digital
PDF
Renewal in an Established Business and Product Portfolio
PDF
ThoughtWorks Technology Radar Roadshow - Brisbane
Leaner and Smarter: How Enterprises Can Develop Better Digital Products
Lean Enterprise - Enabling Innovative Culture
Enabling CD in Enterprises with Testing - Anand Bagmar
Mobile-Driven Transformation at Target
You Can't be Agile When you are Knee Deep in Mud
#DigitalNudge - Tendências entre Psicologia Cognitiva, Behavioral Economics e...
7 Dimensions of Agile Analytics by Ken Collier
The New Strategy
Rewiring Your Organization for Customer Engagement
Resilient Loyalty by Dan McClure
E-commerce innovations in China
Presentación Rails Girls Santiago, Chile (diciembre de 2015)
Building a Data Driven Future | Jonas Jaanimagi, Head of Media Strategy & Ope...
ThoughtWorks Technology Radar Roadshow - Melbourne
ThoughtWorks Technology Radar Roadshow - Sydney
Beyond Permission - Will Critchlow
12 Interview Tips for Young Designers
Liderando a transformação digital
Renewal in an Established Business and Product Portfolio
ThoughtWorks Technology Radar Roadshow - Brisbane
Ad

Similar to Continuously serving the developer community with Continuous Integration and Delivery (20)

PDF
Continuously serving the OSS community with Continuous Integration and Delive...
PDF
FISL 15: Continuously serving the OSS community with Continuous Integration a...
PDF
Recipes for Continuous Delivery (ThoughtWorks Geeknight)
PDF
Fine-Tuning of Agile Development
PDF
Continuous Deployment: Beyond Continuous Delivery
PPTX
B. Durrett The Challenges of Continuous Deployment Social Developer Summit
PDF
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
KEY
Continuous Integration, the minimum viable product
PDF
Continuous Delivery: The Dirty Details
PDF
Dipping Your Toes Into Cloud Native Application Development
PDF
We thought we were doing continuous delivery and then...
PDF
Turnkey Continuous Delivery
PDF
From ci to cd - LavaJug 2012
PDF
Continuous Integration for Citizens
PDF
Continuous, continuous, continuous
PDF
Continuous Delivery with NetflixOSS
PDF
Continuous Integration for Citizens
PDF
Continuous Delivery: 5 years later (Incontro DevOps 2018)
PDF
Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)
PDF
Sean schofield & Richard Lister, Spree Commerce_ Fearless deployment @ Open C...
Continuously serving the OSS community with Continuous Integration and Delive...
FISL 15: Continuously serving the OSS community with Continuous Integration a...
Recipes for Continuous Delivery (ThoughtWorks Geeknight)
Fine-Tuning of Agile Development
Continuous Deployment: Beyond Continuous Delivery
B. Durrett The Challenges of Continuous Deployment Social Developer Summit
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Continuous Integration, the minimum viable product
Continuous Delivery: The Dirty Details
Dipping Your Toes Into Cloud Native Application Development
We thought we were doing continuous delivery and then...
Turnkey Continuous Delivery
From ci to cd - LavaJug 2012
Continuous Integration for Citizens
Continuous, continuous, continuous
Continuous Delivery with NetflixOSS
Continuous Integration for Citizens
Continuous Delivery: 5 years later (Incontro DevOps 2018)
Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)
Sean schofield & Richard Lister, Spree Commerce_ Fearless deployment @ Open C...

More from Thoughtworks (20)

PDF
Design System as a Product
PDF
Designers, Developers & Dogs
PDF
Cloud-first for fast innovation
PDF
More impact with flexible teams
PDF
Culture of Innovation
PDF
Dual-Track Agile
PDF
Developer Experience
PDF
When we design together
PDF
Hardware is hard(er)
PDF
Customer-centric innovation enabled by cloud
PDF
Amazon's Culture of Innovation
PDF
When in doubt, go live
PDF
Don't cross the Rubicon
PDF
Error handling
PDF
Your test coverage is a lie!
PDF
Docker container security
PDF
Redefining the unit
PPTX
Technology Radar Webinar UK - Vol. 22
PDF
A Tribute to Turing
PDF
Rsa maths worked out
Design System as a Product
Designers, Developers & Dogs
Cloud-first for fast innovation
More impact with flexible teams
Culture of Innovation
Dual-Track Agile
Developer Experience
When we design together
Hardware is hard(er)
Customer-centric innovation enabled by cloud
Amazon's Culture of Innovation
When in doubt, go live
Don't cross the Rubicon
Error handling
Your test coverage is a lie!
Docker container security
Redefining the unit
Technology Radar Webinar UK - Vol. 22
A Tribute to Turing
Rsa maths worked out

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Tartificialntelligence_presentation.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Machine Learning_overview_presentation.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Network Security Unit 5.pdf for BCA BBA.
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Tartificialntelligence_presentation.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Programs and apps: productivity, graphics, security and other tools
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cuic standard and advanced reporting.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation_ Review paper, used for researhc scholars
Machine Learning_overview_presentation.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
MIND Revenue Release Quarter 2 2025 Press Release

Continuously serving the developer community with Continuous Integration and Delivery