14
Windows Azure & PowerShell DSC SYSTEM CENTER & AZURE NIGHT!! (2014.03.28) 高井 一輝 – SYSTEM CENTER USER GROUP JAPAN

Windows Azure and PowerShell DSC

Embed Size (px)

DESCRIPTION

System Center and Azure Night!! (2014.03.28) の資料です。

Citation preview

Page 1: Windows Azure and PowerShell DSC

Windows Azure &

PowerShell DSCSYSTEM CENTER & AZURE NIGHT!! (2014.03.28)

高井一輝 – SYSTEM CENTER USER GROUP JAPAN

Page 2: Windows Azure and PowerShell DSC

自己紹介

高井一輝 (Takai Kazuki)

某 ISP勤務

主な仕事 : クラウドとオンプレミスを組み合わせたインテグレーション

見積り、提案書の作成から設計、構築、試験、運用まで

ネットワーク、サーバ (Windows、Linux)

System Center User Group Japan (SCUGJ)

Twitter : @zhuky7

Facebook : kazuki.takai

Blog : Operations Lab. http://operationslab.wordpress.com/

Page 3: Windows Azure and PowerShell DSC

本日のお話

Windows Azure 上で DSC (Desired State Configuration) を使う際の注意点

本質的には DSC はあまり関係ないです

言語パック周りのお話です

Page 4: Windows Azure and PowerShell DSC

突然ですが

Windows Azure は検証にも最適

検証したいと思ってすぐ使える

手元に機材を用意する必要がない

検証・デモ機を持ち歩く必要がない

Windows Server 2012 R2 のテンプレートも用意されている

Windows Server 2012 R2 の新機能を Azure で検証(体験)したい

とりあえず DSC とか

Page 5: Windows Azure and PowerShell DSC

Desired State Configuration (DSC)

Windows PowerShell Desired State Configuration

サーバーの構成と管理を行うための新機能

(PowerShell 4.0 / Windows Server 2012 R2)

サーバーに対する操作 (構築) 手順ではなく、サーバーの状態を記述することでサーバーを自動構成

DSCによるサーバーの構成手順

PowerShell で構成後のサーバーの状態を定義

PowerShell コードから構成データが含まれる MOFファイルを生成

MOFファイルを使用してサーバーを構成

Page 6: Windows Azure and PowerShell DSC

DSCリソース

Archive Environment File Resources A

Group Log Package Resources B

Process Registry Role Resources C

Script Service User Resources D

Windows PowerShell Desired State Configuration

Built-In Resources Custom Resources

Page 7: Windows Azure and PowerShell DSC

試してみた

Windows Azure 上に仮想マシンを展開

OSの初期設定を実施

Windows Update

ユーザー作成

セキュリティ設定変更

エラー報告やその他細かい設定

言語設定

DSCを動かしてみる

Page 8: Windows Azure and PowerShell DSC
Page 9: Windows Azure and PowerShell DSC

エラー

モジュール MSFT_RoleResourceのインポートが失敗しました。

エラー: ディレクトリ

'C:¥Windows¥system32¥WindowsPowerShell¥v1.0¥Modules¥PSDesiredStateC

onfiguration¥DSCResources¥MSFT_RoleResource¥ja-JP¥'

または親のカルチャディレクトリにWindows PowerShell データファイル'MSFT_RoleResourceStrings.psd1' が見つかりません。

+ CategoryInfo : InvalidOperation: (root/Microsoft/...gurationManager:String) []、CimException

+ FullyQualifiedErrorId : ImportModuleFailed

+ PSComputerName : INF1403-W12R2E

Page 10: Windows Azure and PowerShell DSC

リソースファイルがない?

C:¥Windows¥system32¥WindowsPowerShell¥v1.0¥Modules¥PSDesiredStateConfiguration¥DSCResources¥MSFT_RoleResource を見てみる

ja-JPフォルダーがない

Windows Azure の仮想マシンは英語 OS

確かに、デフォルトではリソースが存在しないのが正しいが…

Page 11: Windows Azure and PowerShell DSC

うまく動く環境と動かない環境

同じ DSC構成ファイル(スクリプト)でも、動く環境と動かない環境がある

動く環境

日本語ランゲージパックを適用していない

日本語ランゲージバックを適用済み、ログインユーザーの言語環境が日本語システムユーザーおよびようこそ画面は英語

動かない環境

日本語ランゲージパックを適用済み、ログインユーザーの言語環境が日本語システムユーザーおよびようこそ画面も日本語

↑の環境でも、動く場合がある

Page 12: Windows Azure and PowerShell DSC

動かない原因

システム言語が日本語に設定されている環境で、かつ KB2883200 が適用されていない

KB2883200 - Windows 8.1 およびWindows Server 2012 R2 の一般公開用の更新プログラムのロールアップ

http://support.microsoft.com/kb/2883200/ja

ランゲージパックの適用後に、KB2883200 を適用する必要あり

ランゲージパックの適用後に Windows Update を実行すると、インストール対象として表示される

Page 13: Windows Azure and PowerShell DSC

まとめ

言語パックを適用した OS環境とローカライズ版の OS環境は同じではない

言語パックを適用したら、Windows Update を再実行する

必要がないなら、システムアカウントの言語は変更しない

今回の事象以外にも、いろいろなトラブルが起きる可能性があります

Page 14: Windows Azure and PowerShell DSC

ご清聴ありがとうございました