SlideShare a Scribd company logo
CAPISTRANO
 for non-Rubyists
who we are


   Dimitris Tsironis
    Founder at Geembo, UI designer & huge geek, who
    loves good design and french fries, as much as good
    indentation in a stylesheet. Follow him @tsironakos
    and @geemboHQ

   Dr. John Pagonis
    Dr. John Pagonis is onto something with Missum
    these days. You can follow him at @JohnPagonis
    and @MissumApp
WHAT’S THE PROBLEM?



       deploys can be a real mess

       mistakes could happen very easily
       you don’t mess with the production
       you’re actually delaying bug fixes, new features etc.
one-click deploys!
     (well, almost)
is a language agnostic tool for remote application
administration tasks
provisioning of infrastructure better handled
with other tools, eg. Chef, Puppet, Babushka
it fits well with deploying web-apps
heavily used by Rails community
it’s for sysadmins and devops guys
how it works
 under the bonnet
philosophy



       it runs on your computer

       connects to the server over ssh

       there is no Capistrano server or sth like that

       automates the tasks you would manually do
       with command-line
philosophy part ii



       uses a Ruby-based DSL for task automation

       there are already ready-to-use tasks
       cap shell offers an interactive prompt for adhoc
       commands
       cap shell sessions are cached and can be reused
built-in tasks


   It ships with plenty of stuff, by default
ready-to-use recipes

                  You can find plenty on Github
              https://github.com/nesquena/cap-recipes


           Ruby setup & RubyGems management

           Apache & Phusion Passenger
           Aptitude management
           MongoDB
           and much more!
custom tasks


  Tailor-made Capistrano tasks are easy.

  It’s all Ruby and Rake-like tasks, after all.
how to set it up
 prepare for the battle
set it up



            you need a Capfile in the root of the project

            then, you can execute capistrano tasks anywhere in
            your project’s folder, by running:

                        cap <task name>
rails-less deploy example
capify




         Capify is a file generator for your project

         usually used with Rails project but it works with other projects

         in general, it can be enhanced to work with other structures
capify

 One command to generate the files




 Files you need
         Capfile - basic Capistrano file in root of the project

         config/deploy.rb - here’s where you write custom tasks
production or staging


    config/deploy/production.rb




    config/deploy/staging.rb
roles



        allow you to write capistrano tasks that only apply to
        certain servers

        then you can do something like this
configuration example


    config/deploy.rb
custom tasks example

  config/deploy.rb
RAILS-specific magic
 tasks for Ruby on Rails only
asset precompile




                              PROBLEM
                   Asset precompile can be slow.

                   It could take several minutes that
                     we could use to make a coffee
                        or watch some cats gifs
asset precompile




                            solution

              Skip precompile, if it isn’t necessary

                     “The ability to destroy
                    a planet is insignificant
                    next to the power of Git”

                    --a tech-savvy Darth Vader
rails-specific magic

   config/deploy.rb




Source: StackOverflow of course!
RESOURCES


       Deploying with Capistrano - Github Help
       https://help.github.com/articles/deploying-with-capistrano

       Capistrano Wiki
       https://github.com/capistrano/capistrano/wiki

       Capistrano Multistage extension
       https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension

       Capistrano Handbook - still immature
       https://github.com/leehambley/capistrano-handbook/blob/master/
       index.markdown

       Capistrano Google Group
       http://groups.google.com/group/capistrano
thank you!
@JohnPagonis
 @tsironakos
@geemboHQ

More Related Content

PDF
Madison PHP 2015 - DevOps For Small Teams
PPTX
Paragraphs at drupal 8.
PDF
Introduction to go, and why it's awesome
PDF
Everyday React Native
PDF
Scaling php - Intercon php
PDF
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
PDF
Andrew Mykhaliuk - Sorry, I need to make a build for frontend
PDF
[Container X mas Party with flexy] Machine Learning Lifecycle with Kubeflow o...
Madison PHP 2015 - DevOps For Small Teams
Paragraphs at drupal 8.
Introduction to go, and why it's awesome
Everyday React Native
Scaling php - Intercon php
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Andrew Mykhaliuk - Sorry, I need to make a build for frontend
[Container X mas Party with flexy] Machine Learning Lifecycle with Kubeflow o...

