Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DeployToAzureポチからの卒業 / LT_DeployToAzure
Search
sou
January 15, 2022
Technology
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DeployToAzureポチからの卒業 / LT_DeployToAzure
sou
January 15, 2022
More Decks by sou
See All by sou
Azure におけるコンテナ基盤選定について / azure-container-platform-selection
08thse
0
570
AKS コントロールプレーン監視のためのメトリクス / aks-control-plane-metric-preview
08thse
0
280
Gatekeeper と Azure Policy (rev.1) / gatekeeper-azpol
08thse
0
200
読み物からのエンジニア的な学び / Learning from Reading
08thse
0
200
Azure Container Apps 気になるアップデート (2023/5) / ACA_Update_202305
08thse
0
300
Azure Container Apps 触ってみる / LT_AzureContainerApps
08thse
0
700
Deeperという人材カテゴリに共感した話
08thse
0
190
LT_Documentation
08thse
0
88
Other Decks in Technology
See All in Technology
歴史から理解するクラウドインフラのしくみ
kizawa2020
1
200
MCPをつなげて作る組織横断のAIエージェント基盤
tsubakimoto_s
0
530
数値で見る Microsoft MVP 〜Spec Kit と GitHub Copilot Agent で作るデータ可視化ダッシュボード〜
yutakaosada
0
180
エンタープライズデータへ安全につなぐ Production-ready なエージェント設計 ― AI × MCP リファレンスアーキテクチャ ― #AIDevDay
cdataj
1
450
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
信頼できるテスティングAIをどう育てるか?
odan611
0
180
Webの技術とガジェットで子どもも大人も楽しめるワクワク体験を提供する / Qiita Tech Festa Day 2026
you
PRO
1
330
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
53k
ガバメントクラウドでのランサムウェア対策
techniczna
1
490
20260724 情シスAI #1 「全従業員をAIネイティブにする」ために情シスがやっていること(公開版)
frtckty
0
150
LLMリーダーボードアップデートに向けたAgentic Math_SWEのトレースについて
nejumi
0
190
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
7
5.7k
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
760
Automating Front-end Workflow
addyosmani
1370
210k
Prompt Engineering for Job Search
mfonobong
0
390
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
Writing Fast Ruby
sferik
630
63k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How to Think Like a Performance Engineer
csswizardry
28
2.7k
How to train your dragon (web standard)
notwaldorf
97
6.7k
Transcript
Deploy to Azure ポチからの卒業 sou (@08thse)
2
3
4 Deploy to Azure の動作 ARM Template (Azure Resource Manager)
5 ARM Template の中身 { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters":
{ "virtualMachineSize": { "type": "string", "defaultValue": "Standard_DS1_v2", "metadata": { "description": "Virtual machine size (has to be at least the size of Standard_A3 to support 2 NICs)" } }, "adminUsername": { "type": "string", "metadata": { "description": "Default Admin username" } }, "adminPassword": { "type": "securestring", "metadata": { "description": "Default Admin password" } }, .. .. ..
6 ARM Template の構造 { "$schema": "https://schema.management.azure.com/...", "contentVersion": "1.0.0.0", "parameters":
{ ... }, “variables": { ... }, “resources": { ... }, ... }
7 ARM Template の構造 (1/3) { "$schema": "https://schema.management.azure.com/...", "contentVersion": "1.0.0.0",
"parameters": { ... }, “variables": { ... }, “resources": { ... }, ... } parameter (引数) • テンプレートのデプロイ時に値を入力させる
8 parameter (引数) "parameters": { "virtualMachineSize": { "type": "string", "defaultValue":
"Standard_DS1_v2", "metadata": { "description": "Virtual machine size" } }, "adminUsername": { "type": "string", "metadata": { "description": "Default Admin username" } }, "adminPassword": { "type": "securestring", "metadata": { "description": "Default Admin password" } }, ... }, https://docs.microsoft.com/ja-jp/azure/azure-resource-manager/templates/template-parameters
9 ARM Template の構造 (2/3) { "$schema": "https://schema.management.azure.com/...", "contentVersion": "1.0.0.0",
"parameters": { ... }, “variables": { ... }, “resources": { ... }, ... } parameter (引数) • テンプレートのデプロイ時に値を入力させる variable (変数) • テンプレート中で使う変数を定義 • 関数等を使って文字列構築もOK
10 variable (変数) "variables": { "nic1": "nic-1", "nic2": "nic-2", "virtualNetworkName":
"virtualNetwork", "subnet1Name": "subnet-1", "subnet2Name": "subnet-2", "publicIPAddressName": "publicIp", "networkSecurityGroupName": "NSG", "networkSecurityGroupName2": "[concat(variables('subnet2Name'), '-nsg')]" "diagStorageAccountName": "[concat('diags',uniqueString(resourceGroup().id))]", }, https://docs.microsoft.com/ja-jp/azure/azure-resource-manager/templates/template-variables 定数的に定義 関数を使って文字列作成 適当な文字列も作れます もちろん定義済み変数も利用可能
11 ARM Template の構造 (3/3) { "$schema": "https://schema.management.azure.com/...", "contentVersion": "1.0.0.0",
"parameters": { ... }, “variables": { ... }, “resources": { ... }, ... } resource (Azureリソース定義) • 各Azure Resource毎に構造を定義
12 一言でいうとAzureリソース毎の定義をコードで記載しているだけ resource (Azureリソース定義) { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('diagStorageAccountName')]", "apiVersion":
"2019-06-01", "location": "[parameters('location')]", "sku": { "name": "[parameters('storageAccountType')]" }, "kind": "StorageV2" },
13 一言でいうとAzureリソース毎の定義をコードで記載しているだけ サービスによって書き方がまちまちなので・・・ ▪参考元 (Azure QuickStart Templates) https://azure.microsoft.com/ja-jp/resources/templates/ https://github.com/Azure/azure-quickstart-templates ▪リファレンス
https://docs.microsoft.com/en-us/azure/templates/ 自動テストが失敗しているものは動かない可 能性が高いので注意 resource (Azureリソース定義) 2021/2/4現在、985個のテン プレート
14 ARM Template の構造 { "$schema": "https://schema.management.azure.com/...", "contentVersion": "1.0.0.0", "parameters":
{ ... }, “variables": { ... }, “resources": { ... }, ... } parameter (引数) • テンプレートのデプロイ時に値を入力させる variable (変数) • テンプレート中で使う変数を定義 • 関数等を使って文字列構築もOK resource (変数) • 各Azure Resource毎に構造を定義 その他 • 実施終了時のアウトプット文字列なども設定可能
15 あとは QuickStart Template を参考に書いてみるだけ!