Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Deployment Patterns in the Ruby on Rails World


Published on

Nikhil Mungel and Ajey Gore from ThoughtWorks presented this at DevOpsDays Bangalore 2011.

Published in: Technology
  • Be the first to comment

Deployment Patterns in the Ruby on Rails World

  1. DEPLOYMENT PATTERNSIN THE RUBY on RAILS WORLD<br />Devopsdays India<br />2011<br />
  2. Nikhil Mungel<br />Ajey Gore<br />@AjeyGore<br />@hyfather<br />
  3. Rails<br />Apache<br />Apache<br />Apache<br />Apache<br />Passenger<br />
  4. * Ruby on Rails<br />/app<br />/config<br />/db<br />/doc<br />/lib<br />/log<br />/public<br />/script<br />/test<br />/tmp<br />/vendor<br /><br />README<br />Rakefile<br />
  5. run updated script<br />App<br />Server<br />App<br />Server<br />Pull<br />Pull<br />Git<br />1<br />2<br />3<br />signal over SSH<br />Local Repository<br />contains all scripts<br />
  6. SCM-aware<br />deployments<br />fast and effortless<br />dev and deployment on ruby<br />transfers only delta<br />devenv mess can overflow<br />admin-hell for IT/Ops<br />compiling native gems<br />
  7. Git<br />Pull<br />CI<br />Runs<br />Tests<br />Tests<br />Code<br />$ deploy 77ef185d7<br />$ deploy 77ef185d7<br />QA<br />Prod.<br />Staging<br />
  8. Git<br />Pull<br />Tests<br />CI<br />Runs<br />Tests<br />Code<br />$ deploy 77ef185d7<br />$ deploy 77ef185d7<br />QA<br />Staging<br />Production<br />
  9. CI<br />Runs<br />Tests<br />
  10. Git<br />Pull<br />Unit<br />Tests<br />CI<br />Perf<br />Tests<br />Functional<br />Tests<br />
  11. Git<br />Pull<br />Unit<br />Tests<br />CI<br />Functional<br />Tests<br />Push a Tag<br />tag: mainline-234<br />Perf<br />Tests<br />
  12. Git<br />Pull<br />Unit<br />Tests<br />CI<br />Functional<br />Tests<br />Perf<br />Tests<br />
  13. Git<br />CI<br />mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />
  14. mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />1<br />2<br />3<br />tag<br />Git<br />on remote<br />machine<br />on CI<br />machine<br />deploy<br />emit<br />consume<br />package<br />
  15. RPM<br />mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />tarball<br />war<br />2<br />1<br />tag<br />Git<br />rubygem<br />deb<br />3<br />on remote<br />machine<br />on CI<br />machine<br />deploy<br />emit<br />package<br />consume<br />
  16. tarball<br />better than a directory<br />extremely simple to setup<br />no metadata<br />
  17. RPM, deb<br />stored in a repository<br />standard locations -- /etc<br />first-class system service<br />effected by chef/puppet<br />toolchain expertise<br />maintain a repository<br />less common<br />
  18. rubygem<br />tarball with metadata<br />effected by chef/puppet<br />stored in a repository<br />maintain a gem repository<br />
  19. mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />upload to a repo<br />2<br />expose over<br />CI artifact API<br />1<br />tag<br />Git<br />3<br />on remote<br />machine<br />on CI<br />machine<br />deploy<br />emit<br />package<br />consume<br />
  20. mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />2<br />1<br />tag<br />Git<br />3<br />on remote<br />machine<br />on CI<br />machine<br />deploy<br />emit<br />package<br />consume<br />
  21. Config Management<br />gem install<br />yum install<br />apt-get install<br />
  22. /etc<br />my.cnf<br />httpd.conf<br />ssh_config<br />
  23. /etc<br />database.yml<br />.htaccess<br />private keys for external systems<br />
  24. /etc/myapp<br />First Class<br />Linux Application Software<br />
  25. bundle install --deployment<br />install to vendor/bundle<br />bundle install --without test development<br />bundle package<br />.gem files to vendor/cache<br />bundle install --local<br />
  26. Thanks!<br />@hyfather<br />@AjeyGore<br />