SlideShare a Scribd company logo
1 of 87
Continuous Delivery
in Ruby
Srushti Ambekallu    Brian Guthrie
@srshti              @bguthrie
github.com/srushti   github.com/bguthrie
Delivering great software
Continuous Integration
1.Unit and integration tests
RSpec or Test::Unit
Tests of specific units of code
      Tests of multiple layers
Tests of external integration points
Receive
              new
             commit

Reset test
database
 schema
                  Run tests


                                Reset
                              test data
Receive
              new
             commit

Reset test
database
 schema
                  Run tests


                                Reset
                              test data
1.Unit and integration tests

2.Automated acceptance tests
Cucumber or the test runner of your choice
Selenium or Sahi
    Capybara
Receive
                new
               commit

Reset test                    Run
                                        Reset
database                    browser
                                      test data
 schema                       tests


             Restart test
               server
1.Unit and integration tests

2.Automated acceptance tests

3.User acceptance tests
type              click
         click

       click     click
type              click
         click

       click     click
                   click
                  click    click
       click
        click              type
type                    click
          click

        click        click
                          click
                         click    click
        click
         click                    type

                                  click
click            click
                           type
type                    click
          click

        click        click
                          click           click
                         click    click
        click
         click                    type
                                            click
                                  click
click            click
                           type
click

 type                    click                               type
          click                          click click
                                      click
        click        click
                          click                    click
                         click    click
        click
         click                    type
                                                     click
                                  click
click            click
                           type
click

 type                    click                              type
          click                         click click
                                     click
        click        click

                         ERROR
                          click
                         click
                            click
                                                  click

        click
         click                    type
                                                    click
                                  click
click            click
                           type
1.Unit and integration tests

2.Automated acceptance tests

3.User acceptance tests
1.Unit and integration tests

2.Automated acceptance tests
2a.Deploy
3.User acceptance tests
Deployment
Super easy in Ruby
(those Java guys are suckers)
$ ssh root@production.com
$ ssh root@production.com
prod:~ root# cd /var/www/site
$ ssh root@production.com
prod:~ root# cd /var/www/site
prod:~ root# git pull a31a0eb569ba2
$ ssh root@production.com
prod:~ root# cd /var/www/site
prod:~ root# git pull a31a0eb569ba2
prod:~ root# bundle install
$ ssh root@production.com
prod:~ root# cd /var/www/site
prod:~ root# git pull a31a0eb569ba2
prod:~ root# bundle install
prod:~ root# rake db:migrate
$ ssh root@production.com
prod:~ root# cd /var/www/site
prod:~ root# git pull a31a0eb569ba2
prod:~ root# bundle install
prod:~ root# rake db:migrate
prod:~ root# rake jammit:package
$ ssh root@production.com
prod:~ root# cd /var/www/site
prod:~ root# git pull a31a0eb569ba2
prod:~ root# bundle install
prod:~ root# rake db:migrate
prod:~ root# rake jammit:package
prod:~ root# touch tmp/restart.txt
$ cap deploy production
Why automate?
Digression: The Rails deploy model
$ ssh root@production.com
$ ssh root@production.com

prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2
$ ssh root@production.com

prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2

prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2
$ ssh root@production.com

prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2

prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2

prod:~ root# bundle install
$ ssh root@production.com

prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2

prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2

prod:~ root# bundle install

prod:~ root# rake db:migrate
$ ssh root@production.com

prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2

prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2

prod:~ root# bundle install

prod:~ root# rake db:migrate

prod:~ root# rake jammit:package
$ ssh root@production.com

prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2

prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2

prod:~ root# bundle install

prod:~ root# rake db:migrate

prod:~ root# rake jammit:package

prod:~ root# touch tmp/restart.txt
$ ssh root@production.com

prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2

prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2

prod:~ root# bundle install

prod:~ root# rake db:migrate

prod:~ root# rake jammit:package

prod:~ root# touch tmp/restart.txt
ci-server:~/app/ $ bundle install --deployment

ci-server:~/app/ $ rake jammit:package

ci-server:~/app/ $ tar zxvf app-<SHA>.tgz *
RVM
RVM
Not for production
$ cat ~/projecta/.rvmrc
rvm jruby@projecta

