系列2:部署刚才的hello servlet到bluemix云

参考:https://www.ng.bluemix.net/docs/#starters/liberty/index.html#liberty

1)打包刚才的servlet3

打包后的大小为4KB

C:\IBM\was855nalp\bin> server package simpleServer --archive=hellotest.zip --include=usr
Packaging server simpleServer.
Server simpleServer package complete in C:\IBM\was855nalp\usr\servers\simpleServer\hellotest.zip.


2)登录到bluemix云平台

C:\IBM\was855nalp\bin> cf login -a https://api.ng.bluemix.net
API endpoint: https://api.ng.bluemix.net

Username> [email protected]

Password> ******
Authenticating...
OK

Select an org (or press enter to skip):
1. ccs
2. [email protected]

Org> 1
Targeted org ccs

Select a space (or press enter to skip):
1. dev
2. prod

Space> 1
Targeted space dev

API endpoint: https://api.ng.bluemix.net (API version: 2.2.0)
User:         [email protected]
Org:          ccs
Space:        dev
3) 上传(不自动启动)

C:\IBM\was855nalp\bin> cf push cyperhellotest --no-manifest --no-start -p C:\IBM\was855nalp\usr\servers\simpleServer\hellotest.zip
Creating app cyperhellotest in org ccs / space dev as [email protected]...
OK

Creating route cyperhellotest.ng.bluemix.net...
OK

Binding cyperhellotest.ng.bluemix.net to cyperhellotest...
OK

Uploading cyperhellotest...
Uploading from: C:\IBM\was855nalp\usr\servers\simpleServer\hellotest.zip
3.5K, 4 files
OK

4)启动应用程序
C:\IBM\was855nalp\bin> cf start cyperhellotest
Starting app cyperhellotest in org ccs / space dev as [email protected]...
-----> Downloaded app package (8.0K)
OK


Buildpack Version: v1-20140616-1725
-----> Downloading IBM 1.7.0 JRE from output/ibmjre/ibm-java-jre-7.0-6.0-linux-x86_64-small-footprint-uncompressed-jar-20140116.t
r.gz (0.0s)
       Expanding JRE to .java (1.4s)
Downloading from output/wlp/com.ibm.ws.liberty-2014.5.0.0-201406161725.tar.gz ... (0.0s).
Installing archive ... (0.6s).
-----> Uploading droplet (95M)

1 of 1 instances running

App started

Showing health and status for app cyperhellotest in org ccs / space dev as [email protected]...
OK

requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: cyperhellotest.ng.bluemix.net

     state     since                    cpu    memory         disk
#0   running   2014-06-23 11:59:08 PM   0.5%   273.9M of 1G   180.7M of 1G

C:\IBM\was855nalp\bin>

5)测试
访问cyperhllotest.ng.bluemix.net/helloworld/HelloServlet
系列2:部署刚才的hello servlet到bluemix云

你可能感兴趣的:(系列2:部署刚才的hello servlet到bluemix云)