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
600
バンダイナムコスタジオにおけるクラウドネイティブなゲーム開発スタジオの挑戦
yaegashi
2
1.5k
Bandai Namco DX Cloud Studios の全貌
yaegashi
0
270
DX(開発者体験)の向上を目指す ゲーム開発インフラの進化とDX(デジタル変革)
yaegashi
0
180
Azure AD対応の認証プロキシサーバをGoで作っている話
yaegashi
0
280
ゲーム開発におけるクラウドネイティブな CI/CD の最新動向
yaegashi
0
560
rclonefunction
yaegashi
0
930
大規模ゲーム開発を支えるAzure DevOpsによるクラウドネイティブなCI/CDの紹介
yaegashi
5
2.8k
Other Decks in Technology
See All in Technology
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
130
Keeping Ruby Running on Cygwin
fd0
0
150
Practical TypeProf: Lessons from Analyzing Optcarrot
mame
0
330
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
74k
AI バイブコーティングでキーボード不要?!
samakada
0
560
MLOps導入のための組織作りの第一歩
akasan
0
330
Good Enough Types: Heuristic Type Inference for Ruby
riseshia
1
220
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
23k
Hacobu Tech Deck
hacobu
PRO
0
110
ARIA Notifyについて
ryokatsuse
1
120
インターネットの技術 / Internet technology
ks91
PRO
0
210
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
528
40k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
The agentic SEO stack - context over prompts
schlessera
0
750
The Language of Interfaces
destraynor
162
26k
Are puppies a ranking factor?
jonoalderson
1
3.3k
The Invisible Side of Design
smashingmag
303
52k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
120
Joys of Absence: A Defence of Solitary Play
codingconduct
1
350
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
Building an army of robots
kneath
306
46k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.1k
How to Talk to Developers About Accessibility
jct
2
180
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