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

ChatWorkの新メッセージングシステムを支える技術

 ChatWorkの新メッセージングシステムを支える技術

AWS Summit 2017 Tokyo, Dev Dayで登壇した際の資料です。

かとじゅん

June 09, 2017
Tweet

More Decks by かとじゅん

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork େଜ৳ޗ ๏ ίΞςΫϊϩδʔ։ൃࣨ ๏ 4DBMB෼ࢄγεςϜػցֶश

    ๏ 'BMDPOͰ͸શମઃܭΠϯϑϥ୲౰ Ճ౻५Ұ ๏ ίΞςΫϊϩδʔ։ൃࣨ ๏ 4DBMBυϝΠϯۦಈઃܭ0"VUI ๏ 'BMDPOͰ͸શମઃܭΞϓϦέʔγϣϯ୲౰
  2. ৽ΞʔΩςΫνϟ΁ͷಓͷΓ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ͦͷޙ41P'ରࡦͳͲͷվળ͸ܧଓతʹߦ͕ͬͨࠜຊରࡦ͸Ͱ͖ͳ͔ͬͨɻ 
 ํ਑Λม͑ͯγεςϜΛ࡮৽͢Δ͜ͱʹͳͬͨ
 ๏

    γεςϜ࡮৽ʹ޲͚ͯɺ࠷ॳʹϥΠϒϚΠάϨʔγϣϯϓϥϯ ӈਤ Λબ ୒ͨ͠ɻ ‣ طଘγεςϜ΁ͷӨڹΛ࠷খݶʹ͢ΔͨΊʹ w طଘγεςϜͷίʔυΛۃྗมߋ͠ͳ͍ w ແఀࢭϚΠάϨʔγϣϯ ‣ είʔϓ͸νϟοτϧʔϜʹؔ͢Δ͢΂ͯͷػೳ ϧʔϜ ϝοηʔδ  λεΫ ϑΝΠϧ ίϯλΫτ 
 ๏ Ұ೥൒΄Ͳ։ൃΛଓ͚͕ͨɺ༷ʑͳ໰୊ ϓϩδΣΫτϚωδϝϯτɺε ίʔϓɺύϑΥʔϚϯεͳͲ ͕ى͖ɺϓϩδΣΫτΛ࠶ىಈͨ͠ʜ
 ๏ ࠜຊతʹઓུΛม͑ͯ৽͍͠ΞʔΩςΫνϟʹҠߦ͢Δ͜ͱʹͨ͠
 ͦΕ͔Β໿೥ؒͷ։ൃظؒΛܦͯɺେن໛ͳσʔλҠߦΛߦ͍ɺ ೥຤ʹແࣄϦϦʔε
  3. ৽ΞʔΩςΫνϟͷํ਑ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ Ϗδωεʹ࠷΋Өڹͷେ͖͍ϝοηʔδͷΈͷείʔϓʹߜΔ ‣ ϝοηʔδ਺ͷਪҠ͸ɺ೥ԯ݅‎೥ԯ݅‎೥ԯ݅ ‣

    ϝοηʔδ਺͸ɺࢦ਺ؔ਺తʹٸ૿͍ͯ͠Δ ๏ อकੑΛҡ࣋͢ΔͨΊʹɺυϝΠϯۦಈઃܭ͸ܧଓ
 ๏ ϦΞΫςΟϒγεςϜ "LLB Λϕʔεʹͨ͠$234 &4Λ࠾༻ ‣ ߴεϧʔϓοτɾ௿ϨΠςϯγΛ࣮ݱɻ
 ݱߦγεςϜͷഒఔ౓ͷಉ࣌઀ଓ਺ͱεϧʔϓοτΛ࣮ݱ͢Δ͜ͱ ‣ ՄೳͳݶΓো֐ʹରͯࣗ͠ݾճ෮ྗΛ࣋ͭ ๏ ௿ίετͰ͋Δ͜ͱ γεςϜن໛ͱίετͷ૬͕ؔઢܗະຬ 
 ๏ ίϯηϓτݕূ 10$ Λඞਢͱ͢Δ
 ΫωϏϯϑϨʔϜϫʔΫͷෳࡶͳ՝୊΁ͷରԠ ୳ࠪ‎஌֮‎ରԠͷΞδϟΠϧϓϩηε
  4. $234ͱ͸ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ $PNNBOEBOE2VFSZ3FTQPOTJCJMJUZ4FHSFHBUJPO ‣ ίϚϯυɾΫΤϦ੹຿෼཭ ‣

    ೥(SFH:PVOHࢯʹΑͬͯߟҊ͞ΕͨΞʔΩς Ϋνϟύλʔϯ ๏ $PNNBOE2VFSZ4FQBSBUJPO$24 ‣ ίϚϯυΫΤϦ෼཭ݪଇ ‣ ʮ͋ΒΏΔϝιου͸ɺΞΫγϣϯΛ࣮ߦ͢ΔίϚϯ υ͔ɺݺͼग़͠ݩʹσʔλΛฦ͢ΫΤϦ͔ͷ͍ͣΕ͔ Ͱ͋ͬͯɺ྆ํΛߦͬͯ͸ͳΒͳ͍ɻ͜Ε͸ɺ࣭໰͢ Δ͜ͱͰճ౴ΛมԽͤͯ͞͸ͳΒͳ͍ͱ͍͏͜ͱͩʯ ‣ ೥#FSUSBOE.FZFSࢯʹΑͬͯߟҊ͞Εͨઃܭ ݪଇ
 ๏ $24ΛΞʔΩςΫνϟʹద༻ͨ͠ͷ͕$234
  5. &WFOU4PVSDJOHͱ͸ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ (SFH:PVOHࢯͷߟҊ ๏ &WFOU4PVSDJOH ҎԼ&4

    ͱ͸ɺσʔλͰ͸ͳ͘Կ͔͠Βͷग़དྷࣄʹυϝΠϯΠϕϯτΛϞσ Ϧϯάͷओ໾ʹ͢Δ͜ͱ ๏ υϝΠϯϞσϧΛσʔλͱͯ֨͠ೲ͢ΔͷͰ͸ͳ͘ɺൃੜ͢ΔυϝΠϯΠϕϯτͷ͢΂ͯΛӬ ଓԽ͢Δ ݪଇతʹ௥Ճॻ͖ࠐΈ ɻϞσϧͷঢ়ଶ͸ɺΠϕϯτͷྻΛ࠶ੜ͢Δ͜ͱͰಘΒΕΔ ๏ &4͸ɺ$234Λܶతʹվྑ͢Δ
  6. ॳظͷ$234 &4Ϟσϧ 10$࣌ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork w υϝΠϯۦಈઃܭ w

    υϝΠϯΠϕϯτΛετϨʔδʹॻ͖ࠐΉ Write API Read Model Updater w υϝΠϯΠϕϯτΛϦʔυϞσϧʹม׵ Read API w ΫΤϦۦಈઃܭ w Πϯελϯε਺ͱεϧʔϓοτͷؔ܎͸ɺ ΄ͱΜͲઢܗͰεέʔϧΞ΢τ͢Δ͜ͱ͕ Θ͔ͬͨ ݕূ݁Ռ
  7. ίϯϙʔωϯτߏ੒ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ෼ྨ ίϯϙʔωϯτ ϛυϧ΢ΣΞελοΫ ֓ཁ ετϨʔδ

    Write DB Kafka ύʔςΟγϣϯ͕1Room಺ͷΠϕϯτͷ࿈ଓੑΛอূ͢Δɻ Read DB HBase ReadModelΛӬଓԽɻRowΩʔ͸ɺ”RoomId + MessageId” ΞϓϦέʔγϣϯ Write API akka-http, circe, akka- stream, kafka ΫϥΠΞϯτ͔Βϝοηʔδͷ౤ߘɾߋ৽Λड͚෇͚ɺ KafkaʹυϝΠϯΠϕϯτΛΤϯΩϡʔ͢Δ Read API akka-http, circe, hbase ϝοηʔδͷऔಘɾݕࡧΛड͚෇͚ɺ HBase͔ΒRead ModelΛΫϥΠΞϯτΛฦ͢ɻ Read Model Updater akka-actor, akka-stream, kafka-stream Kafka͔ΒυϝΠϯΠϕϯτΛσΩϡʔ͠ɺHBaseʹRead ModelΛߏங͢Δɻ ͦͷޙɺSparrow ForwarderͷͨΊʹ࠶ͼKafkaʹΤϯΩϡʔ͢Δɻ Sparrow Forwarder akka-actor, kafka Kafka͔ΒυϝΠϯΠϕϯτΛσΩϡʔ͠ɺSparrow APIΛίʔϧ͢Δɻ
  8. &SSPS,FSOFMQBUUFSO ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ In a supervision hierarchy,

    keep important application state or functionality near the root while delegating risky operations towards the leaves. - Reactive Design Patterns
 ๏ εʔύʔϏδϣϯώΤϥϧΩʔͰ͸ɺةݥͳ࡞ۀΛώΤϥϧΩʔͷ຤୺ʹҕৡ͢Δͱಉ࣌ʹɺ ϧʔτۙ͘ʹॏཁͳΞϓϦέʔγϣϯঢ়ଶ΍ػೳΛҡ࣋͢Δ ๏ ͜ͷύλʔϯ͸ɺ&SMBOHͰ਺े೥ʹΘཱͨͬͯ֬͞Ε͍ͯΔɻ
 Jonas Bonerࢯ LightBendࣾCTO ͕AkkaΛ࣮૷͢ΔͨΊͷओͳΠϯεϐϨʔγϣϯͷͭ ग़య: Reactive Design Patterns, Jonas Boner, Dr. Roland Kuhn, Brian Hanafee, Jamie Allen
  9. -FUJUDSBTIQBUUFSO ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ Prefer a full component

    restart to internal failure handling. - Reactive Design Patterns
 ๏ ಺෦ΤϥʔϋϯυϦϯάΑΓ΋ɺ׬શͳίϯϙʔωϯτ࠶ىಈΛਪ঑͢Δɻ ‣ ಺෦Τϥʔ͔Βͷճ෮͢Δػߏ͸ɺނোͨ͠෦෼Λे෼ʹ෼཭Ͱ͖ͳ͍ɻ
 ίϯϙʔωϯτ಺෦ͷ͢΂͕ͯো֐ʹΑͬͯӨڹΛड͚ΔՄೳੑ͕͋Δ ‣ εʔύʔόΠβʹো֐΁ͷରԠ͸ҕ೚͠ɺγεςϜͷҰ෦Λ࠶ىಈͯ͠෮چ͢Δ ‣ ֊૚తͳ࠶ىಈϕʔεͷো֐ॲཧʹΑΓɺো֐ϞσϧΛେ෯ʹ؆ૉԽͰ͖Δɻ
 ·ͨɺ༧ظ͠ͳ͍ো֐ʹૺ۰ͯ͠΋ੜ͖࢒ΔՄೳੑ͕૿͢ ग़య: Reactive Design Patterns, Jonas Boner, Dr. Roland Kuhn, Brian Hanafee, Jamie Allen
  10. Supervisor ΞΫλʔͷεʔύʔϏδϣϯώΤϥϧΩʔ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ਌ͱࢠͷΞΫλʔͷߏ଄ ໦ߏ଄ ͕͋Δɻ਌͸ࢠͷੜ੒΍؂ಜ

    Λߦ͏ ๏ ਌ʹΑͬͯ࡞ΒΕͨࢠΞΫλʔ͸ɺεʔύʔόΠβͷ؂ಜԼʹ ஔ͔ΕΔɻࢠΞΫλʔ͕ഁغ͞ΕΔͱɺͦͷࢠΞΫλʔʹର͢ Δ਌ͷ؂ಜ੹೚΋ऴྃ͢Δ ๏ Ϋϥογϡ͢ΔՄೳੑ͕ߴ͍ΞΫλʔ͸ɺՄೳͳݶΓώΤϥϧ ΩʔͷԼ૚ʹ഑ஔ͢ΔɻԼ૚Ͱى͖ͨো֐͸ɺ্Ґ·ͰͷώΤ ϥϧΩʔ͕؅ཧɾΤεΧϨʔγϣϯ͕Մೳɻো֐Λىͨ͜͠ࢠ ΞΫλʔ͸਌ͷࢦࣔʹΑͬͯ࠶ىಈɾఀࢭͳͲߦ͏ Supervisor Child Child Child Supervisor Child Child Supervisor Child Child ग़య: Akka in Action, Raymond Roestenburg, Rob Bakker, Rob Williams
  11. "LLBͰͷεʔύʔϏδϣϯώΤϥϧΩʔ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ࠷ॳʹActorSystem͕࡞ΒΕΔɻActorSystemΛ࢖ͬͯ࠷ॳͷεʔύʔόΠβΛ ࡞ΔɻεʔύʔόΠβ͕ ࢠΞΫλʔΛ࡞Δ͜ͱͰώΤϥϧΩʔΛߏங͢Δ
 ๏

    ࣮ࡍʹ͸ɺΞϓϦέʔγϣϯ༻ͷΞΫλʔ͸VTFSHVBSEJBO഑Լʹॴଐ͢Δ Application Orders Products Users Order Product User Supervisor ActorSystem("OderSystem") / system user “root guardian” “user guardian” “the one who works the bubbles of space-time” “system guardian” your actor hierarchy sys support hierarchy shutdown order ग़య: akka.io - Supervision and Monitoring
  12. εʔύʔϏδϣϯώΤϥϧΩʔͷ࣮૷ύλʔϯ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ϩάϑΝΠϧΛ؂ࢹ‎ϝϞϦ্ʹϩʔυ‎ߦʹ෼ղ‎%#ʹॻ͖ ࠐΉྫɻࢠΞΫλʔ͕Ӆṭ͞Ε͍ͯͳ͍࣮૷ύλʔϯ ๏ ར఺͸ɺ֤ΞΫλʔ͕૬ޓʹ௚઀௨৴͢Δ͜ͱɻεʔύʔόΠ

    β͸؂ಜۀ຿ͱΠϯελϯε࡞੒ͷΈ
 ๏ ܽ఺͸ɺ࠶ىಈ͔͠࢖͑ͳ͍͜ͱͱɺϝοηʔδ͕σουϨ λʔʹૹΒΕࣦͯΘΕͯ͠·͏Մೳੑ͕͋Δ͜ͱɻ਌ͷεʔ ύʔόΠβ͸ϝοηʔδϑϩʔ͔Β෼཭͞Εͯ͠·͏ Database DbWriter Row LogProccessor LogFile LogFileWatcher NewFile DbWriter Supervisor LogProccessor Supervisor LogFileWatcher Supervisor ώΤϥϧΩʔͷҧ͏ࢠΞΫλʔ΁ͷ ActorRefΛಘΔͷ͸೉͍͠ ग़య: Akka in ActionΑΓฤू, Raymond Roestenburg, Rob Bakker, Rob Williams
  13. εʔύʔϏδϣϯώΤϥϧΩʔͷ࣮૷ύλʔϯ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ઌ΄Ͳͱಉ͡ॲཧϑϩʔ͕ͩɺதؒʹεʔύʔόΠβΛڬΈࢠ ΞΫλʔΛӅṭ͢Δ࣮૷ύλʔϯ ๏ εʔύʔόΠβ͸୯ͳΔੜ੒΍؂ಜͰ͸ͳ͘ɺؒ઀ࢀরͱ͠

    ͯɺ͢΂ͯͷϝοηʔδΛ୯ʹಁաతʹϑΥϫʔυ͢Δɻ
 εʔύʔόΠβ͸ࢠΞΫλʔΛऴྃͨ͠Γɺ֎෦ͷΞΫλʔͱ ͸ແؔ܎ʹ৽͍͠΋ͷΛੜΈग़ͨ͠ΓͰ͖Δ
 ๏ ઌͷྫͱൺ΂ͯϝοηʔδϑϩʔͱώΤϥϧΩʔͷΪϟοϓ͕ ͳ͍ Database DbWriter DbWriterSupervisor LogFileWatcher Supervisor Row LogProccessor LogProccessorSupervisor LogFile LogFileWatcher NewFile ग़య: Akka in ActionΑΓฤू, Raymond Roestenburg, Rob Bakker, Rob Williams
  14. 4QBSSPX'PSXBSEFSͷεʔύʔϏδϣϯώΤϥϧΩʔ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ 3֊૚ͷώΤϥϧΩʔɻதؒͷεʔύʔόΠβ͸ Exponential BackOffΛαϙʔτ͢Δ
 ๏

    ԼҐ૚ͷΞΫλʔ͸͍ͭͰ΋Ϋϥογϡͯ͠΋Α͍ɻ ࢠΞΫλʔͰྫ֎͕ൃੜ͢Δͱ࠶ىಈΛ໋͡Δɻ #BDL0⒎ޙʹϓϩηεΛ࠷ॳ͔Β΍Γ௚͢
 ๏ "1*ίʔϧ΋ಉ༷ʹ#BDL0⒎͍͕ͯͨ͠,BGLBͷηο γϣϯλΠϜλΠϜΞ΢τ͕ൃੜ͢ΔͨΊɺ#BDL0⒎ ͠ͳ͍Α͏ʹͨ͠ɻશମͷॲཧϑϩʔʹӨڹΛ༩͑ͳ ͍Α͏ʹ#BDL0⒎͢Δ͜ͱ͕ٻΊΒΕΔ ໰୊͕ى͖ ͨͷͰɺ BackOffΛ ഇࢭͨ͠
  15. 'BMDPOΞʔΩςΫνϟৄղͷαϚϦ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ΞϓϦέʔγϣϯ։ൃͰͷ੒ޭཁҼ ‣ ,1*ߩݙ౓͕ߴ͍είʔϓͷબ୒ͱ10$ͷಋೖ ‣

    ϦΞΫςΟϒγεςϜͱCQRS + ESͷ࠾༻ ๏ ࠓճͷϓϩδΣΫτͷޮՌ ‣ ະ஌ͷٕज़Λ࠾༻͠ͳ͕Β΋ݫબͨ͠ݕূΛ౿·͑ɺϦΞΫςΟϒγεςϜͱ $234 &4ͷಛ௃Λ͋Θͤ࣋ͭɺϋΠύϑΥʔϚϯεͰো֐ʹڧ͍γεςϜΛ ߏங͢Δ͜ͱ͕Ͱ͖ͨ
  16. Ϟνϕʔγϣϯ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ChatWork಺ʹେ͖ͳϝοηʔδϯά༻ͷαϒγεςϜΛ
 ߏங͢Δ(miroserviceతʹ੾Γग़͢)ͳΒ
 ๏ ͜Ε·ͰͷΠϯϑϥӡ༻՝୊΋ղܾ͍ͨ͠

    ‣ ओͳର৅ɿςετɾϦϦʔεύΠϓϥΠϯɺ࣮ߦΠϯϑϥ ๏ ։ൃνʔϜ͕ࣗ਎ͰϦϦʔεαΠΫϧΛप͠ɺ
 ӡ༻·ͰͰ͖ΔΑ͏ͳঢ়گΛ࡞ͬͯ%FW0QTΛՃ଎͍ͤͨ͞
  17. ࠔ͍ͬͯͨ͜ͱ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ݱߦγεςϜͷΠϯϑϥߏ੒௒֓ཁ ‣ EC2ϕʔε(php)ͷαʔό܈ ‣

    JenkinsʹΑΔσϓϩΠδϣϒ܈ ‣ CapistranoΛ࢖ͬͨσϓϩΠ ‣ FabricʹΑΔઃఆ؅ཧ
 ๏ ࠔ͍ͬͯͨ͜ͱ ‣ ϦϦʔε࡞ۀ͕׬શʹࣗಈԽ͞Ε͓ͯΒͣϦϦʔε͕େม ‣ σϓϩΠϑϩʔͷվम͕େม$*αʔόͷӡ༻ෛՙߴ͍ ‣ ෛՙࢼݧͷख͕ؒ੯͍͠ ΋ͬͱΧδϡΞϧʹ΍Γ͍ͨ
  18. ࣮ߦ؀ڥΛ,VCFSOFUFTʹ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ ࠾༻ͨ͠ओͳཧ༝(ٕज़໘) ‣ ίϯςφΦʔέετϨʔγϣϯͱͯ͠͸σϑΝΫτ &

    Production Ready ͳػೳ͕๛෋ ‣ )FMNͱ͍͏KubernetesͷύοέʔδϯάγεςϜ͕͋Δ ‣ αʔόίετ࡟ݮݟࠐΊΔ ‣ ։ൃ͕΋ͷ͘͢͝׆ൃ ‣ LVCFBXT ͷϓϥΠϚϦϝϯςφ !NVNPTIV ͞Μ͕ࣾ಺ʹ͍Δ ‣ ϩʔΧϧ։ൃ؀ڥNJOJLVCF͕͋ͬͯΧϯλϯʹϩʔΧϧͰىಈͰ͖Δ
  19. Kubernetes͕΋ͨΒͨ͠੹຿ͷ෼཭ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ΞϓϦ + Πϯϑϥ ๏ ඞཁͳAWSϦιʔε͸terraform؅ཧ

    ‣ ΞϓϦ: PR ࡞੒ ‣ Πϯϑϥ: ϨϏϡʔ & ద༻ security group etc. ΞϓϦ ๏ Kubernetes/Helm APIΛͰ͍ͭͰ΋
 σϓϩΠ(։ൃऀ ≒ ӡ༻ऀ) ๏ ΞϥʔτରԠ΋νʔϜࣗ਎ͰॲཧՄೳ Πϯϑϥ ๏ ҆ఆͨ͠ΠϯϑϥఏڙʹϑΥʔΧε ‣ kubernetes API, Helm API (Tiller) ‣ ϩάऩूج൫, ϝτϦΫεऩूج൫ ๏ kube-aws Λ࢖ͬͯkubernetesΛσϓϩΠ
  20. Simple & Scalable (1/4) ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ✓ ύΠϓϥΠϯ͕Ұڃࢢຽ

    ؂ࢹ औಘ Resource ঢ়ଶͱͯ͠ೖྗ Jobs Tasks ঢ়ଶΛग़ྗ Resource ঢ়ଶΛ֎෦΁อଘ ✓ ఆٛ͸શͯYAML ➡ Pipeline as CodesՄೳ Worker͸Πϯελϯε௥Ճ͢Δ͚ͩ reference: https://concourse.ci
  21. Dependable Results (Reproducible Pipeline) (2/4) ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ✓

    ύΠϓϥΠϯ͸εςʔτϨε ؂ࢹ औಘ Resource ঢ়ଶͱͯ͠ೖྗ Jobs Tasks ঢ়ଶΛग़ྗ Resource ঢ়ଶΛ֎෦΁อଘ ➡ ࣮ߦʹ࠶ݱੑ͕͋Δ ➡ ϩʔΧϧ։ൃͨ͠ύΠϓϥΠϯΛຊ൪CIαʔόʹͦͷ··σϓϩΠ ✓ Taskͷ࣮ߦ؀ڥ͕ίϯςφͰ෼཭͞Ε͍ͯΔ ➡ Concourseαʔόʹpluginඞཁͳ͍ͷͰ؅ཧָ͕ ➡ ಠࣗimageͰ࣮ߦ؀ڥࣗ༝ࣗࡏ reference: https://concourse.ci
  22. Integration, Streamlined-UI (3,4/4) ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ✓ ֦ுՄೳͳResource ➡

    ChatWork௨஌΋༰қʹಠ֦ࣗு reference: https://concourse.ci ๏ ϚϧνςφϯτରԠ ๏ ॊೈͳೝূํ๏ ‣ Basicೝূ, OAuth(Github etc.) Integration Streamlined-UI ๏ ϏϧυύΠϓϥΠϯͷঢ়ଶΛ
 ϦΞϧλΠϜͰ؂ࢹՄೳͳUI
 ๏ ೖྗςΩετϘοΫεͷແ͍UI
  23. Concourse CIʹͯ͠ಛʹΑ͔ͬͨ͜ͱ(1/2) ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ✓ CIαʔόͷӡ༻͕ඇৗʹָʹͳͬͨ ๏ جຊతʹύΠϓϥΠϯͷఆٛʹશ͕ͯهड़͞ΕΔ

    ‣ task΍resourceͷఆٛ΋container image ๏ αʔό͸pipelineۦಈ͢Δ͚ͩͰΑ͍ͷͰpluginͷߏ੒؅ཧ͕ඞཁͳ͍ ๏ Databaseͷӡ༻͸ඞཁ͕ͩɺอଘσʔλ͸ओʹύΠϓϥΠϯఆٛ΍ϏϧυཤྺͷΈ ‣ RDSΛ࢖͑͹ओͳӡ༻λεΫ͸Χόʔͯ͠΋Β͑ΔͷͰෛ୲͕গͳ͍ ๏ Production ReadyͳσϓϩΠ͸গ͠஫ҙ͕ඞཁ ‣ ެࣜͰ͸#04)͕ਪ঑ ‣ !NVNPTIV͞ΜͱҰॹʹDPODPVSTFBXTͱ͍͏terraformͷthin wrapperΛ։ൃ&ެ։த
  24. ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ✓ ϩʔΧϧ։ൃͨ͠ύΠϓϥΠϯ͕ͦͷ··ຊ൪ʹσϓϩΠͰ͖Δ ๏ ύΠϓϥΠϯ͸ReproducibleͳͷͰɺ֎෦(git, docker registry,

    kubernetes౳)ʹঢ়ଶΛ ४උ͢Ε͹Ͳ͜Ͱ΋࠶ݱ͕Մೳ
 ๏ ϩʔΧϧ։ൃ؀ڥ΋ॆ࣮ ‣ concourse ͸ ‘vagrant up’ͰΧϯλϯʹϩʔΧϧ؀ڥΛىಈՄೳ ‣ kubernetes ΋ minikube ͱ͍͏ϩʔΧϧ։ൃ؀ڥ͕͋Δ Concourse CIʹͯ͠ಛʹΑ͔ͬͨ͜ͱ(2/2)
  25. FalconͷCI/CDύΠϓϥΠϯ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ (JUMBCqPXXJUI&OWJSPONFOU#SBODIFTΛ࠾༻ ‣ ؀ڥຖͷϒϥϯνΛ࡞ͬͯঢ֨ͤ͞ΔϞσϧ ๏

    ௨஌͸DIBUXPSLOPUJpDBUJPOSFTPVSDFΛ࣮૷ staging؀ڥ༻branch ຊ൪؀ڥ༻branch ಈ࡞֬ೝޙঢ֨(खಈ) staging؀ڥ ຊ൪؀ڥ push σϓϩΠ σϓϩΠ pull pull ௨஌
  26. ෛՙςετπʔϧͷࣗಈԽ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ Ϟνϕʔγϣϯ ආ͚͍ͨ ‣ ։ൃେ٧ΊͰෛՙςετͰύϑΥʔϚϯε͕ग़ͳ͍


    ๏ ͡Ό͊Ͳ͏͢Δʁ ‣ ͜Ε·ͰҎ্ʹΧδϡΞϧʹෛՙςετΛ͔͚ΒΕΔ؀ڥΛ࡞Γ͍ͨ • FullBokར༻͢Δ͜ͱͰߏங͸ࣗಈԽग़དྷ͍͕࣮ͯͨߦࣗಈԽ͕Ϛμͩͬͨ • ݺͼग़͠ʹґଘؔ܎͕͋ΔΑ͏ͳγφϦΦΛGUIͰ࡞੒͢Δͷ͕खؒͩͬͨ
  27. ๏ Ͳ͏΍ΔʁʢͲ͏΍ͬͨ ‣ Amazon ECS + GatlingΛ࢖ͬͨෛՙςετࣗಈԽπʔϧͷಋೖ
 ๏ Ͳ͏ͳͬͨʁ ‣

    ෛՙγφϦΦ͕ίϯςφԽ͞Εͯෛՙ࣮ߦ·ͰࣗಈԽ ‣ ෛՙςετΛ௨ͬͨίʔυͷҡָ͕࣋ʹͳͬͨ ෛՙςετπʔϧͷࣗಈԽ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork
  28. (BUMJOHͱ͸ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ Ϟνϕʔγϣϯ ‏͜ͷ෦෼ͷαϙʔτπʔϧΛ࣮૷ ‣ Ϋϥελ࣮ߦ

    • ෳ਺ΠϯελϯεͰ࣮ߦ͢Ε͹ͳΜͱ͔Ͱ͖Δ ‣ ෳ਺Ϩϙʔτͷaggregation ‣ ͨͩ͠ • Gatling Frontline ͱ͍͏঎༻൛͋Γ • scale-out cookbook ΋ࢀߟʹͳΔ
  29. &$4 (BUMJOHΛ͔ͭͬͨෛՙςετπʔϧ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork ๏ $MPVE'PSNBUJPOςϯϓϨʔτ ‣ ECSΫϥελ+S3όέοτ,

    ECSλεΫ ๏ Gatling LogΛS3΁ॻ͖ग़ͨ͢ΊͷϕʔείϯςφΠϝʔδ ๏ S3ͷϩά͔Βू໿ϨϙʔτΛੜ੒͢Δπʔϧ 1.ߏங 2.ෛՙ࣮ߦ 3.Ϩϙʔτੜ੒ɾӾཡ ϩάอଘ pull
  30. DevOpsվળαϚϦ ChatWork ͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ © ChatWork 'BMDPO։ൃνʔϜ͕ ࣮ߦ؀ڥKubernetes&HelmԽɺCIαʔόConcourse CIԽɺ
 ෛՙࢼݧࣗಈԽπʔϧಋೖʹΑͬͯ ෛՙࢼݧΛ௨ͬͨΞϓϦίʔυΛ

    ։ൃνʔϜ͚ͩͰɺࣗ਎ͷ޷͖ͳλΠϛϯάͰϦϦʔε Α͏ʹͳͬͨ 'BMDPOγεςϜͷΞϥʔτରԠ·ͰνʔϜͰରԠͰ͖Δ ๏ ͜ͷϓϥΫςΟεΛطଘChatWorkνʔϜʹ֦ॆ ๏ ΠϯϑϥνʔϜΛͰ͖Δ͚ͩখ͘͞อͪଓ͚͍ͨ ࠓ ޙ