[tl10] azure iaas 構築・運用・管理の専門家が語る devtest labs...
TRANSCRIPT
https://mvp.microsoft.com/ja-jp/PublicProfile/4039915
R2R2
同じ環境を何回も作ったり ユーザーの操作環境の準備コスト管理
⇒それ、Azure DevTest Labs で解決できます!
すばやくプロビジョニング無駄を最小化
コストを最小化Windows Linux
高速で簡単な、無駄のない開発とテストの環境を構築できる
Azure のサービスです。
理解する使いたくなる人に教えたくなる
Azure DevTest Labs を理解するための準備Azure DevTest Labs の概要Azure DevTest Labs の機能Azure DevTest Labs による仮想マシンの作成まとめと参考情報
【目標】
リソースマネージャーデプロイモデル
docs.microsoft.com/ja-jp/azure/azure-resource-manager/resource-manager-deployment-model
• Azure Quickstart Templates
github.com/Azure/azure-quickstart-templates
サイズ
Managed Disks (管理ディスク)
• 管理が簡単• スケーラブルな仮想マシンデプロイが可能• 高い耐用性と可用性
docs.microsoft.com/ja-jp/azure/active-directory/role-based-access-control-configure
• ユーザーに仮想マシンを作成させると、不必要にたくさん作るかもしれない…
• 高い料金のサイズを選択するかもしれない…• 仮想マシンが動いたままで課金されるかもしれない…• 開発やテストの環境を、毎回作るのが面倒…• 時間がかかる、同じ環境にならない…• 同じ環境をたくさん作るには一工夫が必要…
コスト管理と環境構築に課題あり
コスト管理を簡略化シャットダウンを自動化
自動削除数やサイズを制限
コスト見積もり しきい値
環境を簡単にセットアップ素早く作成
自動インストール同じ環境
1
1
2
12
3
azure.microsoft.com/ja-jp/pricing/details/devtest-lab/
www.microsoft.com/ja-jp/casestudies/tg-inet.aspx www.microsoft.com/ja-jp/casestudies/bbsystem4.aspx
Demo
セッション中に Azure DevTest Labs で100台の仮想マシンの作成に挑戦!
ラボ
• DevTest Lab• ストレージアカウント• 仮想ネットワーク• Key Vault• リソースグループ
ラボ所有者 ラボユーザー
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-add-devtest-user
Demo
ラボ作成ユーザー追加ユーザーの操作
仮想マシンサイズ
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-set-lab-policy
Marketplace のイメージ
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-configure-marketplace-images
仮想マシン数
SSD 数
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-set-lab-policy
自動シャットダウン
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-set-lab-policy
自動開始
無効
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-set-lab-policy
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-shared-ip
Demo
仮想マシンサイズの制限Marketplace イメージの制限仮想マシン数の制限自動シャットダウン自動開始
プール
要求可能
要求
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-add-claimable-vm
自動削除
azure.microsoft.com/ja-jp/updates/azure-devtest-labs-set-expiration-date-for-new-vms-from-azure-portal/
• パーソナルシークレットストア
azure.microsoft.com/ja-jp/updates/azure-devtest-labs-keep-your-secrets-safe-and-easy-to-use-with-the-new-personal-secret-store/
推定コスト予測コスト
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-configure-cost-management
• コスト目標と通知
azure.microsoft.com/ja-jp/updates/azure-devtest-labs-cost-threshold-notification-and-custom-cost-tracking-time-range/
• Marketplace イメージ• カスタムイメージ• 式 (再利用可能なベース)
• 成果物複数作成
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-add-vm
カスタムイメージ
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-create-custom-image-from-vm-using-portal
プロパティのテンプレート
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-manage-formulas
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-comparing-vm-base-image-types
タイプ 特徴 長所 短所カスタムイメージ
アプリケーションのセットアップなども終わった VHD をベースとする
プロビジョニングが早い ベースの構成を変更する際にイメージの再作成が必要
式 新規のイメージをベースとして、テンプレートである式を適用する
プロビジョニング時に構成の変更が可能
仮想マシンのサイズや、仮想ネットワークの設定もプロビジョニング時に設定可能
プロビジョニングに時間がかかる
自動化• ツールやエージェント
(Fiddler、Visual Studio など)• 仮想マシンで実行するアクション
(リポジトリのクローン作成など)• テストするアプリケーション
アーティファクト
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-add-vm
github.com/Azure/azure-devtestlab
インストール用は chocolately を使用
chocolatey.org/packages/
便利な成果物1・Install Chocolatey Packages
便利な成果物2・Reset VM Password
複数作成
• クォータに注意
azure.microsoft.com/ja-jp/updates/azure-devtest-labs-create-multiple-identical-vms-at-once-from-portal/
• 複数の仮想マシン群• 3 階層アプリケーション• SharePoint ファーム
• ARM テンプレートを利用• カスタマイズした成果物
リポジトリ
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-add-artifact-repo
• ARM テンプレート• マスターテンプレートファイル名前は「azuredeploy.json」• パラメーターファイル名は「azuredeploy.parameters.json」• メタデータファイル名は「metadata.json」
• プライベート Git リポジトリ
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-create-environment-from-arm
github.com/Azure/azure-quickstart-templates
docs.microsoft.com/ja-jp/azure/devtest-lab/devtest-lab-artifact-author
blogs.msdn.microsoft.com/devtestlab/2016/09/22/tips-and-tricks-on-azure-devtest-labs-artifacts-development-and-debugging/
• 定義ファイルとスクリプト• プライベート Git リポジトリ
仮想マシン作成方法の選択例
ARMテンプレートを使用して作成
Marketplaceイメージから
作成
カスタムイメージから
作成
式(再利用可能なベース)を
使用して作成
最初の仮想マシン?
プロビジョニングを短時間で終わらせなければ
ならない?
シンプルな構成?
YES
YES
YES NO
NO
NO
すばやく、何度も用意コストを抑える
Demo100台の仮想マシンは無事に完成した?
Appendix
成果物
No. 名前 説明1 7-Zip Installs 7-Zip using the Chocolatey package manager2 Atom Installs Atom using the Chocolatey package manager3 AWS Command
Line InterfaceInstalls AWS Command Line Interface using the Chocolatey package manager
4 Azure PowerShell Installs the latest version of Windows Azure PowerShell. This artifact may require a reboot. Review the artifacts results for instructions.
5 Chef Client Downloads and installs the client, registers with the specified Chef server, does an initial checkin, and applies any recipes in the run list.
6 Chrome Installs Chrome using the Chocolatey package manager7 Docker Installs Docker on Windows Server. Requires Windows Server 2016.8 Download VSTS
Drop and Run Script
Downloads the latest build artifact for a given build definition and then executes a script from that drop. The download will be in c:¥<build definition name>¥
9 Fiddler4 Installs Fiddler4 using the Chocolatey package manager
No. 名前 説明10 Firefox Installs Firefox using the Chocolatey package manager11 Git Installs git using the Chocolatey package manager12 gVim (Cream) for
WindowsInstalls gVim for Windows, with the Cream superset of functionality added. …
13 Install Chocolatey Packages
Installs the Chocolatey package manager along with a user selected set of packages
14 Install RuckZuckPackages
Update existing software or install packages from the RuckZuck.toolsrepository
15 IntelliJ IDEA (Community Edition)
Installs IntelliJ IDEA (Community Edition) using the Chocolatey package manager
16 Microsoft .NET Framework 4.5
Installs Microsoft .NET Framework 4.5 using the Chocolatey package manager
17 MongoDB Installs MongoDB using the Chocolatey package manager
No. 名前 説明18 Node JS Installs Node JS using the Chocolatey package manager19 Notepad++ Installs Notepad++ using the Chocolatey package manager20 PowerShell 3.0 and
Windows Management Framework 3.0
Windows Management Framework 3.0 includes new installation or updates to Windows PowerShell, Windows Remote Management (WinRM), Windows Management Instrumentation (WMI), Windows Management Instrumentation (WMI), and Server Manager CIM Provider.
21 PuTTY Installs PuTTY using the Chocolatey package manager22 Remote Desktop
Connection Manager
Installs Remote Desktop Connection Manager using the Chocolatey package manager
23 Selenium Installs Firefox, Chrome, Selenium Driver for Chrome and IE using the Chocolatey package manager (Firefox already has it)
24 Self Signed Certificate
Installs a self signed certificate for use with development
No. 名前 説明25 Slack Installs Slack using the Chocolatey package manager26 SSMS Installs Sql server management studio using the Chocolatey package
manager27 Sublime Text Installs SublimeText using the Chocolatey package manager28 Sysinternals Installs Sysinternals using the Chocolatey package manager. It is installed
under %ALLUSERSPROFILE%¥chocolatey¥lib¥sysinternals¥tools. All Sysinternals tools are immediately accessible from the command line after install (e.g. Start -> Run, "procexp.exe").
29 Visual Studio Code Installs Visual Studio Code30 VSTS Build Agent Downloads and installs the VSTS build agent, registers with the specified
Visual Studio Team Services account, and adds the VM to the specified agent pool.
31 WebDeploy Installs WebDeploy using the Chocolatey package manager.
No. 名前 説明1 Active Directory
Domain JoinJoins a Windows VM to an Active Directory Domain. Requires that the Windows operating system can resolve the domain name and domain controller via DNS.
2 Clone a gitrepository
Installs git and clones specified repository
3 Configuration Manager Current Branch
FOR TESTING ONLY! ; This Product requires SQL Server, .NET 3.5 and .NET 4.5 as Prerequisite ; With System Center Configuration Manager, you can manage PCs and servers, keeping software up-to-date, …
4 Configuration Manager Technical Preview
FOR TESTING ONLY! ; This Product requires SQL Server, .NET 3.5 and .NET 4.5 as Prerequisite ; With System Center Configuration Manager, you can manage PCs and servers, keeping software up-to-date, …
5 Create Domain Create an AD Domain in a new Forest6 Create web
shortcutCreates a shortcut to a URL in the public desktop folder.
No. 名前 説明7 Download file from
URIDownloads a file from a URI and saves it to a specified location on the virtual machine
8 Enable local administrators
Enables local administrator accounts (if disabled).
9 Reset VM Password Uses the VMAccess extension to reset the built-in administrator account and reset the Remote Desktop service configuration.
10 Run PowerShell Use this to run a script using PowerShell11 Selenium-grid hub Use this artifact to setup your selenium-grid hub. For the prerequisites
please check the readme on https://aka.ms/se-hub-prereqs12 Selenium-grid
nodeUse this artifact to setup your selenium-grid node. For the prerequisites please check the readme on https://aka.ms/se-node-prereqs
13 Sysprep Runs sysprep on Windows machines. Running this artifact will render your machine unusable. Apply this artifact last if used in conjunction with other artifacts.
No. 名前 説明1 Apt-Get Install Apt packages on Linux using the apt-get utility. This system is the
default package manager installed on Debian and Debian-based distributions such as Ubuntu.
2 Chef Client Downloads and installs the client, registers with the specified Chef server, does an initial checkin, and applies any recipes in the run list.
3 Deploy App from Azure Storage
Deploy an app stored in an Azure container to Linux
4 Docker Install Docker on Linux5 Docker Container Install a Docker container on Linux6 JDK Install Java Development Kit on Debian-based and Red Hat based
distributions.7 MongoDB Install MongoDB on Linux8 Node.js Install Node.js on Linux
No. 名前 説明9 NPM Package Install NPM packages on Linux using the Node Package Manager.10 PowerShell on
LinuxInstalls PowerShell on Linux either on CentOS 7 or Ubuntu 14.04 or 16.04 LTS.
11 YUM Package Install YUM packages on Linux
No. 名前 説明1 de-provision Uses The Microsoft Azure Linux Agent (waagent) to de-provision a Linux
VM for saving as an image.2 Run Bash Download and run a bash script3 Swap File Configure swap file on Linux
Appendix
参考情報
docs.microsoft.com/ja-jp/azure/devtest-lab/
blogs.msdn.microsoft.com/devtestlab/
azure.microsoft.com/ja-jp/updates/?product=devtest-lab
azure.microsoft.com/ja-jp/resources/videos/index/?services=devtest-lab
social.msdn.microsoft.com/Forums/en-US/home?forum=AzureDevTestLabs
stackoverflow.com/questions/tagged/azure-devtest-labs
github.com/Azure/azure-quickstart-templates
github.com/Azure/azure-devtestlab
Appendix
ラボ作成操作
①
②
③
⑤④’
④
Appendix
ユーザー追加操作
①
②
③
④
⑤
⑥⑦
⑧
Appendix
ユーザーの操作
Appendix
仮想マシンのサイズ制限操作
①②③
Appendix
ユーザーあたりの仮想マシン数の制限操作
①②③④⑤
Appendix
ラボあたりの仮想マシン数の制限操作
①
②③④⑤
Appendix
自動シャットダウンの設定操作
① ② ③
④ ⑤
Appendix
自動開始の設定操作
①② ③
Appendix
シークレットの保存操作
①
②
③
Appendix
仮想マシン作成操作(要求可能な仮想マシン)
①
②③
④
⑤
⑥
⑦⑧
⑨⑨’
⑩⑪
⑬⑫
Appendix
仮想マシンの要求と利用操作
① ②
③④
⑤
⑥
⑦
Appendix
カスタムイメージの作成操作
①
②③④
Appendix
カスタムイメージによる仮想マシンの作成操作
①②
Appendix
式の作成操作(既存の仮想マシンからキャプチャ)
①
② ③④
Appendix
式の作成操作(スクラッチ)
①
②
③
④⑤
Appendix
式による仮想マシンの作成操作
①②
Appendix
リポジトリの確認操作(標準の Public Repo)
①②
Appendix
リポジトリの追加操作
①②
③④
Appendix
カスタムARM テンプレートの利用操作
①②
③
③’
セッションアンケートにご協力ください
専用アプリからご回答いただけます。
decode 2017
スケジュールビルダーで受講セッションを登録後、アンケート画面からご回答ください。
アンケートの回答時間はたったの 15 秒です!
Ask the Speaker のご案内本セッションの詳細は『Ask the Speaker Room』各コーナーカウンタにてご説明させていただきます。是非、お立ち寄りください。
© 2017 Microsoft Corporation. All rights reserved.
本情報の内容(添付文書、リンク先などを含む)は、作成日時点でのものであり、予告なく変更される場合があります。