Immutable Infrastructure #jawsdays

Immutable Infrastructure #jawsdays

B4afc7d853d7f1cb6a253d3c7183c05a?s=128

Naoya Ito

March 15, 2014
Tweet

Transcript

  1. *NNVUBCMF *OGSBTUSVDUVSF !OBPZB@JUP +"84%":4 

  2. *NNVUBCMF*OGSBTUSVDUVSF •  %JTQPTBCMF$PNQPOFOUT •  ෆมͳɺঢ়ଶΛ࣋ͨͳ͍ɺഇغՄೳͳ

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

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

    •  $IFG 1VQQFU 
  5. ঢ়ଶ؅ཧ͕໘౗ͳΒɺঢ়ଶΛ ؅ཧ͠ͳ͚Ε͹ྑ͍͡Όͳ͍

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

  7. #MVF(SFFO%FQMPZNFOU

  8. )FSPLV )FSPLV͸HJUQVTI͢Δຖɺ৽͍͠؀ڥ ίϯςφ Λ࡞Γɺݹ͍؀ڥΛغͯΔ

  9. 5SBWJT$* 5SBWJT$*΋ςετΛ࣮ߦ͢ΔͨͼɺίϯςφΛ࡞ΓऴΘͬͨΒغͯΔ

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

  11. *NNVUBCMF*OGSBTUSVDUVSF Λࢧ͑Δٕज़ •  ίϯςφ – -JOVYͳΒ-9$ͳͲ •  ίϯςφΛӡ༻͢Δपล࣮૷ – FH%PDLFS

  12. *NNVUBCMF*OGSBTUVSDUVSF ʹࢸΔܦҢ •  Ծ૝Խ •  Ϋϥ΢υ •  *OGSBTUSVDUVSFBT$PEF – "VUPNBUFE*OGSBTUSVDUVSF • 

    *NNVUBCMF*OGSBTUSVDUVSF
  13. *OGSBTUSVDUVSFBT$PEF

  14. None
  15. $POpHSBUJPO.BOBHFNFOU5PPM •  αʔόʔͷঢ়ଶΛ؅ཧ͢Δͷ͸໘౗ •  खͰ΍Δͱ҉໧஌Խ •  खॱॻʹ࢒͢ͱखॱॻ͕ݹ͘ͳΔ •  ʮαʔόʔͷঢ়ଶʯΛίʔυʹ͢Δ – $IFG1VQQFU"OTJCMF

  16. None
  17. ঢ়ଶ͕ίʔυʹͳΕ͹͋Δ΂͖ঢ় ଶ΁ͷऩଋ͸ࣗಈԽͰ͖Δ

  18. Πϯελϯε΋ϓϩάϥϚϒϧʹ

  19. $  vagrant  init   $  vagrant  up  

  20. WBHSBOUVQ

  21. ͱ͜ΖͰɺ%FW0QT

  22. Ϋϥ΢υʹΑͬͯ Ұؾʹਐาͨ͠

  23. *OGSBTUSVDUVSFBT$PEF •  Ϋϥ΢υͰԾ૝Խ؀ڥ͕౰ͨΓલʹͳͬ ͨ •  ϋʔυΛιϑτ΢ΣΞͱͯ͠ѻ͑ΔͳΒɺ ͳΜͰ΋ίʔυͰهड़͠Α͏ •  αʔόʔͷঢ়ଶ΋ίʔυͰهड़ • 

    ݁ՌతʹɺࣗಈԽͳͲͷԸܙʹ༩Δ
  24. αʔόʔ؅ཧNFFUT(JU •  ʮαʔόʔͷঢ়ଶ͕͢΂ͯίʔυͰهड़Ͱ ͖ͨͳΒɺ(JUͰ؅ཧ͢Ε͹ྑ͍͡Όͳ ͍ʯ

  25. ΠϯϑϥΛόʔδϣϯ؅ཧ

  26. ΠϯϑϥNFFUT(JUIVC Πϯϑϥ΋QVMMSFRVFTUɺίʔυϨϏϡʔ

  27. ΠϯϑϥΛςετŋŋŋTFSWFSTQFD

  28. ΠϯϑϥΛ$* HJUQVTIͷͨͼɺ7BHSBOUͰ&$ΠϯελϯεΛ࡞Γ$IFGΛద༻͠TFSWFSTQFDͰςετ

  29. มߋͷͨͼɺಈ࡞Λอূ͢Δ QVMMSFRVFTUʹ DPNNJUΛॏͶΔ ౓ɺ$*͕ςετ݁ ՌΛڭ͑ͯ͘ΕΔ

  30. *OGSBTUSVDUVSFBT$PEFͷຊ࣭ •  αʔόʔΠϯϑϥΛಈతʹѻ͏ •  ΞϓϦέʔγϣϯ։ൃͷϫʔΫϑϩʔΛ Πϯϑϥͷੈքʹ࣋ͪࠐΊΔ – ࣗಈԽ͸*OGSBTUSVDUVSFBT$PEFͷԸܙ ͷҰ෦෼ʹ͗͢ͳ͍ – όʔδϣϯ؅ཧ – ίʔυϨϏϡʔ

    – ςετ – $* – (JUIVC 
  31. *NNVUBCMF *OGSBTUSVDUVSF

  32. ႈ౳ੑ •  ͋Δૢ࡞ΛԿճߦͬͯ΋݁Ռ͕ಉ͜͡ͱ – ྫ$IFGΛԿ౓ద༻ͯ͠΋ಉ͡ঢ়ଶʹऩଋ •  ႈ౳ੑ͕֬อͰ͖ͳ͍αʔόʔ͸ѻ͍ͮΒ ͍ – ৽͍͠ΠϯελϯεΛ௥Ճ͢Δʹ͋ͨͬͯɺଞ ͷΠϯελϯεͱҟͳΔ΋ͷ͕Ͱ͖ͯ͸ࠔΔ

  33. ႈ౳ੑͷ֬อ •  ਅͬ৽ͳαʔόʔͰ΋ɺத్൒୺ͳঢ়ଶͷ αʔόʔͰ΋$IFGΛద༻ͨ͠Βಉ͡ʹ ͳΔΑ͏ʹ͢Δ – ΠϯετʔϧࡁΈͷιϑτ΢ΣΞ͕ɺ$IFGΛ ద༻ͨ͠Βҙਤͤͣόʔδϣϯ͕উखʹ্ ͕ͬͨɺͳͲΛආ͚Δඞཁ – ೉͍͠࿩Ͱ͸ͳ͍ େ෦෼Λ$IFG͕໘౗Έ

    ͯ͘ΕΔ 
  34. αʔόʔͷঢ়ଶΛߟྀ͢Δ  •  αʔόʔͷঢ়ଶΛ؅ཧ͢Δલఏʹཱ͔ͭΒɺ ໘౗͝ͱ͕૿͑Δ – ႈ౳ੑͷ֬อ – ͲͷαʔόʔʹԿ͕ೖͬͯΔ͔ – ͢Ͱʹಈ͍͍ͯΔΞϓϦέʔγϣϯͷΞοϓ άϨʔυ – ແఀࢭͰͷΞϓϦέʔγϣϯαʔόʔͷ࠶ى

    ಈ
  35. *NNVUBCMF*OGSBTUSVDUVSF •  ؀ڥ 㲈αʔόʔ ͷঢ়ଶ؅ཧΛ΍ΊΔ – ඞཁʹͳͬͨΒ؀ڥΛ৽نʹͭ͘Δ – Ұ౓࡞Γऴ͑ͨ؀ڥ͸ɺҎ߱มߋ͠ͳ͍ •  4UBUFMFTTͷ੍໿

  36. ࠶ܝ#MVF(SFFO%FQMPZNFOU

  37. *NNVUBCMF*OGSBTUSVDUVSF ࣮ݱʹඞཁͳ͜ͱ •  *OGSBTUSVDUVSFBT$PEF͸લఏ৚݅ – ߏ੒͕ಈతͰͳ͚Ε͹ɺ*NNVUBCMF *OGSBTUSVDUVSFͷར఺͸εϙΠϧ͞ΕΔ •  ৽͍͠؀ڥΛΦϯσϚϯυͰଈ࠲ʹੜ੒ Ͱ͖Δٕज़ – 7.ΑΓ΋ɺίϯςφ

  38. %PDLFS

  39. %PDLFS •  -JOVYίϯςφΛखܰ׌ͭϓϩάϥϚϒϧ ʹѻ͑ΔΑ͏ʹ͢Δ – ͔Β͸-9$ʹґଘ͠ͳ͘͢Βͳͬͨ •  ίϯςφΠϝʔδΛઌʹ࡞੒͓͍ͯͯ͠ɺ ͔ͦ͜ΒίϯςφΛॠ࣌ʹ࡞Γग़͢

  40. %PDLFSͷయܕతϢʔεέʔε •  +FOLJOT %PDLFS •  %PLLVɺ'MZOO h"p://www.slideshare.net/techblogyahoo/jenkins-­‐withdocker-­‐131220

  41. *NNVUBCMF*OGSBTUSVDUVSFͱ ΞϓϦέʔγϣϯͷϙʔλϏϦςΟ •  %JTQPTBCMFͳ؀ڥΛલఏʹ͢ΔͱɺΞϓϦ έʔγϣϯͷ࠶ݱՄೳੑ͕ཁٻ͞ΕΔ –  ݁ՌతʹΞϓϦέʔγϣϯ͕ϙʔλϒϧʹͳΔ h"p://www.slideshare.net/dotCloud/docker-­‐intro-­‐november

  42. ྫ͑͹)FSPLV •  3VCZΞϓϦέʔγϣϯ – #VOEMFSͰHFNΛྻڍ͠ – 3BDLͰಈ͔͠ – 'PSFNBOͰ੍ޚ͢Δɺͱ͍͏ͷ͕ʮඞਢʯ •  /PEFKT – OQNɺQBDLBHFKTPO • 

    #VJMEQBDLT
  43. ΞϓϦέʔγϣϯ͕ϙʔλϒϧʹͳΔͱ •  ΞϓϦέʔγϣϯͷަ׵͕θϩίϯϑΟά ʹۙͮ͘ – ʮ˓˓ͱººͱ˚˚ΛೖΕͯ͋Εͯ͜͠͏͠ ͯŋŋŋʯ͔Βʮ͜ͷHJU63-ΛQVTIͯ͠ʯ΁ •  *NNVUBCMFͰ͋Δ੍໿͕΋ͨΒ͢ޮՌ – εςʔτϨεͳ8FCͱ63*ͷ΋ͨΒ੍͢໿ʹ Α͘ࣅͨ࿩

    – εςʔτϨεɺ׌ͭ63*͕͋Δ͔Βɺ63*Λ ౉͚ͩ͢ͰϦιʔεΛଞਓͱަ׵Ͱ͖Δ
  44. "UMBTTJBO+*3" %PDLFS •  HJUDMPOFͯ͠EPDLFSʹಥͬࠐΉ͚ͩͰಈ͘ •  ϩʔΧϧ͚ͩͰͳ͘ɺ%PDLFSΛαϙʔτ͍ͯ͠ΔΫϥ΢υαʔϏεͰ΋ ಉ༷ –  ະݕূͰ͕͢ɺ%JHJUBM0DFBO΍($&ͳͲ $

     git  clone  git@github.com:docker-­‐atlassian/jira.git   $  docker  build  -­‐t  naoya/jira  jira   $  docker  run  -­‐p  49080:8080  -­‐d  naoya/jira
  45. ίϯςφϕʔεͷσϓϩΠ •  ैདྷͷσϓϩΠͰ͋Γ͕ͪͳ͜ͱ –  طଘͷ؀ڥʹDBQEFQMPZͨ͠ΒEFQMPZ͕ HFN͕Ͳ͏ͱ͔Ͱࣦഊͨ͠ –  ຊ൪؀ڥʹҠͨ͠Βಈ͔ͳ͘ͳͬͨ •  ্ॻ͖σϓϩΠ͔Βɺίϯςφϕʔεͷσϓ

    ϩΠ΁ –  )FSPLVͷΑ͏ͳ –  #MVF(SFFO%FQMPZNFOU –  %PDLFSͷϙʔλϏϦςΟΛ׆͔ͨ͢Ίʹ΋ •  ϩΧʔϧͰಈ͍ͨ΋ͷΛͦͷ··ຊ൪΁͍࣋ͬͯ͘
  46. 2VJQQFSࣾͷࣄྫ •  GFBUVSFCSBODI΁ͷQVTIͷͨͼɺ)FSPLVͰΞϓϦέʔγϣϯ Λ࡞Δ •  ඇ։ൃऀͱ63-Λަ׵ͯ͠ɺ࣮؀ڥͰ͙͢ʹϨϏϡʔͰ͖Δ •  *OGSBTUSVDUVSFBT$PEF*NNVUBCMF*OGSBTUSVDUVSFͰಈతɾ ϙʔλϒϧʹͳ͍ͬͯ͘ͱɺ͜͏͍͏͜ͱ͕Մೳʹͳ͍ͬͯ͘ͱ͍͏ ྑ͍ࣄྫ

    h"p://blog.madoro.org/mn/93
  47. *NNVUBCMF*OGSBTUSVDUVSFͷ՝୊ •  ίϯςφ%PDLFS͚ͩͰ͸଍Γͳ͍ –  $MPVE'PVOESZ 0QFO1BB4 ͷΞʔΩςΫνϟΛݟΑ •  εςʔτϑϧͳαʔόʔΛͲ͏͢Δ͔ – 

    ྫετϨʔδɺΩϟογϡ –  ݱঢ়͸͢΂ͯεςʔτϨεʹ͢΂͖ɺͱ͍͏࿩Ͱ͸ͳ͍ɻεςʔτϨεͰ͋Δ΂͖Օ ॴ ΞϓϦέʔγϣϯαʔόʔ Λ*NNVUBCMFʹ –  εςʔτϑϧͳ΋ͷΛ֎ʹಀ͕࣮͢૷ŋŋŋqVFOUEͳͲ h"p://www.publickey1.jp/blog/11/paascloud_foundry.html
  48. *NNVUBCMF*OGSBTUSVDUVSF ͷݱࡏ •  ͍Ζ͍Ζඞཁͳ෦඼͕࡞ΒΕ͍ͯΔ –  %PDLFSɺNFTPTEPDLFSɺTFSG •  ʮ1SJWBUFͳ1BB4͕ཉ͍͠ʯͰ͸ͳ͘ʮطଘ ΠϯϑϥͷҰ෦Λಈతʹ͍ͨ͠ʯͱ͍͏Ϣʔ βʔ͕஫໨͍ͯ͠Δ

    •  Ϣʔβʔ͸ίϯςφϕʔεͷσϓϩΠͷརӹΛ ମײ࢝͠Ί͍ͯΔ –  େ͖ͳྲྀΕͱͯ͠ɺ͜Ε͔ΒͷσϓϩΠΞʔΩςΫ νϟ͸ίϯςφϕʔεʹมΘ͍ͬͯ͘Մೳੑ͕ߴ͍
  49. *NNVUBCMF*OGSBTUSVDUVSF ͱ$IFG1VQQFU"OTJCMF •  *NNVUBCMF*OGSBTUSVDUVSFʹΑͬͯɺ ඞཁͳ͘ͳΔ  – ͍͍͑ – *OGSBTUSVDUVSFBT$PEFͷຊ࣭͸ࣗಈԽ ΍ঢ়ଶ؅ཧ͚ͩͰ͸ͳ͍ – *NNVUBCMFʹͳͬͯඞཁͳ͘ͳͬͨՕॴ͕

    ࡟ΒΕ͍ͯ͘PSͦΕʹϑΟοτͨ͠ಓ۩͕ ੜ·ΕΔ
  50. ͜Ε͔Β •  *NNVUBCMF*OGSBTUSVDUVSFʹΑͬͯɺ ࠓ·Ͱݻఆతͩͱߟ͍͑ͯͨίϯϙʔωϯ τ͕ಈతɾΦϯβϑϥΠʹͳ͍ͬͯ͘ •  ࡢࠓͷαʔόʔΠϯϑϥύϥμΠϜͷू େ੒ͱͯ͠ͷ*NNVUBCMF *OGSBTUSVDUVSF – ͍Ζ͍Ζͳ֓೦ɺ࣮૷͕͜ͷߟ͑ํʹू໿͞

    Ε͍ͯ͘