What's hot (20)

PDF
Frontend asset management with Bower and Gulp.js
PDF
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
PDF
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
PDF
OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...
PDF
Intro to Front End Development with Angular + Firebase
PDF
2016 05-cloudsoft-amp-and-brooklyn-new
PPTX
Pulumi. Modern Infrastructure as Code.
PDF
Docker, developers take power
PPTX
Continuous deployment of Rails apps on AWS OpsWorks
PDF
SCM Puppet: from an intro to the scaling
PDF
Gulp - the streaming build system
PDF
Why Puppet Sucks - Rob Terhaar
PDF
Serverless preview environments to the rescue
PDF
Docker orchestration with kontena
PPTX
External ng2 lib
PDF
Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019
PDF
Simulation in R and Python
PDF
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
PDF
Automate All the Things with Grunt
PDF
Render-as-You-Fetch
Frontend asset management with Bower and Gulp.js
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...
Intro to Front End Development with Angular + Firebase
2016 05-cloudsoft-amp-and-brooklyn-new
Pulumi. Modern Infrastructure as Code.
Docker, developers take power
Continuous deployment of Rails apps on AWS OpsWorks
SCM Puppet: from an intro to the scaling
Gulp - the streaming build system
Why Puppet Sucks - Rob Terhaar
Serverless preview environments to the rescue
Docker orchestration with kontena
External ng2 lib
Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019
Simulation in R and Python
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
Automate All the Things with Grunt
Render-as-You-Fetch
Ad

Viewers also liked (20)

PPTX
Proyecto
PPTX
Visiones sobre el aprendizaje
PPTX
PPTX
امکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آن
PPTX
Xii promoción
PDF
Sandra liliana actividad1_2mapac.pdf
PDF
Ferreira et al, abc (1995)
PPTX
Proyecto decimo once
PPTX
Pequena borboleta slid
PPTX
Jj new batch
PPTX
Webquest
PDF
3 bedrooms + study
KEY
Fall 2012, Class 02
PPS
Posando para la foto
PPT
Semi d @ roseburn
PDF
Jewella at Disrupt Sydney September 2015
PPT
Nipah photos and floor plan
PDF
Подводные камни финансовых стартапов
PPTX
13 Things I Learnt (or Relearnt) in 2013
PPTX
Advertising
Proyecto
Visiones sobre el aprendizaje
امکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آن
Xii promoción
Sandra liliana actividad1_2mapac.pdf
Ferreira et al, abc (1995)
Proyecto decimo once
Pequena borboleta slid
Jj new batch
Webquest
3 bedrooms + study
Fall 2012, Class 02
Posando para la foto
Semi d @ roseburn
Jewella at Disrupt Sydney September 2015
Nipah photos and floor plan
Подводные камни финансовых стартапов
13 Things I Learnt (or Relearnt) in 2013
Advertising
Ad

Similar to Capistrano for non-rubyist (20)

ODP
DiUS Computing Lca Rails Final
PPTX
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
PDF
Deploy like a pro!
PDF
Sparklife - Life In The Trenches With Spark
PDF
Deploy made easy (even on Friday)
PDF
ZendCon 2015 - DevOps for Small Teams
PDF
Java to Golang: An intro by Ryan Dawson Seldon.io
PPTX
A Fabric/Puppet Build/Deploy System
KEY
Capistrano, Puppet, and Chef
PDF
Building Drupal 8 Sites
PDF
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
PDF
Deployment Via Capistrano
ODP
CAPISTRANO
PPT
CoffeeScript: A beginner's presentation for beginners copy
PDF
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PDF
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
PDF
DevOps For Small Teams
PDF
Function as a Service
PDF
Midwest PHP 2017 DevOps For Small team
KEY
Ruby on Rails survival guide of an aged Java developer
DiUS Computing Lca Rails Final
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
Deploy like a pro!
Sparklife - Life In The Trenches With Spark
Deploy made easy (even on Friday)
ZendCon 2015 - DevOps for Small Teams
Java to Golang: An intro by Ryan Dawson Seldon.io
A Fabric/Puppet Build/Deploy System
Capistrano, Puppet, and Chef
Building Drupal 8 Sites
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Deployment Via Capistrano
CAPISTRANO
CoffeeScript: A beginner's presentation for beginners copy
PHP Mega Meetup, Sep, 2020, Anti patterns in php
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
DevOps For Small Teams
Function as a Service
Midwest PHP 2017 DevOps For Small team
Ruby on Rails survival guide of an aged Java developer

