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

#mixi #DeLT スタートアップでマイクロサービスアーキテクチャやってみた / Microservice Architecture at a Startup

Abde1cc59b4baaec3c12d65581c5d017?s=47 riita10069
January 26, 2021

#mixi #DeLT スタートアップでマイクロサービスアーキテクチャやってみた / Microservice Architecture at a Startup

Abde1cc59b4baaec3c12d65581c5d017?s=128

riita10069

January 26, 2021
Tweet

Transcript

  1. ελʔτΞοϓͰ ϚΠΫϩαʔϏεΞʔΩςΫνϟΛ ΍ͬͯΈͨ גࣜձࣾϛΫγΟ 
 ։ൃຊ෦ CTOࣨ SREάϧʔϓ 
 ࢁా

    ྒྷଠ ˌୈճ🎍%F-5🎍
  2. 2 About me Ryota Yamada Tokyo Institute of Technology Department

    of Information and Communications Engineerin g Berrar DataScience Laborator y Former Tech Design Inc. CT O Journey Inc. Lead Enginee r Volare an engineering organizatio n Twitter: @riita10069 aboutme: https://riita10069.m e Interest: Go, Cloud Native, SRE, DevOps, AI, MLOps, DataOps, FPGA
  3. גࣜձࣾTech Design ܦӦঢ়گͷΑ͘ͳ͍ձࣾʹ͓͍ͯɺ৽نࣄۀͷཱҊ͔Βɺ্ཱͪ͛·Ͱɻ BCPɺSCMɺࡂ֐৘ใΛ໢ཏͨ͠૯߹తͳϓϥοτϑΥʔϜΛࣗΒߏ૝ɻ ๻͕δϣΠϯͨ࣌͠͸ɺࣾ಺ͷΤϯδχΞ͕਺໊͔ͭϊ΢ϋ΢͕ཷ·͍ͬͯͳ͍ɻ ࠷ߴٕज़੹೚ऀ(CTO)

  4. גࣜձࣾTech Design ࠷ߴٕज़੹೚ऀ(CTO) • ϏδωεϞσϧͷߏஙɺαʔϏεઆ໌ࢿྉͷ࡞੒ • ૝ఆಋೖاۀͱͦͷϢʔβʔετʔϦʔͷ࡞੒ • ػೳཁ݅ɺඇػೳཁ݅ͷઃఆ •

    ΞϓϦέʔγϣϯίʔυɺΫϥ΢υΞʔΩςΫτͷ࣮૷ • ٕज़બఆɺϞμϯͳٕज़΁ͷΩϟονΞοϓ • ϝϯόʔͷ࠾༻ • ΤϯδχΞϦϯάϚωʔδϟʔɺεΫϥϜϚελʔ ϓϩμΫτͱϝϯόʔͱϏδωεʹؔ͢Δ͜ͱͷશͯΛ͔̌Β࡞ͬͨɻ
  5. 5 αʔϏε঺հ

  6. ࣄۀܧଓܭըͱؔ࿈اۀΛ؅ཧ͢ΔμογϡϘʔυ ػೳ͕ඇৗʹෳࡶ ɾೝূɾೝՄ(Ӿཡݖݶͱฤूݖݶ͕ผ) 
 ɾؔ࿈͢ΔਓɾϞϊɾձ͕ࣾৗʹݟ͑Δ 
 ɾۓٸ࣌ͷΞϥʔτɾBIA(༏ઌॱҐ)ͷܭࢉ 
 ɾاۀʹΑͬͯɺ৽ͨͳػೳ͕ඞཁʹ ࡂ֐࣌ͷେྔϦΫΤετΛ૝ఆ

    ɾࡂ֐࣌ʹશࣾһ͕ΞΫηε
  7. ࡂ֐৘ใΛॠ࣌ʹऩू͠ɺඞཁͳاۀʹϨίϝϯυ͢ΔNewsϖʔδ ࡂ֐ʹؔ࿈͢ΔNews͚ͩநग़ ؔ࿈͢Δاۀ৘ใΛநग़

  8. 8 νʔϜ࡞Γ

  9. 9 νʔϜ࡞Γ ࣾ಺ ϝϯόʔ ۀ຿ҕୗ ΤϯδχΞ ϑϩϯτ(React) όοΫΤϯυ(Go) SRE(GCP) AI

    Me
  10. 10 νʔϜ࡞Γ • 16ਓͱ͍͏େਓ਺ΛҰਓͰϚωδϝϯτ͢Δඞཁ • ίϩφՒͰۀ຿ҕୗϝϯόʔ͕ϑϧϦϞʔτ • ࣾ಺ϝϯόʔ΋िʹ1ճͷΈͷग़ࣾ • ೥ྸ΍ٕज़ྖҬɺΩϟϦΞײͳͲόϥόϥ

    • ϋΠεΩϧਓࡐ͕ଟ͍ɻYahoo!,DeNA,DMMग़਎ͳͲ ίϛϡχέʔγϣϯίετ͕๲େʹ ݸʑͷ໨ඪʹରͯ͠࠷దͰ͸ͳ͘ͳΔ
  11. Ձ஋ͷ͋Δ࢓ࣄͱ͸ͳʹ͔ʁ

  12. ॓୊ ͜ΕΒͷҧ͍͸ʁ झຯ

  13. ͭ·Βͳ͍ͷ͸ɺ ࣗ෼Ͱ͸ͳ͍ʮଞͷ୭͔ʯ͕ ΍ͬͯ΄͍͜͠ͱΛ΍͍ͬͯΔͱ͖

  14. શһ͕ҙࢥܾఆऀͰ͋Ε͹͍͍ɻ

  15. શһ͕ࣗ཯తʹܾஅͰ͖Δ ϚΠΫϩαʔϏεΛ࠾༻ͨ͠ɻ

  16. 16 νʔϜ࡞Γ • ैདྷͷٕज़ྖҬͰ͸ͳ͘ɺίϯςΩετ͝ͱʹ෼ྨ͞Ε ͨαʔϏενʔϜΛߏ੒ • αʔϏεʹؔ͢Δػೳతɺٕज़తܾఆࣄ߲ʹؔͯ͠͸ɺ (CTOͰ͋ΔࢲͰ͸ͳ͘)αʔϏενʔϜͷࡋྔͱͨ͠ • ҰਓҰਓ͕ࣗൃతʹಈ͖ࣗ཯తʹػೳ͢Δ૊৫Λ࡞Δ

    • ҰਓҰਓΛผͷώτͱͯ͠ɺ࠷దͳ੒௕؀ڥΛఏڙ • ϝϯόʔશһͷඳ͘ΩϟϦΞΛࢲ͸ཧղͦ͠Εʹ޲͔͏
  17. 17 ҰൠతͳνʔϜ ϑϩϯτ όοΫΤϯυ SRE AI CTO or EM(ҙࢥܾఆݖ)

  18. 18 ࢲͨͪͷνʔϜ Authentication User News Recommend ڥք͚ͮΒΕͨίϯςΩετ͝ͱʹ ҙࢥܾఆݖΛ࣋ͪɺࣗ཯తʹػೳ͢Δ ϑϩϯτ αʔόʔ

    SRE AI
  19. 19 ߦಈࢦ਑ • ݸਓͷࣗൃతͳҙࢥܾఆͱ௅ઓΛҾ͖ग़͢ • ࢓ࣄ͸ਓʹ༩͑ΒΕΔͷͰ͸ͳ͘ɺࣗ෼ͰੜΈग़͢΋ͷ • ഑ྀ͸͢Δ͕ɺԕྀ͸͠ͳ͍ ࣗ཯తʹػೳ͢ΔνʔϜ͕ ΑΓࣗओతʹ։ൃΛਐΊΔΑ͏ʹ

  20. 20 ਓ͕੒௕͢Δاۀ΁ • ΩϟϦΞઓུʹ߹ΘͤͨνʔϜׂৼΓ • ຖिߦΘΕΔࣾ಺ษڧձ • εΩϧϨϕϧͷߴ͍ਓ͕ू·͍ͬͯΔ ͦͯ͠ɺਓ͸ҙࢥܾఆͷ਺͚ͩ੒௕͢Δ ݁Ռɺਓ͕੒௕͍ͯ͘͠૊৫΁

  21. ੒௕ͷ࣮ײ ࠷ߴͷ؀ڥ΁ʂ ࠷ߴͷ༑ਓ ࣗ཯తͳ 
 ҙࢥܾఆ ੒ޭମݧ

  22. 22 ϚΠΫϩαʔϏεΞʔΩςΫνϟ

  23. 23 ݟ͖͑ͯͨ՝୊ • αʔϏεڥքͷઃఆ͕ᐆດʹͳΓ΍͍͢ • Ұཡը໘ͷऔಘ࣌ʹΫΤϦνϡʔχϯά͕೉͍͠ • ෼ࢄτϥϯβΫγϣϯ؅ཧͱ݁Ռ੔߹ੑ • αʔϏεؒͷΠϯςάϨʔγϣϯςετ

    • αʔϏεͷݸ਺෼Πϯϑϥߏங͢Δඞཁ͕͋Γ޻਺ѹഭ • ΫϥΠΞϯτͰग़ΔΤϥʔͷݪҼ͕ෆ໌͗͢Δ
  24. 24 ݟ͖͑ͯͨ՝୊ • αʔϏεڥքͷઃఆ͕ᐆດʹͳΓ΍͍͢ • Ұཡը໘ͷऔಘ࣌ʹΫΤϦνϡʔχϯά͕೉͍͠ • ෼ࢄτϥϯβΫγϣϯ؅ཧͱ݁Ռ੔߹ੑ • αʔϏεؒͷΠϯςάϨʔγϣϯςετ

    • αʔϏεͷݸ਺෼Πϯϑϥߏங͢Δඞཁ͕͋Γ޻਺ѹഭ • ΫϥΠΞϯτͰग़ΔΤϥʔͷݪҼ͕ෆ໌͗͢Δ
  25. 25 αʔϏεڥքઃఆ • ڥք͚ͮΒΕͨίϯςΩετΛލ͙αʔϏε͸࡞Βͳ͍ • αϒυϝΠϯ୯Ґ͸ݪଇ෼͚Δɻ෼ׂࠔ೉ͳΒ෼͚ͳ͍ɻ • ૬ޓґଘؔ܎͸࡞Βͳ͍ɻಠཱͯ͠σϓϩΠͰ͖Δ͜ͱ • සൟͳαʔϏεݺͼग़͠Λආ͚ΔɻಛʹඇಉظͰ͸ɻ

    • ͋·Γʹ΋খ͍͞αʔϏεΛ޷ΜͰ࠾༻͢Δ • ͍͔ͭ͘ͷύλʔϯΛ࠾༻ͨ͠(BFF, APIGateway)
  26. Tree Service Authentication Service Web BFF API BFF App BFF

    API Gateway ※؆ུԽ͞Ε͍ͯ·͢ɻ Account Service News Service User Service BFF Layer GW Layer SVC Layer Scraper Service NLP Service Company Service Payment Service Partner Service Recommend Service
  27. ※؆ུԽ͞Ε͍ͯ·͢ɻ

  28. 28 Schema ۦಈ։ൃΛ࠾༻ • SchemaΛ؅ཧ͢ΔrepositoryΛҰͭ࡞੒ • .protoΛ͜ͷrepositoryͰ؅ཧ͍ͯ͠Δɻ • ΤϯυϙΠϯτΛ௥Ճߋ৽͢Δ৔߹͸PRΛ͜͜΁ૹΔ •

    ഁյతมߋͷݕ஌ (https://github.com/uber/prototool break check) • ໋໊نଇͷపఈ (https://github.com/yoheimuta/protolint) • APIυΩϡϝϯτͷࣗಈ࡞੒ • pb.goΛࣗಈੜ੒͠ɺࣗಈͰPull RequestΛద੾ͳrepositoryʹૹ৴ • ͜ΕΒ͕શͯCIͰߦΘΕΔ
  29. 29 ݟ͖͑ͯͨ՝୊ • αʔϏεڥքͷઃఆ͕ᐆດʹͳΓ΍͍͢ • Ұཡը໘ͷऔಘ࣌ʹΫΤϦνϡʔχϯά͕೉͍͠ • ෼ࢄτϥϯβΫγϣϯ؅ཧͱ݁Ռ੔߹ੑ • αʔϏεؒͷΠϯςάϨʔγϣϯςετ

    • αʔϏεͷݸ਺෼Πϯϑϥߏங͢Δඞཁ͕͋Γ޻਺ѹഭ • ΫϥΠΞϯτͰग़ΔΤϥʔͷݪҼ͕ෆ໌͗͢Δ
  30. 30 Queryෳࡶ͗͢໰୊ • TreeͷҰཡϖʔδʹඞཁͳαʔϏε͸ • Partner, Company, User, Tree, Authorization…

    • ෆՄೳͰ͸ͳ͍͚ΕͲAPI Composition͸͠ΜͲ͍ • ΫΤϦͷύϑΥʔϚϯε໰୊ͱ޲͖߹ͬͯΒΕͳ͍ • API GW͸ඞཁͳΧϥϜ͕Ͳ͜ʹ͋Δ͔஌Δඞཁ(ૄ݁߹ੑ) Query͚ͩMonolith΁
  31. 31 Queryෳࡶ͗͢໰୊ • QueryʹରԠ͢ΔDB͸Ұͭʹू໿ • αʔϏε͸StateDBΛͦΕͧΕ࣋ͭ • Event͸શͯKVSʹอଘ(Event Store) •

    ো֐࣌ʹ෮چՄೳ
  32. 32 Query vs Command • QueryΛ࢖͏৔߹ • ݪଇෳ਺ͷϦϨʔγϣϯ͕བྷΉҰཡϖʔδͷऔಘ࣌ͷΈ • ͭ·Γɺ/resources/:id΍/users/:id͸commandͰڞ༗

    • CommandΛ࢖͏৔߹ • σʔλͷ࡞੒ɺߋ৽ɺϏδωεϩδοΫ͸શͯͪ͜Β • ิঈτϥϯβΫγϣϯʹ͍ͭͯ͸݁Ռ੔߹ੑͷΈΛٻΊΔ
  33. 33 ݟ͖͑ͯͨ՝୊ • αʔϏεڥքͷઃఆ͕ᐆດʹͳΓ΍͍͢ • Ұཡը໘ͷऔಘ࣌ʹΫΤϦνϡʔχϯά͕೉͍͠ • ෼ࢄτϥϯβΫγϣϯ؅ཧͱ݁Ռ੔߹ੑ • αʔϏεؒͷΠϯςάϨʔγϣϯςετ

    • αʔϏεͷݸ਺෼Πϯϑϥߏங͢Δඞཁ͕͋Γ޻਺ѹഭ • ΫϥΠΞϯτͰग़ΔΤϥʔͷݪҼ͕ෆ໌͗͢Δ
  34. 34 CAPͷఆཧ • C: (Strong)Consistency • A: Availability • P:

    (Tolerance to Network)Partition • ͜ͷ̏ͭͷཁૉ͕τϨʔυΦϑͷؔ܎ [Eric Brewer] • ैདྷͷRDBͰ͸ɺڧ͍Ұ؏ੑΛٻΊ͍ͯͨɻ • ϚΠΫϩαʔϏεͰ͸ɺͲ͜Λଥڠ͍͔ͯ͘͠ɻ
  35. 35 ͍͔ͭ͘ͷύλʔϯ • ڧ͍੔߹ੑΛٻΊΔ৔߹͸ɺTCCͳͲͷೋ૬ίϛοτ • ݁Ռ੔߹ੑΛٻΊΔ৔߹͸ɺSagaύλʔϯ͕ओྲྀ • TCCͰ͸ϩοΫ͕૸ΓɺՄ༻ੑ͕Լ͕ΔͨΊ 
 ݱ୅Ͱ͸ɺSagaʹΑΓBasic

    AvailabilityΛٻΊΔ͜ͱ΋ • ָ؍ϩοΫ vs ൵؍ϩοΫͷٞ࿦ʹࣅ͍ͯΔ
  36. 36 τϥϯβΫγϣϯ 5SFF 4FSWJDF $PNQBOZ 4FSWJDF ۓٸঢ়گ 
 ͷ೾ٴ 6TFS

    4FSWJDF 2VFSZ 4FSWJDF $MPVE 1VC4VC
  37. 37 τϥϯβΫγϣϯ 5SFF 4FSWJDF $PNQBOZ 4FSWJDF ۓٸঢ়گ 
 ͷ೾ٴ 6TFS

    4FSWJDF 2VFSZ 4FSWJDF $MPVE 1VC4VC &NFSHFODZ &NFSHFODZ &NFSHFODZ ᶃ ᶄ
  38. 38 τϥϯβΫγϣϯ 5SFF 4FSWJDF $PNQBOZ 4FSWJDF ۓٸঢ়گ 
 ͷ೾ٴ 6TFS

    4FSWJDF 2VFSZ 4FSWJDF $MPVE 1VC4VC 4VDDFTT 4VDDFTT 4VDDFTT ᶅ ᶆ ͭ0,ͳΒ 
 Ϩεϙϯε ᶇ 5SZJOH 5SZJOH 5SZJOH
  39. 39 τϥϯβΫγϣϯ 5SFF 4FSWJDF $PNQBOZ 4FSWJDF ۓٸঢ়گ 
 ͷ೾ٴ 6TFS

    4FSWJDF 2VFSZ 4FSWJDF $MPVE 1VC4VC $PO fi SN $PO fi SN $PO fi SN ᶉ ᶈ ͭ0,ͳΒ 
 Ϩεϙϯε ᶇ $PO fi SNFE $PO fi SNFE $PO fi SNFE
  40. 40 τϥϯβΫγϣϯ 5SFF 4FSWJDF $PNQBOZ 4FSWJDF 6TFS 4FSWJDF 2VFSZ 4FSWJDF

    $MPVE 1VC4VC 4VDDFTT 4VDDFTT 5JNFPVU ᶅ ᶆ • ੔߹ੑͷͨΊͷϦτϥΠ • Pub/SubͷϦτϥΠ • ॏཁͳͷ͕ႈ౳ੑ • ϦΫΤετIDΛॴ࣋ • ॏେͳγεςϜো֐ରԠ IUUQTHJUIVCDPNNFSDBSJHPDJSDVJUCSFBLFS 5SZJOH 5SZJOH
  41. 41 τϥϯβΫγϣϯ 5SFF 4FSWJDF $PNQBOZ 4FSWJDF 6TFS 4FSWJDF 2VFSZ 4FSWJDF

    $MPVE 1VC4VC $BODFM $BODFM 'BVMU ᶉ ᶈ ͭ0,ἧΘͳ͍ 
 Ϩεϙϯε ᶇ • ิঈτϥϯβΫγϣϯ • Ұ͕ࣦͭഊͨ͠ΒRollback • Tree͸ΠϕϯτΛॲཧ͢Δ 
 ଞͷαʔϏεΛ஌͍ͬͯΔ • ૄ݁߹ͱ͸͍͚ͳ͍͚ΕͲ… $BODFM $BODFM
  42. 42 Reconcile • ϦΫΤετ͝ͱʹ݁Ռ੔߹ੑͱิঈτϥϯβΫγϣϯ • ͦΕͰ΋ɺྲྀྔ͕େ͖͘ෆ੔߹Λ0ʹ͸Ͱ͖ͳ͍ • ఆظతʹϦίϯαΠϧ༻Λߦ͍ 
 ଞͷϚΠΫϩαʔϏεͱͷ੔߹ੑνΣοΫΛߦ͏

  43. 43 Event Sourcing • Pub/Subʹ্͛ΒΕͨEventΛશͯKVSʹه࿥͢Δ • EventΛ࠶ੜ͢Δ͚ͩͰ݁Ռ੔߹ੑͷอͨΕͨσʔλʹ • ࠶ੜʹ΍ͨΒ͔͔࣌ؒΔͷͰఆظతʹεφοϓγϣοτ •

    APIόʔδϣϯʹΑͬͯڍಈ͕มΘΔͷͰɺ 
 σϓϩΠͷࡍʹ΋εφοϓγϣοτΛ࡞੒͢Δ • KVSʹ͸datastoreΛ࢖༻ͨ͠ IUUQTHJUIVCDPNNFSDBSJEBUBTUPSF
  44. 44 ݟ͖͑ͯͨ՝୊ • αʔϏεڥքͷઃఆ͕ᐆດʹͳΓ΍͍͢ • Ұཡը໘ͷऔಘ࣌ʹΫΤϦνϡʔχϯά͕೉͍͠ • ෼ࢄτϥϯβΫγϣϯ؅ཧͱ݁Ռ੔߹ੑ • αʔϏεؒͷΠϯςάϨʔγϣϯςετ

    • αʔϏεͷݸ਺෼Πϯϑϥߏங͢Δඞཁ͕͋Γ޻਺ѹഭ • ΫϥΠΞϯτͰग़ΔΤϥʔͷݪҼ͕ෆ໌͗͢Δ
  45. 45 Ϣχοτςετ • Ϣχοτςετ͸CIͰ͋Δఔ౓ճͤΔ͕ɺ 
 ݁߹ςετͱDBͷѻ͍͕՝୊ʹͳͬͯ͘ • ࣗ࡞OSS Cynthia(https://github.com/riita10069/cynthia) 


    ʹΑͬͯMockΛ࢖ͬͨɺRepositoryͷςετΛඞਢͱͨ͠ • ·ͨRepositoryͷςετ͸sqlmockΛ࢖༻ͨ͠ 
 https://github.com/DATA-DOG/go-sqlmock
  46. 46 ίϯϙʔωϯτςετ • https://github.com/mercari/testdeck • ςετ݁ՌΛDBʹอଘͰ͖ΔͨΊɺUIΛ࡞ΕΘ͔Γ΍͍͢ • ϦΞϧͳαʔϏεͷΑ͏ʹৼΔ෣͏ςεταʔϏε • ςετ؀ڥͰ࣮ࢪ͢Δ

    • IaC͸ۃྗTerraform IUUQTFOHJOFFSJOHNFSDBSJDPNCMPHFOUSZUFTUEFDL
  47. 47 ݟ͖͑ͯͨ՝୊ • αʔϏεڥքͷઃఆ͕ᐆດʹͳΓ΍͍͢ • Ұཡը໘ͷऔಘ࣌ʹΫΤϦνϡʔχϯά͕೉͍͠ • ෼ࢄτϥϯβΫγϣϯ؅ཧͱ݁Ռ੔߹ੑ • αʔϏεؒͷΠϯςάϨʔγϣϯςετ

    • αʔϏεͷݸ਺෼Πϯϑϥߏங͢Δඞཁ͕͋Γ޻਺ѹഭ • ΫϥΠΞϯτͰग़ΔΤϥʔͷݪҼ͕ෆ໌͗͢Δ
  48. 48 αʔϏεͷݸ਺෼Πϯϑϥ؀ڥΛߏங͢Δ • ҰͭͷϚΠΫϩαʔϏε͕࡞Δ΂͖k8s Resource • Deploy, Service, PDB, HPA,

    DestinationRule 
 Virtual Service, CI, CD, Duplicator(CRD), Terraform • ͜ΕΛTest, Dev, Prod؀ڥʹରͯࠩ͠෼ͳ͘࡞੒ • 1300ߦఔ౓ͷyamlΛ20Ҏ্΋ن཯Λ΋ͬͯ࡞੒͸ແཧ • K8sͷখ͞ͳϛε͕Πϯγσϯτʹͭͳ͕Γɺֶशίετେ • Ϧιʔεͷ໋໊نଇ΍σΟϨΫτϦߏ੒΋่յ
  49. 49 SKUF (Spectacular Kubernetes Unified Framework) • ڧ͘ந৅Խ͞ΕͨKubernetes Manifest FrameworkΛ಺੡

    • AppʹඞཁͳCueͱtfϑΝΠϧΛίϚϯυͰࣗಈੜ੒ • CueݴޠʹΑ੍ͬͯݶ͕ڧ͘ಇ໋໊͖ͳͲͷن཯Λอͭ • kustomizeΛ༻͍ͨdev, test, staging؀ڥ΋ࣗಈੜ੒ • cloudbuild.ymlͱArgoCDͷઃఆ΋ద੾ʹࣗಈੜ੒͞ΕΔ • ࠷௿ݶͷઃఆΦϓγϣϯ • Size, Scale, Network, Secret, ConfigMap
  50. 50 SKUF (Spectacular Kubernetes Unified Framework) ͨͬͨ͜Ε͚ͩͰ %FQMPZNFOU 4FSWJDF /BNFTQBDF

    3#"$ 1%# )1" %FTUJOBUJPO3VMF 7JSUVBM4FSWJDF ͜ΕΛࣗಈੜ੒
  51. 51 Kptͷ׆༻ • ResilireͰ͸ɺ5ͭఔ౓ͷCustom ControllerΛӡ༻ • ֤ϚΠΫϩαʔϏενʔϜ͸͜ΕΛ׆༻͢Δ͜ͱ͕ਪ঑ • ͦͷͨΊʹɺCustom ResourceͷManifestΛ࡞੒͸େม

    • Manifestͷ഑෍ʹkptΛ࢓༷ • https://github.com/GoogleContainerTools/kpt • NamespaceͳͲɺϚΠΫϩαʔϏενʔϜʹݻ༗ͳ΋ͷΛ 
 KptfileΛ༻͍ͯ؅ཧ͢Δ͜ͱͰCRͷσϓϩΠΛ༻ҙʹͨ͠
  52. 52 Code Generation Tool • ελʔτΞοϓͷ։ൃͷ΄ͱΜͲ͕CRUDͷ։ൃ • Go͔ͭClean ArchitectureͷCRUDΛࣗಈੜ੒͢Δ 


    ίʔυδΣωϨʔλʔͷ։ൃΛ࢖༻ͯ͠։ൃ଎౓Λ୲อ • ϚΠΫϩαʔϏεͱClean ArchitectureʹΑͬͯ 
 0 → 1։ൃͷεϐʔυײΛٯʹߴΊΔ͜ͱ͕Ͱ͖Δ • .protoͷΈΛهड़ͯ͠ɺCRUD΍migration͕ࣗಈੜ੒
  53. 53 OSS༻ʹ࠶࣮૷ͨ͠ʂ IUUQTHJUIVCDPNSJJUBSPDIF

  54. 54 CIͱCDΛ෼཭ͨ͠GitOps • ߏ੒ͷมߋ΋GitͰ؅ཧͯ͠Single Source of Truthʹ͍ͨ͠ • k8s operatorʹΑΓΫϥελΛએݴతͳߏ੒ʹۦಈ͢Δ

    • Ϋϥελ͸؂ࢹ͞Ε͍ͯΔ
  55. 55 ݟ͖͑ͯͨ՝୊ • αʔϏεڥքͷઃఆ͕ᐆດʹͳΓ΍͍͢ • Ұཡը໘ͷऔಘ࣌ʹΫΤϦνϡʔχϯά͕೉͍͠ • ෼ࢄτϥϯβΫγϣϯ؅ཧͱ݁Ռ੔߹ੑ • αʔϏεؒͷΠϯςάϨʔγϣϯςετ

    • αʔϏεͷݸ਺෼Πϯϑϥߏங͢Δඞཁ͕͋Γ޻਺ѹഭ • ΫϥΠΞϯτͰग़ΔΤϥʔͷݪҼ͕ෆ໌͗͢Δ
  56. 56 ϦΫΤετ͝ͱͷuid • શͯͷϦΫΤετʹuniqueͳIDΛ෇༩͢Δ • શͯͷϩάʹϦΫΤετIDΛ͚ͭͯ؅ཧ͢Δ • ϦΫΤετIDͰߜΓࠐΈΛ͢ΔͱͲ͜Ͱίέ͔ͨΘ͔Δ • ͜Ε͸ႈ౳ੑ؅ཧʹ͓͍ͯ΋࢖ΘΕ͍ͯΔ

    • ͞ΒʹEvent Storeʹ΋อଘͯ͠ॏෳ͕ͳ͍Α͏ʹ