Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cloud Build × Terraform = “Infra” CI / CD
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
SouMatsuda
October 01, 2019
Technology
81
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cloud Build × Terraform = “Infra” CI / CD
SouMatsuda
October 01, 2019
Other Decks in Technology
See All in Technology
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
340
Getting Started with Google Antigravity
glaforge
0
310
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
170
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
300
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
430
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
270
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
480
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1.2k
USB PDを使ってスマホを労わりたい
raspython3
0
180
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Code Reviewing Like a Champion
maltzj
529
40k
The Pragmatic Product Professional
lauravandoore
37
7.5k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Automating Front-end Workflow
addyosmani
1369
210k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
330
BBQ
matthewcrist
90
10k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
Chasing Engaging Ingredients in Design
codingconduct
0
360
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Transcript
Cloud Build × Terraform = “Infra” CI / CD Google
Cloud Build Day 2019/10/01 @mtds_08
自己紹介 松田 創 ( Matsuda Sou ) ◦ NEC ネッツエスアイ株式会社
所属 ◦ インフラエンジニア ▪ 普段は Kubernetes や Red Hat OpenShift Container Platform 等 のコンテナ関連のプロダクトや GCP を主に触ってます。 ◦ Twitter : @mtds_08 (作りたて)
はじめに https://www.youtube.com/watch?v=XMjihC837s0 本発表は、今年の Google Cloud Next ‘19 in Tokyo にて
話した内容の短縮版です
目次 1. Terraform とは 2. インフラ CI / CD 3.
Cloud Build × Terraform
1. Terraform とは
Terraform とは • HashiCorp 社により開発されている、オープンソースの インフラストラクチャ自動構築/管理ツール ◦ 類似ツール : Pulumi,
Cloud Development Kit ( AWS ) ...等 • インフラをコードとして宣言的に定義 ( IaC : Infrastructure as Code ) ◦ 環境の自動構築や、ソースコードリポジトリでのバージョン管理を実現 • パブリッククラウドの様々なサービス や、インフラソフトウェア ( OpenStack, Kubernetes 等) をサポート
Terraform の主な設定ファイル • tf ファイル ◦ 構築および管理を行うインフラリソースを定義するファイル ◦ HCL (
HashiCorp Configuration Language ) と呼ばれる 独自言語で定義 • .tfstate ファイル ◦ 構築したインフラリソースの現在の状態 ( 設定値 ) を管理する ための json ファイル ◦ リモートストレージ ( Google Cloud Storage 等 ) への格納も可能
Terraform を GCP で利用する場合の実行例 Terraform CLI .tf File Node Pool
Compute Engine GKE Cluster Kubernetes Engine GKE Network Cloud Network tfstate Bucket Cloud Storage Cloud API Cloud APIs 一括 Deploy GCS に .tfstate File を格納 terraform apply Terraform で管理 インフラの状態を保持 init : 初期化 plan : 実行計画作成 apply : デプロイ destroy : 削除
2. インフラ CI / CD
インフラをコードとして定義する Infrastructure as Code によって 実現可能な、CI / CD の手法をインフラの管理・運用に適用する考え方 インフラ
CI / CD とは Test & Build 成果物の 管理 インフラ管 理者 Infrastructure コード リポジトリ Deploy CI/CD ツール CI/CD パイプライン Trigger Release Push
IaC と インフラ CI / CD のメリット • 構築フェーズ ◦
同一構成環境の複製が容易 ( 開発→ステージング→本番 ) ◦ 環境構築時のオペレーションミスの撲滅 • 運用フェーズ ◦ インフラのバージョン管理による変更の追跡が可能 ◦ サービスの安定運用やインフラの品質向上を継続的に実施
3. Cloud Build × Terraform
Cloud Build × Terraform の環境構成例 CI / CD Pipeline Trigger
インフラ 管理者 Push Terraform Container Infra Deploy Cloud Build Image Pull Infra Repo Cloud Source Repositories Node Pool GKE Cluster Nodes Node Pool Nodes Container Run init 初期化 apply デプロイ plan テスト Sync Deploy tfstate Bucket Cloud Storage Remote Backend GitHub Terraform Cloud Builder※ ※https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/terraform
まずは個人的な GCP 検証や PoC にて Cloud Build × Terraform を利用
使ってみた所感 • 良かった点 ◦ Cloud Build is 使いやすい ▪ しかもコミュニティで Terraform Cloud Builder が提供されており、すぐ試せる ◦ 頻繁にクラウドインフラの変更作業が発生する場合、 作業の工数を削減可能 ▪ インフラの変更履歴が管理されているのも嬉しい • 課題・今後の展望 ◦ とはいえ、学習コストはそれなりにかかる ▪ 今後は 個人 → チーム → 社内 と展開していきたい ◦ 既存環境への適用が難しい ▪ terraformer 等のエクスポートツールに期待
Thank you.