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

Start Go with Terraform

Start Go with Terraform

LT at Go Conference 2014 autumn

3f479274334fc7ef2ba2fdfda104c796?s=128

Takaaki FURUKAWA

November 30, 2014
Tweet

Transcript

  1. 5FSSBGPSNͰ࢝ΊΔ(Pݴޠ Vol.01 Nov/30/2014 Takaaki Furukawa Global Operations Department, Rakuten Inc.

    http://www.rakuten.co.jp/
  2. 2 •  !ULBL •  4ZTUFN1SPWJTJPOJOH(SPVQ •  4FSWFS&OHJOFFS •  (Pݴޠྺ͸̎ϲ݄͘Β͍ ࣗݾ঺հ

  3. 3 ࠓ೔࿩͢͜ͱ ! ָఱͷ*OGSBTUSVDUVSFBT$PEF ! 5FSSBGPSNͷ֓ཁ ! 5FSSBGPSN1MVHJO։ൃͱ(P

  4. 4 ָఱͷ*OGSBTUSVDUVSFBT$PEF

  5. 5    ""  !  " 

       
  6. 6 ! αʔϏεͷछྨ͕ଟ͍αʔόͷछྨ͕ଟ͍ɻ ! Ծ૝Խͱͱ΋ʹαʔόͷ୆਺͕૿େɻ ! *OGSBTUSVDUVSFBT$PEF ίʔυʹΑΔ؅ཧͱࣗಈԽ ͠ͳ͍ͱͭΒ͍ɻ

  7. 7JSUVBM.BDIJOF $SFBUJPO 04.JEEMFXBSF$POpHVSBUJPO 1IZTJDBM4FSWFS 04JOTUBMMBUJPO "QQMJDBUJPO%FQMPZNFOU 4ZTUFN1SPWJTJPOJOH-BZFS $PNQVUF Orchestration Bootstrap

    Configuration Deployment %/4 4-# FUD
  8. "QQMJDBUJPO%FQMPZNFOU 04.JEEMFXBSF$POpHVSBUJPO 1IZTJDBM4FSWFS 04JOTUBMMBUJPO 7JSUVBM.BDIJOF $SFBUJPO 4ZTUFN1SPWJTJPOJOH-BZFS $PNQVUF Orchestration Bootstrap

    Configuration Deployment %/4 4-# FUD Kickstart Packer
  9. "QQMJDBUJPO%FQMPZNFOU 04.JEEMFXBSF$POpHVSBUJPO 1IZTJDBM4FSWFS 04JOTUBMMBUJPO 7JSUVBM.BDIJOF $SFBUJPO 4ZTUFN1SPWJTJPOJOH-BZFS $PNQVUF Orchestration Bootstrap

    Configuration Deployment %/4 4-# FUD Kickstart Packer Terraform
  10. 10 ཧ૝ 7.ͷ࡞੒΍ઃఆ͚ͩͰͳ͘ɺ %/4΍4-#ɺ.POJUPSJOHͳͲ ෇ଐ͢Δ΋ͷ΋ؚΊɺαʔϏ ε͝ͱʹશ෦·ͱΊͯίʔυ Ͱ؅ཧ͍ͨ͠ʂ

  11. 11 5FSSBGPSN Git TFSWJDF

  12. 12 5FSSBGPSNͷ֓ཁ

  13. 13 •  ΦʔέετϨʔγϣϯπʔϧ •  ೥݄̓)BTIJ$PSQ͔ΒϦϦʔε •  (Pݴޠ •  *OGSBTUSVDUVSFBT$PEF • 

    ༷ʑͳΫϥ΢υαʔϏεΛίʔυͰ؅ཧ •  "84 (PPHMF$MPVE %JHJUBM0DFBO  )FSPLV FUD 5FSSBGPSN
  14. 14

  15. 15

  16. 16

  17. 17

  18. 18 •  Πϯϑϥͷߏ੒৘ใΛςΩετϑΝΠϧͰ؅ཧɻ •  $-*ͰΠϯϑϥΛૢ࡞ɻ •  lUFSSBGPSNQMBOzͰ࡞ۀલͷ֬ೝ •  lUFSSBGPSNBQQMZzͰ࣮ߦɻ • 

    lUFSSBGPSNEFTUSPZzͰ࡟আɻ 5FSSBGPSNͷجຊػೳ
  19. 19 5FSSBGPSN1MVHJO։ൃͱ(P

  20. 20 ! 5FSSBGPSNW͔ΒϓϥάΠϯ։ൃ͠΍͍͢ϑϨʔϜ ϫʔΫػೳαϙʔτɻ ! ࢼ͠ʹ$POP)B༻ͷ1MVHJOΛ։ൃͯ͠Έ͕ͨɺҙ֎ͱ ؆୯ɻ ! 1MVHJO։ൃͷલʹ8FC"1*ͷ(PMJCSBSZΛ࡞Δͱ͜Ζ ͔Βɻ ! (Pॻָ͍͍͍ͯͯ͠ɻ ! 5FSSBGPSN1MVHJO։ൃͷྲྀΕ͸ϒϩάʹɻ ! QSJWBUFDMPVE޲͚ͷΦϨΦϨ1MVHJOΛ։ൃதɻ

    5FSSBGPSN1MVHJO։ൃ
  21. 21 (PͰॻ͔Εͨ044ͷϓϥάΠ ϯ։ൃΛ͖͔͚ͬʹ(Pݴޠ͸ ͡ΊͯΈͯ͸Ͳ͏Ͱ͠ΐ͏͔ɻ

  22. 22 ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ

  23. 23  •  Terraform https://www.terraform.io/ •  Terraform Provider  http://tkak.hatenablog.com/entry/2014/11/07/074044