Pro Yearly is on sale from $80 to $50! »

突撃!隣の Terraform / Visit the next terraform

93c80c388fe9d8f9df7d030549a0ff0b?s=47 Takeshi Kondo
December 02, 2019

突撃!隣の Terraform / Visit the next terraform

93c80c388fe9d8f9df7d030549a0ff0b?s=128

Takeshi Kondo

December 02, 2019
Tweet

Transcript

  1. ಥܸʂྡͷ Terraform Takeshi Kondo / @chaspy 2019/12/02 Terraform Meetup Tokyo#3

  2. tl;dr • KyashɾϝϧΧϦͷ Terraform ͷӡ༻Λώ ΞϦϯά͠ʹಥܸͨ͠ • ඇৗʹֶͼ͕ଟ͔ͬͨͷͰɺಠΓ઎Ίͤ ͣɺίϛϡχςΟʹؐݩ͍ͨ͠ •

    ͏ͪʹ΋ಥܸ͠ʹ͖ͯͶʂ
  3. Background • https://gist.github.com/suzuki-shunsuke/ 0f6f602571920e95be279044c2f44ea8 • 2 repositories, 3 states •

    Japan / Global • Production / Staging / Manage • ୭Ͱ΋ PR Λ౤͛ΒΕΔঢ়گͰ͸͋Δɺ͕ɺɺɺ • Өڹൣғ͕େ͖͍ • Release branch ӡ༻ʹݶք͕ݟ͖͑ͯͨ • SRE Λհͣ͞ Devs ͕ࣗ༝ʹ merge & release ͯ͠΄͍͠ • Splitting State • Delegation to devs
  4. Background

  5. Background

  6. https://twitter.com/chaspy_/status/1187601882245582848

  7. None
  8. Kyash https://kyash.co/company/

  9. Kyash • @lamanotrama ͞Μʢݩฐࣾ Senior SREʣ • workspace Λ࢖༻ •

    ։ൃɾຊ൪͕Ұக͍ͯ͠Δ͜ͱΛώΞϦϯάͰ֬ೝ • remote stateͷ key check ࣗಈԽ • moduleԽͷࡍͷTips • module ͷ಺෦͕͋·ΓมΘΒͳ͍ͱ֬৴Ͱ͖Δ΋ͷ • ෳࡶͳ࢓༷Λ module ʹ͠ͳ͍ • State ࣗମΛ෼͚͍ͯΔͷͰ module Խ͢Δ͜ͱͰ DRY ʹ͸ͳΒͳ͍
  10. mercari https://about.mercari.com/about/

  11. mercari • @deeeet ͞Μ / @dtan4 ͞Μ • https://gist.github.com/tcnksm/ 7b430f7955beac1ebb5b4d2fb26b40f7

    • GitHub flow • ಉ࣌ʹ1 service ͔͠มߋͰ͖ͳ੍͍໿ • Master branch Ͱͷ CI ͸ඞͣ 1 service ͷΈ͕ Apply • ৽αʔϏε࡞੒࣌ʹ͸ bootstrap Λ༻ҙ • microservices starter kit module • template_dir Λ༻͍࣭ͯ໰ʹ౴͑Δͱࣗಈੜ੒ • Stein ʹΑΔ lint
  12. Future work By @suzuki-shunsuke • Conftest ʹΑΔ state ͷ Lint

    • Remote state ͷ key ͷ Lint • Kubernetes ͷ manifest ΋ςετͰ͖Δ • Service domain ୯ҐͰͷ෼ׂத • ڞ௨ɾωοτϫʔΫϦιʔε΁ͷґଘ͸ϋʔυίʔυ • Application in monorepo ͷ໊લͱҰகͤ͞Δ • Service ͱͦΕΒ͕ར༻͢Δ Infrastructure ͸Կ͔͠Β ͷن໿ͰҰகͤ͞Δඞཁ͕͋Δͱ൑அ
  13. ͓͠·͍ • ֶͼ͕ଟ͔ͬͨͷͰಥܸ͸ศར • ઈࢍ state ෼ׂத • Terraform ӡ༻ʹ͍ͭͯฉ͖͍ͨ͜ͱ͕

    ͋ͬͨΒ͍ͭͰ΋༡ͼʹ͖͍ͯͩ͘͞
  14. Thank You! chaspy chaspy_ Site Reliability Engineer Takeshi Kondo SRE

    Lounge Terraform-jp