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
20190620_Multi_Cloud_Day.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
nezumisannn
June 20, 2019
Technology
750
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20190620_Multi_Cloud_Day.pdf
nezumisannn
June 20, 2019
Transcript
28 slides
Multi Cloud IaC realized by Terraform
Agenda » 自己紹介 » マルチクラウドに求めること » マルチクラウドの課題 » Terraformとは »
Terraformで何が出来るのか » Terraformの実行方法 » まとめ 2
自己紹介 resource “my_profile” “nezumisannn” { name = “Yuki.Teraoka” nickname =
“ねずみさん家。” company = “beyond” job = “Site Reliability Engineer” twitter = “@yktr_sre” skills = [“terraform”,”packer”] } 3
“What do you ask for MultiCloud” 4
良いとこ取り 良い所だけを組み合わせたい... 5
Why » コスト/性能の最適化 ⋄ ベンダーごとに当然異なる » DR対策 ⋄ クラウド自体の障害への備え »
クラウドロックインの回避 ⋄ 特定のクラウドに依存しない » 最適なサービスの利用 ⋄ 利用したいものを幅広く選定できる 6
Problem » 構成の複雑化 ⋄ 構成が複数クラウドに跨る » 学習コストの増加 ⋄ 複数のクラウドを理解する必要性 »
標準化が難しい ⋄ クラウドごとの差異の吸収 7
Solution » 構成の複雑化 ⋄ Infrastructure as code » 学習コストの増加 ⋄
気合いでなんとかする » 標準化が難しい ⋄ 統一的に記述できる言語を選定 8
What is Terraform » インフラオーケストレーションツール » HashiCorp社のOSSでGolangで開発 » 豊富なProviderの提供 ⋄
GCP ⋄ Alibaba Cloud ⋄ Oracle Cloud » HCLという独自言語で記述する 9
Terraformで出来ること » マルチプロバイダ ⋄ 種類に関わらず統一言語(HCL)で記述 » コードでのインフラ定義/管理(IaC) » 作成/変更/削除の自動化と人的ミスが減少 »
インフラCI/CDとの親和性が高い 10
HCLの優位性 API Google gcloud compute networks create Alibaba aliyun vpc
CreateVpc OCI oci network vcn create 11
HCLの優位性 Terraform Google HCL Alibaba HCL OCI HCL 12
HCLの種類 » Provider ⋄ クラウドの種類と認証情報を明示する » Resource ⋄ Terraformで管理する対象の基本単位 »
Data Source » Provisioner » State » Backend » Module 13
Provider 14 provider "provider_name" { -> provider setting here }
Provider provider "google" { credentials = "../credentials/multi-cloud-terraform.json" project = "test-project"
region = "asia-northeast2" } 15
Provider provider "alicloud" { access_key = "${var.credential["alicloud_access_key"]}" secret_key = "${var.credential["alicloud_secret_key"]}"
region = "${var.credential["region"]}" } 16
Provider provider "oci" { tenancy_ocid = "${var.tenancy_ocid}" user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}" private_key_path = "${var.private_key_path}" region = "${var.region}" } 17
Variable variable "access_key" { type = "string" default = "Your
Access Key here" } 18
Variable variable "credential" { type = "map" default = {
access_key = "Your Access Key here" secret_key = "Your Secret Key here" region = "Your Region here" } } 19
Resource resource "resource_type" "resource_name" { -> resource setting here }
20
Resource resource "google_compute_network" "example" { name = "example-vpc" description =
"example-vpc" auto_create_subnetworks = true } 21
Resource resource "alicloud_vpc" "example" { name = "example-vpc" cidr_block =
"10.0.0.0/8" } 22
Resource resource "oci_core_vcn" "example" { cidr_block = "192.168.0.0/16" compartment_id =
"${var.compartment_id}" display_name = "example-vcn" } 23
Terraformの実行 Write Plan Apply 24 Destroy
Terraformの実行 » Write ⋄ 作成したいリソースをHCLで記述する » Plan ⋄ HCLの構文チェックとドライラン »
Apply ⋄ デプロイ » Destroy ⋄ 作成したリソースを全て削除する 25
実行すると... 26
まとめ » マルチクラウドに求めるものは「良いとこ取り」 » 課題を無視すると「良いとこ取れない」 » TerraformでマルチクラウドIaCをやろう » HCLを覚える必要がありますがそこは気合いで! 27
THANKS! Any questions? You can find me at » @yktr_sre
»
[email protected]
28
More Decks by nezumisannn
See All by nezumisannn
20250930_Conohaウェビナー_生成AI_Terraform_ConoHa_VPSサーバー_セットアップ入門編
nezumisannn
1
48
20250723_Conohaウェビナー_高騰する海外クラウド費用を劇的カット_サーバーコスト最適化のポイント解説と成功事例のご紹介.pdf
nezumisannn
0
74
20241204_ビヨンド勉強会_44_AWS_Service_Catalogを利用したIaCのテンプレート化とTerraformによるデプロイ.pdf
nezumisannn
0
440
20240828_ビヨンド勉強会_42_EKS_on_FargateでWebサービスを公開するために覚えておきたいこと.pdf
nezumisannn
0
120
20240530_ビヨンド勉強会#41_ビヨンドのエンジニア新卒研修における取り組み
nezumisannn
0
140
20230511_AWSにおけるコンテナサービスの選択とIaC実装例.pdf
nezumisannn
0
1.5k
リーダーになって1年経過して_取り組んできたことと大事にしている考え方_の裏側_.pdf
nezumisannn
0
98
20211118_GKEにおける高負荷時のPodとWorker_Nodeの挙動について.pdf
nezumisannn
0
200
20211014_Alibaba_Cloud_Container_Service_for_KubernetesにおけるServerless_Kubernetesの概要とManaged_Kubernetesとの違い.pdf
nezumisannn
0
120
Other Decks in Technology
See All in Technology
認知負荷の減らし方 ~開発にも日常業務にも活かせるノウハウ~
minorun365
PRO
17
10k
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.1k
Metadata - Section 4 : MODS (Metadata Object Description Schema )
mohab1
0
110
OpenTelemetryで変わった 新時代のCloudWatchメトリクス監視
tsukuboshi
0
500
現地速報! Microsoft Ignite アップデートレポート
kasada
1
460
AWS Well-Arhitected Frameworkセキュリティの柱 について
miu_crescent
PRO
2
260
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
140
認知の質も文化醸成も。数年取り組んで見えてきた技術広報のKPI設計 / Tech PR KPIs: Lessons on Awareness Quality and Culture After Several Years
bitkey
PRO
0
220
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
14
7.5k
ブース設計、 お前もプロダクトだったのか / So Booth Design Was a Product All Along
akihiro0038
0
150
2026-11-16 JAWS-UG コンテナ支部 #31 ゆるLT大会 ECR のライフサイクルポリシーを いい感じに設定したい / ECR Lifecycle policy
masasuzu
3
620
Amazon EFS のマルウェアスキャンをClamAV で自前実装したら苦労した話
mtmtfactory01
0
110
Featured
See All Featured
The browser strikes back
jonoalderson
0
2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
850
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
470
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Automating Front-end Workflow
addyosmani
1370
210k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
340
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Making Projects Easy
brettharned
120
6.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Believing is Seeing
oripsolob
1
290