$ cat ~/projecta/.rvmrc
rvm ree@projectb

$ cat ~/projecta/.rvmrc
rvm 1.9.1@projectc
Environments
App
server
App
server

 App
server

 App
server
App
server
         Background
         jobs server
 App
server

 App
server
App
           server
                    Background
                    jobs server
            App
 Load
           server
balancer

            App
           server
App
           server
                    Background
                    jobs server
            App
 Load
           server
balancer

            App
           server
                    Background
                    jobs server
            App
           server
Chef
Chef
Puppet
App
           server
                    Background
                    jobs server
            App
 Load
           server
balancer

            App
           server
                    Background
                    jobs server
            App
           server
Configuration
Management


                           App
                          server
                                   Background
                                   jobs server
                           App
                Load
                          server
               balancer

                           App
                          server
                                   Background
                                   jobs server
                           App
                          server
Peace in the kingdom
How often?
Project Lifecycle
   faf4d2788f   .........................   a433f20abb




Code                                           Release
                        Six months
Project Lifecycle
  faf4d2788f   f26115c8c   c86c1bfea6   56d1dd8accc4   dd35192f8 1b51fee653a   f038af17de4   8318b750aec   192410bd2537


       631f5c3f58c                             7bcafdd2266
                                                                                       2bbed3e4bd2



Code                                                                                                               Release
                                                 Every week
                                                  (iteration)
Project Lifecycle
             f26115c8c                  dd35192f8   f038af17de4


       631f5c3f58c        7bcafdd2266




Code                                                              Release
                             Every day?
Project Lifecycle
         7bcafdd2266

Code                       Release
        Multiple times
          a day??
Features long in development need branches
Branch by abstraction
(“if this feature is enabled, show this link”)
<% if feature?(:masala) %>
  <%= render :partial => "dosas/masala",
        :locals => { :dosa => @dosas.masala.first } %>
<% else %>
  <%= render :partial => "dosas/plain",
        :locals => { :dosa => @dosas.first } %>
<% end %>
This doesn’t work for everything:
   big features, config changes
Branch by source control
      (“fork me”)




  http://martinfowler.com/bliki/FeatureBranch.html
The Build Pipeline
“...an automated manifestation of your process for
   getting software from version control into the
                hands of your users.”
                     - Jez Humble and David Farley, Continuous Delivery
Unit and     Automated      Manual
Integration   Acceptance   Acceptance   Production
                                         (Woohoo!)
   Tests         Tests        Tests
Test     Test     Test
              runner   runner   runner


                        Test
                       runner




 Unit and         Automated                Manual
Integration       Acceptance             Acceptance   Production
                                                       (Woohoo!)
   Tests             Tests                  Tests
“I see CI as primarily giving birth to a release
candidate at each commit. The job of the CI
system and deployment process is to disprove
the production-readiness of a release candidate.
This model relies on the need to have some
mainline that represents the current shared, most
up to date picture of complete.”
                                   - David Farley
Automate until human intervention = decision

                 DEPLOY
Internal                 External
                             users                    users



  Feature                                  User
              Continuous
development                   Staging   acceptance    Production
              integration
  Bug fixes                                testing
Human beings
Real testing is hard
Let computers do the simple testing
  Smart humans for smart testing
Automated testing
                       User testing




Traditional projects
Automated testing
           User testing




Agilify!
Agilify!
Questions?
   Srushti Ambekallu
   @srshti
   github.com/srushti

   Brian Guthrie
   @bguthrie
   github.com/bguthrie

More Related Content

Viewers also liked

Hybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsHybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsSteven Francia
 
Core MIDI and Friends
Core MIDI and FriendsCore MIDI and Friends
Core MIDI and FriendsChris Adamson
 
Ruby For Java Programmers
Ruby For Java ProgrammersRuby For Java Programmers
Ruby For Java ProgrammersMike Bowler
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive QueriesOwen O'Malley
 
How To Solder V3.5
How To Solder V3.5How To Solder V3.5
How To Solder V3.5JasonDeMoe
 
Powering Interactive Data Analysis at Pinterest by Amazon Redshift
Powering Interactive Data Analysis at Pinterest by Amazon RedshiftPowering Interactive Data Analysis at Pinterest by Amazon Redshift
Powering Interactive Data Analysis at Pinterest by Amazon RedshiftJie Li
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Domenic Denicola
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWSAmazon Web Services
 
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at FlickrJohn Allspaw
 

