はてなシステム構想 / The concept of Hatena System

はてなシステム構想 / The concept of Hatena System

ペパボ・はてな技術大会@福岡

A658ec7f1badf73819dfa501165016c1?s=128

Yuuki Tsubouchi (yuuk1)

October 07, 2017
Tweet

Transcript

  1. ͸ͯͳγεςϜߏ૝ ͸ͯͳ id:y_uuki ϖύϘɾ͸ͯͳٕज़େձ@෱Ԭ

  2. id:y_uuki / @y_uuk1 TSUBOUCHI Yuuki https://yuuk.io/ גࣜձࣾ͸ͯͳ WebΦϖϨʔγϣϯΤϯδχΞ / γχΞΤϯδχΞ

    / ςοΫϦʔυ / ج൫։ൃνʔϜϦʔμʔ
  3. ͸ͯͳγεςϜ

  4. https://twitter.com/y_uuk1/status/722085103166296065

  5. https://twitter.com/matsumotory/status/722085980375621632

  6. https://twitter.com/matsumotory/status/722232813668274177

  7. https://twitter.com/kentaro/status/722233495632764928

  8. ͦͯ͠ɺ1೥൒ܦա

  9. ͸ͯͳγεςϜߏ૝ ɾ1. ΍Γ͍ͨ͜ͱ ɾ2. ͸ͯͳγεςϜͱ͸ɹ ɾ3. Repairable Infrastructureɹ ɾ4. Experimentable

    Infrastructureɹ ɾ5. ·ͱΊɹ
  10. 1.΍Γ͍ͨ͜ͱ

  11. ΤϯδχΞ͕ӡ༻ʹർฐͤͣʹ ૑଄ੑΛൃشͯ͠ ָ͘͠։ൃͰ͖ΔΑ͏ʹ͍ͨ͠ ※ ※ಛʹɺSREɺWebΦϖϨʔγϣϯΤϯδχΞɺΠϯϑϥΤϯδχΞΛࢦ͢

  12. ΍Γ͍ͨ͜ͱ • ઓज़తͳγεςϜվળͷݶք͕Έ͖͑ͯͨ • ΤϯδχΞͷٕज़ʹΑΔ໰୊ղܾೳྗ͸͋͘͢͝Δͷ ͰɺγεςϜӡ༻ͷτΠϧ(࿑ۤ)Λ΋ͬͱݮΒ͍ͨ͠ • γεςϜӡ༻͔Βղ์͞Εɺ૑଄తͳ։ൃΛ΍͍ͬͯ ͖͍ͨ

  13. ͳͥϏδϣϯ͔ • γεςϜʹର͢ΔϏδϣϯ͕·ͣඞཁͩͱײͨ͡ • ϏδϣϯͱͦΕʹجͮ͘ઓུΛܾఆ͢Δ͜ͱͰޮՌత ʹγεςϜΛվળ͍ͯ͘͠ • ͋͑ͯந৅తࢥߟΛਪ͠ਐΊΔ͜ͱͰݶքΛಥഁ͢Δ • ͳΊΒ͔ͳγεςϜ͕޷͖

  14. 2. ͸ͯͳγεςϜͱ͸

  15. ͸ͯͳͷϏδϣϯ͔Βಋग़

  16. http://hatenacorp.jp/information/mission ʮ஌Δʯʮͭͳ͕Δʯʮදݱ͢Δʯ Ͱ৽͍͠ମݧΛఏڙ͠ɺ ਓͷੜ׆Λ๛͔ʹ͢Δ

  17. http://hatenacorp.jp/information/mission

  18. ޠ۟ͷΈൈਮ ΑΓଟ͘ͷΫϦΤΠλʔ ଟ༷ͳٕज़ ਓͷੜ׆ දݱ͢Δ

  19. ਓͷੜ׆͸਺े೥ => αʔϏεͷ࣌ؒతӬଓੑ දݱखஈ͸ଟ༷ => αʔϏεͷଟ༷ੑ

  20. αʔϏε਺ 100+ ϩʔϧ਺ 1000+ ఏڙ೥਺ 10years+ ※ ※͜͜Ͱ͸಺෦γεςϜ΍εςʔδϯά؀ڥΛؚΜͩγεςϜ୯Ґ

  21. ૿͑ଓ͚ΔαʔϏεΛޮ཰Α͘Քಇͤ͞Δ αʔϏεΛ10೥୯ҐͰՔಇͤ͞ଓ͚Δ

  22. αʔϏεͷ ʮݸ਺ʯͱʮ࣌ؒʯʹରͯ͠ εέʔϧ͢Δ͜ͱΛ໨ࢦ͢

  23. ͸ͯͳʹ ͢Ͱʹଘࡏ͢Δཁૉٕज़͔Β ۩ମతͳϏδϣϯΛߟ͑Δ

  24. 3. Repairable Infrastructure

  25. Droot https://github.com/yuuki/droot

  26. Droot • DockerΞʔΧΠϒΛchrootͰ࣮ߦ͢Δ͚ͩͷ௒ܰྔΞϓ ϦέʔγϣϯίϯςφΤϯδϯ • Docker͕ఏএ͢ΔBuild -> Ship -> Runͷ֓೦Λ෼ղ͠ɺ

    ίϯςφΤϯδϯ෦෼ͷΈΛ͸ͯͳΒ࣮͘͠૷ͨ͠΋ͷ
  27. ڊେͳج൫ιϑτ΢ΣΞʹ ର͢ΔΞϯνςʔθ

  28. ڊେͳج൫ιϑτ΢ΣΞ • طଘͷج൫ιϑτ΢ΣΞ܈ͱͷ࿈ܞ͕೉͍͠ • ෆ҆ఆʹͳͬͨͱ͖ʹରॲͮ͠Β͍ • όʔδϣϯΞοϓ࣌ͷӨڹൣғ͕େ͖͍ • ೥਺͕ܦա͢Δͱɺ৽͍͠΋ͷ΁ೖΕସ͑ͨΓɺఫୀ͢ ΔՄೳੑ΋͋Δ

    • ௕೥ӡ༻͢ΔΠϯϑϥετϥΫνϟʹ͸޲͔ͳ͍
  29. ෼ղͱ࠶ߏங

  30. ΍Γ͍ͨ͜ͱΛখ͞ͳཁૉʹ ෼ղ͠ɺ࠶ߏங͢Δ UNIX఩ֶͷΑ͏ͳߟ͑ํ

  31. ΞϓϦέʔγϣϯσϓϩΠϝϯτͷྫ Build Run Ship

  32. ΞϓϦέʔγϣϯσϓϩΠϝϯτͷྫ Archive Registry Archive Builder Archive Uploader Deploy Server Archive

    Fetcher Archive Extracter Container Engine σϓϩΠλʔήοτ CIαʔό Service Discovery
  33. ΞϓϦέʔγϣϯσϓϩΠϝϯτͷྫ Archive Registry Archive Builder Archive Uploader Deploy Server Archive

    Fetcher Archive Extracter Container Engine σϓϩΠλʔήοτ CIαʔό Service Discovery
  34. ΞϓϦέʔγϣϯσϓϩΠϝϯτͷྫ Archive Registry Archive Builder Archive Uploader Deploy Server Archive

    Fetcher Service Discovery Archive Extracter Container Engine σϓϩΠλʔήοτ CIαʔό
  35. ΞϓϦέʔγϣϯσϓϩΠϝϯτͷྫ Archive Registry Archive Builder Archive Uploader Deploy Server Archive

    Fetcher Service Discovery Archive Extracter Container Engine σϓϩΠλʔήοτ CIαʔό
  36. ΞϓϦέʔγϣϯσϓϩΠϝϯτͷྫ Archive Registry Archive Builder Archive Uploader Deploy Server Archive

    Fetcher Service Discovery Archive Extracter Container Engine σϓϩΠλʔήοτ CIαʔό
  37. ۩ମతͳ࣮૷Λ഑ஔ Amazon S3 droot build awscli furoshiki stretcher Mackerel capze

    droot run σϓϩΠλʔήοτ CIαʔό
  38. ෼ղͱ࠶ߏங • ଟ਺ͷαʔϏεΛޮ཰Α͘ӡ༻͢Δʹ͸ڞ௨ج൫͕ඞཁ • ௕ظӡ༻͢ΔαʔϏε͸มԽ͠ଓ͚Δ • ιϑτ΢ΣΞΛখ͘͞γϯϓϧʹ෼ղ͠ɺকདྷͷมߋʹ దԠͰ͖ΔΑ͏ʹ͓ͯ͘͠

  39. Repairable मਖ਼ͷ༰қͳ ܽؕ෦෼Λमਖ਼͢ΔͨΊͷมߋΛہॴతʹԡ͑͞Δ͜ ͱ͕Ͱ͖,݁Ռͱͯ͠,ଞͷϓϩάϥϜϞδϡʔϧ,෇ଐจ ॻʹ͸࠷খݶͷӨڹ͔͠༩͑ͳ͍Α͏ͳιϑτ΢ΣΞ ʹؔͯ͠༻͍Δ༻ޠ. http://ejje.weblio.jp/content/repairable

  40. Repairable Infrastructure

  41. 4. Experimentable Infrastructure

  42. Q. ࠷΋࣌ؒΛͱΒΕ͍ͯΔ͜ͱ͸ʁ A. γεςϜͷߏ੒΍ঢ়گ͕Θ͔Βͳ͍ͱ ͖ͷௐࠪ

  43. αʔϏε਺͕ଟ͍ αʔϏεͷྺ࢙͕௕͍ ☓ ෳࡶ౓ =

  44. γεςϜͷঢ়ଶͱৼΔ෣͍Λ ଊ͑ଓ͚Δ͜ͱͷॏཁੑ ʹؾͮ͘

  45. Mackerel https://mackerel.io

  46. Mackerel • αʔό؅ཧɾ؂ࢹαʔϏε • ΋ͱ΋ͱ͸͸ͯͳͷࣾ಺πʔϧͩͬͨ • 2007೥લޙʹଟ਺ͷαʔϏεΛޮ཰Α͘ߏங͢ΔͨΊ ʹXen HypervisorΛಋೖ •

    Ծ૝ϗετ਺͕૿େ͠ɺExcelͰ͸؅ཧͰ͖ͳ͘ͳͬͨ • ϗετ৘ใΛϓϩάϥϚϒϧʹѻ͏MackerelΛ։ൃ
  47. Mackerel͸ αʔϏεͷଟ༷ੑΛ ղܾ͢ΔͨΊʹൃୡ͖ͯͨ͠

  48. ୯ͳΔ؂ࢹͰ͸ͳ͍

  49. ؍ଌ Observation

  50. ؍ଌ ࢮ׆ঢ়ଶ ϝτϦοΫ ϩά Πϕϯτ αʔό ߏ੒ཁૉ ཁૉಉ࢜ ͷؔ܎

  51. ܧଓతͳ؍ଌʹΑΓ աڈΛ஌ΓɺݱࡏΛଊ͑Δ

  52. ͜͜·Ͱ͸ݟ͍͑ͯΔ ͦͷ࣍ʹ΍Γͨ͘ͳΔ͜ͱ

  53. ະདྷΛ༧ଌ͠ɺରԠ͢Δ

  54. ࣮ݧ Experiment

  55. ϑΟʔυόοΫ੍ޚ

  56. ϑΟʔυόοΫ੍ޚ͸ɺେن໛Ͱෳࡶ ͳγεςϜΛɺͨͱ͑γεςϜ͕֎ཚ ʹӨڹΛड͚Α͏ͱ΋ɺ͋Δ͍͸ɺݶ ΒΕͨࢿݯΛ༗ޮར༻ͭͭ͠ɺͦͷੑ ೳΛอͬͯಈ࡞ͤ͞ΔͨΊͷख๏Ͱ͢ɻ Philipp K. Janert ஶ, ʮΤϯδχΞͷͨΊͷϑΟʔυόοΫ੍ޚೖ໳ʯ,ΦϥΠϦʔɾδϟύϯ,

    2014/07
  57. ϑΟʔυόοΫ੍ޚͷ஫໨఺ • ੍ޚର৅͸ϒϥοΫϘοΫεͰ͋Γɺத਎͸ෆ໌ͰΑ͍ • OpsΤϯδχΞ͕ΞϓϦέʔγϣϯͷத਎Λ஌ΒͣʹϞχ λϦϯά݁Ռ͚ͩΛΈͯো֐ରԠ͢Δ༷ࢠʹࣅ͍ͯΔ • ॻ੶ʹαʔόͷ਺ͷௐ੔΍Ωϟογϡώοτ཰΁ͷԠ༻ྫ ͕͋Δ •

    WebγεςϜ͸ෳࡶ͗ͯ͢ཧ࿦ϞσϧΛಋग़͢Δͷ͸೉͠ ͍ͨΊɺύϥϝʔλͷܾఆʹ͸ʮ࣮ݧʯʹΑΔܭଌ͕ඞཁ
  58. ϑΟʔυόοΫ੍ޚͷಋೖΠϝʔδ • ੍ޚೖྗ: αʔόͷ୆਺ɺαʔόͷϝϞϦྔͳͲ • ੍ޚग़ྗ: ϨεϙϯελΠϜɺΤϥʔ਺ͳͲ • ੍ޚग़ྗΛ؂ࢹ͠ଓ͚ɺ໨ඪ஋͔Β֎ΕͨΒ੍ޚೖྗΛมߋ ͠ɺݩʹ໭͢Α͏ͳૢ࡞Λ͢Δ

    • ੍ޚೖྗʹରͯ͠఻ୡؔ਺Λద༻͠ɺ੍ޚग़ྗΛಘΔ • ఻ୡؔ਺ͷಉఆͱνϡʔχϯά͸ɺ࣮γεςϜͰԠ౴ΛΈΔ ඞཁ͕͋Δ
  59. ຊ൪؀ڥΛյ͢ͷ͸ෆ҆

  60. ຊ൪ʹ͍ۙ؀ڥΛ࡞Δٕज़Λൃୡͤ͞ ύϥϝʔλΛ͔࣮͑ͯݧΛ܁Γฦ͠ɺ ϞσϧΛߏங͢Δ Container, Serverless Architecture, Shadow Proxyɺ

  61. ຊ൪؀ڥ ࣮ݧ؀ڥ ؍ଌγεςϜ ࣮ݧ ಈ࡞Ԡ౴Ϟσϧ ϑΟʔυόοΫ ੍ޚ

  62. ࣮ݧΛݩʹະདྷͷ؍ଌΛ͢Δ

  63. Experimentable Infrastructure

  64. 5. ·ͱΊ

  65. ͸ͯͳγεςϜ

  66. αʔϏεͷ ʮݸ਺ʯͱʮ࣌ؒʯʹରͯ͠ εέʔϧͤ͞ΔͨΊʹ

  67. ෼ղͱ࠶ߏஙʹΑΓRepairableʹߏங͞Ε ؍ଌͱ࣮ݧͷϧʔϓΛߴ଎ʹճ͠ͳ͕Β ࣗ཯తʹಈ࡞͢ΔExprimentableͳγεςϜ

  68. http://hatenacorp.jp/recruit/career/operation-engineer WebΦϖϨʔγϣϯΤϯδχΞੵۃืूத