【REMIX】 イベントが開催、終了しました
Silverlight, Expression Studio, Windows Live, Windows Media など盛りだくさんなイベントでした。 私は例によってIIS7のセッションを担当させていただきましたが、ご参加いただいた大勢のお客様、ありがとうございました。ここでいくつかの宿題を果たしたいと思います。
●配布資料に無かったスライドの内容
n 台を管理する際に WinRS と Appcmd の組合せの他に PowerShell の活用事例を説明するところで一枚スライドを前日に追加しました。その内容は下記です。
PowerShell の強みの一つはテキストファイルをループに使用してコマンドをパイプして打てることです。そして、アプリケーション&システム構成の配布を行う場合にIIS7ではフォルダを XCOPY する方法で行えることをうまく活用すると、以下3.のようなコマンドレットを書いておくことで非常に便利に任意のサーバー台数に展開できます。PowerShell はパイプの受け渡しにオブジェクトを使えるのでここで書いているのはほんの一例であって、もっと複雑なこともできるのは言うまでもありません。
1. RestOfFarm.txt ・・・ 展開先サーバー名の一覧を書いたテキストファイル
Server1
Server2
Server3
Server4
2. AppManifest.txt ・・・ 展開したいフォルダの一覧を書いたテキストファイル
この例では実は展開済みのPHPエンジン(c:\php)を一緒に配ってしまう発想です。
C:\PHP
C:\App1
C:\App2
D:\App3
3. コマンド
# file: Deploy-Application.ps1
$sourceMachine = "DemoServer1"
$farmList = get-content '.\RestOfFarm.txt'
$filesToCopy = get-content '.\AppManifest.txt'
foreach ($targetMachine in $farmList)
{
foreach ($file in $filesToCopy)
{
$sourcePath = "\\" + (join-path $sourceMachine $file)
$destPath = "\\" + (join-path $targetMachine $file)
write-host -for yellow "$targetMachine : Copying files from $sourcePath"
copy-item $sourcePath $destPath -recurse -force
}
}
で実際に実行する際はPowerShell内で以下のように1コマンドで実行できる。
PS C:\> .\Deploy-Application.ps1
この方法の長所はシンプルでいながら、テキストファイルに n 台(それこそ1000台でも)書けばスケールすること、展開したいアプリケーションのリストも追加すれば増えること、非同期でこれを複数で実行するように工夫をすれば実践で本当に使えるソリューションだということをお伝えしました。
●いただいたいくつかのご質問のご紹介
- Virtual Server を Vista 環境(IIS7)で動かすとメッセージが出てうまく使えない
Virtual Server 2005 R2 SP1 のWeb 管理ツールでメッセージが出て使えないということであれば、IEを管理者起動しているかどうかをお聞きしました。
※仮想環境については 田辺、高添 のブログをご覧になるとこれ以外でもヒントが見つかるかもしれません。
- スライドにVistaとXPでのファイル転送効率の話があったがどこかにこの公開資料はないか
私のスライドにあった資料とは違いますが、下記なんかいかがでしょうか。
https://download.microsoft.com/download/4/b/4/4b455e48-72c4-4a04-b9a5-892fd497087a/tollyresults.pdf
日経ITPROさんのこんな記事もありますね。
https://itpro.nikkeibp.co.jp/article/COLUMN/20070712/277389/?L=rss
私の使っているグラフの出所を再確認したところ、Microsoft.com の運用チームが米国 Tech・Ed で行ったセミナーのスライドにあったもので、作成条件は フランクフルトにあるサーバーからインターネット経由でインターネットに直接接続しているマシンをデュアルブートにして XP SP2 と Vista を比較して作成したもののようで、公開はされていません。転送レートは154kbps 対 432kbps だったようです。
下記でグラフの作者の解説が見れます。ヨーロッパで話しているものが公開されていますが英語です。
- ASPのアプリケーションをクラシックモードでテストしているけど、動作しないものが。。。
お聞きしたところ、IIS6 で使用しているが IIS5互換モードで動かしているものをクラシックモードに持ってきたとのことでした。クラシックモードはあくまでも IIS6 のネイティブモード、ワーカープロセス分離モードの互換モードですので、IIS6 にアプリケーションを移行する際にワーカープロセス分離モードで動作するかどうかを確認していないアプリの場合、ワーカープロセス分離モードに持っていって起こることがそのまま当然起こります。ここでの判断は天秤で、ワーカープロセス分離モードでの検証を行うか、いっそのことIIS7の統合モードまで一気に持っていくかをサンプリング検証(最も複雑なアプリ とか 特殊なアプリ)で判断するとどうか というような話をしました。また、ASPの場合、むしろ互換性判断をしなければいけないのは呼び出しを行っている COM+ コンポーネントだという点もお伝えしました。ASPのページそのものはかなりの確度で動くと思います。
あと、今日のテーマで何か新しい発見があったらまたここに書きます。(^-^)
= English =
[REMIX] The event was held and done
Silverlight, Expression Studio, Windows Live, Windows Media many many cool stuff. I was speaking about IIS7 as usual and thank you to everyone who attended my session. I'd like to do some of the homework here...
// A slide I didn't have in the handsout
When you want to manage multiple servers, one option is to use WinRS along with Appcmd. I added a slide last night where I was discussing about the possibility and power of Windows PowerShell.
One example of the great things about PowerShell is you can use a text file as an input for looping something. Also the IIS7 ability to XCOPY applications and configuration for deployment comes in. When these are combined, you can for instance use a commandlet as in 3. below very conveniently to deploy apps to a huge number of servers very easily. With PowerShell you can use obejcts for piping stuff so this is just a very simple example what you can do and the possibility that lies here is far more bigger than what the following does.
1. RestOfFarm.txt
A text file listing the server names where you want to deploy. If you change this to 1000 lines, you can deploy to 1000 servers although with that size, you'll need some tweaking to make it happen not sequentially but in parallel.
Server1
Server2
Server3
Server4
2. AppManifest.txt
A text file listing the application folders you want to deploy. In this case, you're actually deploying the PHP engine itself too.
C:\PHP
C:\App1
C:\App2
D:\App3
3. Commandlet
# file: Deploy-Application.ps1
$sourceMachine = "DemoServer1"
$farmList = get-content '.\RestOfFarm.txt'
$filesToCopy = get-content '.\AppManifest.txt'
foreach ($targetMachine in $farmList)
{
foreach ($file in $filesToCopy)
{
$sourcePath = "\\" + (join-path $sourceMachine $file)
$destPath = "\\" + (join-path $targetMachine $file)
write-host -for yellow "$targetMachine : Copying files from $sourcePath"
copy-item $sourcePath $destPath -recurse -force
}
}
And what you actually type when you execute is the one short line below...
PS C:\> .\Deploy-Application.ps1
This way of deployment is very simple in design but scales just editing the text files and if you do the tweaking, it will be actually a practical solution in real world.
//Introducing several questions I received after the session
1. A message shows when I install Virtual Server on a Vista x64 machine running IIS7
If the web administration tool of Virtual Server 2005 R2 SP1 is showing some message that says you can't access something, how about trying IE in admin mode.
For virtualization issues, I strongly recommend checking out Shigeya's and Osamu's blog where you might be able to also find hints other than this one.
2. There was slide about XP and Vista TCP difference and is there a public place you can get the chart?
Well it's not the same chart but how about this whitepaper?
https://download.microsoft.com/download/4/b/4/4b455e48-72c4-4a04-b9a5-892fd497087a/tollyresults.pdf
There's also an article at Nikkei IT PRO below.
https://itpro.nikkeibp.co.jp/article/COLUMN/20070712/277389/?L=rss
I re-checked where I got the chart in my slide and it was from a session slide @ Tech・Ed done by the Microsoft.com team. The backgrounds of this chart meaning how they got the data is they tested downloading a file on a server in Frankfurt accessing from a Internet connected dual boot machine that has Windows XP SP2 and Windows Vista. Unfortunately, the chart itself I couldn't find it in public places. The transfer rate difference was XP: 154kbps vs. Vista: 432kbps.
You can watch a video at this site which is the same session spoken in Europe - in English.
https://www.microsoft.com/emea/spotlight/paul_wright_brad_leross_microsoftcom_employing_windows_server_2008_and_internet_information_services_7_.aspx
3. I'm testing some ASP apps in classic mode but there seems to be ones that don't work
What I heard was that this person tried to bring applications that are executing on an IIS6 box in IIS5 compatibility mode to IIS7 classic mode. IIS7 classic mode is a compatibility mode with IIS6 worker process isolation mode, the IIS6 native mode. So if the app is not tested against IIS6 native mode, what will happen there will also happen in IIS7 classic mode obviously. So I advised doing a trial with some specific apps - big and complicated ones or doing something special - and decide trying worker process isolation mode testing and IIS7 integrated mode testing and compare which is the solution to choose for the customer's situation. Also if you're talking about ASP, I'd say the compatibility problems would be in the COM+ component functions and probably the ASP page itself won't have any problems.
If I get any updates about today's topic, I'll write again. :-)