More from Dimitris Tsironis (7)

PDF
Automating Front-End Workflow
PDF
Modern Webapps
PDF
PDF
PDF
HTML+CSS: how to get started
PDF
Coffeescript unfancy javascript
PDF
Coffeescript - take a sip of code
Automating Front-End Workflow
Modern Webapps
HTML+CSS: how to get started
Coffeescript unfancy javascript
Coffeescript - take a sip of code

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Cloud computing and distributed systems.
PDF
Electronic commerce courselecture one. Pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
sap open course for s4hana steps from ECC to s4
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Programs and apps: productivity, graphics, security and other tools
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Encapsulation_ Review paper, used for researhc scholars
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
20250228 LYD VKU AI Blended-Learning.pptx
Machine learning based COVID-19 study performance prediction
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
sap open course for s4hana steps from ECC to s4

Capistrano for non-rubyist

  • 2. who we are Dimitris Tsironis Founder at Geembo, UI designer & huge geek, who loves good design and french fries, as much as good indentation in a stylesheet. Follow him @tsironakos and @geemboHQ Dr. John Pagonis Dr. John Pagonis is onto something with Missum these days. You can follow him at @JohnPagonis and @MissumApp
  • 3. WHAT’S THE PROBLEM? deploys can be a real mess mistakes could happen very easily you don’t mess with the production you’re actually delaying bug fixes, new features etc.
  • 4. one-click deploys! (well, almost)
  • 5. is a language agnostic tool for remote application administration tasks provisioning of infrastructure better handled with other tools, eg. Chef, Puppet, Babushka it fits well with deploying web-apps heavily used by Rails community it’s for sysadmins and devops guys
  • 6. how it works under the bonnet
  • 7. philosophy it runs on your computer connects to the server over ssh there is no Capistrano server or sth like that automates the tasks you would manually do with command-line
  • 8. philosophy part ii uses a Ruby-based DSL for task automation there are already ready-to-use tasks cap shell offers an interactive prompt for adhoc commands cap shell sessions are cached and can be reused
  • 9. built-in tasks It ships with plenty of stuff, by default
  • 10. ready-to-use recipes You can find plenty on Github https://github.com/nesquena/cap-recipes Ruby setup & RubyGems management Apache & Phusion Passenger Aptitude management MongoDB and much more!
  • 11. custom tasks Tailor-made Capistrano tasks are easy. It’s all Ruby and Rake-like tasks, after all.
  • 12. how to set it up prepare for the battle
  • 13. set it up you need a Capfile in the root of the project then, you can execute capistrano tasks anywhere in your project’s folder, by running: cap <task name>
  • 15. capify Capify is a file generator for your project usually used with Rails project but it works with other projects in general, it can be enhanced to work with other structures
  • 16. capify One command to generate the files Files you need Capfile - basic Capistrano file in root of the project config/deploy.rb - here’s where you write custom tasks
  • 17. production or staging config/deploy/production.rb config/deploy/staging.rb
  • 18. roles allow you to write capistrano tasks that only apply to certain servers then you can do something like this
  • 19. configuration example config/deploy.rb
  • 20. custom tasks example config/deploy.rb
  • 21. RAILS-specific magic tasks for Ruby on Rails only
  • 22. asset precompile PROBLEM Asset precompile can be slow. It could take several minutes that we could use to make a coffee or watch some cats gifs
  • 23. asset precompile solution Skip precompile, if it isn’t necessary “The ability to destroy a planet is insignificant next to the power of Git” --a tech-savvy Darth Vader
  • 24. rails-specific magic config/deploy.rb Source: StackOverflow of course!
  • 25. RESOURCES Deploying with Capistrano - Github Help https://help.github.com/articles/deploying-with-capistrano Capistrano Wiki https://github.com/capistrano/capistrano/wiki Capistrano Multistage extension https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension Capistrano Handbook - still immature https://github.com/leehambley/capistrano-handbook/blob/master/ index.markdown Capistrano Google Group http://groups.google.com/group/capistrano