SlideShare a Scribd company logo
1 of 82
Download to read offline
Continuously serving the OSS
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 INTEGRATION
CONTINUOUS INTEGRATION
CONTINUOUS DELIVERY
CONTINUOUS DELIVERY
!
!
▫︎ Continuous Integration
!
▫︎ Automated tasks
!
▫︎ Repeatable/reliable process
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,
Snap CI
/nandopaf
/fernando-alves
/nand0paf
Developer,
Snap CI
/akshay_karle
/akshaykarle
/akshay_ka
WHAT WE DO?
!
!
!
!
▫︎Continuous Integration for repositories on GitHub
▫︎SaaS
▫︎Helps you do Continuous Delivery
▫︎Free for open source projects
SNAP INSIDE-OUT
LIFECYCLE OF A BUILD
LIFECYCLE OF A BUILD
LIFECYCLE OF A BUILD
LIFECYCLE OF A BUILD
head
repository
commit
LIFECYCLE OF A BUILD
head
repository
commit
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
Babysitters
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
Babysitters
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
Babysitters
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
LIFE CYCLE
!
▫︎ Prepare the container
▫︎ Starts database
▫︎ Sets PATH
▫︎ Download artifacts
▫︎Git clone
▫︎Runs each pipeline stage
▫︎Upload artifacts
DATABASE
Babysitters
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
Babysitters
LIFECYCLE OF A BUILD
head
repository
commit
DATABASE
ARCHITECTURE OVERVIEW
L
B
ARCHITECTURE OVERVIEW
L
B
Database
web server
ARCHITECTURE OVERVIEW
!
!
▫︎ Rails app fronted by
apache
!
▫︎ Receives the hooks from
GitHub
Database
web server
ARCHITECTURE OVERVIEW
L
B
web server
Database
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
BLUE-GREEN DEPLOYMENT
Web Server App Server Database
App ServerApp ServerWeb Server Database
BLUE-GREEN DEPLOYMENT
Web Server App Server Database
App ServerApp ServerWeb Server Database
BLUE-GREEN DEPLOYMENT
App ServerApp ServerWeb Server Database
BLUE-GREEN DEPLOYMENTS FOR SNAP
VZHOSTBuild Server
web server
VZHOSTBuild Server
web server
L
B
DATABASE
BLUE-GREEN DEPLOYMENTS FOR SNAP
VZHOSTBuild Server
web server
VZHOSTBuild Server
web server
L
B
DATABASE
CHALLENGES IN SNAP
Long running builds
Database migrations
CHALLENGES IN SNAP
Long running builds
LONG RUNNING BUILDS
VZHOSTBuild Server
web server
VZHOSTBuild Server
web server
L
B
DATABASE
LONG RUNNING BUILDS
VZHOSTBuild Server
web server
VZHOSTBuild Server
web server
L
B
DATABASE
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
COLOR AWARE BABYSITTERS
Build Server
Green Stack
Build Server
Blue Stack
web server
BUILD LIFECYCLE
head
repository
commit
DATABASEDATABASE
L
B
BUILD LIFECYCLE
head
repository
commit
DATABASEDATABASE
L
B
BUILD LIFECYCLE
head
repository
commit
DATABASEDATABASE
L
B
THE SWITCH
L
B
THE SWITCH
L
B
THE SWITCH
L
B
THE SWITCH
L
B
THE SWITCH
L
B
THE SWITCH
L
B
THE SWITCH
L
B
CHALLENGES IN SNAP
Long running builds
Database migrations
CHALLENGES IN SNAP
Database migrations
DATABASE MIGRATIONS
Pipelines
Counter
Duration
App v1.0
App v1.0
L
B
DATABASE MIGRATIONS
Pipelines
Counter
Duration
App v1.0
App v1.0
L
B
Upgrading to v2.0,
migrating
DATABASE MIGRATIONS
Pipelines
Counter
App v2.0
App v1.0
L
B
Cannot have destructive migrations
MIGRATIONS IN PHASES
Pipelines
Counter
Duration
App v1.0
App v1.0
L
B
MIGRATIONS IN PHASES
Pipelines
Counter
Duration
App v1.0
App v1.0
Upgrading to v2.0
L
B
MIGRATIONS IN PHASES
Pipelines
Counter
Duration
App v2.0
App v1.0
L
B
MIGRATIONS IN PHASES
Pipelines
Counter
Duration
App v2.0
App v1.0
L
B
MIGRATIONS IN PHASES
Pipelines
Counter
Duration
App v2.0
App v1.0
L
B
MIGRATIONS IN PHASES
Pipelines
Counter
Duration
App v2.0
App v1.0
Upgrading to v3.0
L
B
MIGRATIONS IN PHASES
App v2.0
App v3.0
Pipelines
Counter
L
B
MIGRATIONS IN PHASES
App v2.0
App v3.0
Pipelines
Counter
L
B
LESSONS LEARNT
Automation is beauty
Watch out your data
Things will go wrong
THANK YOU
Questions?
https://snap-ci.com

More Related Content

What's hot

Defrag 2014 - Hybrid clouds with containers
Defrag 2014 - Hybrid clouds with containersDefrag 2014 - Hybrid clouds with containers
Defrag 2014 - Hybrid clouds with containers
Avi Cavale
 
Continuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two ApproachesContinuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two Approaches
Ross Snyder
 

What's hot (17)

Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
 
Super-powered CI with Git - Sarah Goff-Dupont
Super-powered CI with Git - Sarah Goff-DupontSuper-powered CI with Git - Sarah Goff-Dupont
Super-powered CI with Git - Sarah Goff-Dupont
 
Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012
 
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as CodeConfoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
 
