Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Capistrano for non-Rubyists

Capistrano for non-Rubyists

Dimitris Tsironis

March 18, 2013

More Decks by Dimitris Tsironis

Other Decks in Technology


  1. who we are Dimitris Tsironis Dr. John Pagonis Dr. John

    Pa onis is onto somethin with Missum these days. You can follow him at @JohnPa onis and @MissumApp Founder at Geembo, UI desi ner & hu e eek, who loves ood desi n and french fries, as much as ood indentation in a stylesheet. Follow him @tsironakos and @ eemboHQ
  2. 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 delayin bu fixes, new features etc.
  3. is a lan ua e agnostic tool for remote application

    administration tasks heavily used by Rails community it’s for sysadmins and devops uys it fits well with deployin web-apps provisionin of infrastructure better handled with other tools, e . Chef, Puppet, Babushka
  4. 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
  5. 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
  6. ready-to-use recipes You can find plenty on Github https://github.com/nesquena/cap-recipes Ruby

    setup & RubyGems mana ement Apache & Phusion Passen er Aptitude mana ement Mon oDB and much more!
  7. 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 runnin : cap <task name>
  8. capify Capify is a file enerator for your project usually

    used with Rails project but it works with other projects in eneral, it can be enhanced to work with other structures
  9. capify One command to enerate the files Files you need

    Capfile - basic Capistrano file in root of the project config/deploy.rb - here’s where you write custom tasks
  10. roles allow you to write capistrano tasks that only apply

    to certain servers then you can do somethin like this
  11. 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 ifs
  12. 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
  13. RESOURCES Deployin with Capistrano - Github Help https://help. ithub.com/articles/deployin -with-capistrano

    Capistrano Wiki https:// ithub.com/capistrano/capistrano/wiki Capistrano Multista e extension https:// ithub.com/capistrano/capistrano/wiki/2.x-Multista e-Extension Capistrano Handbook - still immature https:// ithub.com/leehambley/capistrano-handbook/blob/master/ index.markdown Capistrano Goo le Group http:// roups. oo le.com/ roup/capistrano