Viewers also liked (9)

Hybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsHybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS Applications
 
Core MIDI and Friends
Core MIDI and FriendsCore MIDI and Friends
Core MIDI and Friends
 
Ruby For Java Programmers
Ruby For Java ProgrammersRuby For Java Programmers
Ruby For Java Programmers
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
 
How To Solder V3.5
How To Solder V3.5How To Solder V3.5
How To Solder V3.5
 
Powering Interactive Data Analysis at Pinterest by Amazon Redshift
Powering Interactive Data Analysis at Pinterest by Amazon RedshiftPowering Interactive Data Analysis at Pinterest by Amazon Redshift
Powering Interactive Data Analysis at Pinterest by Amazon Redshift
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS
 
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
 

Similar to Continuous Delivery in Ruby

Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsJonathan Hitchcock
 
To Host, Or Not To Host?
To Host, Or Not To Host?To Host, Or Not To Host?
To Host, Or Not To Host?Atlassian
 
Enjoy privacy on Gitlab
Enjoy privacy on GitlabEnjoy privacy on Gitlab
Enjoy privacy on GitlabMaxis Kao
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitAndreas Heim
 
TDD - for people who don't need it
TDD - for people who don't need itTDD - for people who don't need it
TDD - for people who don't need itChoon Keat Chew
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Tomas Doran
 
How penetration testing techniques can help you improve your qa skills
How penetration testing techniques can help you improve your qa skillsHow penetration testing techniques can help you improve your qa skills
How penetration testing techniques can help you improve your qa skillsMarian Marinov
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manormartinbtt
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.David Nuescheler
 
Team Development and Release Management
Team Development and Release ManagementTeam Development and Release Management
Team Development and Release ManagementSalesforce Partners
 
How Do Developers React to API Deprecation? The Case of a Smalltalk Ecosystem
How Do Developers React to API Deprecation? The Case of a Smalltalk EcosystemHow Do Developers React to API Deprecation? The Case of a Smalltalk Ecosystem
How Do Developers React to API Deprecation? The Case of a Smalltalk Ecosystemmircea.lungu
 
Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with JenkinsBeMyApp
 
SFSCON23 - Denver Gingerich - How do you really do GPL enforcement
SFSCON23 - Denver Gingerich - How do you really do GPL enforcementSFSCON23 - Denver Gingerich - How do you really do GPL enforcement
SFSCON23 - Denver Gingerich - How do you really do GPL enforcementSouth Tyrol Free Software Conference
 
DEFCON 23 - Mike Sconzo - i am packer and so can you
DEFCON 23 - Mike Sconzo - i am packer and so can youDEFCON 23 - Mike Sconzo - i am packer and so can you
DEFCON 23 - Mike Sconzo - i am packer and so can youFelipe Prado
 
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDavid Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDay Software
 
Making the Most of User Changes
Making the Most of User ChangesMaking the Most of User Changes
Making the Most of User ChangesESUG
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled CucumbersJoseph Wilk
 

Similar to Continuous Delivery in Ruby (20)

Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad Decisions
 
To Host, Or Not To Host?
To Host, Or Not To Host?To Host, Or Not To Host?
To Host, Or Not To Host?
 
Enjoy privacy on Gitlab
Enjoy privacy on GitlabEnjoy privacy on Gitlab
Enjoy privacy on Gitlab
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
 
TDD - for people who don't need it
TDD - for people who don't need itTDD - for people who don't need it
TDD - for people who don't need it
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)
 
How penetration testing techniques can help you improve your qa skills
How penetration testing techniques can help you improve your qa skillsHow penetration testing techniques can help you improve your qa skills
How penetration testing techniques can help you improve your qa skills
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manor
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.
 
Tec314
Tec314Tec314
Tec314
 
Team Development and Release Management
Team Development and Release ManagementTeam Development and Release Management
Team Development and Release Management
 
How Do Developers React to API Deprecation? The Case of a Smalltalk Ecosystem
How Do Developers React to API Deprecation? The Case of a Smalltalk EcosystemHow Do Developers React to API Deprecation? The Case of a Smalltalk Ecosystem
How Do Developers React to API Deprecation? The Case of a Smalltalk Ecosystem
 
Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with Jenkins
 
