SlideShare a Scribd company logo
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

More Related Content

What's hot

Untitled talk at Riviera.rb
Untitled talk at Riviera.rbUntitled talk at Riviera.rb
Untitled talk at Riviera.rb
Jean-Baptiste Mazon
 
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
Nikolay 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 API
Dániel Kalmár
 
Introducing docker
Introducing dockerIntroducing docker
Introducing docker
Bill Wang
 
Ruby confhighlights
Ruby confhighlightsRuby confhighlights
Ruby confhighlights
Claire Tran
 
Rook - cloud-native storage
Rook - cloud-native storageRook - cloud-native storage
Rook - cloud-native storage
Karol Chrapek
 
Mojolicious mvc
Mojolicious mvcMojolicious mvc
Mojolicious mvc
Arpad Szasz
 
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
Alkacon Software GmbH & Co. KG
 
GraalVM
GraalVMGraalVM
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
Yagiz Nizipli
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
ColCh
 
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 MoneyBird
Edwin Vlieg
 
Messaging with the Docker
Messaging with the DockerMessaging with the Docker
Messaging with the Docker
Henryk Konsek
 
Docker from a team perspective
Docker from a team perspectiveDocker from a team perspective
Docker from a team perspective
Edwin 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 2018
Petr 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 GRAALVM
Owais Zahid
 
Hybrid Application Development
Hybrid Application DevelopmentHybrid Application Development
Hybrid Application Development
Yagiz Nizipli
 

What's hot (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
 

Viewers also liked

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
ijsrd.com
 
Lassance 20120920 comparative-presidential-studies-slides
Lassance 20120920 comparative-presidential-studies-slidesLassance 20120920 comparative-presidential-studies-slides
Lassance 20120920 comparative-presidential-studies-slides
antoniolassance
 
Q4 2012 Presentation
Q4 2012 PresentationQ4 2012 Presentation
Q4 2012 Presentation
United_Stationers
 
Basic swing
Basic swingBasic swing
Basic swing
bharathi120789
 
Task 6
Task 6Task 6
Task 6
millerj1
 
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 & accent
Aqib Memon
 
Cowgirl Up Fanfic Bible.doc
Cowgirl Up Fanfic Bible.docCowgirl Up Fanfic Bible.doc
Cowgirl Up Fanfic Bible.doc
docwho210
 
Inverses & One-to-One
Inverses & One-to-OneInverses & One-to-One
Inverses & One-to-One
aabdel96
 

Viewers also liked (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
 

Similar to Deployments with rails

Capybara with Rspec
Capybara with RspecCapybara with Rspec
Capybara with Rspec
Omnia Helmi
 
Deploy like a pro!
Deploy like a pro!Deploy like a pro!
Deploy like a pro!
Damian Serrano Thode
 
一种多屏时代的通用 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
Roger Barnes
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at Scale
Kris Buytaert
 
Rails data migrations
Rails data migrationsRails data migrations
Rails data migrations
Andrei Kaleshka
 
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 Team
Arto Artnik
 
Gradle - time for another build
Gradle - time for another buildGradle - time for another build
Gradle - time for another build
Igor Khotin
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new build
Igor Khotin
 
Grails 101
Grails 101Grails 101
Grails 101
David Jacobs
 
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
Lance Albertson
 
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
Taller Negócio Digitais
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
Taro L. Saito
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
Mark Proctor
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
Stephan Lindauer
 
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
GR8Conf
 
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
 

Similar to 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