deployment patterns in the ruby on rails world
DESCRIPTION
Nikhil Mungel and Ajey Gore from ThoughtWorks presented this at DevOpsDays Bangalore 2011.TRANSCRIPT
DEPLOYMENT PATTERNS
IN THE RUBY on RAILS WORLD
DEVOPSDAYS INDIA2 0 1 1
Nikhil Mungel
@hyfather
Ajey Gore@AjeyGore
ApacheApache
Apache
Passenger
ApacheRails
/app/config/db/doc/lib/log/public/script/test/tmp/vendorconfig.ruREADMERakefile
* Ruby on Rails
Local Repository
AppServer Pull Git
signal over SSH
run updated script
1
23Pull
AppServer
contains all scripts
SCM-awaredeployments
fast and effortless
dev and deployment on ruby
transfers only delta
dev env mess can overflow
compiling native gemsadmin-hell for IT/Ops
GitCI
RunsTests
Tests
CodePull
QA
$ deploy 77ef185d7
$ deploy 77ef185d7
Staging Prod.
GitCI
RunsTests
Tests
CodePull
QA Staging
Production
$ deploy 77ef185d7
$ deploy 77ef185d7
CI
RunsTests
UnitTests
FunctionalTests
PerfTests
CI
Git Pull
UnitTests
FunctionalTests
PerfTests
CI
Git Pull
Push a Tag
tag: mainline-234
UnitTests
FunctionalTests
PerfTests
CI
Git Pull
CIGit
mainline unittests
functests
perftests
mainline unittests
functests
perftests
deploy package emit consume
on remotemachine
Gittag
on CImachine
12
3
mainline unittests
functests
perftests
deploy emit consume
on remotemachine
Gittag1
2
3on CImachine
package
RPM
rubygem
tarball
war
deb
tarball
better than a directory
extremely simple to setup
no metadata
RPM, debstored in a repository
standard locations -- /etc
first-class system service
effected by chef/puppet
toolchain expertise
less common
maintain a repository
rubygem
maintain a gem repository
tarball with metadata
effected by chef/puppet
stored in a repository
mainline unittests
functests
perftests
deploy consume
on remotemachine
Gittag1
2
3on CImachine
package emit
upload to a repo
expose overCI artifact API
mainline unittests
functests
perftests
deploy
Gittag1
2
3on CImachine
emitpackage consume
on remotemachine
gem install
yum install
apt-get install
Config Management
my.cnf
ssh_config
httpd.conf
/etc
database.yml
.htaccess
private keys for external systems
/etc
First ClassLinux Application Software
/etc/myapp
bundle install --without test development
bundle package
bundle install --deployment
install to vendor/bundle
.gem files to vendor/cache
bundle install --local
Thanks!@hyfather @AjeyGore