Deployment Patterns in the Ruby on Rails World
-
Upload
nikhil-mungel -
Category
Technology
-
view
7.595 -
download
0
description
Transcript of Deployment Patterns in the Ruby on Rails World
![Page 1: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/1.jpg)
DEPLOYMENT PATTERNS
IN THE RUBY on RAILS WORLD
DEVOPSDAYS INDIA2 0 1 1
![Page 2: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/2.jpg)
Nikhil Mungel
@hyfather
Ajey Gore@AjeyGore
![Page 3: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/3.jpg)
ApacheApache
Apache
Passenger
ApacheRails
![Page 4: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/4.jpg)
/app/config/db/doc/lib/log/public/script/test/tmp/vendorconfig.ruREADMERakefile
* Ruby on Rails
![Page 5: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/5.jpg)
Local Repository
AppServer Pull Git
signal over SSH
run updated script
1
23Pull
AppServer
contains all scripts
![Page 6: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/6.jpg)
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
![Page 7: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/7.jpg)
GitCI
RunsTests
Tests
CodePull
QA
$ deploy 77ef185d7
$ deploy 77ef185d7
Staging Prod.
![Page 8: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/8.jpg)
GitCI
RunsTests
Tests
CodePull
QA Staging
Production
$ deploy 77ef185d7
$ deploy 77ef185d7
![Page 9: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/9.jpg)
CI
RunsTests
![Page 10: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/10.jpg)
UnitTests
FunctionalTests
PerfTests
CI
Git Pull
![Page 11: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/11.jpg)
UnitTests
FunctionalTests
PerfTests
CI
Git Pull
Push a Tag
tag: mainline-234
![Page 12: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/12.jpg)
UnitTests
FunctionalTests
PerfTests
CI
Git Pull
![Page 13: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/13.jpg)
CIGit
mainline unittests
functests
perftests
![Page 14: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/14.jpg)
mainline unittests
functests
perftests
deploy package emit consume
on remotemachine
Gittag
on CImachine
12
3
![Page 15: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/15.jpg)
mainline unittests
functests
perftests
deploy emit consume
on remotemachine
Gittag1
2
3on CImachine
package
RPM
rubygem
tarball
war
deb
![Page 16: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/16.jpg)
tarball
better than a directory
extremely simple to setup
no metadata
![Page 17: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/17.jpg)
RPM, debstored in a repository
standard locations -- /etc
first-class system service
effected by chef/puppet
toolchain expertise
less common
maintain a repository
![Page 18: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/18.jpg)
rubygem
maintain a gem repository
tarball with metadata
effected by chef/puppet
stored in a repository
![Page 19: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/19.jpg)
mainline unittests
functests
perftests
deploy consume
on remotemachine
Gittag1
2
3on CImachine
package emit
upload to a repo
expose overCI artifact API
![Page 20: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/20.jpg)
mainline unittests
functests
perftests
deploy
Gittag1
2
3on CImachine
emitpackage consume
on remotemachine
![Page 21: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/21.jpg)
gem install
yum install
apt-get install
Config Management
![Page 22: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/22.jpg)
my.cnf
ssh_config
httpd.conf
/etc
![Page 23: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/23.jpg)
database.yml
.htaccess
private keys for external systems
/etc
![Page 24: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/24.jpg)
First ClassLinux Application Software
/etc/myapp
![Page 25: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/25.jpg)
bundle install --without test development
bundle package
bundle install --deployment
install to vendor/bundle
.gem files to vendor/cache
bundle install --local
![Page 26: Deployment Patterns in the Ruby on Rails World](https://reader033.fdocuments.net/reader033/viewer/2022061212/5494c852b479596a4d8b4b97/html5/thumbnails/26.jpg)
Thanks!@hyfather @AjeyGore