»
S
I
D
E
B
A
R
«
Your Database in the Cloud.
5月 30th, 2009 by kwin
Your_Database_in_the_cloud

Your_Database_in_the_cloud

SDS の CTP もまもなく開始されるらしい。

The SQL Data Services Community Technology Preview (CTP) will be available soon. You can join the mailing list in order to receive an e-mail notification when it will become available.

mailing list アクセスのダッシュボードのリンクを記録しておくことに。

https://connect.microsoft.com/dashboard/

New_Windows_Azure_Storage_Table_and_Blog_Features_May2009

New_Windows_Azure_Storage_Table_and_Blog_Features_May2009

Windows Azure Storage の方もトランザクション機能
などが追加されてきている

Entity Group Transactions for Windows Azure Table – It is now possible to perform a transaction across entities stored within the same table and same partition
Copy Blob for Windows Azure Blob
Get Block List for Windows Azure Blob

CloudDriveでWindows Azure Logsをみる
5月 1st, 2009 by kwin
 
SDK 環境では動作しても Cloud にもっていくと Internal Server Error になることがある。
 
 Windows Azure Logs Viewer の記事を読んで Copy ボタンをクリックすると Log ファイルが Azure Storage にコピーされることを知った。
 
さっそく Cloud Storage Studio で除いてみると、確かにファイルが作成されていた。
しかし、このツールは現在のバージョンでは Public モードのデータしか内容を参照できない。 
つまり、ファイルの存在は確認できたけれども、その内容をみることができないのである。 
 
 
 
もとの Azure SDK に付属の sample.zip の中にある CloudDrive がいいようだ。 
 
 
azure_samples/CloudDrive/scripts/MountDrive.ps1

function MountDrive {
Param (
$Account = “museum”,
$Key = “xxxQ0GjFYJqTvWY+SspHkfoDmOxxx”,
$ServiceUrl=”http://blob.core.windows.net”,
$DriveName=”Blob”,
$ProviderName=”BlobDrive”)

 # Power Shell Snapin setup
 add-pssnapin CloudDriveSnapin -ErrorAction SilentlyContinue

 # Create the credentials
 $password = ConvertTo-SecureString -AsPlainText -Force $Key
 $cred = New-Object -TypeName Management.Automation.PSCredential -ArgumentList $Account, $password

 # Mount storage service as a drive
 new-psdrive -psprovider $ProviderName -root $ServiceUrl -name $DriveName -cred $cred -scope global
}
MountDrive

 
上記の設定ファイルを作成しておいて 
  azure_samples/CloudDrive > powershell
    PS   azure_samples/CloudDrive > .\buildme.cmd
    PS azure_samples\CloudDrive> .\runme.cmd

Starting DevStore
****Starting PowerShell prompt ****
To switch to Blob drive: cd Blob:
To display the contents: dir

Name       Provider      Root                                      CurrentLocation
—-       ——–      —-                                                —————
Blob       BlobDrive     http://blob.core.windows.net 

 
  cd Blob 
   
  PS Blob:\000000004c00f3ca-staging\Web\Web_IN_0> dir

   Parent: CloudDriveSnapin\BlobDrive::http:\\blob.core.windows.net\000000004c00f3ca-staging\Web\Web_IN_0

Type       Size       LastWriteTimeUtc          Name
—-       —-       —————-          —-
Blob       619        2009/05/01 1:28:58        Events_UTC_200905010115_200905010130.xml
Blob       283        2009/05/01 1:31:15        Events_UTC_200905010130_200905010145.xml
Blob       283        2009/05/01 2:25:20        Events_UTC_200905010215_200905010230.xml
Blob       621        2009/05/01 3:38:22        Events_UTC_200905010330_200905010345.xml

  PS Blob:\000000004c00f3ca-staging\Web\Web_IN_0> cd ..
  PS Blob:\000000004c00f3ca-staging\Web> copy-cd Web_IN_0\ c:\work\ 
 
 
ようやく  取得した xml ファイルをみても、 Web Role が Start したなどの情報だけで、エラーの詳細の内容は記載されていない。
 
 結局は web.config に以下の記述を追加することで画面に詳細が表示されるようになり、 FastCGI の500 エラーなので権限関係の問題、そういば CakePHP は /app/tmp 以下のファイルシステムへの書き込みをしていることを思い出した。
 
 

<system.webServer> 
<httpErrors errorMode=”Detailed” /> 
</system.webServer> 

 

Read the rest of this entry »

Windows Azure First Deploy
4月 18th, 2009 by kwin

Windows Azure の Token を入手した。  

  

 以前、Windows Azure SDK の環境を構築した後に SQL Server を再インストールしてしまっていたので、 Azure 用のデータベースの再作成はどのようにしたらいいのか? 

Windows Azure SDK も新しくなっていたので再インストールしてみたが Create Databse などされない。結局、 Visual Studio で作成したアプリケーションが実行されるときに自動的に Create Database された。

以前、作成したデータベースファイルが物理ファイルとして消されずに残っていたので、途中エラーがでたが、ファイルを削除したところ無事、再作成された。    

  *  上の画像ファイル格納のデモプログラムを以前実行した際のデータベースの様子 

 

 さそく Power to the PROP の記事を参考に PHP  によるアプリケーション作成をVisual Studioで 開始したが、
  Invalid FastCGI application path ‘%RoleRoot%\php\php-cgi.exe’: ..
のエラーが解決できない。

( 結局は ファイルのプロパティのビルドアクションを なし にして解決*1
  Cloud への Deploy の動作が問題  環境変数に RoleRoot=C: を設定し ビルドのアクションは コンテンツ にする )

 

