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

HashiCorpの新ツール 「Waypoint」をCloud Runで使ってみた

Ryuji Tsutsui
November 15, 2020

HashiCorpの新ツール 「Waypoint」をCloud Runで使ってみた

GCPUG Shonan vol.56 5周年 LT

Ryuji Tsutsui

November 15, 2020
Tweet

More Decks by Ryuji Tsutsui

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • Ryuji Tsutsui@ryu22e • GCPUG Shonanελοϑ • ීஈ͸࿡ຊ໦ͷϑΟϯςοΫܥاۀͰDjango੡΢ΣϒαʔϏεͷ
 ։ൃΛ͍ͯ͠·͢ɻ

    • झຯ: өըؑ৆ʢ2015೥ʙʣɺ֨ಆٕ؍ઓʢ2019೥ʙʣ • ࠓ೥͸ίϩφͷ͍ͤͰɺͲͪΒ΋͋·Γߦ͚ͯͳ͍
  2. gcloudͷઃఆ $ gcloud auth application-default login $ gcloud config set

    project <my-project-name> $ gcloud auth configure-docker
  3. waypoint.hclͷ಺༰Λ֬ೝ & ฤू $ ls -l1 Procfile README.md index.js package.json

    public views waypoint.hcl εϥΠυͩͱݟͮΒ͍ͷͰΤσΟλͰݟ·͢ɻ
  4. σϓϩΠ·ͰͷྲྀΕ • build • CloudNative BuildpacksͰϏϧυ & GCRʹpush • deploy

    • Cloud RunʹσϓϩΠ • release • σϓϩΠͨ͠ίʔυΛΞΫςΟϒԽ
  5. v0.1.5࣌఺Ͱͷ࢖ͬͯΈͨײ૝ • ͋·ΓቕΔ͜ͱͳ͘࢖͏͜ͱ͸Ͱ͖ͨ • ϓϩδΣΫτͷ಺༰͔ΒϏϧυʹඞཁͳखॱΛࣗಈ൑அ͢Δͷ͸ָ͕ͩɺͪΐͬͱखͷࠞΜ ͩ͜ͱΛ΍Δͱ೰Ή͜ͱʹͳΓͦ͏ͳ༧ײ • ϦϞʔτͰར༻Ͱ͖Δwaypoint serverΛࣗલͰཱͯΔͷ͕໘౗ •

    Ϛωʔδυͳwaypoint server͕΄͍͠ • waypoint server্ͷϓϩδΣΫτ͕ফͤͳ͍ • ফͤΔΑ͏ʹ͢Δ༧ఆ͸͋Δ͕ࠓͷͱ͜ΖͰ͖ͳ͍Β͍͠ • https://discuss.hashicorp.com/t/how-to-delete-the-project/16465/4
  6. v0.1.5࣌఺Ͱͷ࢖ͬͯΈͨײ૝ • Cloud Run΁ͷσϓϩΠ͔͠࢖͍ͬͯͳ͍͚Ͳɺ·ͩػೳతʹ଍Γ͍ͯͳ͍ͱ͜Ζ͕ ͋Δײ͡ • ΦʔτεέʔϦϯάͷmax͸ࢦఆͰ͖Δͷʹmin͸Ͱ͖ͳ͍ • Cloud SQL΍VPC઀ଓʹؔ͢Δύϥϝʔλ͕ͳͦ͞͏

    • Hookػೳ͸͋ΔͷͰɺσϓϩΠޙʹgcloudͰઃఆͯ͠΍Δ͔͠ͳ͍͔΋ʁ • waypoint destroyͱ͍͏ίϚϯυ͕͋Δͷʹಈ͔ͳ͍ • Issue͸ڍ͕͍ͬͯͨ https://github.com/hashicorp/waypoint/issues/533