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
Terraforming Windows Virtual Desktop Infrastruc...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
YAEGASHI Takeshi
February 10, 2021
Technology
740
0
Share
Terraforming Windows Virtual Desktop Infrastructure on Azure
Terraform meetup ONLINE #2021.02
https://terraform-jp.connpass.com/event/
YAEGASHI Takeshi
February 10, 2021
More Decks by YAEGASHI Takeshi
See All by YAEGASHI Takeshi
Microsoft Entra IDとAzure App Serviceによる エンタープライズWebアプリ・サービスのプラットフォーム構築
yaegashi
0
170
Microsoft Entra/Azure による Redmine の企業内利用向けカスタマイズと運用
yaegashi
0
590
バンダイナムコスタジオにおけるクラウドネイティブなゲーム開発スタジオの挑戦
yaegashi
2
1.5k
Bandai Namco DX Cloud Studios の全貌
yaegashi
0
260
DX(開発者体験)の向上を目指す ゲーム開発インフラの進化とDX(デジタル変革)
yaegashi
0
180
Azure AD対応の認証プロキシサーバをGoで作っている話
yaegashi
0
280
ゲーム開発におけるクラウドネイティブな CI/CD の最新動向
yaegashi
0
550
rclonefunction
yaegashi
0
930
大規模ゲーム開発を支えるAzure DevOpsによるクラウドネイティブなCI/CDの紹介
yaegashi
5
2.8k
Other Decks in Technology
See All in Technology
2026-04-02 IBM Bobオンボーディング入門
yutanonaka
0
200
AWS DevOps Agent or Kiro の使いどころを考える_20260402
masakiokuda
0
170
「決め方」の渡し方 / How to hand over the "decision-making process"
pauli
7
1.2k
Kubernetes基盤における開発者体験 とセキュリティの両⽴ / Balancing developer experience and security in a Kubernetes-based environment
chmikata
0
170
ASTのGitHub CopilotとCopilot CLIの現在地をお話しします/How AST Operates GitHub Copilot and Copilot CLI
aeonpeople
1
120
スケーリングを封じられたEC2を救いたい
senseofunity129
0
140
AIドリブン開発の実践知 ― AI-DLC Unicorn Gym実施から見えた可能性と課題
mixi_engineers
PRO
0
110
仕様通り動くの先へ。Claude Codeで「使える」を検証する
gotalab555
6
1.9k
解剖"React Native"
hacusk
0
110
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
150
VSCode中心だった自分がターミナル沼に入門した話
sanogemaru
0
920
ZOZOTOWNリプレイスでのSkills導入までの流れとこれから
zozotech
PRO
4
2.4k
Featured
See All Featured
Believing is Seeing
oripsolob
1
100
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
260
AI: The stuff that nobody shows you
jnunemaker
PRO
4
510
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Fireside Chat
paigeccino
42
3.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
170
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
430
Transcript
Terraforming Windows Virtual Desktop Infrastructure on Azure 八重樫 剛史 Takeshi
Yaegashi BANDAI NAMCO Studios Inc.
自己紹介 八重樫 剛史 Takeshi Yaegashi 株式会社バンダイナムコスタジオ BANDAI NAMCO Studios Inc.
所属 Linux・Unix・OSS が好きなエンジニア Go 言語が好き 組み込みシステム開発、ゲームサーバ開発、 CI/CD インフラ開発、 開発環境のクラウドシフトなどの業務に従事 最近は Azure DevOps で Unity アプリの CI/CD をいじっていた 活動場所 ホームページ・ブログ https://l0w.dev GitHub https://github.com/yaegashi GitLab https://gitlab.com/yaegashi Twitter https://twitter.com/hogegashi
HashiCorp products 関連活動 Terraform provider for Microsoft Graph ▪ Microsoft
Graph API を操作するプロバイダ (Azure AD の代替) ▪ Terraform Registry に登録しました https://registry.terraform.io/providers/yaegashi/msgraph HashiTalks: Japan 2020 speaker ▪ Terraform provider for Microsoft Graph について喋りました
HashiCorp products 関連活動 Packer ▪ Azure の Windows VM イメージの構築に多用している
▪ Ansible provisioner が好き Azure Image Builder ▪ あまり知られていない Azure のマネージド Packer サービス ▪ あまりに使いづらいので CLI ツールを Go で作った話 https://qiita.com/yaegashi/items/5216a9b37c2041b93a3a
Windows Virtual Desktop (WVD) Azure が提供する VDI サービス ▪ COVID-19
対応のひとつとして注目されるようになった ▪ Windows 10 Enterprise の Azure VM にリモートデスクトップ接続できる ▪ Windows ライセンスと VM・基本インフラ以外の費用が必要なく、安いのが特長
WVD の一般的なアーキテクチャ https://docs.microsoft.com/ja-jp/azure/architecture/example-scenario/wvd/windows-virtual-desktop
wvd-terraform https://github.com/yaegashi/wvd-terraform ▪ ついさっき作ったばかりのリポジトリ ▪ Terraform を使って Windows Virtual Desktop
をお気軽に試せるサンプルです ▪ Terraform の provider の自作とかしてるわりに運用は素人なのでいろいろだめな点をご指摘くださ い
Windows Virtual Desktop を試す① 必要なサブスクリプションとライセンス ▪ Azure サブスクリプション – なんとか自分で用意してください
– 数日間試すだけなら、初回アカウント登録時のおまけクレジット (22,500 円) や Visual Studio サブスクリプションのおまけクレジット (6,000円/月) でも十分 ▪ Windows 10 Enterprise のライセンス × ユーザー数分 – Microsoft 365 Developer Program にサインアップするのがおすすめ https://developer.microsoft.com/ja-jp/microsoft-365/dev-program – 全部入りライセンス Microsoft 365 E5 × 25 がほぼ無期限に使える (90日ごとに更新) – 新しいテナントができるのでそこで Azure サブスクリプションを使えるようにする
Windows Virtual Desktop を試す② 事前に作っておくべきリソース ▪ Virtual Networks – AADDS
用と WVD ホスト用 2 つのサブネットを作っておく ▪ Azure Active Directory Domain Services (AADDS) – Azure AD のユーザー・グループを自動同期してくれるマネージド AD サーバ – これも Terraform で作れるとよいのだが azurerm provider が対応していない… – https://github.com/terraform-providers/terraform-provider-azurerm/issues/8970
Windows Virtual Desktop を試す③ サンプルリポジトリをクローンして設定 ▪ git clone https://github.com/yaegashi/wvd-terraform ▪
フォルダ構成 – workspace Workspace リソース – pool1 ホストプール・セッションホストリソース ▪ 各フォルダの修正箇所 – main.tf サブスクリプション・テナント・バックエンド設定 – variables.tf 変数設定 – local.auto.tfvars.json AD参加ユーザー・パスワードなど (.gitignore されている)
pool1/local.auto.tfvars.json CODE EDITOR { "adjoin": { "name": "aad-join", "domain": "l0wdev.onmicrosoft.com",
"password": "hogehogesecret" } }
Windows Virtual Desktop を試す④ Terraform 実行 ▪ workspace, pool1 の各フォルダで普通に実行
– terraform init – terraform plan – terraform apply
Windows Virtual Desktop を試す⑤ Web クライアントで接続テスト ▪ https://rdweb.wvd.microsoft.com/arm/webclient/index.html 間違って Windows
Server 2019 でホストを作ってしまっ た … (ライセンス違反)
セッションホストの追加登録 CODE EDITOR module "yaegashi" { source = "./modules/wvdhost" owner
= "
[email protected]
" vm = { location = "japaneast" resource_group_name = azurerm_resource_group.wvd.name name = "wvd-yaegashi1" size = "Standard_D2as_v4" storage_account_type = "Premium_LRS" license_type = "Windows_Client" subnet_id = data.azurerm_subnet.wvd.id gpu_driver = "" } adjoin = var.adjoin hpjoin = { name = azurerm_virtual_desktop_host_pool.wvd.name token = azurerm_virtual_desktop_host_pool.wvd.registration_info[0].token wvd_yaegashi.tf のようなファイルをコピペして増やすだけで追加登録可能!
Terraform で WVD まとめ① wvd-terraform のよい点 ▪ ホストプール・セッションホスト・ VM の複雑な構成のデプロイや破壊が自動的にできる
– ホストの追加・削除がとても手軽 ▪ Azure Portal や Azure CLI では不可能な構成も簡単に実現できる – ひとつのホストプールにサイズの異なる VM を混在して登録できる – ホスト名を個別に自由に決められる (通常は連番ホスト名しか使えない ) ▪ ユーザー個別のカスタマイズが必要な用途には都合がよい
Terraform で WVD まとめ② wvd-terraform のよくない点 ▪ ディレクトリ・ファイルの構成が素人ぽい ▪ 汎用性が足りない
(決め打ち設定がかなりある ) ▪ ドキュメントがない (README.md すらない) ▪ これから改善していきます!
Thank You!
[email protected]
learn.hashicorp.com discuss.hashicorp.com 17
[email protected]
learn.hashicorp.com discuss.hashicorp.com 18