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

Classmethod流のPlatform Engineering / classmethod...

tomoki10
July 19, 2024

Classmethod流のPlatform Engineering / classmethod-platform-engineering-devio2024

Classmethod Odysseyで発表した内容です。
https://event.classmethod.jp/odyssey-offline

tomoki10

July 19, 2024
Tweet

More Decks by tomoki10

Other Decks in Technology

Transcript

  1. ՝୊Λߟ͑Δલʹ 11 Ҿ༻ɿ • ٕज़తϕΫτϧΛଋͶΔ • ͢΂ͯͷνʔϜʹಠࣗͷܾஅΛԼ͢ݖརΛ༩͑Δ ͱ͍͏΍Γํ΋ߟ͑ΒΕΔͩΖ͏ɻ͔͠͠ɺ͋ ΒΏΔπʔϧͷ࢖༻ΛೝΊΔ૊৫͸ɺͲͷπʔϧ ΋αϙʔτ͠ͳ͍૊৫Ͱ΋͋Δ(p.60)

    • ৽͍͠ϓϥΫςΟεΛల։͢Δͭ΋ΓͳΒɺ༏Εͨ ϓϥΫςΟε͸ٛ຿෇͚Δ΋ͷͰ͸ͳ͘ਐԽͷ݁Ռ ͱͯ͠ੜ͡Δ΋ͷ(p.58) https://dev.classmethod.jp/articles/book-review-staff-engineer/
  2. CX Team Topologiesʹ౰ͯ͸ΊΔ 18 AࣾνʔϜ BࣾνʔϜ CࣾνʔϜ … ZࣾνʔϜ Slack

    Notion ετϦʔϜΞϥΠϯυνʔϜ͕Ҋ݅νʔϜʹ͍ۙঢ়ଶ ՝୊ • νʔϜ֎Ͱൃ৴͕ແ͍৔߹ɹ ΄΅ܨ͕Γ͕ͳ͍ • Ҋ݅νʔϜ಺Ͱ΍Δ͜ͱ͕ଟ ͍ʢϑϩϯτ/όοΫ/ϞόΠϧ/ Πϯϑϥ/IaC/CICD/ηΩϡϦ ςΟ/؂ࢹ/υϝΠϯ஌ࣝ/etcʣ ※੨ઢ͸ίϛϡχέʔγϣϯϥΠϯ DevelopersIO
  3. CX Team Topologiesʹ౰ͯ͸ΊΔ 20 ϓϥοτ ϑΥʔϜ νʔϜ AࣾνʔϜ BࣾνʔϜ CࣾνʔϜ

    … ZࣾνʔϜ ][ ][ ][ ][ • ڞ௨ͱͳΔΞΫηε؅ཧɺη ΩϡϦςΟɺCI/CDͳͲͷ໛ൣ ύλʔϯΛx as a serviceͱ͠ ͯఏڙ͢Δ • Slack্ʹཷ·͍ͬͯΔϑϩʔ ৘ใΛετοΫ৘ใʹม͑Δ • τΠϧ(։ൃ଎౓௿Լͷো֐)ɹ ղফͷώϯτΛ࢒͢ ૝ఆͨ͠ཧ૝૾
  4. Ͳ͏΍ͬͯ৘ใڞ༗͢Δ͔ 21 Inner Sourceͷߟ͑ํΛࢀߟ • ૊৫಺ͷιϑτ΢ΣΞ։ൃϓϩδΣΫτΛ OSSϓϩδΣΫτͷΑ͏ʹӡӦ • ίʔυ΍υΩϡϝϯτΛ૊৫಺Ͱ޿͘ڞ༗͠ɹ ୭Ͱ΋ΞΫηεɾߩݙͰ͖ΔΑ͏ʹ͢Δ

    • ίʔυϨϏϡʔɺPull RequestɺIssueͳͲͷ OSSతͳख๏Λ࠾༻ • ૊৫಺Ͱ։ൃ͞Εͨίʔυ΍ίϯϙʔωϯτͷ ࠶ར༻Λଅਐ https://innersourcecommons.org/ja/
  5. Platformͱ͸ 26 CNCF Platform Engineeringࢿྉ※͔ΒҰ෦Ҿ༻/ҙ༁ ※https://tag-app-delivery.cncf.io/whitepapers/platforms/ CNCF…Cloud Native Computing Foundation

    • Ϋϥ΢υωΠςΟϒ ίϯϐϡʔςΟϯάͷϓϥοτϑΥʔϜ͸ɺϓϥοτ ϑΥʔϜͷϢʔβʔͷχʔζʹԠͯ͡ఆ͓ٛΑͼఏڙ͞ΕΔػೳͷ౷߹ίϨΫ γϣϯͰ͢ • ϓϥοτϑΥʔϜ͕αϙʔτ͢ΔػೳͱγφϦΦͷ۩ମతͳηοτ͸ɺར֐ؔ ܎ऀͱϢʔβʔͷχʔζʹΑܾͬͯఆ͢Δඞཁ͕͋Γ·͢ • ඇৗʹ୯७ͳʮϓϥοτϑΥʔϜʯ͸ɺʢதུʣϓϩόΠμʔ͔ΒػೳΛϓϩ Ϗδϣχϯά͢ΔͨΊͷඪ४ૢ࡞खॱ΁ͷϦϯΫΛؚΉ wiki ϖʔδͰ͋ΔՄೳ ੑ͕͋Γ·͢ɻ
  6. Platformͱ͸ 27 CNCF Platform Engineeringࢿྉ※͔ΒҰ෦Ҿ༻/ҙ༁ ※https://tag-app-delivery.cncf.io/whitepapers/platforms/ CNCF…Cloud Native Computing Foundation

    • Ϋϥ΢υωΠςΟϒ ίϯϐϡʔςΟϯάͷϓϥοτϑΥʔϜ͸ɺϓϥοτ ϑΥʔϜͷϢʔβʔͷχʔζʹԠͯ͡ఆ͓ٛΑͼఏڙ͞ΕΔػೳͷ౷߹ίϨΫ γϣϯͰ͢ • ϓϥοτϑΥʔϜ͕αϙʔτ͢ΔػೳͱγφϦΦͷ۩ମతͳηοτ͸ɺར֐ؔ ܎ऀͱϢʔβʔͷχʔζʹΑܾͬͯఆ͢Δඞཁ͕͋Γ·͢ • ඇৗʹ୯७ͳʮϓϥοτϑΥʔϜʯ͸ɺʢதུʣϓϩόΠμʔ͔ΒػೳΛϓϩ Ϗδϣχϯά͢ΔͨΊͷඪ४ૢ࡞खॱ΁ͷϦϯΫΛؚΉ wiki ϖʔδͰ͋ΔՄ ೳੑ͕͋Γ·͢ɻ
  7. CX ࣗ෼ͨͪͷ૊৫Ͱ౰ͯ͸ΊΔ৔߹ 30 AࣾνʔϜ BࣾνʔϜ CࣾνʔϜ … ZࣾνʔϜ ECS ҎԼͷཧ༝Ͱݕ౼֎ʹ

    • ٕज़ελοΫ͕Ҋ݅ͰҟͳΔ • Ϋϥελʔ؅ཧͷӨڹ͕ଞͷ ձࣾͷҊ݅ʹ΋Өڹ͢Δ • ηϧϑαʔϏεԽͰ͖Δ·Ͱ ͷίετ͕ߴ͍ • ੾Γସ͑ͷ༧ࢉঝೝ͕ސ٬͝ ͱʹඞཁͰݱ࣮తͰͳ͍ Lambda EKS ࠷େͷPlatform
  8. CX ࣗ෼ͨͪͷ૊৫Ͱ౰ͯ͸ΊΔ৔߹ 31 AࣾνʔϜ BࣾνʔϜ CࣾνʔϜ … ZࣾνʔϜ Կ౓͔ߏங͸͞Ε͍͕ͯͨɹɹɹ ຖճࣅͨΑ͏ͳྲྀΕͰҰ؏ͨ͠ɹ

    φϨοδूʹͳΒͳ͍ 1. Ҋ݅ʹۭ͖͕͋Δ or ࢥཱ͍ͬ ͨͱ͖ʹݕ౼͕࢝·Δ 2. Ұ୴׬੒ 3. ਓ͕ுΓ෇͔ͳ͍ͷͰ์ஔ 4. அยతͳφϨοδूʹͳΔ ࠷খͷPlatform φϨοδ ू 㱺େ͖ա͗ΔͱಋೖͰ͖ͳ͍ɻখ͞ա͗ͯ΋Ҋ݅ͷҾྗͰҡ࣋Ͱ͖ͳ͍
  9. த͙ؒΒ͍ͷҊ 32 ࠷େͱ࠷খͷத͙ؒΒ͍ͷҊΛ3ͭ΄Ͳݕ౼ • Ϋϥ΢υ؅ཧϓϥοτϑΥʔϜͷར༻ • AWS ServiceCatalog΍AWS ProtonΛར༻ •

    ϥΠϒϥϦͱͯ͠ఏڙ • ίʔυͷҰ෦ΛNPMϥΠϒϥϦͳͲͱͯ͠ఏڙ • ར༻ऀ͸ύοέʔδϚωʔδϟܦ༝Ͱར༻͢Δ • αϯϓϧίʔυͱͯ͠ఏڙ • ϑϩϯτ/όοΫΤϯυ/IaCͷίʔυΛαϯϓϧͱͯ͠ఏڙ • ར༻ऀ͸αϯϓϧΛਅࣅͯ͠هड़͢Δ
  10. த͙ؒΒ͍ͷҊ 35 ͦΕͧΕͷར఺/ܽ఺ • Ϋϥ΢υ؅ཧϓϥοτϑΥʔϜͷར༻ • ར఺ɿηϧϑαʔϏεͰར༻Մೳ • ܽ఺ɿΧελϚΠζੑ͕๡͍͠ʁӡ༻஌ݟ͕গͳ͍ •

    ϥΠϒϥϦͱͯ͠ఏڙ • ར఺ɿύοέʔδϚωʔδϟܦ༝Ͱ͙͢ʹಋೖͰ͖Δ • ܽ఺ɿόʔδϣϯΞοϓͰӨڹൣғ֬ೝɺޙํޓ׵ੑͷҡ͕࣋ඞཁ • αϯϓϧίʔυͱͯ͠ఏڙ • ར఺ɿޙํޓ׵ੑͷҡ࣋͸ෆཁɻҰ෦͚ͩͰ΋࢖͑Δ • ܽ఺ɿҰ౓ద༻ͨ͠ޙ͸ݹ͍όʔδϣϯͷ··ʹͳΔ
  11. ͓͞Β͍ 36 Platform ͸ఏڙ͢ΔϨϕϧ͕͍͔ͭ͋͘Δ Level ఏڙ಺༰ CDKͰߟ͑Δ৔߹ԿΛ࢖͏͔ 5 IDPͳͲʹΑΔ׬શͳ ηϧϑαʔϏε

    BackStage/ಠ࣮ࣗ૷ 4 Ϋϥ΢υ؅ཧϓϥοτϑΥʔϜ ͷར༻ ServiceCatalog/Proton 3 ϥΠϒϥϦͱͯ͠ఏڙ Construct Hub/Code Artifact 2 αϯϓϧίʔυͱͯ͠ఏڙ GitHub/GitLab 1 Wikiͱͯ͠ఏڙ Notion etc.. Platform Level
  12. ͓͞Β͍ 37 Platform ͸ఏڙ͢ΔϨϕϧ͕͍͔ͭ͋͘Δ Level ఏڙ಺༰ ར༻ऀෛՙ ։ൃෛՙ ґଘ౓ 5

    IDPͳͲʹΑΔ׬શͳ ηϧϑαʔϏε ௿ େ େ 4 Ϋϥ΢υ؅ཧϓϥοτϑΥʔϜ ͷར༻ ௿ த େ 3 ϥΠϒϥϦͱͯ͠ఏڙ ௿ த த 2 αϯϓϧίʔυͱͯ͠ఏڙ த த খ 1 Wikiͱͯ͠ఏڙ ߴ খ খ Platform Level
  13. ܾ·ͬͨ͜ͱ 40 Α͋͘ΔύλʔϯΛαϯϓϧίʔυͱͯ͠ఏڙ͢Δ ԿΛఏڙ͢Δͷ͔ • όοΫΤϯυ • ബ͍ϨΠϠʔυΞʔΩςΫνϟͷΈఏڙ • ϑϩϯτΤϯυ

    • ݕ౼͕ٕͨ͠ज़ͷҠΓมΘΓ͕ܹ͍ͨ͠Ίஅ೦ • Πϯϑϥ/CICD/؂ࢹ/ηΩϡϦςΟ • CDKͷίʔυͱ্ͯ͠هͷϕʔεͱͳΔઃఆΛఏڙ • Ҋ݅ͰΑ͋͘ΔLambdaϕʔε/ECSϕʔεͷ2ύλʔϯ͕ϝΠϯ
  14. ICASU ECSͷ֓ཁ 52 ҎԼͷػೳΛ࣮૷/هࡌ • ICASU NOTE • ։ൃʹඞཁͳπʔϧʢLinter/Formatter/SpellCheck/Dependabot) •

    IaC • Πϯϑϥ • CI/CDύΠϓϥΠϯ • ηΩϡϦςΟʢAWSηΩϡϦςΟ/ίʔυηΩϡϦςΟʣ • αϯϓϧόοΫΤϯυ
  15. ICASU NOTEͷߏ੒ 54 • ๯಄จ • ઃܭͰΑ͘ߟྀϙΠϯτͱͳΔ෦෼Λهࡌ • ຊจ •

    ࣮ࡍʹى͖Δ໰୊΍ DevIOͳͲಡΉ΂͖هࣄͷϦϯΫͳͲΛهࡌ
  16. ։ൃʹඞཁͳπʔϧ 56 • Linter/Formatter • Biome.js • TypeScriptͷLinter/Formatterઃఆ͕ॳΊΘ͔Γʹ͍͘ͱ͍͏ίϝ ϯτ͕͋ͬͨͨΊσϑΥϧτઃఆΛఏڙ •

    ECSଆ͸γϯϓϧͳBiome.jsΛઃఆ • SpellCheck • CSpell • PRͰͷεϖϧϛεͷࢦఠΛۃྗݮΒ͠ੜ࢈ੑΛ্͛ΔͨΊ௥Ճ • IaCͷ৔߹ɺIDϛεͰϦιʔε࡞Γ௚͠΋͋Γ͏ΔͷͰॏཁ
  17. Πϯϑϥ 57 యܕతͳΠϯϑϥύλʔϯΛCDKͱͯ͠هड़͠ਅࣅͰ͖ΔΑ͏ʹఏڙ • CDKࣗମͷॻ͖ํ • VPCؔ࿈ • NAT Gateway/NAT

    Instance • SecurityGroup/NetworkACL • VPC Endpoint • ECR • ECS • Cluster/Service/Container • ALB • Aurora(MySQL) • CloudWatch Logs • Cognito • WAF • Other • GitHub Actions Role
  18. ICASU Lambdaͷ֓ཁ 62 ҎԼͷػೳΛ࣮૷/هࡌ • ICASU NOTE • ։ൃʹඞཁͳπʔϧʢLinter/Formatter/SpellCheck) •

    IaC • CI/CDύΠϓϥΠϯ • ϞχλϦϯά • ηΩϡϦςΟ • αϯϓϧόοΫΤϯυ
  19. ޮՌͷଌఆ 65 Ͳ͏΍ͬͯ͜ͷࢪࡦ͕͏·͍ͬͨ͘ͱ൑அ͢Δ͔ ҎԼͷࢦඪΛઃఆͯ͠ɺఆྔత/ఆੑతͳධՁΛ࣮ࢪ • ఆྔతධՁࢦඪ • ޻਺վળ • ৽نҊ݅Ͱͷಋೖ਺

    • ಋೖ࣌ͷ࡟ݮ޻਺ • طଘҊ݅ͰͷҰ෦ػೳಋೖ਺ • ίϯτϦϏϡʔτͷྔͱ࣭ʢPRͱissueͷ਺ʣ • GitHub Org΁ͷࢀՃऀ਺ʢ౰࣌୯ಠͷOrgΛར༻ʣ
  20. ఆྔతධՁࢦඪͷ݁Ռ 66 ఆྔతධՁࢦඪ Ϋϥεϝιου20ظɿ2023೥7݄ʙ2024೥6݄ • ޻਺վળ • ৽نҊ݅Ͱͷಋೖ਺ˠ4Ҋ݅ʢ2022೥౓͸4݅ʣ • ಋೖ࣌ͷ࡟ݮ޻਺ˠ1~2िؒ

    • طଘҊ݅ͰͷҰ෦ػೳಋೖ਺ˠෆ໌ • ίϯτϦϏϡʔτͷྔͱ࣭ʢPRͱissueͷ਺ʣˠPR:140/issue:58 • GitHub Org΁ͷࢀՃऀ਺ʢ౰࣌୯ಠͷOrgΛར༻ʣˠ120ਓ
  21. ·ͱΊ 72 • ΰʔϧ • Platform EngineeringΛͲ͏ղऍͯ͠ɺ࣮ફ͠Α͏ͱ͍ͯ͠Δ ͔ҰྫΛ஌Δ • ࣗࣾΛTeam

    TopologiesͷղऍͰ෼ੳ͠ɺঢ়گΛ೺Ѳ͢Δ ۩ମྫΛఏࣔɻ૊৫͝ͱͷPlatform LevelΛߟ͑ɺࣗ෼ͷ ૊৫ʹ͋ͬͨPlatformͷΧλνΛબ୒ • ۩ମྫ͔Β໌೔ͷ։ൃͷώϯτΛಘΔ • ੒Ռ෺͸ύϒϦοΫʹͳ͍ͬͯΔͷͰ͝׆༻͍ͩ͘͞
  22. 74