DEPLOYMENT PATTERNSIN THE RUBY on RAILS WORLD<br />Devopsdays India<br />2011<br />
Nikhil Mungel<br />Ajey Gore<br />@AjeyGore<br />@hyfather<br />
Rails<br />Apache<br />Apache<br />Apache<br />Apache<br />Passenger<br />
* Ruby on Rails<br />/app<br />/config<br />/db<br />/doc<br />/lib<br />/log<br />/public<br />/script<br />/test<br />/t...
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...
SCM-aware<br />deployments<br />fast and effortless<br />dev and deployment on ruby<br />transfers only delta<br />devenv ...
Git<br />Pull<br />CI<br />Runs<br />Tests<br />Tests<br />Code<br />$ deploy 77ef185d7<br />$ deploy 77ef185d7<br />QA<br...
Git<br />Pull<br />Tests<br />CI<br />Runs<br />Tests<br />Code<br />$ deploy 77ef185d7<br />$ deploy 77ef185d7<br />QA<br...
CI<br />Runs<br />Tests<br />
Git<br />Pull<br />Unit<br />Tests<br />CI<br />Perf<br />Tests<br />Functional<br />Tests<br />
Git<br />Pull<br />Unit<br />Tests<br />CI<br />Functional<br />Tests<br />Push a Tag<br />tag: mainline-234<br />Perf<br ...
Git<br />Pull<br />Unit<br />Tests<br />CI<br />Functional<br />Tests<br />Perf<br />Tests<br />
Git<br />CI<br />mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />
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 rem...
RPM<br />mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />tarball<br />war<br />2<br />1<br />...
tarball<br />better than a directory<br />extremely simple to setup<br />no metadata<br />
RPM, deb<br />stored in a repository<br />standard locations -- /etc<br />first-class system service<br />effected by chef...
rubygem<br />tarball with metadata<br />effected by chef/puppet<br />stored in a repository<br />maintain a gem repository...
mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />upload to a repo<br />2<br />expose over<br /...
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 rem...
Config Management<br />gem install<br />yum install<br />apt-get install<br />
/etc<br />my.cnf<br />httpd.conf<br />ssh_config<br />
/etc<br />database.yml<br />.htaccess<br />private keys for external systems<br />
/etc/myapp<br />First Class<br />Linux Application Software<br />
bundle install --deployment<br />install to vendor/bundle<br />bundle install --without test development<br />bundle packa...
Thanks!<br />@hyfather<br />@AjeyGore<br />
Upcoming SlideShare
Loading in...5
×

Deployment Patterns in the Ruby on Rails World

7,920

Published on

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

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
7,920
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
14
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • Single file instead of managing the entire src code as a folder.Should not contain files like .htaccess or db.yml, but contain symlinks for these.
  • API to provide LATEST, STABLE and so on…
  • API to provide LATEST, STABLE and so on…
  • Even the repo sources are in config mgmt.
  • Deployment Patterns in the Ruby on Rails World

    1. 1. DEPLOYMENT PATTERNSIN THE RUBY on RAILS WORLD<br />Devopsdays India<br />2011<br />
    2. 2. Nikhil Mungel<br />Ajey Gore<br />@AjeyGore<br />@hyfather<br />
    3. 3. Rails<br />Apache<br />Apache<br />Apache<br />Apache<br />Passenger<br />
    4. 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 />config.ru<br />README<br />Rakefile<br />
    5. 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. 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. 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. 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. 9. CI<br />Runs<br />Tests<br />
    10. 10. Git<br />Pull<br />Unit<br />Tests<br />CI<br />Perf<br />Tests<br />Functional<br />Tests<br />
    11. 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. 12. Git<br />Pull<br />Unit<br />Tests<br />CI<br />Functional<br />Tests<br />Perf<br />Tests<br />
    13. 13. Git<br />CI<br />mainline<br />unit<br />tests<br />func<br />tests<br />perf<br />tests<br />
    14. 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. 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. 16. tarball<br />better than a directory<br />extremely simple to setup<br />no metadata<br />
    17. 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. 18. rubygem<br />tarball with metadata<br />effected by chef/puppet<br />stored in a repository<br />maintain a gem repository<br />
    19. 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. 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. 21. Config Management<br />gem install<br />yum install<br />apt-get install<br />
    22. 22. /etc<br />my.cnf<br />httpd.conf<br />ssh_config<br />
    23. 23. /etc<br />database.yml<br />.htaccess<br />private keys for external systems<br />
    24. 24. /etc/myapp<br />First Class<br />Linux Application Software<br />
    25. 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. 26. Thanks!<br />@hyfather<br />@AjeyGore<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×