esa.ioの育て方

Ffdf2b0baba2980a90923978cf32a6ca?s=47 fukayatsu
February 23, 2018

 esa.ioの育て方

Ruby Business Users Conference 2018
2018-02-23 (Fri) 14:00 - 17:00

http://www.ruby.or.jp/rbuc2018/
https://rubyassociation.doorkeeper.jp/events/69247

Ffdf2b0baba2980a90923978cf32a6ca?s=128

fukayatsu

February 23, 2018
Tweet

Transcript

  1. 2.

    2 • ߹ಉձࣾ esa • ߹ܭ3໊ • ΤϯδχΞ2໊ • σβΠφʔ1໊

    • શһ͕ίʔυΛॻ͘ • શһ͕ձࣾ୅ද • ૑ۀ4೥໨
  2. 6.

    6

  3. 7.

    7 • ݱࡏɺ໿2,200νʔϜ͕ར༻த • ITاۀΛத৺ͱͨ͠ձࣾɾஂମɾݸਓʢن໛: 1ਓʙ300ਓఔ౓ʣ • ΤϯδχΞɾσβΠφʔΛத৺ʹɺاըɾӦۀ৬ɾࣄ຿ܥͷํ΋ར༻ • ݸਓ΍͝Ոఉɺେֶͷݚڀࣨɺझຯͷஂମ΋ଟ਺

    User About esa.io • MarkdownܗࣜͰॻ͚ΔɺνʔϜͷͨΊͷ৘ใڞ༗πʔϧ • ೔ใɾٞࣄ࿥ɾϝϞɾΞΠσΞɾ࢓༷ॻɾاըॻ౳ɺνʔϜͰͷυ Ωϡϝϯτڞ༗Ͱར༻
  4. 8.

    8 • ݱࡏɺ2,000νʔϜҎ্͕༗ྉར༻ • ITاۀΛத৺ͱͨ͠ձࣾɾஂମɾݸਓʢن໛: 1ਓʙ300ਓఔ౓ʣ • ΤϯδχΞɾσβΠφʔΛத৺ʹɺاըɾӦۀ৬ɾࣄ຿ܥͷํ΋ར༻ • ݸਓ΍͝Ոఉɺझຯͷஂମ΋ଟ਺

    User Concept: ৘ใΛɺҭ͍ͯͨɻ • υΩϡϝϯτ͸࠷ॳ͔Β׬ᘳͰ͸ͳ͘ɺ࣌ؒΛ͔͚ͯΑ͍΋ͷʹҭ͍ͬͯ͘ • ݸਓ͕ΏΔ͍ΞΠσΞΛग़͠΍͘͢ɺΈΜͳͰܧଓతʹվળ͠΍͍͢࢓૊Έ • ্͔Βͷԡ͠෇͚Ͱ͸ͳ͘ϘτϜΞοϓͰࣗൃతʹ৘ใൃ৴͢ΔΑ͏ʹͳΔ ͜ͱ͕ɺΑΓ͍͖͍͖ͱͨࣗ͠཯తͳνʔϜͮ͘Γʹͭͳ͕Δ
  5. 13.

    ࠓ೔͓࿩͍ͨ͜͠ͱ • [x] esaͱesa LLC ʹ͍ͭͯ (5෼) • [ ]

    esaͷγεςϜߏ੒ (10෼) • [ ] esaͷػೳ͝ͱͷ࣮૷ํ๏ (15෼) • [ ] esaͷϢʔβʔαϙʔτ (5෼) • [ ] esaͱϞνϕʔγϣϯ (5෼) 13
  6. 16.

    جຊతͳઓུ • ࠷৽ͷRuby/RailsΛ࢖͏ • 2018/02/16࣌఺ͰRuby 2.5.0 / Rails 5.1.5 •

    ຖ೔ɺ൒ࣗಈͰBundle Update͢Δ • ܧଓతʹ΍ͬͨ΄͏͕݁Ռతʹָ • ։ൃͷϦζϜʹ΋ͳΔ 16
  7. 17.

    2014 ~ 2016 • Heroku (US region) • 2X dyno

    Λ 2~5ݸ • ໷ؒ΍ٳ೔ʹdynoΛগͳͯ͘͠અ໿ • ϦϦʔε͔Β2೥ऑͷؒΠϯϑϥʹ͍ͭͯ೰ ·͞ΕΔ͜ͱ͕গͳͯ͘ຊ౰ʹॿ͔ͬͨ 17
  8. 18.

    2014 ~ 2016 • Heroku (US region) • ຊ֨తʹར༻͞ΕΔʹͭΕɺϨΠςϯγ͕ ਏ͘ͳ͖ͬͯͨ

    • Enterpriseܖ໿͢Ε͹Tokyo region΋࢖͑ ͦ͏͕ͩͬͨɺྉۚతʹஅ೦ 18
  9. 21.

    Ҡߦޙͷߏ੒ • AWS ECS (Tokyo region) • Railsίϯςφ x 4ɺSidekiqίϯςφ

    x 1 • db:migrate࣌ʹ͸ຖճ৽نʹίϯςφΛى ಈˠഇغ 21
  10. 22.

    Ҡߦޙͷߏ੒ • AWS ECS (Tokyo region) • ϖʔδͷදࣔ଎౓͕1/2 ~ 1/3ఔ౓·Ͱվળ

    • Ͱ͖Δ͚ͩHeroku࣌୅ͱಉ͡Α͏ͳ։ൃ͕ଓ͚ΒΕ ΔΑ͏ʹ޻෉ • masterϚʔδͰࣗಈσϓϩΠ • ίϯςφͷ਺͕ҰఆʹอͨΕΔ 22
  11. 23.

    ֤ίϯςφʹ͍ͭͯ • Rails / Sidekiq ίϯςφ (2016/03 ~) • PlantUML

    ίϯςφ (2016/10 ~) • ܾࡁܥίϯςφ (2017/02 ~) 23
  12. 24.

    Rails / Sidekiq ίϯςφ • ී௨ͷRails / Sidekiq app •

    ݩʑHeroku্Ͱಈ͍͍ͯͨesa.ioͷຊମ • ಉ͡Docker ImageͰىಈΦϓγϣϯͰweb/ workerΛ੾Γସ͑ • ಈ͍͍ͯΔίϯςφ਺͸Rails: 4ɺSidekiq: 1 24
  13. 26.

    PlantUML ίϯςφ 26 • PlantUML͸Java੡ • Javaͷαʔόͷϝϯς͸ͨ͘͠ͳ͍ɻɻɻ • JRuby +

    Sinatra + PumaͰ࣮૷ • ςΩετΛड͚औͬͯsvgΛฦ͚ͩ͢ • ։ൃ։͔࢝Β1೔ఔ౓ͰϦϦʔε
  14. 28.
  15. 34.

    ΧςΰϦػೳ • ܦ࿏ྻڍϞσϧͰ࣮૷ 34 DBUFHPSJFTςʔϒϧ JE QBUI  GPP 

    GPPCBS UJUMF GPPهࣄ GPPCBSهࣄ GPPCBSهࣄ QPTUTςʔϒϧ JE OBNF DBUFHPSZ@JE  هࣄ   هࣄ   هࣄ 
  16. 35.

    ΧςΰϦػೳ 35 DBUFHPSJFTςʔϒϧ JE QBUI  GPP  GPPCBS QPTUTςʔϒϧ

    JE OBNF DBUFHPSZ@JE  هࣄ   هࣄ   هࣄ  “foo/bar” ΧςΰϦ಺ͷهࣄݕࡧ: select * from posts join categories on categories.id = posts.category_id where categories.path like ‘foo/bar/%’
  17. 67.
  18. 69.