SlideShare uma empresa Scribd logo
1 de 12
Deployments with Rails
            -Gourav Tiwari
Overview

●   Crash-course on Capistrano
●   Quick tips
●   Questions?
Basic Structure

●   config directory
●   deploy.rb
●   Capfile
Variables

●   application
●   repository
●   scm
●   user
●   deploy_to
●   Custom variables?
●   exists?
Roles
●   app
●   db
●   web
●   Options
          –   :primary => true
          –   :no_release => true
Cap Tasks
●   Namespace
●   Tasks
●   before
●   after
●   Multiple tasks before/after
●   assets?
Running commands
●   run
●   rake tasks
●   shell scripts
●   set cron jobs (whenever)
●   create links and so on...
Multiple environments
●   Specific vs Generic tasks
●   Handling environment variables
●   Different git branches
Useful cap tasks available
●   cap -T
●   cap -vT
●   cap -e <taskname>
●   cap <env> deploy:install
●   cap <env> deploy:migrations
●   cap <env> deploy:cleanup
●   cap <env> deploy
Transactions and Roll-Back
Thank You
References

●   https://github.com/capistrano/capistrano/wiki
●   https://github.com/capistrano/capistrano

Mais conteúdo relacionado

Mais procurados

Everyday tools and tricks for scaling Node.js
Everyday tools and tricks for scaling Node.jsEveryday tools and tricks for scaling Node.js
Everyday tools and tricks for scaling Node.jsNikolay Stoitsev
 
AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker kloia
 
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話なおき きしだ
 
Drupal course - batch API
Drupal course - batch APIDrupal course - batch API
Drupal course - batch APIDániel Kalmár
 
Introducing docker
Introducing dockerIntroducing docker
Introducing dockerBill Wang
 
Ruby confhighlights
Ruby confhighlightsRuby confhighlights
Ruby confhighlightsClaire Tran
 
Rook - cloud-native storage
Rook - cloud-native storageRook - cloud-native storage
Rook - cloud-native storageKarol Chrapek
 
Web Development: Making it the right way
Web Development: Making it the right wayWeb Development: Making it the right way
Web Development: Making it the right wayYagiz Nizipli
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CIColCh
 
Migrating Legacy Data (Ruby Midwest)
Migrating Legacy Data (Ruby Midwest)Migrating Legacy Data (Ruby Midwest)
Migrating Legacy Data (Ruby Midwest)Patrick Crowley
 
Docker at MoneyBird
Docker at MoneyBirdDocker at MoneyBird
Docker at MoneyBirdEdwin Vlieg
 
Messaging with the Docker
Messaging with the DockerMessaging with the Docker
Messaging with the DockerHenryk Konsek
 
Docker from a team perspective
Docker from a team perspectiveDocker from a team perspective
Docker from a team perspectiveEdwin Vlieg
 
Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Petr Zapletal
 
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVMHOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVMOwais Zahid
 
Hybrid Application Development
Hybrid Application DevelopmentHybrid Application Development
Hybrid Application DevelopmentYagiz Nizipli
 

Mais procurados (20)

Untitled talk at Riviera.rb
Untitled talk at Riviera.rbUntitled talk at Riviera.rb
Untitled talk at Riviera.rb
 
Everyday tools and tricks for scaling Node.js
Everyday tools and tricks for scaling Node.jsEveryday tools and tricks for scaling Node.js
Everyday tools and tricks for scaling Node.js
 
AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker
 
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
 
Drupal course - batch API
Drupal course - batch APIDrupal course - batch API
Drupal course - batch API
 
Introducing docker
Introducing dockerIntroducing docker
Introducing docker
 
Ruby confhighlights
Ruby confhighlightsRuby confhighlights
Ruby confhighlights
 
Rook - cloud-native storage
Rook - cloud-native storageRook - cloud-native storage
Rook - cloud-native storage
 
Mojolicious mvc
Mojolicious mvcMojolicious mvc
Mojolicious mvc
 
