ラベル ClowdFoundry の投稿を表示しています。 すべての投稿を表示
ラベル ClowdFoundry の投稿を表示しています。 すべての投稿を表示

2011年5月10日火曜日

Cloud Foundry windows利用メモ [Eclipseからの利用]

Eclipseで使えるらしい。
参考: Using Cloud Foundry from STS

1. Eclipse の Help → Maketplace を選択

2. Find 欄にCloud Foundryを入力し、検索

3. 「Cloud Foundry Integration」 をインストール

インストール後はSpring Source Tool Suiteもインストールされる


4.サーバの登録

5.情報の入力

6.登録したアプリケーションや、ファイルなどもEclipseから確認可能になる

Cloud Foundry windows利用メモ [ログイン、コマンド、アップ準備]

1.ログインする
C:\>vmc login
Email: メールでもらったアカウント
Password: ********
Successfully logged into [http://api.cloudfoundry.com]
2.コマンドのヘルプを確認(以下のコマンドで一通り出てくる)
C:\test>vmc -h
3.手順書のRubyのスクリプトを作る
C:\test>more test.rb
require 'sinatra'
get '/' do
 "Hello from FTMOON Cloud Foundry test update2"
end 

4.アップロード


C:\test>vmc push
Would you like to deploy from the current directory? [Yn]:
Application Name: ftmoon
Application Deployed URL: 'ftmoon.cloudfoundry.com'?
Detected a Sinatra Application, is this correct? [Yn]:
Memory Reservation [Default:128M] (64M, 128M, 256M, 512M, 1G or 2G)
Creating Application: OK
Would you like to bind any services to 'ftmoon'? [yN]:
Uploading Application:
 Checking for available resources: OK
 Packing application: OK
 Uploading (0K): OK
Push Status: OK
Staging Application: OK
Starting Application: OK


5.表示確認
ここで確認可能
アップロードしただけで、ちゃんと表示されてる。ちょっとスゴイ。

Cloud Foundry windows利用メモ [環境設定]

指定された手順通りにとりあえず実行する

1.「Start Command Prompt with Ruby 」を実行


2.コマンドプロンプトが開く


3.gem install vmc
以下、実行結果

C:\>gem install vmc
Fetching: json_pure-1.5.1.gem (100%)
Fetching: rubyzip2-2.0.1.gem (100%)
Fetching: highline-1.6.1.gem (100%)
Fetching: mime-types-1.16.gem (100%)
Fetching: rest-client-1.6.1.gem (100%)
Fetching: terminal-table-1.4.2.gem (100%)
Fetching: vmc-0.3.10.gem (100%)
Successfully installed json_pure-1.5.1
Successfully installed rubyzip2-2.0.1
Successfully installed highline-1.6.1
Successfully installed mime-types-1.16
Successfully installed rest-client-1.6.1
Successfully installed terminal-table-1.4.2
Successfully installed vmc-0.3.10
7 gems installed
Installing ri documentation for json_pure-1.5.1...
Installing ri documentation for rubyzip2-2.0.1...
Installing ri documentation for highline-1.6.1...
Installing ri documentation for mime-types-1.16...
Installing ri documentation for rest-client-1.6.1...
Installing ri documentation for terminal-table-1.4.2...
Installing ri documentation for vmc-0.3.10...
Installing RDoc documentation for json_pure-1.5.1...
Installing RDoc documentation for rubyzip2-2.0.1...
Installing RDoc documentation for highline-1.6.1...
Installing RDoc documentation for mime-types-1.16...
Installing RDoc documentation for rest-client-1.6.1...
Installing RDoc documentation for terminal-table-1.4.2...
Installing RDoc documentation for vmc-0.3.10...




4.ターゲットの設定
  vmc target api.cloudfoundry.com



Succesfully targeted to [http://api.cloudfoundry.com]

ここまでやれば、コマンドラインで利用可能に。

Cloud Foundry windows利用メモ [事前準備]

使ってみたら結構面白かった。

利用手順メモ

1.公式サイトで登録

http://www.cloudfoundry.com/

2.メールが届くまでじっと待つ。no-reply@cloudfoundry.comからこんなメールが届く

Thank you for your interest in Cloud Foundry – the industry’s first open platform as a service.

We have approved your request for a CloudFoundry.com account.

Your credentials are listed below.

  Email: ***
  Temporary password: ***

To start using CloudFoundry.com you should first download the vmc command line tool and change your password. To learn how to download and use this tool please follow the instructions here:
http://support.cloudfoundry.com/entries/20012337-getting-started-guide-command-line-vmc-users

Once you have reset your password you can start deploying and managing applications on the CloudFoundry.com service. You can use the vmc command line tool for applications in all of our supported languages and frameworks.

Developers interested in Spring and Java may also use the SpringSource Eclipse-based IDE, STS. To start using Cloud Foundry with STS please follow the instructions here:
http://support.cloudfoundry.com/entries/20012462-getting-started-guide-sts-users

Be sure to visit our community site at http://support.cloudfoundry.com where you can search the knowledge base, ask questions and submit ideas. Note that the community site requires a separate registration.

Happy Clouding,

The Cloud Foundry team


3.メール内にある手順書をとりあえず読む。

4.[ここからWindows Only] Ruby Installerをダウンロード
http://www.rubyinstaller.org/

5.ダウンロードしたファイルをインストール
空白が入っているフォルダだとうまく動作しない模様( Program files など)
(インストーラのデフォルトが無難かと。)

以上で利用前準備完了