Help us understand the problem. What is going on with this article?

NTT Cloudnを初めて試したときのメモ

More than 3 years have passed since last update.

NTT Cloudnを初めて試してみたので、その時のメモです。

1. クライアントツール

NTT Cloudnも「cf tool」より操作可能ですが、「GUD」が推奨されています。

Cloudn PaaSをご利用頂くために、専用のクライアントソフトウェアであるGUDをインストールしてください。Cloudn PaaSはCloud Foundryをベースとしていますが、他ベンダーの提供するクライアントソフトウェアでは、Cloudn RDB連携など、弊社独自機能をご利用頂けません。

GUDは以下より取得可能です。
スクリーンショット 2016-06-12 20.17.44.png

2. GUDを使用してログインからサンプルアプリ(Java)の起動手順

2.1. Node.jsアプリのPushテスト

まずは、かつて「cf tool」から「Node.js」アプリのPushに失敗していたので、GUDからならできるかも?と確認しました。

$ gud api api.paas.jp-e1.cloudn-service.com
Setting api endpoint to api.paas.jp-e1.cloudn-service.com...
OK


API endpoint:   https://api.paas.jp-e1.cloudn-service.com (API version: 2.4.0)   
Not logged in. Use 'gud login' to log in.
$ gud login
API endpoint: https://api.paas.jp-e1.cloudn-service.com

Email> ********************

Password> 
Authenticating...
OK

Targeted org cln*********

Targeted space default



API endpoint:   https://api.paas.jp-e1.cloudn-service.com (API version: 2.4.0)   
User:           cln*********@cloudnpaas.com   
Org:            cln*********   
Space:          default   

$ pwd
/.../NodeRedTest-Kokui

$ ls
bluemix-settings.js launchConfigurations    nodes
License.txt     couchstorage.js     manifest.yml        package.json
README.md       defaults        mongostorage.js     public

$ gud push -b https://github.com/cloudfoundry/nodejs-buildpack
Using manifest file /.../NodeRedTest-Kokui/manifest.yml

Creating app NodeRedTest-Kokui in org cln********* / space default as ********************...
OK

Creating route NodeRedTest-Kokui.paas.jp-e1.cloudn-service.com...
OK

Binding NodeRedTest-Kokui.paas.jp-e1.cloudn-service.com to NodeRedTest-Kokui...
OK

Uploading NodeRedTest-Kokui...
Uploading app files from: /.../NodeRedTest-Kokui
Uploading 133.2K, 22 files
OK
FAILED
Could not find service NodeRedTest-Kokui-cloudantNoSQLDB to bind to NodeRedTest-Kokui

$ gud logs NodeRedTest-Kokui --recent
Connected, dumping recent logs for app NodeRedTest-Kokui in org cln********* / space default as ********************...

2016-06-12T18:26:41.76+0900 [API]     OUT Created app with guid 4335259f-07dc-4ae0-9c73-ef587f7a6320
2016-06-12T18:26:42.35+0900 [API]     OUT Updated app with guid 4335259f-07dc-4ae0-9c73-ef587f7a6320 ({"route"=>"90ccf657-6b79-4caa-b662-62290c50f59f"})

やっぱりダメ。

2.2. JavaアプリのPushテスト

Javaのサンプルアプリを以下より取得して使用します。
https://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/

$ gud push hello-world -p sample.war 
Creating app hello-world in org cln********* / space default as ********************...
OK

Using route hello-world.paas.jp-e1.cloudn-service.com
Binding hello-world.paas.jp-e1.cloudn-service.com to hello-world...
OK

Uploading hello-world...
Uploading app files from: sample.war
Uploading 6.1K, 11 files
OK

Starting app hello-world in org cln********* / space default as ********************...
OK
-----> Downloaded app package (8.0K)
-----> Java Buildpack Version: 541623b | git@github.com:cloudn/java-buildpack.git#541623b
-----> Downloading Oracle JRE 1.7.0_80 from http://buildpacks-cdn.cloudnpaas.com/java/jre-7u80-linux-x64.tar.gz (4.0s)
       Expanding Oracle JRE to .java-buildpack/oracle_jre (2.5s)
-----> Downloading Tomcat Instance 7.0.65 from https://download.run.pivotal.io/tomcat/tomcat-7.0.65.tar.gz (1.2s)
       Expanding Tomcat to .java-buildpack/tomcat (0.3s)
-----> Downloading Tomcat Lifecycle Support 2.5.0_RELEASE from https://download.run.pivotal.io/tomcat-lifecycle-support/tomcat-lifecycle-support-2.5.0_RELEASE.jar (0.1s)
-----> Downloading Tomcat Logging Support 2.5.0_RELEASE from https://download.run.pivotal.io/tomcat-logging-support/tomcat-logging-support-2.5.0_RELEASE.jar (0.1s)

-----> Uploading droplet (53M)

0 of 1 instances running, 1 starting
1 of 1 instances running

App started

Showing health and status for app hello-world in org cln********* / space default as ********************...
OK

requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: hello-world.paas.jp-e1.cloudn-service.com
zone: 

     state     since                    cpu    memory          disk   
#0   running   2016-06-12 07:42:32 PM   0.0%   88.4M of 256M   140.8M of 2G   

$ gud apps
Getting apps in org cln********* / space default as ********************...
OK

name          requested state   instances   memory   disk   urls                                        zone   auto update   
hello-world   started           1/1         256M     2G     hello-world.paas.jp-e1.cloudn-service.com          false   

Cloudnの操作マニュアルによると、Configフォルダを作成して、「oracle_jre.yml」を配置するような記述がありましたが、このままでも上手くいきました。
(ものによってはダメかも。)

スクリーンショット 2016-06-12 20.14.59.png

3. 参考

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away