OpenCms Days 2012 - Developing OpenCms with Gradle
OpenCms Days 2012 - Developing OpenCms with GradleOpenCms Days 2012 - Developing OpenCms with Gradle
OpenCms Days 2012 - Developing OpenCms with Gradle
 
GraalVM
GraalVMGraalVM
GraalVM
 
Web Development: Making it the right way
Web Development: Making it the right wayWeb Development: Making it the right way
Web Development: Making it the right way
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
 
Migrating Legacy Data (Ruby Midwest)
Migrating Legacy Data (Ruby Midwest)Migrating Legacy Data (Ruby Midwest)
Migrating Legacy Data (Ruby Midwest)
 
Docker at MoneyBird
Docker at MoneyBirdDocker at MoneyBird
Docker at MoneyBird
 
Messaging with the Docker
Messaging with the DockerMessaging with the Docker
Messaging with the Docker
 
Docker from a team perspective
Docker from a team perspectiveDocker from a team perspective
Docker from a team perspective
 
Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018
 
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVMHOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
 
Hybrid Application Development
Hybrid Application DevelopmentHybrid Application Development
Hybrid Application Development
 

Destaque

Comparatively analysis of AODV and DSR in MAC layer for Ad Hoc Environment
Comparatively analysis of AODV and DSR in MAC layer for Ad Hoc EnvironmentComparatively analysis of AODV and DSR in MAC layer for Ad Hoc Environment
Comparatively analysis of AODV and DSR in MAC layer for Ad Hoc Environmentijsrd.com
 
Lassance 20120920 comparative-presidential-studies-slides
Lassance 20120920 comparative-presidential-studies-slidesLassance 20120920 comparative-presidential-studies-slides
Lassance 20120920 comparative-presidential-studies-slidesantoniolassance
 
Cave archaeology and post depositional processes affecting taphonomy session...
Cave archaeology and post depositional processes affecting taphonomy  session...Cave archaeology and post depositional processes affecting taphonomy  session...
Cave archaeology and post depositional processes affecting taphonomy session...Ecomuseum Cavalleria
 
Voice & accent
Voice & accentVoice & accent
Voice & accentAqib Memon
 
Cowgirl Up Fanfic Bible.doc
Cowgirl Up Fanfic Bible.docCowgirl Up Fanfic Bible.doc
Cowgirl Up Fanfic Bible.docdocwho210
 
Inverses & One-to-One
Inverses & One-to-OneInverses & One-to-One
Inverses & One-to-Oneaabdel96
 

Destaque (9)

Comparatively analysis of AODV and DSR in MAC layer for Ad Hoc Environment
Comparatively analysis of AODV and DSR in MAC layer for Ad Hoc EnvironmentComparatively analysis of AODV and DSR in MAC layer for Ad Hoc Environment
Comparatively analysis of AODV and DSR in MAC layer for Ad Hoc Environment
 
Lassance 20120920 comparative-presidential-studies-slides
Lassance 20120920 comparative-presidential-studies-slidesLassance 20120920 comparative-presidential-studies-slides
Lassance 20120920 comparative-presidential-studies-slides
 
Q4 2012 Presentation
Q4 2012 PresentationQ4 2012 Presentation
Q4 2012 Presentation
 
Basic swing
Basic swingBasic swing
Basic swing
 
Task 6
Task 6Task 6
Task 6
 
Cave archaeology and post depositional processes affecting taphonomy session...
Cave archaeology and post depositional processes affecting taphonomy  session...Cave archaeology and post depositional processes affecting taphonomy  session...
Cave archaeology and post depositional processes affecting taphonomy session...
 
Voice & accent
Voice & accentVoice & accent
Voice & accent
 
Cowgirl Up Fanfic Bible.doc
Cowgirl Up Fanfic Bible.docCowgirl Up Fanfic Bible.doc
Cowgirl Up Fanfic Bible.doc
 
Inverses & One-to-One
Inverses & One-to-OneInverses & One-to-One
Inverses & One-to-One
 

Semelhante a Deployments with rails