Enterprise Workflows When You Aren't Enterprise
Enterprise Workflows When You Aren't EnterpriseEnterprise Workflows When You Aren't Enterprise
Enterprise Workflows When You Aren't Enterprise
 
Making development environments not suck | #econfpsu #econfpsu16
Making development environments not suck | #econfpsu #econfpsu16Making development environments not suck | #econfpsu #econfpsu16
Making development environments not suck | #econfpsu #econfpsu16
 
Terraform Testing with InSpec Demo
Terraform Testing with InSpec DemoTerraform Testing with InSpec Demo
Terraform Testing with InSpec Demo
 
A Business Case for Git - Tim Pettersen
A Business Case for Git - Tim PettersenA Business Case for Git - Tim Pettersen
A Business Case for Git - Tim Pettersen
 
Avoiding integration hell
Avoiding integration hellAvoiding integration hell
Avoiding integration hell
 
Delivery With Chef - ChefConf 2015
Delivery With Chef - ChefConf 2015 Delivery With Chef - ChefConf 2015
Delivery With Chef - ChefConf 2015
 
Jira Daten über Unternehmensgrenzen teilen – K15t Solution Forum 2018
Jira Daten über Unternehmensgrenzen teilen – K15t Solution Forum 2018Jira Daten über Unternehmensgrenzen teilen – K15t Solution Forum 2018
Jira Daten über Unternehmensgrenzen teilen – K15t Solution Forum 2018
 
Pain Free Frontend Development
Pain Free Frontend DevelopmentPain Free Frontend Development
Pain Free Frontend Development
 
Managing Requirements with Word and TFS by Max Markov
Managing Requirements with Word and TFS by Max MarkovManaging Requirements with Word and TFS by Max Markov
Managing Requirements with Word and TFS by Max Markov
 
How HipChat Ships and Recovers Fast with DevOps Practices
How HipChat Ships and Recovers Fast with DevOps PracticesHow HipChat Ships and Recovers Fast with DevOps Practices
How HipChat Ships and Recovers Fast with DevOps Practices
 
Defrag 2014 - Hybrid clouds with containers
Defrag 2014 - Hybrid clouds with containersDefrag 2014 - Hybrid clouds with containers
Defrag 2014 - Hybrid clouds with containers
 
Continuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two ApproachesContinuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two Approaches
 
Cloud tools
Cloud toolsCloud tools
Cloud tools
 

Similar to FISL 15: Continuously serving the OSS community with Continuous Integration and Delivery

Similar to FISL 15: Continuously serving the OSS community with Continuous Integration and Delivery (20)

Continuously serving the developer community with Continuous Integration and...
Continuously serving the developer community with  Continuous Integration and...Continuously serving the developer community with  Continuous Integration and...
Continuously serving the developer community with Continuous Integration and...
 
WordCamp, Cape Town 2017
WordCamp, Cape Town 2017WordCamp, Cape Town 2017
WordCamp, Cape Town 2017
 
[@IndeedEng] Boxcar: A self-balancing distributed services protocol
[@IndeedEng] Boxcar: A self-balancing distributed services protocol [@IndeedEng] Boxcar: A self-balancing distributed services protocol
[@IndeedEng] Boxcar: A self-balancing distributed services protocol
 
Optimizing for Change (Henrik Joreteg)
Optimizing for Change (Henrik Joreteg)Optimizing for Change (Henrik Joreteg)
Optimizing for Change (Henrik Joreteg)
 
Continuous Delivery with NetflixOSS
Continuous Delivery with NetflixOSSContinuous Delivery with NetflixOSS
Continuous Delivery with NetflixOSS
 
VisualOps Credentials
VisualOps CredentialsVisualOps Credentials
VisualOps Credentials
 
Tanzu Developer Connect Workshop - Philadelphia
Tanzu Developer Connect Workshop - PhiladelphiaTanzu Developer Connect Workshop - Philadelphia
Tanzu Developer Connect Workshop - Philadelphia
 
Tanzu Developer Connect Workshop - 06022022.pdf
Tanzu Developer Connect Workshop - 06022022.pdfTanzu Developer Connect Workshop - 06022022.pdf
Tanzu Developer Connect Workshop - 06022022.pdf
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp
 
AWS Summit Stockholm 2014 – T4 – Continuous integration on AWS
AWS Summit Stockholm 2014 – T4 – Continuous integration on AWSAWS Summit Stockholm 2014 – T4 – Continuous integration on AWS
AWS Summit Stockholm 2014 – T4 – Continuous integration on AWS
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Cake Php Consultant
Cake Php ConsultantCake Php Consultant
Cake Php Consultant
 
DevOps @ Scania - Trust and some code - NFI Testforum 2015
DevOps @ Scania - Trust and some code - NFI Testforum 2015DevOps @ Scania - Trust and some code - NFI Testforum 2015
DevOps @ Scania - Trust and some code - NFI Testforum 2015
 
The Platform Mullet
The Platform MulletThe Platform Mullet
The Platform Mullet
 
How to deal with mobile traffic expansion
How to deal with mobile traffic expansionHow to deal with mobile traffic expansion
How to deal with mobile traffic expansion
 
A year with progressive web apps! #webinale
A year with progressive web apps! #webinaleA year with progressive web apps! #webinale
A year with progressive web apps! #webinale
 
Beacon talk
Beacon talkBeacon talk
Beacon talk
 
Putting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/TestPutting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/Test
 
Red Hat Summit - Discover the foundations of digital transformation
Red Hat Summit - Discover the foundations of digital transformationRed Hat Summit - Discover the foundations of digital transformation
Red Hat Summit - Discover the foundations of digital transformation
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

FISL 15: Continuously serving the OSS community with Continuous Integration and Delivery