Visual Studio をいったんあきらめ、
Azure Services Training Kit  April には FastCGI のLab が追加されており、この手順に従い コマンドラインによる操作による構築作業で PHP が Windows Azure にて動作することを確認できた。

さて、ようやく動作したので Deploy してみたが、動かない。

いきなり PHP アプリケーションを Deploy するのではなく、最初は Visual Studio からサンプルプログラムの HelloAzure を Deploy してみたのだけれども動作しない。 Windows Azure については新しいサイトができていて、このサイトのはじめの Video がまさに Deploy の手順の説明であるのだが、

  

 

 Video によると Deploy には時間がかるが、その後 WebRole が Initializing から Started にかわるのに時間がかかるとはいっていないし、実際に動画ではすぐ Started にステータスがかわっている。 

 

 しかし、一晩たっても Initializing のままだった。

 Forum を検索してみたところ、どうやらちょうどトラブルだったようで、あらためて自分のWebRole のステータスを確認したところ Started になっていた。

 

 Hello World! 

*1php.iniの問題 http://d.hatena.ne.jp/machi_pon/20090327/1238127217  


 
Read the rest of this entry »

Windows Azureとクラウドのコスト
3月 24th, 2009 by kwin

クラウドの原価はそのサービス形態によって大きく違ってくるらしい。
Windows Azure は効率性はどのくらいになるか。

Azure のアナウンスの影響で Amzaon や Google は Cloud ユーザーの
青田刈りをはじめた。 Amazon EC2、事前一括支払いで大幅割引

先行者利益はやはり重要。

Windows Azure の MIX09 のビデオをみて、そういえば Token はどうなった
のかと思い、アクセスしてみたところ説明が記載されていた。

よく寄せられる質問 (FAQ)

            

 

http://jp.techcrunch.com/archives/20090323the-efficient-cloud-all-of-salesforce-runs-on-only-1000-servers/ 

クラウドの効率性:Salesforceの全サービスはわずか1,000台のサーバで運用されている 
2009 年 3 月 24 日  
EC2クラウドの処理などのWeb Serviceは利用者間で共有しているわけではないので、直接的に比較するのはナンセンスだろう(利用者にはインスタンス処理のための専用コンピュータないし占有部分が与えられることになる)。しかしそれでも大雑把に言ってSalesforceはAmazonのクラウドに対して100対1の効率性優位を持っていることになる。独自のプログラムを独自のデータベースにて、データを非常に効率的に処理するための「マルチテナントオプティマイザー」を実装することで、この優位性を実現している。 
http://www.azurejournal.com/2009/03/windows-azure-mix-09-videos/ 

 Windows Azure Mix ‘09 Video 

  • Using the Windows Azure Tools for Microsoft Visual Studio to Build Cloud Services
  • Introduction to the Azure Services Platform
  • Overview of Windows Azure
  • Building Web Applications with Windows Azure
  • Windows Azure Storage
  2009/03/12 13:29  
マイクロソフト、「Azure」は絵空事ではないと強調 http://japan.cnet.com/news/ent/story/0,2000056022,20389779,00.htm 

Read the rest of this entry »

Windows Azure SDK
3月 2nd, 2009 by kwin

Windows Azure SDK のデモプログラムを動かしてみる
  http://www.microsoft.com/azure/register.mspx 

Windows Web Server 2008  の本環境ではすでに IIS7 は稼動しているが、
Azure SDK のためには SQL Server が必要となる。

  SQL Server Express 2008 のインストールには Installer のインストールが
 必要だが、これのインストールがメモリ不足のため実行できなかったため、
   SQL Server Express 2005 をインストールした。  

  SQL Server Express 2008 with Tools をインストール。
 ( Windows Web Server 2008 には Windows Installer 4.5 の追加インストールは不要 ) 

   その後、  Azure SDK や SQL Data Service SDK や
 Visual Web Develper 2008 Express Editon をインストールした。

  以下は Azure SDK 添付の sample.zip の中の Thumbnails のデモアプリを
 実行時のものである 

  SQL Server が Development Storage のベースとして利用されている
  Development Storage が Azure のストレージ

 

 

 

SQL Server が起動していない場合、以下のようなエラーとなる。 

 

This buffer is for notes you don’t want to save, and for Lisp evaluation.
If you want to create a file, visit that file with C-x C-f,
then enter the text in that file’s own buffer.
‘/’ アプリケーションでサーバー エラーが発生しました。

The Windows Azure storage services cannot be contacted via the current account
configuration or the local development storage tool is not running. Please start the
development storage tool if you run the service locally!

説明: 現在の Web 要求を実行中に、ハンドルされていない例外が発生しました。エラーに関する詳
および例外の発生場所については、スタック トレースを参照してください。

例外の詳細: System.Net.WebException: The Windows Azure storage services cannot be contacted via the current account configuration or the local development storage tool is not running. Please start the development storage tool if you run the service locally!

 

ソース エラー:

 

[関連したソースの行はありません]

ソース ファイル: Default.aspx.cs    行: 47

スタック トレース:

[WebException: The Windows Azure storage services cannot be contacted via the current account configuration or the local development storage tool is not running. Please start the development storage tool if you run the service locally!]

 Microsoft.Samples.ServiceHosting.Thumbnails._Default.CreateOnceContainerAndQueue()
in Default.aspx.cs:47

   Microsoft.Samples.ServiceHosting.Thumbnails._Default.GetPhotoGalleryContainer()
in Default.aspx.cs:58   Microsoft.Samples.ServiceHosting.Thumbnails._Default.Page_PreRender(Object sender, EventArgs e) in Default.aspx.cs:87   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +8682870
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

 

Read the rest of this entry »

»  Substance: WordPress   »  Style: Ahren Ahimsa