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

Immutable Infrastructure / これからのWeb, クラウドシステム

B4afc7d853d7f1cb6a253d3c7183c05a?s=47 Naoya Ito
September 12, 2014

Immutable Infrastructure / これからのWeb, クラウドシステム

B4afc7d853d7f1cb6a253d3c7183c05a?s=128

Naoya Ito

September 12, 2014
Tweet

Transcript

  1. *NNVUBCMF*OGSBTUSVDUVSF ͜Ε͔Βͷ8FCΫϥ΢υγεςϜ /BPZB*UP ,"*;&/QMBUGPSN*OD  ϚΠφϏχϡʔε*5αϛοτ

  2. ࣗݾ঺հ •  ҏ౻௚໵ •  ೥χϑςΟ •  ೥͸ͯͳ औక໾ࣥߦ໾һ$50  • 

    ೥άϦʔ ιʔγϟϧϝσΟΞ౷ׅ෦௕  •  ೥.64&"TTPDJBUFT ϑΣϩʔ  •  ೥,"*;&/QMBUGPSN*OD ٕज़ސ໰ 
  3. ,"*;&/QMBUGPSN*OD "#ςετΫϥ΢υαʔϏεQMBO#$%Λ։ൃ͢Δ໊ఔ౓ͷελʔτΞοϓ

  4. None
  5. ΞδΣϯμ •  *NNVUBCMF*OGSBTUSVDUVSFͬͯ  – ࣮ࡍͷࣄྫ – *NNVCBMFʙΛࢧ͑Δٕज़ •  ׬શԾ૝Խ͔Β04ϨϕϧԾ૝Խ΁ •  Ϗοάσʔλͱ*NNVUBCMFʙ

    – ͜Ε͔Βͷ8FCΫϥ΢υγεςϜ
  6. ಥવͰ͕͢ɺҎԼͷ Ϋϥ΢υαʔϏεΛ͝ଘ஌Ͱ͔͢ •  )FSPLV •  8FSDLFS 5SBWJT$* $JSDMF$*

  7. )FSPLV

  8. )FSPLV •  (JUͰιʔείʔυΛૹΓࠐΉ͚ͩͰ 8FCΞϓϦέʔγϣϯΛಈ͔ͯ͘͠ΕΔ $  git  push  heroku  master  

    -­‐-­‐-­‐-­‐-­‐>  Ruby  app  detected   -­‐-­‐-­‐-­‐-­‐>  Compiling  Ruby/Rack   -­‐-­‐-­‐-­‐-­‐>  Using  Ruby  version:  ruby-­‐2.0.0   (snip.)   -­‐-­‐-­‐-­‐-­‐>  Launching...  done,  v14                http://radiant-­‐wildwood-­‐3571.herokuapp.com/  deployed   to  Heroku  
  9. http://www.slideshare.net/mokamoto/201117c4-heroku-databasecom

  10. %ZOP͸ຖճغͯΒΕΔ •  º্ॻ͖ͰσϓϩΠ •  ˓ຖճ৽͍͠%ZOP͕࡞੒͞ΕΔ – ৽%ZOP͕४උ׬ྃϧʔςΟϯά͕੾Γସ ΘΓݹ͍΋ͷ͸ഇغ

  11. $*BTB4FSWJDF

  12. $*BTB4FSWJDF •  $POUJOVPVT*OUFHSBUJPO Ϋϥ΢υ •  8FSDLFSɺ5SBWJT$*ɺ$JSDMF$* – (JU)VCͳͲʹίʔυͷมߋ͕QVTI͞ΕΔ ͱɺಉϨϙδτϦ಺ͷςετΛ࣮ߦ

  13. webhook notification

  14. None
  15. ςετͷ౓؀ڥΛ࡞Γग़͢ •  ෳ਺ͷϢʔβʔ͕ෳ਺ͷγεςϜΛςετ ͢Δ •  ςετຖʹ৽͍͠ίϯςφΛ࡞Δ – ଞͷϢʔβʔͱ͸෼཭͞Εͨ؀ڥ͕ཁΔ͔Β – ςετ͕ऴΘͬͨΒغͯΔ

  16. %JTQPTBCMF$PNQPOFOU •  ഇغՄೳͳ •  ඞཁʹͳͬͨΒ࡞Δ •  ߋ৽͸্ॻ͖Ͱ͸ͳͯ͘ɺغͯͯ৽͍͠ͷ ࡞Δɻͭ·Γɺมߋ͠ͳ͍ – ˠ*NNVUBCMF*OGSBTUSVDUVSF

  17. αʔόʔͷঢ়ଶ •  ͋Δ೔ೲ඼͞Εͨ3BJMTαʔόʔ –  9݄9೔ʹ%/4ΩϟογϡΛઃఆͨ͠ –  :݄:೔ʹϓϩηε਺Λνϡʔχϯάͨ͠ –  ;݄;೔ʹSVCZͷόʔδϣϯΛ্͛ͨ – 

    ŋŋŋ ͍Ζ͍Ζ܁Γฦ͠  •  ͜ͷαʔόʔʹ൒೥ৼΓʹ3BJMTΞϓϦΛσϓϩ Π –  Ռͨͯ͠σϓϩΠ͸ਖ਼͘͠ऴΘΔͷ͔
  18. αʔόʔͷঢ়ଶΛ؅ཧ͢Δ •  खॱॻ  •  ࣗಈԽ  •  αʔόʔ؅ཧσʔλϕʔε 

    •  $IFG 1VQQFU 
  19. ঢ়ଶ؅ཧ͕໘౗ͳΒɺঢ়ଶΛ ؅ཧ͠ͳ͚Ε͹ྑ͍ͷͰ͸

  20. h"p://chadfowler.com/blog/2013/06/23/immutable-­‐deployments/

  21. #MVF(SFFO%FQMPZNFOU

  22. ࣌ؒʹ ճσϓϩΠ h"p://www.publickey1.jp/blog/12/amazon11000_aws_reinventday2_am.html

  23. *NNVUBCMFʙΛࢧ͑Δٕज़ ίϯςφ

  24. ׬શԾ૝Խ͔Β 04ϨϕϧԾ૝Խ ίϯςφ ΁

  25. *NNVUBCMFʙʹ஫໨͕ू·Δഎܠ •  ςΫχοΫͱͯ͠ͷ*NNVUBCMFʙ – ܧଓతΠϯςάϨʔγϣϯσϦόϦʔ – #MVF(SFFO%FQMPZNFOU •  ཁૉٕज़࣮૷ŋŋŋΫϥ΢υΠϯϑϥͷస ׵ظ – ίϯςφ – %PDLFS

  26. None
  27. ׬શԾ૝Խͱ04ϨϕϧԾ૝Խ •  ׬શԾ૝Խ –  Ϛγϯ͝ͱԾ૝Խ͠ಠཱͨ͠؀ڥΛఏڙ –  "84ͷ*BB4΍7.8BSF –  ʮԾ૝Խʯͱݴ͑͹ݱঢ়ࢥ͍ු͔΂Δͷ͸ͪ͜Β • 

    04ϨϕϧԾ૝Խ –  ͋͘·Ͱ04ͷϓϩηε –  DISPPUɺ+BJMɺ-9$ ίϯςφ  7JSUVBM.BDIJOF 7.  WT $POUBJOFS ※厳密にはコンテナ系実装を「仮想化」と言ってよいかどうか# ここではユースケース的の文脈に拡大解釈
  28. http://www.slideshare.net/m-bird/ss-38785624

  29. -JOVYίϯςφ •  Ϣʔβʔϓϩηεͱͯ͠৽͍͠؀ڥΛ࡞Δ –  ϓϩηεͳͷͰॠ࣌ʹੜ੒͞ΕΔ –  Ϣʔβʔ͔Β͸͔͋ͨ΋৽͍͠04ʹݟ͑Δ •  ίϯςφWT7.ʹ͸τϨʔυΦϑ – 

    ίϯςφىಈ͕ॠ࣌Φʔόʔϔου͕গͳ͍ϗ ετ04͔Βͷ੍ޚ͕Մೳ –  7.ϗετήετ΋෼཭ɺ
  30. %PDLFS

  31. None
  32. $POUBJOFSTBSFBOFXTUBOEBSEJO DMPVEJOGSBTUSVDUVSF

  33. https://speakerdeck.com/jbeda/containers-at-scale

  34. Ϋϥ΢υʹ͓͚ΔԾ૝Խ •  ϗεςΟϯά΍*BB4 –  Ϣʔβʔ͕ظ଴͍ͯ͠Δͷ͸ʮຊ౰ͷαʔόʔͷ༷ͳ෺ʯͳͷ Ͱ7.ϕʔεͷํ͕๬·͍͠ ͷ͔΋   • 

    BTB4FSWJDF΍(PPHMF'BDFCPPL –  )FSPLV ("& 8FSDLFS 5SBWJT$* –  ൴Β͕ཉ͔ͬͨ͠΋ͷ͸ʮԾ૝Խ͞ΕͨαʔόʔʯͰ͸ͳ͘ ʮΫϥελϦϯά͞ΕͨΞϓϦέʔγϣϯͷೖΕ෺ʯ ͭ·Γʮಠཱͨ͠؀ڥʯΛखʹ ͍ΕΔखஈͱͯ͠ίϯςφͷํ ͕޲͍ͯΔέʔε΋ଟ͔ͬͨ
  35. *NNVUBCMFʙͷྲྀߦͱ Ϋϥ΢υͷকདྷ •  *NNVUBCMF͸ͦΕ୯ମͷ֓೦͕ண໨͞ Ε͍ͯΔΘ͚Ͱ͸ͳ͘ •  Ϋϥ΢υΠϯϑϥ͕ίϯςφܕʹҠߦͯ͠ ͍͘τϨϯυͱ૬·ͬͯͷ͜ͱ ※VMが時代遅れ、という話ではありません。現状VMではなくコンテナの方が向いてるはずの要件も、VMで賄われている場面が多い、とい う話

  36. Ϗοάσʔλͱ *NNVUBCMFʙɺίϯςφ

  37. ഇغՄೳͳ  •  ΞϓϦέʔγϣϯαʔόʔ͸Θ͔Δ – 4IBSFE/PUIJOHʹ͓͚ͯ͠͹Α͍ – ʮεςʔτϨεʯ •  σʔλϕʔεͳͲͷετϨʔδ͸ 

  38. *NNVUBCMFʙͱετϨʔδ •  ഇغՄೳͦ͏Ͱͳ͍෦඼Λ໌֬ʹ͢Δ •  ͦ͏Ͱͳ͍෦඼͸ैདྷ௨Γʹӡ༻ – ͨͩ͠Ϋϥ΢υΛੵۃར༻͢Δ •  3%#ˠ"NB[PO3%4 •  ετϨʔδˠ"NB[PO4

  39. *NNVUBCMF૚ ʮΞϓϦέʔγϣϯίʔ υʯ͕Քಇ͢Δ৔ॴ

  40. 8FCγεςϜͷࡾ૚ߏ଄ ʹ͓͚Δ*NNVUBCMF૚ •  ʮ8FCΞϓϦέʔγϣϯͷίʔυʯ͕Քಇ͢ΔϨΠϠ Λ*NNVUBCMFʹ –  ετϨʔδ૚ͳͲ͸ɺΫϥ΢υతʹந৅Խͭͭ͠ैདྷ௨Γ –  ઀ଓ͸ΦʔέετϨʔγϣϯͰٵऩ͢Δ • 

    4FFTFSG DPOTVM ,VCFSOFUFTFUD ৄࡉ͸লུ   •  *NNVUBCMF૚Ͱಈ͘ΞϓϦʹ͸࠶ݱੑ͕ٻΊΒΕΔ –  5IF5XFMFWF'BDUPS"QQ –  ݁Ռతʹϙʔλϒϧ༷ʑͳӡ༻্ͷϝϦοτ –  ৄ͘͠͸TQFBLFSEFDLDPNOBPZB
  41. *NNVUBCMFʙ࣌୅ͷΞʔΩςΫνϟ •  ϑϩϯτΤϯυόοΫΤϯυͷ෼཭Λ໌ ֬ʹߦ͏ •  ݁Ռతʹϩά͸Ϗοάσʔλج൫΁ – )BEPPQΫϥελ – #JH%BUBBTB4FSWJDF

  42. Ϗοάσʔλج൫ •  )BEPPQɺ#JH2VFSZ – *0ΛʮεέʔϧΞ΢τʯͰฒྻॲཧ͢Δ͜ ͱʹΑΓϏοάσʔλղੳΛՄೳʹ – 5#Φʔμʔͷσʔλʹର͠਺ेʙ਺ઍ୆ͷΫ ϥελ

  43. .11ܥΫΤϦΤϯδϯ •  Ϗοάσʔλج൫ʹରͯ͠খ͍͞Φʔόʔ ϔουͰ42- – )BEPPQ •  1SFTUP •  $MPVEFSB*NQBMB • 

    "QBDIF%SJMM – (PPHMF#JH2VFSZ •  %SFNFM
  44. https://speakerdeck.com/naoya/google-bigquery-falsehua-number-yapcasia

  45. Ϗοάσʔλͷฒྻॲཧ •  جຊɺΫϥελϦϯά – ଟ਺ͷαʔόʔͰฒྻॲཧ – Ϧιʔε؅ཧɺδϣϒεέδϡʔϦϯάŋŋŋ •  ΫϥελͱԾ૝Խ – Ծ૝ԽΛט·ͤͨํ͕ӡ༻্ͷར఺͕ଟ͍

  46. ,VCFSOFUFT https://www.youtube.com/watch?v=tsk0pWf4ipw

  47. ,VCFSOFUFT •  ,VCFSOFUFT –  (PPHMFɺ*#.ɺ.JDSPTPGUɺ3FE)BUɺ %PDLFS –  ʮ%PDLFSίϯςφʹΑΔΫϥελߏஙͷͨΊͷεέ δϡʔϦϯάαʔϏεʯ • 

    %PDLFS ,VCFSOFUFT –  %PDLFS͸ΫϥελߏஙػߏΛ࣋ͨͳ͍ –  ,VCFSOFUFT͕Ϋϥελ؅ཧ •  ίϯςφ؅ཧͷͨΊͷΦʔέετϨʔγϣϯ૚
  48. https://circleci.com/docs/docker#kubernetes

  49. ϏοάσʔλͱίϯςφܕΫϥελ •  Ծ૝ԽͰ؅ཧ͢ΔͳΒίϯςφ – *0Φʔόʔϔου͕গͳ͍ •  *0ΛࢄΒͨ͢Ίʹฒྻॲཧ͍ͯ͠ΔϏοάσʔλ ج൫ʹͱͬͯࢧ഑త – தԝ͔Β੍ޚ͠΍͍͢ – #JH2VFSZͷ಺෦ߏ଄ͳͲ͔Β΋ɺͦͷํ޲ ੑ͕֞ؒݟ͑Δ

    ͜Ε͔ΒϏοάσʔλج൫΋ί ϯςφ*NNVUBCMFʙ͔Β ͷӨڹΛڧ͘ड͚Δ
  50. ·ͱΊ •  ʮΫϥ΢υΠϯϑϥ͸ίϯςφܕ΁ʯͱ͍͏େ ͖ͳస׵఺ –  ։ൃϓϩηε8FCγεςϜΞʔΩςΫνϟʹӨڹΛ ༩͑\Δ ͨ^݁Ռ͕*NNVUBCMF*OGSBTUSVDUVSF –  Ϗοάσʔλج൫ͷΞʔΩςΫνϟʹ΋ӨڹΛ༩͑Δ

    •  ଞɺ8FC෼ࢄγεςϜશൠʹӨڹΛ༩͑ΔτϨ ϯυ ͱݸਓతʹ༧૝͍ͯ͠·͢ɻ