From 'Legacy' to 'Edge'

543 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
543
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

From 'Legacy' to 'Edge'

  1. 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. 2. self
  3. 3. SHIBATA Hiroshi(@hsbt)
  4. 4. Rails Girls in Japan
  5. 5. asakusa.rb
  6. 6. asakusa.rb takoyaki!
  7. 7. asakusa.rb
  8. 8. Ruby Committer
  9. 9. Great News
  10. 10. ruby/www.ruby-lang.org
  11. 11. Please join us
  12. 12. http://bugs.ruby-lang.org
  13. 13. asakusarb/redmine4ruby-lang
  14. 14. http://30d.jp
  15. 15. from 2007/5
  16. 16. 280,000 users 174,000,000 photos
  17. 17. Our Rails app 44models 9000lines in controllers 220lines in routes.rb
  18. 18. system architecture
  19. 19. application server
  20. 20. storage api server
  21. 21. storage server
  22. 22. customer management
  23. 23. storage is over 400TB
  24. 24. Ruby 1.8.6 Rails 2.0.2
  25. 25. Rails in Kansas
  26. 26. Rails in Tokyo
  27. 27. Ruby 1.8.6 Rails 2.0.2 Ruby 2.0.0 Rails 3.2.13
  28. 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. 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. 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. 31. How to migrate edge rails from legacy rails?
  32. 32. Test to specify
  33. 33. Continuous Integration
  34. 34. staging environment
  35. 35. puppet
  36. 36. 1-8 deploy/day
  37. 37. Rails 2.0 Rails 2.3
  38. 38. Rails 2.0 Rails 2.3 hotfix A migration A
  39. 39. Rails 2.0 Rails 2.3 hotfix A migration A
  40. 40. Rails 2.0 Rails 2.3 hotfix A migration A
  41. 41. offensive system operation
  42. 42. Zero Downtime Deploy
  43. 43. app1 app2
  44. 44. should not use slave-read in database caution
  45. 45. the basic of slave-read
  46. 46. cookpad/kage
  47. 47. Kage (kah-geh) is an HTTP shadow proxy server that sits between clients and your server(s) to enable "shadow requests".
  48. 48. the basic of kage real request
  49. 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. 50. hsbt/puppet-kage
  51. 51. app1 app2
  52. 52. monitoring and alerting
  53. 53. newrelic
  54. 54. nagios
  55. 55. exception_notification
  56. 56. IRC github issue costomer’s contact nagios
  57. 57. munin
  58. 58. people
  59. 59. newcomer bootcamp sergeantsergeant sergeant
  60. 60. github and github:e
  61. 61. webistrano
  62. 62. confusion of programmer is causes of low productivity
  63. 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. 64. Ruby 1.8.7 Rails 2.3.18 Ruby 1.8.7 Rails 3.0.20
  65. 65. rails 2.3 with bundler
  66. 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 => 'git@github.com:paperboy-all/ osaipo_client.git', :branch => 'legacy' gem 'jugem_client', :git => 'git@github.com:paperboy-all/ jugem_client.git' gem 'ppb_footer', :github => 'paperboy-all/ppb_footer'
  67. 67. require "./config/environment" use Rails::Rack::LogTailer use Rails::Rack::Static run ActionController::Dispatcher.new rack with rails 2.3
  68. 68. rails_upgrade plugin
  69. 69. 30days-front can’t use hyphen can’t use number can’t convert application.rb...
  70. 70. conclusion
  71. 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. 72. high productivity
  73. 73. Let’s enjoy around legacy system!!

×