from 'legacy' to 'edge

Download From 'Legacy' to 'Edge

If you can't read please download the document

Upload: hiroshi-shibata

Post on 15-May-2015

258 views

Category:

Technology


1 download

TRANSCRIPT

  • 1. SHIBATA Hiroshi paperboy&co. asakusa.rb paperboy&co., Inc. Continuous Upgrades For Rails Apps. RedDotRubyConf 2013 2013-06-08(Sat) From 'Legacy' to 'Edge'

2. self 3. SHIBATA Hiroshi(@hsbt) 4. Rails Girls in Japan 5. asakusa.rb 6. asakusa.rb takoyaki! 7. asakusa.rb 8. Ruby Committer 9. Great News 10. ruby/www.ruby-lang.org 11. Please join us 12. http://bugs.ruby-lang.org 13. asakusarb/redmine4ruby-lang 14. http://30d.jp 15. from 2007/5 16. 280,000 users 174,000,000 photos 17. Our Rails app 44models 9000lines in controllers 220lines in routes.rb 18. system architecture 19. application server 20. storage api server 21. storage server 22. customer management 23. storage is over 400TB 24. Ruby 1.8.6 Rails 2.0.2 25. Rails in Kansas 26. Rails in Tokyo 27. Ruby 1.8.6 Rails 2.0.2 Ruby 2.0.0 Rails 3.2.13 28. RubyRubyRubyRuby 1.8.6 1.8.7 1.9 2.0 Rails 2.0/2.1 Rails 2.3 Rails 3.0 Rails 3.2 29. RubyRubyRubyRuby 1.8.6 1.8.7 1.9 2.0 Rails 2.0/2.1 Rails 2.3 Rails 3.0 Rails 3.2 30. RubyRubyRubyRuby 1.8.6 1.8.7 1.9 2.0 Rails 2.0/2.1 Rails 2.3 Rails 3.0 Rails 3.2 31. How to migrate edge rails from legacy rails? 32. Test to specify 33. Continuous Integration 34. staging environment 35. puppet 36. 1-8 deploy/day 37. Rails 2.0 Rails 2.3 38. Rails 2.0 Rails 2.3 hotx A migration A 39. Rails 2.0 Rails 2.3 hotx A migration A 40. Rails 2.0 Rails 2.3 hotx A migration A 41. offensive system operation 42. Zero Downtime Deploy 43. app1 app2 44. should not use slave-read in database caution 45. the basic of slave-read 46. cookpad/kage 47. Kage (kah-geh) is an HTTP shadow proxy server that sits between clients and your server(s) to enable "shadow requests". 48. the basic of kage real request 49. Kage::ProxyServer.start do |server| config = YAML.load_file(File.expand_path("../config.yml", __FILE__))[ENV['RAILS_ENV']] server.port = 8090 server.host = config[:host] server.debug = false # backends can share the same host/port server.add_master_backend(:production, config[:production], 8080) server.add_backend(:sandbox, config[:sandbox], 80) server.client_timeout = 15 server.backend_timeout = 10 # Dispatch all GET requests to multiple backends, otherwise only :production server.on_select_backends do |request, headers| if request[:method] == 'GET' && rand(9) == 0 [:production, :sandbox] else [:production] end end end 50. hsbt/puppet-kage 51. app1 app2 52. monitoring and alerting 53. newrelic 54. nagios 55. exception_notication 56. IRC github issue costomers contact nagios 57. munin 58. people 59. newcomer bootcamp sergeantsergeant sergeant 60. github and github:e 61. webistrano 62. confusion of programmer is causes of low productivity 63. RubyRubyRubyRuby 1.8.6 1.8.7 1.9 2.0 Rails 2.0/2.1 Rails 2.3 Rails 3.0 Rails 3.2 always on the edge is motivating 64. Ruby 1.8.7 Rails 2.3.18 Ruby 1.8.7 Rails 3.0.20 65. rails 2.3 with bundler 66. source 'https://rubygems.org' gem 'rails', '~> 2.3.18' gem 'rake', '~> 0.9.2' gem 'rdoc' gem 'rake-confirm' gem 'mysql' gem "mysql_retry_lost_connection" gem 'acts_as_paranoid', :github => 'paperboy-30days/acts_as_paranoid' gem 'passenger', '~> 3.0' gem 'memcache-client', :require => 'memcache' gem 'system_timer' gem 'yajl-ruby', :require => 'yajl' gem 'will_paginate', '~> 2.3' gem 'mail' gem 'sass' gem 'compass-rails' gem 'osaipo_client', :git => '[email protected]:paperboy-all/ osaipo_client.git', :branch => 'legacy' gem 'jugem_client', :git => '[email protected]:paperboy-all/ jugem_client.git' gem 'ppb_footer', :github => 'paperboy-all/ppb_footer' 67. require "./config/environment" use Rails::Rack::LogTailer use Rails::Rack::Static run ActionController::Dispatcher.new rack with rails 2.3 68. rails_upgrade plugin 69. 30days-front cant use hyphen cant use number cant convert application.rb... 70. conclusion 71. RubyRubyRubyRuby 1.8.6 1.8.7 1.9 2.0 Rails 2.0/2.1 Rails 2.3 Rails 3.0 Rails 3.2 72. high productivity 73. Lets enjoy around legacy system!!