DEPLOYMENT PATTERNSIN THE RUBY on RAILS WORLDDevopsdays India2011
Nikhil MungelAjey Gore@AjeyGore@hyfather
RailsApacheApacheApacheApachePassenger
* Ruby on Rails/app/config/db/doc/lib/log/public/script/test/tmp/vendorconfig.ruREADMERakefile
run updated scriptAppServerAppServerPullPullGit123signal over SSHLocal Repositorycontains all scripts
SCM-awaredeploymentsfast and effortlessdev and deployment on rubytransfers only deltadevenv mess can overflowadmin-hell for IT/Opscompiling native gems
GitPullCIRunsTestsTestsCode$ deploy 77ef185d7$ deploy 77ef185d7QAProd.Staging
GitPullTestsCIRunsTestsCode$ deploy 77ef185d7$ deploy 77ef185d7QAStagingProduction
CIRunsTests
GitPullUnitTestsCIPerfTestsFunctionalTests
GitPullUnitTestsCIFunctionalTestsPush a Tagtag: mainline-234PerfTests
GitPullUnitTestsCIFunctionalTestsPerfTests
GitCImainlineunittestsfunctestsperftests
mainlineunittestsfunctestsperftests123tagGiton remotemachineon CImachinedeployemitconsumepackage
RPMmainlineunittestsfunctestsperfteststarballwar21tagGitrubygemdeb3on remotemachineon CImachinedeployemitpackageconsume
tarballbetter than a directoryextremely simple to setupno metadata
RPM, debstored in a repositorystandard locations -- /etcfirst-class system serviceeffected by chef/puppettoolchain expertisemaintain a repositoryless common
rubygemtarball with metadataeffected by chef/puppetstored in a repositorymaintain a gem repository
mainlineunittestsfunctestsperftestsupload to a repo2expose overCI artifact API1tagGit3on remotemachineon CImachinedeployemitpackageconsume
mainlineunittestsfunctestsperftests21tagGit3on remotemachineon CImachinedeployemitpackageconsume
Config Managementgem installyum installapt-get install
/etcmy.cnfhttpd.confssh_config
/etcdatabase.yml.htaccessprivate keys for external systems
/etc/myappFirst ClassLinux Application Software
bundle install --deploymentinstall to vendor/bundlebundle install --without test developmentbundle package.gem files to vendor/cachebundle install --local
Thanks!@hyfather@AjeyGore

Deployment Patterns in the Ruby on Rails World

Editor's Notes

  • #16 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.
  • #20 API to provide LATEST, STABLE and so on…
  • #21 API to provide LATEST, STABLE and so on…
  • #22 Even the repo sources are in config mgmt.