SFSCON23 - Denver Gingerich - How do you really do GPL enforcement
SFSCON23 - Denver Gingerich - How do you really do GPL enforcementSFSCON23 - Denver Gingerich - How do you really do GPL enforcement
SFSCON23 - Denver Gingerich - How do you really do GPL enforcement
 
DEFCON 23 - Mike Sconzo - i am packer and so can you
DEFCON 23 - Mike Sconzo - i am packer and so can youDEFCON 23 - Mike Sconzo - i am packer and so can you
DEFCON 23 - Mike Sconzo - i am packer and so can you
 
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDavid Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
 
Making the Most of User Changes
Making the Most of User ChangesMaking the Most of User Changes
Making the Most of User Changes
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled Cucumbers
 

Recently uploaded

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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 WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Continuous Delivery in Ruby

  • 1. Continuous Delivery in Ruby Srushti Ambekallu Brian Guthrie @srshti @bguthrie github.com/srushti github.com/bguthrie
  • 3.
  • 4.
  • 5.
  • 9. Tests of specific units of code Tests of multiple layers Tests of external integration points
  • 10. Receive new commit Reset test database schema Run tests Reset test data
  • 11. Receive new commit Reset test database schema Run tests Reset test data
  • 12. 1.Unit and integration tests 2.Automated acceptance tests
  • 13. Cucumber or the test runner of your choice
  • 14. Selenium or Sahi Capybara
  • 15. Receive new commit Reset test Run Reset database browser test data schema tests Restart test server
  • 16. 1.Unit and integration tests 2.Automated acceptance tests 3.User acceptance tests
  • 17.
  • 18. type click click click click
  • 19. type click click click click click click click click click type
  • 20. type click click click click click click click click click type click click click type
  • 21. type click click click click click click click click click click type click click click click type
  • 22. click type click type click click click click click click click click click click click click type click click click click type
  • 23. click type click type click click click click click click ERROR click click click click click click type click click click click type
  • 24. 1.Unit and integration tests 2.Automated acceptance tests 3.User acceptance tests
  • 25. 1.Unit and integration tests 2.Automated acceptance tests 2a.Deploy 3.User acceptance tests
  • 27. Super easy in Ruby (those Java guys are suckers)
  • 29. $ ssh root@production.com prod:~ root# cd /var/www/site
  • 30. $ ssh root@production.com prod:~ root# cd /var/www/site prod:~ root# git pull a31a0eb569ba2
  • 31. $ ssh root@production.com prod:~ root# cd /var/www/site prod:~ root# git pull a31a0eb569ba2 prod:~ root# bundle install
  • 32. $ ssh root@production.com prod:~ root# cd /var/www/site prod:~ root# git pull a31a0eb569ba2 prod:~ root# bundle install prod:~ root# rake db:migrate
  • 33. $ ssh root@production.com prod:~ root# cd /var/www/site prod:~ root# git pull a31a0eb569ba2 prod:~ root# bundle install prod:~ root# rake db:migrate prod:~ root# rake jammit:package
  • 34. $ ssh root@production.com prod:~ root# cd /var/www/site prod:~ root# git pull a31a0eb569ba2 prod:~ root# bundle install prod:~ root# rake db:migrate prod:~ root# rake jammit:package prod:~ root# touch tmp/restart.txt
  • 35. $ cap deploy production
  • 37. Digression: The Rails deploy model
  • 39. $ ssh root@production.com prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2
  • 40. $ ssh root@production.com prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2 prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2
  • 41. $ ssh root@production.com prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2 prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2 prod:~ root# bundle install
  • 42. $ ssh root@production.com prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2 prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2 prod:~ root# bundle install prod:~ root# rake db:migrate
  • 43. $ ssh root@production.com prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2 prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2 prod:~ root# bundle install prod:~ root# rake db:migrate prod:~ root# rake jammit:package
  • 44. $ ssh root@production.com prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2 prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2 prod:~ root# bundle install prod:~ root# rake db:migrate prod:~ root# rake jammit:package prod:~ root# touch tmp/restart.txt
  • 45. $ ssh root@production.com prod:~ root# git clone git@scm/myapp.git /var/www/site/a31a0eb569ba2 prod:~ root# ln -s /var/ww/site/current /var/www/site/a31a0eb569ba2 prod:~ root# bundle install prod:~ root# rake db:migrate prod:~ root# rake jammit:package prod:~ root# touch tmp/restart.txt
  • 46. ci-server:~/app/ $ bundle install --deployment ci-server:~/app/ $ rake jammit:package ci-server:~/app/ $ tar zxvf app-<SHA>.tgz *
  • 47. RVM
  • 49. $ cat ~/projecta/.rvmrc rvm jruby@projecta $ cat ~/projecta/.rvmrc rvm ree@projectb $ cat ~/projecta/.rvmrc rvm 1.9.1@projectc
  • 53. App server Background jobs server App server App server
  • 54. App server Background jobs server App Load server balancer App server
  • 55. App server Background jobs server App Load server balancer App server Background jobs server App server
  • 56. Chef
  • 58. App server Background jobs server App Load server balancer App server Background jobs server App server
  • 59. Configuration Management App server Background jobs server App Load server balancer App server Background jobs server App server
  • 60.
  • 61. Peace in the kingdom
  • 63. Project Lifecycle faf4d2788f ......................... a433f20abb Code Release Six months
  • 64. Project Lifecycle faf4d2788f f26115c8c c86c1bfea6 56d1dd8accc4 dd35192f8 1b51fee653a f038af17de4 8318b750aec 192410bd2537 631f5c3f58c 7bcafdd2266 2bbed3e4bd2 Code Release Every week (iteration)
  • 65. Project Lifecycle f26115c8c dd35192f8 f038af17de4 631f5c3f58c 7bcafdd2266 Code Release Every day?
  • 66. Project Lifecycle 7bcafdd2266 Code Release Multiple times a day??
  • 67. Features long in development need branches
  • 68. Branch by abstraction (“if this feature is enabled, show this link”) <% if feature?(:masala) %> <%= render :partial => "dosas/masala", :locals => { :dosa => @dosas.masala.first } %> <% else %> <%= render :partial => "dosas/plain", :locals => { :dosa => @dosas.first } %> <% end %>
  • 69. This doesn’t work for everything: big features, config changes
  • 70. Branch by source control (“fork me”) http://martinfowler.com/bliki/FeatureBranch.html
  • 72. “...an automated manifestation of your process for getting software from version control into the hands of your users.” - Jez Humble and David Farley, Continuous Delivery
  • 73. Unit and Automated Manual Integration Acceptance Acceptance Production (Woohoo!) Tests Tests Tests
  • 74. Test Test Test runner runner runner Test runner Unit and Automated Manual Integration Acceptance Acceptance Production (Woohoo!) Tests Tests Tests
  • 75. “I see CI as primarily giving birth to a release candidate at each commit. The job of the CI system and deployment process is to disprove the production-readiness of a release candidate. This model relies on the need to have some mainline that represents the current shared, most up to date picture of complete.” - David Farley
  • 76. Automate until human intervention = decision DEPLOY
  • 77. Internal External users users Feature User Continuous development Staging acceptance Production integration Bug fixes testing
  • 78.
  • 79.
  • 80.
  • 82.
  • 83. Real testing is hard Let computers do the simple testing Smart humans for smart testing
  • 84. Automated testing User testing Traditional projects
  • 85. Automated testing User testing Agilify!
  • 87. Questions? Srushti Ambekallu @srshti github.com/srushti Brian Guthrie @bguthrie github.com/bguthrie

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. Brian - skeptic (&amp;#x201C;what do I need tests for?&amp;#x201D;)\nSrushti - champion\n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. Brian - champion (&amp;#x201C;I deploy all the time - I GUESS you could automate&amp;#x201D;)\nSrushti - skeptic\n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. Brian - champion, Srushti - skeptic\n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. Brian - more rapid, then convinced to be slower\nSrushti - slower, then convinced to be more rapid\n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. Brian - skeptic because wants slower deploys, Srushti - champion\n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. Etsy - will open source later\n
  96. Brian - skeptic (&amp;#x201C;I used to have an army of testers&amp;#x201D;)\nSrushti - champion\n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n