Capybara with Rspec
Capybara with RspecCapybara with Rspec
Capybara with RspecOmnia Helmi
 
一种多屏时代的通用 web 应用架构
一种多屏时代的通用 web 应用架构一种多屏时代的通用 web 应用架构
一种多屏时代的通用 web 应用架构勇浩 赖
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with DjangoRoger Barnes
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at ScaleKris Buytaert
 
Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!Corneil du Plessis
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Gradle - time for another build
Gradle - time for another buildGradle - time for another build
Gradle - time for another buildIgor Khotin
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new buildIgor Khotin
 
Hands on Virtualization with Ganeti (part 1) - LinuxCon 2012
Hands on Virtualization with Ganeti (part 1)  - LinuxCon 2012Hands on Virtualization with Ganeti (part 1)  - LinuxCon 2012
Hands on Virtualization with Ganeti (part 1) - LinuxCon 2012Lance Albertson
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTaro L. Saito
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationMark Proctor
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
pppr - 解決 JavaScript 無法被搜尋引擎正確索引的問題
pppr - 解決 JavaScript 無法被搜尋引擎正確索引的問題pppr - 解決 JavaScript 無法被搜尋引擎正確索引的問題
pppr - 解決 JavaScript 無法被搜尋引擎正確索引的問題Mu Chun Wang
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Izzet Mustafaiev
 

Semelhante a Deployments with rails (20)

Capybara with Rspec
Capybara with RspecCapybara with Rspec
Capybara with Rspec
 
Deploy like a pro!
Deploy like a pro!Deploy like a pro!
Deploy like a pro!
 
一种多屏时代的通用 web 应用架构
一种多屏时代的通用 web 应用架构一种多屏时代的通用 web 应用架构
一种多屏时代的通用 web 应用架构
 
Tp web
Tp webTp web
Tp web
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at Scale
 
Rails data migrations
Rails data migrationsRails data migrations
Rails data migrations
 
Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Gradle - time for another build
Gradle - time for another buildGradle - time for another build
Gradle - time for another build
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new build
 
Grails 101
Grails 101Grails 101
Grails 101
 
Hands on Virtualization with Ganeti (part 1) - LinuxCon 2012
Hands on Virtualization with Ganeti (part 1)  - LinuxCon 2012Hands on Virtualization with Ganeti (part 1)  - LinuxCon 2012
Hands on Virtualization with Ganeti (part 1) - LinuxCon 2012
 
Next.js with drupal, the good parts
Next.js with drupal, the good partsNext.js with drupal, the good parts
Next.js with drupal, the good parts
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
pppr - 解決 JavaScript 無法被搜尋引擎正確索引的問題
pppr - 解決 JavaScript 無法被搜尋引擎正確索引的問題pppr - 解決 JavaScript 無法被搜尋引擎正確索引的問題
pppr - 解決 JavaScript 無法被搜尋引擎正確索引的問題
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?
 

Deployments with rails

  • 1. Deployments with Rails -Gourav Tiwari
  • 2. Overview ● Crash-course on Capistrano ● Quick tips ● Questions?
  • 3. Basic Structure ● config directory ● deploy.rb ● Capfile
  • 4. Variables ● application ● repository ● scm ● user ● deploy_to ● Custom variables? ● exists?
  • 5. Roles ● app ● db ● web ● Options – :primary => true – :no_release => true
  • 6. Cap Tasks ● Namespace ● Tasks ● before ● after ● Multiple tasks before/after ● assets?
  • 7. Running commands ● run ● rake tasks ● shell scripts ● set cron jobs (whenever) ● create links and so on...
  • 8. Multiple environments ● Specific vs Generic tasks ● Handling environment variables ● Different git branches
  • 9. Useful cap tasks available ● cap -T ● cap -vT ● cap -e <taskname> ● cap <env> deploy:install ● cap <env> deploy:migrations ● cap <env> deploy:cleanup ● cap <env> deploy
  • 12. References ● https://github.com/capistrano/capistrano/wiki ● https://github.com/capistrano/capistrano