Upgrade to Pro — share decks privately, control downloads, hide ads and more …

esa.ioの育て方

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

fukayatsu

February 23, 2018
Tweet

More Decks by fukayatsu

Other Decks in Technology

Transcript

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

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

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

    User About esa.io • MarkdownܗࣜͰॻ͚ΔɺνʔϜͷͨΊͷ৘ใڞ༗πʔϧ • ೔ใɾٞࣄ࿥ɾϝϞɾΞΠσΞɾ࢓༷ॻɾاըॻ౳ɺνʔϜͰͷυ Ωϡϝϯτڞ༗Ͱར༻
  4. 8 • ݱࡏɺ2,000νʔϜҎ্͕༗ྉར༻ • ITاۀΛத৺ͱͨ͠ձࣾɾஂମɾݸਓʢن໛: 1ਓʙ300ਓఔ౓ʣ • ΤϯδχΞɾσβΠφʔΛத৺ʹɺاըɾӦۀ৬ɾࣄ຿ܥͷํ΋ར༻ • ݸਓ΍͝Ոఉɺझຯͷஂମ΋ଟ਺

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

    esaͷγεςϜߏ੒ (10෼) • [ ] esaͷػೳ͝ͱͷ࣮૷ํ๏ (15෼) • [ ] esaͷϢʔβʔαϙʔτ (5෼) • [ ] esaͱϞνϕʔγϣϯ (5෼) 13
  6. جຊతͳઓུ • ࠷৽ͷRuby/RailsΛ࢖͏ • 2018/02/16࣌఺ͰRuby 2.5.0 / Rails 5.1.5 •

    ຖ೔ɺ൒ࣗಈͰBundle Update͢Δ • ܧଓతʹ΍ͬͨ΄͏͕݁Ռతʹָ • ։ൃͷϦζϜʹ΋ͳΔ 16
  7. 2014 ~ 2016 • Heroku (US region) • 2X dyno

    Λ 2~5ݸ • ໷ؒ΍ٳ೔ʹdynoΛগͳͯ͘͠અ໿ • ϦϦʔε͔Β2೥ऑͷؒΠϯϑϥʹ͍ͭͯ೰ ·͞ΕΔ͜ͱ͕গͳͯ͘ຊ౰ʹॿ͔ͬͨ 17
  8. 2014 ~ 2016 • Heroku (US region) • ຊ֨తʹར༻͞ΕΔʹͭΕɺϨΠςϯγ͕ ਏ͘ͳ͖ͬͯͨ

    • Enterpriseܖ໿͢Ε͹Tokyo region΋࢖͑ ͦ͏͕ͩͬͨɺྉۚతʹஅ೦ 18
  9. Ҡߦޙͷߏ੒ • AWS ECS (Tokyo region) • Railsίϯςφ x 4ɺSidekiqίϯςφ

    x 1 • db:migrate࣌ʹ͸ຖճ৽نʹίϯςφΛى ಈˠഇغ 21
  10. Ҡߦޙͷߏ੒ • AWS ECS (Tokyo region) • ϖʔδͷදࣔ଎౓͕1/2 ~ 1/3ఔ౓·Ͱվળ

    • Ͱ͖Δ͚ͩHeroku࣌୅ͱಉ͡Α͏ͳ։ൃ͕ଓ͚ΒΕ ΔΑ͏ʹ޻෉ • masterϚʔδͰࣗಈσϓϩΠ • ίϯςφͷ਺͕ҰఆʹอͨΕΔ 22
  11. ֤ίϯςφʹ͍ͭͯ • Rails / Sidekiq ίϯςφ (2016/03 ~) • PlantUML

    ίϯςφ (2016/10 ~) • ܾࡁܥίϯςφ (2017/02 ~) 23
  12. Rails / Sidekiq ίϯςφ • ී௨ͷRails / Sidekiq app •

    ݩʑHeroku্Ͱಈ͍͍ͯͨesa.ioͷຊମ • ಉ͡Docker ImageͰىಈΦϓγϣϯͰweb/ workerΛ੾Γସ͑ • ಈ͍͍ͯΔίϯςφ਺͸Rails: 4ɺSidekiq: 1 24
  13. PlantUML ίϯςφ 26 • PlantUML͸Java੡ • Javaͷαʔόͷϝϯς͸ͨ͘͠ͳ͍ɻɻɻ • JRuby +

    Sinatra + PumaͰ࣮૷ • ςΩετΛड͚औͬͯsvgΛฦ͚ͩ͢ • ։ൃ։͔࢝Β1೔ఔ౓ͰϦϦʔε
  14. ΧςΰϦػೳ • ܦ࿏ྻڍϞσϧͰ࣮૷ 34 DBUFHPSJFTςʔϒϧ JE QBUI  GPP 

    GPPCBS UJUMF GPPهࣄ GPPCBSهࣄ GPPCBSهࣄ QPTUTςʔϒϧ JE OBNF DBUFHPSZ@JE  هࣄ   هࣄ   هࣄ 
  15. ΧςΰϦػೳ 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/%’