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

サービス開発と健全なプロダクトメンテナンスを開発チームで持続的に取り組む / Developers Boost KANSAI

astj
June 15, 2019

サービス開発と健全なプロダクトメンテナンスを開発チームで持続的に取り組む / Developers Boost KANSAI

astj

June 15, 2019
Tweet

More Decks by astj

Other Decks in Technology

Transcript

  1. αʔϏε։ൃͱ
    ݈શͳϓϩμΫτϝϯςφϯεΛ
    ։ൃνʔϜͰ࣋ଓతʹऔΓ૊Ή
    2019/06/15 Developers Boost KANSAI
    Asato WAKISAKA (astj)

    View full-size slide

  2. id:astjʢ͋͞ͱ͐͡ʔʣ
    ͸ͯͳ ΞϓϦέʔγϣϯΤϯδχΞ
    ৽ଔ (2014/04)
    Mackerel ։ൃνʔϜ (2016/08~)
    Mackerel ςοΫϦʔυ (2018/05~)
    มભ: ͸ͯͳϒοΫϚʔΫ‎͸ͯͳϒϩά
    ➡डୗϓϩδΣΫτ➡Mackerel

    View full-size slide

  3. • 2014೥9݄ਖ਼ࣜϦϦʔε
    • ͔ͦ͜ΒຖिʢຖӦۀिʣͷ৽ػೳϦϦʔε
    • 200+िଓ͚·ͨ͠
    • Ҏ߱΋ΞΫςΟϒʹػೳ։ൃΛܧଓ
    https://mackerel.io/ja/blog/entry/announcement/20180705

    View full-size slide

  4. • αʔόʔαΠυ: Scala / Go
    • ϑϩϯτΤϯυ: TypeScript + AngularJS
    • ػցֶशαϒγεςϜ: Python
    • AWS Lambda : NodeJS ੝୔ࢁ

    View full-size slide

  5. ຊ೔ͷத਎
    • ࠓ೔࿩͢ϓϩμΫτϝϯςφϯεͷఆٛ
    • Mackerel ։ൃνʔϜͰͷՁ஋؍
    • Mackerel ։ൃνʔϜͷऔΓ૊Έ

    View full-size slide

  6. ϓϩμΫτϝϯςφϯε

    View full-size slide

  7. • ʢΤϯδχΞͷ΍Δ͜ͱͷ͏ͪʣ
    • ϦϑΝΫλϦϯά
    • ґଘιϑτ΢ΣΞͷߋ৽
    • Πϯϑϥɺϛυϧ΢ΣΞͷߋ৽
    ʮػೳ։ൃҎ֎͍͍ͩͨશ෦ʯ

    View full-size slide

  8. ٕज़తෛ࠴ͷ͜ͱʁ

    View full-size slide

  9. ์ஔͯ͠෗ΒͤΔͱٕज़తෛ࠴
    ੵۃతʹऔΓ૊Ήͱརӹ͕͋Δ

    View full-size slide

  10. ৽͍͠෺͸ྑ͍

    View full-size slide

  11. ιϑτ΢ΣΞ͸৽͘͢͠Δͱྑ͘
    ͳ͍ͬͯ͘ͱࢥ͍ͨ͘ͳ͍Ͱ͔͢ʁɹ
    ࣮ͦͯ͠ࡍଟ͘ͷ৔߹͸੒Γཱͭ͸ͣ

    View full-size slide

  12. ৽͍͠෺͸ྑ͍
    • ػೳͷ௥Ճ
    • ෆ۩߹ͷमਖ਼

    • ੑೳͷ޲্

    • etc…

    View full-size slide

  13. όʔδϣϯΞοϓ͕ۜͷ஄ؙ
    ……ʹͳΔ͜ͱ΋͋Δ

    View full-size slide

  14. • Scala ͷίϯύΠϧ͸஗͍ͱݴΘΕΔ
    • ࣮ࡍ Mackerel Ͱ΋೰·͞Ε͖ͯͨ

    View full-size slide

  15. • Scala 2.11.12 ➡ 2.12.6
    • ϑϧίϯύΠϧ 30෼ ➡ 5෼൒
    • CI 40~50෼ ➡ 16෼
    • push ͢Δͨͼʹ͜Ε͚ͩ଴ͬͯͨ…
    • ࠓࢥ͏ͱੲͷॴཁ࣌ؒϠό͍

    View full-size slide

  16. ৽͘͢͠Δඞཁ͋ΔΜͰ͢ʁ
    ʮࠓͷ··Ͱ໰୊ͳ͘ಈ͍ͯΔ͡ΌΜʁʯ
    ʮมߋରԠ͢Δͷ΋खؒͩ͠…ʯ
    ʮ͏ͪͷίϯύΠϧ30෼͔͔Βͳ͍ΜͰ…ʯ
    ʮಈ࡞֬ೝ͢Δͷେมʂʯ

    View full-size slide

  17. ͦΕ΋Θ͔Δ

    View full-size slide

  18. ྑ͠ѱ͠Ͳ͜Ζ͡Όͳ͍ྫ
    • όά
    • ηΩϡϦςΟ໰୊
    • αϙʔτऴྃ

    View full-size slide

  19. ಀ͛੾ΕΔ͔Ͳ͏͔
    • ख͕཭ΕΔ·Ͱಀ͛੾ΕͨΒউͪ
    • ʮೲ඼ͯ͠׬ྃʯʮӡ༻ظ͕ؒݶఆʯ͸༗ར
    • ʮಀ͛੾ΕΔํʹṌ͚·͔͢ʁʯ
    • ಀ͛੾Δલʹߋ৽͕ආ͚ΒΕͳ͘ͳͬͨΒʁ

    View full-size slide

  20. ߋ৽ͷखؒ
    • ಥવͷେ͖ͳมߋ͸ඇৗʹ͠ΜͲ͍ʂʂ
    • ܭըతʹ৽͍ͯ͘͘͠͠ͱେδϟϯϓճආ
    • ʢܭըతʹ΍ͬͯ΋݁ہେδϟϯϓͷ͜ͱ΋…ʣ

    View full-size slide

  21. => ϦεΫϔοδͱͯ͠ͷ
    ܭըతͳߋ৽
    ʢͱ͍͏໘΋͋Δʣ

    View full-size slide

  22. ߋ৽ͷखؒ
    • ಥવͷେ͖ͳมߋ͸ඇৗʹ͠ΜͲ͍ʂʂ
    • ܭըతʹ৽͍ͯ͘͘͠͠ͱେδϟϯϓճආ
    • ʢܭըతʹ΍ͬͯ΋݁ہେδϟϯϓͷ͜ͱ΋…ʣ

    View full-size slide

  23. • ීஈͷ։ൃʹ͓͚ΔՁ஋؍Λ౿ऻ͢Δ
    • খཻ͍͞౓ͰͷϦϦʔεΛੵΈॏͶ͍ͯ͘
    • ڊେͳϓϧϦΫΤετ࡞Βͣ෼ׂ͍ͯ͘͠
    • ཁ͸มʹಛผѻ͍͢Δ͜ͱͳ͍Ͷͱ͍͏࿩

    View full-size slide

  24. ޻਺ͳ͍໰୊
    • ػೳ։ൃ༏ઌ͞Εͯ͠·͏ɺͳͲ
    • ։ൃܭըଆͱՁ஋؍Λڞ༗Ͱ͖Ε͹ྑ͍
    • Mackerel ͷ৔߹͸ΤϯδχΞ͕ଟ͍
    • ͜ͷղ͸͋·Γ࣋ͬͯͳ͍Ͱ͢……

    View full-size slide

  25. ࣮ࡍͷऔΓ૊Έ

    View full-size slide

  26. •৽ͨʹߟ͑Δ͜ͱ / ൑அ͢Δ͜ͱ͕ग़ݱ
    •վΊͯνʔϜঢ়گΛ࠶֬ೝ
    ςοΫϦʔυʹͳͬͨ (2018/05)

    View full-size slide

  27. લఏ
    • εΫϥϜ
    • 2िؒεϓϦϯτ
    • εϓϦϯτͷ౓ʹόοΫϩάΛؔ܎ऀͰ੔ཧ
    • ௕ظతʹ͸̏ϲ೥ϩʔυϚοϓ
    • ̏ϲ݄͝ͱʹݟ௚͠

    View full-size slide

  28. • খ͍͞λεΫʢ1εϓϦϯτ͘Β͍ʣ
    • XXX ͷίʔυϦϑΝΫλϦϯά͍ͨ͠
    • ͋ͷαʔόʔΛೖΕସ͑ͳ͍ͱ͍͚ͳ͍
    • ͓͓͖ͳ࿩୊
    • Play Framework ͷόʔδϣϯΞοϓ
    • Redis Λ ElastiCache ʹҠߦ͢Δ
    ৭ʑͳϓϩμΫτϝϯςφϯε

    View full-size slide

  29. ݩʑ (astj TL ब೚௚ޙ)

    View full-size slide

  30. Α͍͜ͱ
    • ΍Δ΂͖͜ͱ͸ΈΜͳͷ೴ཪʹ֓Ͷ͋Δ
    • ϝϯςφϯεʹϦιʔεΛׂ͖͍ͨҙࣝ͸͋Δ
    • ʮ৽͍͠෺͸ྑ͍ʯ
    • ΤϯδχΞʹݶΒͣνʔϜϨϕϧͰ࣋ͬͯΔ
    • ҙࣝͷߴ͞ͱؾ߹ͰͦΕͳΓʹਐΜͰΔ

    View full-size slide

  31. ͓ࠔΓ
    • λεΫʹ૊৫తʹऔΓ૊ΉྲྀΕ͕ະ੔උ
    • ݸਓͷؤுΓۦಈ͕ଟ͍
    • ҙࣝͷߴ͞ͱؾ߹པΈ
    • ࣋ଓੑ͕ͳ͍ʢؾ߹͕࣋ͯ͹࣋ଓ͢Δ…ʣ

    View full-size slide

  32. • ΞϓϦ͸ TL, SM, PO ͰόοΫϩάͱͯ͠੔ཧ
    • ىථ͸ issue Ͱ୭Ͱ΋Ͱ͖Δ
    • ੔ཧ͢ΔձͰ͓ΓΌͬͱܾΊͯͨ
    • Πϯϑϥ͸ SRE ʹλεΫ؅ཧ͓೚ͤ

    View full-size slide

  33. • ϩʔυϚοϓʹج൫ܥλεΫͱͯ͠Ճ͑Δ
    • SM ͱ PO ͕ issue ͔ΒงғؾͰर͍ͬͯͨ

    View full-size slide

  34. • ΤϯδχΞ͕༨ྗͱؾ෼ɾؾ߹Ͱߋ৽͢Δ
    • ґଘϥΠϒϥϦͷߋ৽ͱ͔

    View full-size slide

  35. astj TL ब೚(2018/05)

    View full-size slide

  36. ͜ΕܾΊΒΕͳ͘ͳ͍ʁ

    View full-size slide

  37. • ΞϓϦ͸ TL, SM, PO ͰόοΫϩάͱͯ͠੔ཧ
    • ىථ͸ issue Ͱ୭Ͱ΋Ͱ͖Δ
    • ੔ཧ͢ΔձͰ͓ΓΌͬͱܾΊͯͨ
    • Πϯϑϥ͸ SRE ʹλεΫ؅ཧ͓೚ͤ

    View full-size slide

  38. • όοΫϩά੔ཧͷͦͷ৔Ͱ൑அͰ͖ͳ͍
    • ʮ΍ͬͨ΄͏͕͍͍Ͱ͢Ͷʯ͸ݴ͑Δ
    • ʮ༏ઌ౓Ͳ͏Ͱ͔͢ʯʹ౴͕͑ग़ͳ͍
    • ຊདྷ͸ΤϯδχΞͷ૯ҙʢʁʣͷ൑அͰ͸
    • ΤϯδχΞΛ୅දͯ͠੔ཧͷ৔ʹग़ͯΔ

    View full-size slide

  39. • ϩʔυϚοϓʹج൫ܥλεΫͱͯ͠Ճ͑Δ
    • SM ͱ PO ͕ issue ͔ΒงғؾͰर͍ͬͯͨ

    View full-size slide

  40. • ;Θͬͱͯ͠Δʂʂʂʂʂʂʂʂʂ
    • ΤϯδχΞ͕ͪΌΜͱؔ༩͍ͨ͠
    • ໪࿦ϩʔυϚοϓͳͷͰަব΍ௐ੔͸͢Δɹ

    View full-size slide

  41. ܾΊΔͨΊʹԿ͕ඞཁʁ

    View full-size slide

  42. ϓϩμΫτϝϯςφϯεͷλεΫ؅ཧ

    View full-size slide

  43. • ΤϯδχΞϦϯάλεΫͷ༏ઌ౓Λ؅ཧ͍ͨ͠
    • ͦͯ͠ΤϯδχΞ಺Ͱٞ࿦͍ͨ͠
    • ࠷ऴతͳλεΫ؅ཧ͸νʔϜશମ
    • খͳΒόοΫϩά΁ / େͷ࿩͸ޙड़ʂ
    • λεΫΛೋॏ؅ཧͨ͘͠ͳ͍ʢϜμʣ
    ➡όοΫϩά / ϩʔυϚοϓͷલஈ֊Λ؅ཧ

    View full-size slide

  44. • GitHub Project ʹ issue ΛूΊΔ
    • ʮػೳ։ൃλεΫ͸ೖΕͳ͍ʯ͕ϧʔϧ
    • νʔϜશମͷλεΫ؅ཧͱ͸ผͷϘʔυ
    • ఆظతʹΤϯδχΞͰ༏ઌ౓Λ͚ͭΔ
    • ༏ઌ౓௿͍ͱ์ྲྀʢؾ͕޲͍ͨΒ΍ͬͯʂʣ

    View full-size slide

  45. • খʢεΫϥϜͷόοΫϩάʹՃ͑Δʣ
    • νʔϜͷόοΫϩά੔ཧͰϘʔυΛݩʹ࿩͢
    • େʢϩʔυϚοϓʹ૊ΈࠐΉʣ
    • ϩʔυϚοϓΛࡦఆ͢Δձٞʹ TL ΋ग़Δ

    View full-size slide

  46. ͜ΕܾΊΒΕͳ͘ͳ͍ʁ
    ղܾ

    View full-size slide

  47. • ΞϓϦ͸ TL, SM, PO ͰόοΫϩάͱͯ͠੔ཧ
    • ىථ͸ issue Ͱ୭Ͱ΋Ͱ͖Δ
    • ੔ཧ͢ΔձͰ͓ΓΌͬͱܾΊͯͨ
    • Πϯϑϥ͸ SRE ʹλεΫ؅ཧ͓೚ͤ

    View full-size slide

  48. • SRE ΋ΤϯδχΞձʹࢀՃͯ͠૭ޱ౷Ұ
    • ΤϯδχΞΈΜͳͰ՝୊ʹऔΓ૊Ή
    • αʔόʔͷߋ৽΋ιϑτ΢ΣΞͷߋ৽΋ಉྻ
    Ұॹʹ΍Ζ͏͡ΌΜ

    View full-size slide

  49. • ΤϯδχΞ͕༨ྗͱؾ෼ɾؾ߹Ͱߋ৽͢Δ
    • ґଘϥΠϒϥϦͷߋ৽ͱ͔

    View full-size slide

  50. => ϦεΫϔοδͱͯ͠ͷ
    ܭըతͳߋ৽
    ʢͱ͍͏໘΋͋Δʣ
    ࠶ܝ

    View full-size slide

  51. • αʔόʔαΠυ: Scala / Go
    • ϑϩϯτΤϯυ: TypeScript + AngularJS
    • ػցֶशαϒγεςϜ: Python
    • AWS Lambda : NodeJS ੝୔ࢁ
    ࠶ܝ

    View full-size slide

  52. • ϝϯόʔʹΑΓಘखෆಘख͕͋Δ
    • ΋Γͩ͘͞Μ
    • ܭըతʹফԽ͢Δͱେྔͷ issue ͕ग़ݱ

    View full-size slide

  53. ʢݸਓʣ
    ؾ߹େ޷͖ʂʂʂʂʂ

    View full-size slide

  54. ʢTLʣ
    ؾ߹΍Ί͍ͨʂʂʂʂ

    View full-size slide

  55. ×TL͕ҟৗʹ͕Μ͹Δ
    ×ಛఆͷ୭͔͕ҟৗʹ͕Μ͹Δ
    ʓνʔϜͰ࣋ଓతʹ͕Μ͹Δ

    View full-size slide

  56. • ҆ఆతʹϥΠϒϥϦΛߋ৽͍ͨ͠
    • νʔϜͰऔΓ૊ΜͰ͍͖͍ͨ
    • ຖि issue ݐͯΔͷେมͰ͸
    • ʢਐḿ؅ཧ͸γϏΞ͡Όͳ͍ʣ

    View full-size slide

  57. ➡ ΤϯδχΞձͰٞ࿦

    View full-size slide

  58. ➡౰൪੍

    View full-size slide

  59. • ΋ͱ΋ͱΤϯδχΞ಺ͰिସΘΓͷ౰൪੍
    • ϦϦʔε୲౰ɺΤεΧϨʔγϣϯ੥͚ etc
    • ౰൪ͷҰͭͱͯ͠௥Ճ

    View full-size slide

  60. • େྔʹ͋ΔͷͰ͍͔ͭ͘ળҙͰબΜͰߋ৽
    • ͬ͞ͱ্͛ΒΕͳ͍৔߹͸దٓઌૹΓ
    • ➡λεΫͱͯ͠ܭըతʹ޲͖߹͏

    View full-size slide

  61. • ߋ৽౓߹͍͸εϓϨουγʔτʹه࿥
    • ͠͹Β͘଺ͬͯΔͱ੺͘ͳΔ
    • పఈ͍ͨ͠ͱ͍͏ΑΓՄࢹԽ͍ͨ͠

    View full-size slide

  62. ΤϯδχΞձ / GitHub Project

    View full-size slide

  63. • ॠൃతͳ൑அྗʹཔΒͣ༏ઌ౓ܾఆͰ͖Δ
    • ٕज़తཁ݅ͳͲ΋֬ೝ͠΍͘͢ͳͬͨ
    • গ͠Πϯϑϥߋ৽ʹภͬͯΔؾ͸ͯ͠Δ
    • SRE ۀ΋TL ͕࢓੾͔ͬͯͨΒʁؔ܎ͳ͍ʁ
    • ➡࠷ۙ SRE ૿һ͕͋ͬͨͷͰௐ੔͍ͯ͘͠

    View full-size slide

  64. Ξοϓσʔτ౰൪

    View full-size slide

  65. • ґଘ͕ݹ୅ͷ··์ஔ͞ΕΔ͜ͱ͕ͳ͘ͳͬͨ
    • ༷ࢠ͕ՄࢹԽͰ͖ͨ
    • τϥϒϧͷࣄલճආ΋੒ޭ
    • Amazon S3: AWS ॺ໊όʔδϣϯ2ഇࢭ
    • aws-sdk-go Λߋ৽ͨ࣌͠ʹࣗવͱҠߦ

    View full-size slide

  66. • Ұ౓ͷߋ৽ʹඞཁͳؾ߹ήʔδ͸ݮͬͨ
    • ؾ߹θϩͰ͸ߋ৽Ͱ͖ͳ͍ͷ΋ࣄ࣮
    • Ͳ͏ͯ͠΋ۤखͷ΋ͷ͸ख͕͖ͭͮΒ͍
    • ➡νʔϜ಺ͰͲ͏ٕज़Λ޿͛Δ͔
    • εΩϧϚοϓͳͲͷऔΓ૊Έ
    Mackerel։ൃνʔϜΧΠθϯͷཱྀʢৼΓฦΓɾϞϒϓϩɾεΩϧϚοϓͳͲʣ
    https://developer.hatenastaff.com/entry/2018/04/04/111410

    View full-size slide

  67. • ʮ৽͍͠෺͸ྑ͍ʯͰ΍ͬͯ·͢
    • ϓϩμΫτΛ݈શʹ৽͍ͯ͘͘͠͠
    • νʔϜͰ޲͖߹͏औΓ૊ΈΛ͍ͯ͠·͢
    • ։ൃϩʔυϚοϓ΁ͷ૊ΈࠐΈ
    • ΤϯδχΞ಺ͰͷλεΫ༏ઌ౓෇͚
    • Ξοϓσʔτ౰൪

    View full-size slide

  68. ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ
    ͳʹ͔͋Ε͹࠙਌ձ or Twitter @astj ·Ͱʂ

    View full-size slide