Learn and Be Curious

day2

Cloud/Bluemix2017. 3. 21. 11:34








c:\bluemix-libertycache>cf push abc-java-sample-myung -p cacheSampleJavaNativeAPIs.war --no-manifest
Creating app abc-java-sample-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

Creating route abc-java-sample-myung.mybluemix.net...
OK

Binding abc-java-sample-myung.mybluemix.net to abc-java-sample-myung...
OK

Uploading abc-java-sample-myung...
Uploading app files from: C:\Users\tec12\AppData\Local\Temp\unzipped-app892741111
Uploading 42.9K, 21 files
Done uploading
OK

Starting app abc-java-sample-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
Downloading liberty-for-java_v3_7-20170118-2046...
Downloading nodejs_buildpack...
Downloading ruby_buildpack...
Downloading xpages_buildpack...
Downloading dotnet-core...
Downloaded dotnet-core
Downloading swift_buildpack...
Downloading java_buildpack...
Downloaded ruby_buildpack
Downloading noop-buildpack...
Downloaded xpages_buildpack
Downloaded nodejs_buildpack
Downloading liberty-for-java...
Downloaded swift_buildpack
Downloading go_buildpack...
Downloaded java_buildpack
Downloading python_buildpack...
Downloaded noop-buildpack
Downloading liberty-for-java_v3_4_1-20161030-2241...
Downloaded liberty-for-java
Downloading staticfile_buildpack...
Downloaded go_buildpack
Downloaded liberty-for-java_v3_4_1-20161030-2241
Downloading sdk-for-nodejs...
Downloaded python_buildpack
Downloaded staticfile_buildpack
Downloading liberty-for-java_v3_5-20161114-1152...
Downloaded php_buildpack
Downloading sdk-for-nodejs_v3_9-20161128-1327...
Downloaded binary_buildpack
Downloading swift_buildpack_v2_0_3-20161217-1748...
Downloaded sdk-for-nodejs
Downloaded liberty-for-java_v3_5-20161114-1152
Downloaded sdk-for-nodejs_v3_9-20161128-1327
Downloaded dotnet-core_v1_0_6-20161205-0912
Downloaded swift_buildpack_v2_0_3-20161217-1748
Creating container
Successfully created container
Downloaded app package (6.1M)
Staging...
-----> Liberty Buildpack Version: v3.8-20170308-1507
-----> Retrieving IBM 1.8.0_20170215 JRE (ibm-java-jre-8.0-4.1-pxa6480sr4fp1-20170215_01-cloud.tgz) ... (0.0s)
         Expanding JRE to .java ... (1.3s)
-----> Retrieving App Management 1.25.0_20170214-1539 (app-mgmt_v1.25-20170214-1539.zip) ... (0.0s)
         Expanding App Management to .app-management (0.1s)
-----> Retrieving com.ibm.ws.liberty-17.0.0.1-201703081507.tar.gz ... (0.0s)
         Installing archive ... (1.4s)
-----> Liberty buildpack is done creating the droplet
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading droplet...
Uploading build artifacts cache...
Uploaded build artifacts cache (108B)
Uploaded droplet (137.8M)
Uploading complete
Destroying container

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

App started


OK

App abc-java-sample-myung was started using this command `.liberty/initial_startup.rb`

Showing health and status for app abc-java-sample-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: abc-java-sample-myung.mybluemix.net
last uploaded: Tue Mar 21 01:14:00 UTC 2017
stack: cflinuxfs2
buildpack: Liberty for Java(TM) (WAR, liberty-17.0.0_1, buildpack-v3.8-20170308-1507, ibmjdk-1.8.0_20170215, env)

     state     since                    cpu     memory         disk           details
#0   running   2017-03-21 10:15:32 AM   57.2%   126.4M of 1G   190.9M of 1G

c:\bluemix-libertycache>






space 안에 있는 다른 앱들도 모두 내가 제어가능 (donation하는 형태)











c:\dev>git clone https://github.com/pfgeiger/RedbookLibrary
Cloning into 'RedbookLibrary'...
remote: Counting objects: 285, done.
Receiving objects:  78% (223/285), 5.14 MiB | 1.08 MiB/s
Receiving objects: 100% (285/285), 5.80 MiB | 1.08 MiB/s, done.
Resolving deltas: 100% (109/109), done.

c:\dev>dir
 C 드라이브의 볼륨에는 이름이 없습니다.
 볼륨 일련 번호: 2666-F88B

 c:\dev 디렉터리

2017-03-21  오전 11:31    <DIR>          .
2017-03-21  오전 11:31    <DIR>          ..
2017-03-20  오전 11:58    <DIR>          apache-maven-3.3.9-bin
2017-03-20  오전 11:21    <DIR>          liberty-myung
2017-03-21  오전 11:32    <DIR>          RedbookLibrary
               0개 파일                   0 바이트
               5개 디렉터리  150,514,216,960 바이트 남음

c:\dev>cf create-service dashdb Entry library_db_myung
Creating service instance library_db_myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

Attention: The plan `Entry` of service `dashdb` is not free.  The instance `library_db_myung` will incur a cost.  Contact your administrator if you th
ink this is in error.


c:\dev>cf create-service SessionCh

c:\dev>cf target
API endpoint:   https://api.ng.bluemix.net
API version:    2.54.0
User:           jesang.myung@gmail.com
Org:            SDS_Bluemix_Workshop
Space:          Workshop

c:\dev>cf services
Getting services in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

name                           service                  plan       bound apps
       last operation
Auto-Scaling-paul              Auto-Scaling             free       abc-java-sample-myung, abc-java-sample-paul, app-hello-mix, h2l-2-u4-1, HKT-java-sa
mple   update succeeded
availability-monitoring-auto   AvailabilityMonitoring   Lite       app-hello-mix, HKT-java-sample
       create succeeded
Cloudant NoSQL DB-37           cloudantNoSQLDB          Lite
       create succeeded
Cloudant NoSQL DB-cw           cloudantNoSQLDB          Lite       app-hello-mix
       create succeeded
Cloudant NoSQL DB-eb           cloudantNoSQLDB          Lite
       create succeeded
Cloudant NoSQL DB-gy           cloudantNoSQLDB          Lite       hobbitApp
       create succeeded
Cloudant NoSQL DB-qf           cloudantNoSQLDB          Lite
       create succeeded
Cloudant NoSQL DB-tl           cloudantNoSQLDB          Lite
       create succeeded
Cloudant NoSQL DB-z8           cloudantNoSQLDB          Lite
       create succeeded
Compose for MySQL-nb           compose-for-mysql        Standard
       create succeeded
Compose for ScyllaDB-ut        compose-for-scylladb     Standard
       create succeeded
fordapp-cloudantNoSQLDB        cloudantNoSQLDB          Lite
       create succeeded
library_db                     dashDB                   Entry      h2l-redbooklibrary
       create succeeded
library_db_myung               dashDB                   Entry
       create succeeded
SessionCache-abc               SessionCache             starter    h2l-redbooklibrary
       create succeeded

c:\dev>cf marketplaces
'marketplaces' is not a registered command. See 'cf help'

Did you mean?
      marketplace

c:\dev>cf marketplace
Getting services from marketplace in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...

c:\dev>
c:\dev>
c:\dev>
c:\dev>cf create-service SessionCache starter SessionCache-abc-myung
Creating service instance SessionCache-abc-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

Attention: The plan `starter` of service `SessionCache` is not free.  The instance `SessionCache-abc-myung` will incur a cost.  Contact your administr
ator if you think this is in error.


c:\dev>
c:\dev>cf push
FAILED
Incorrect Usage. The push command requires an app name. The app name can be supplied as an argument or with a manifest.yml file.

NAME:
   push - Push a new app or sync changes to an existing app

USAGE:
   Push a single app (with or without a manifest):
   cf push APP_NAME [-b BUILDPACK_NAME] [-c COMMAND] [-d DOMAIN] [-f MANIFEST_PATH] [--docker-image DOCKER_IMAGE]
   [-i NUM_INSTANCES] [-k DISK] [-m MEMORY] [--hostname HOST] [-p PATH] [-s STACK] [-t TIMEOUT] [-u (process | port | http)] [--route-path ROUTE_PATH]

   [--no-hostname] [--no-manifest] [--no-route] [--no-start] [--random-route]

   Push multiple apps with a manifest:
   cf push [-f MANIFEST_PATH]

ALIAS:
   p

OPTIONS:
   -b                           Custom buildpack by name (e.g. my-buildpack) or Git URL (e.g. 'https://github.com/cloudfoundry/java-buildpack.git') or
 Git URL with a branch or tag (e.g. 'https://github.com/cloudfoundry/java-buildpack.git#v3.3.0' for 'v3.3.0' tag). To use built-in buildpacks only, sp
ecify 'default' or 'null'
   -c                           Startup command, set to null to reset to default start command
   -d                           Domain (e.g. example.com)
   --docker-image, -o           Docker-image to be used (e.g. user/docker-image-name)
   -f                           Path to manifest
   --health-check-type, -u      Application health check type (Default: 'port', 'none' accepted for 'process', 'http' implies endpoint '/')
   --hostname, -n               Hostname (e.g. my-subdomain)
   -i                           Number of instances
   -k                           Disk limit (e.g. 256M, 1024M, 1G)
   -m                           Memory limit (e.g. 256M, 1024M, 1G)
   --no-hostname                Map the root domain to this app
   --no-manifest                Ignore manifest file
   --no-route                   Do not map a route to this app and remove routes from previous pushes of this app
   --no-start                   Do not start an app after pushing
   -p                           Path to app directory or to a zip file of the contents of the app directory
   --random-route               Create a random route for this app
   --route-path                 Path for the route
   -s                           Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)
   -t                           Time (in seconds) allowed to elapse between starting up an app and the first healthy response from the app

c:\dev>dir
 C 드라이브의 볼륨에는 이름이 없습니다.
 볼륨 일련 번호: 2666-F88B

 c:\dev 디렉터리

2017-03-21  오전 11:31    <DIR>          .
2017-03-21  오전 11:31    <DIR>          ..
2017-03-20  오전 11:58    <DIR>          apache-maven-3.3.9-bin
2017-03-20  오전 11:21    <DIR>          liberty-myung
2017-03-21  오전 11:32    <DIR>          RedbookLibrary
               0개 파일                   0 바이트
               5개 디렉터리  150,509,555,712 바이트 남음

c:\dev>cd RedbookLibrary

c:\dev\RedbookLibrary>dir
 C 드라이브의 볼륨에는 이름이 없습니다.
 볼륨 일련 번호: 2666-F88B

 c:\dev\RedbookLibrary 디렉터리

2017-03-21  오전 11:32    <DIR>          .
2017-03-21  오전 11:32    <DIR>          ..
2017-03-21  오전 11:32             1,047 .classpath
2017-03-21  오전 11:32               500 .factorypath
2017-03-21  오전 11:32               395 .gitattributes
2017-03-21  오전 11:32               617 .gitignore
2017-03-21  오전 11:32             1,047 .project
2017-03-21  오전 11:32    <DIR>          .settings
2017-03-21  오전 11:32             1,828 build.xml
2017-03-21  오전 11:32    <DIR>          dep-jar
2017-03-21  오전 11:32               176 manifest.liberty
2017-03-21  오전 11:42               215 manifest.yml
2017-03-21  오전 11:32             1,225 README.md
2017-03-21  오전 11:32         2,960,996 RedbookLibrary.war
2017-03-21  오전 11:32         2,960,975 RedbookLibraryDerby.war
2017-03-21  오전 11:32    <DIR>          src
2017-03-21  오전 11:32    <DIR>          WebContent
              11개 파일           5,929,021 바이트
               6개 디렉터리  150,509,572,096 바이트 남음

c:\dev\RedbookLibrary>dir

c:\dev\RedbookLibrary>cf push
Using manifest file c:\dev\RedbookLibrary\manifest.yml

Creating app redbooklibrary-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

Creating route redbook-library-myung.mybluemix.net...
OK

Binding redbook-library-myung.mybluemix.net to redbooklibrary-myung...
OK

Uploading redbooklibrary-myung...
Uploading app files from: C:\Users\tec12\AppData\Local\Temp\unzipped-app033912727
Uploading 53.3K, 46 files
Done uploading
OK
Binding service library_db_myung to app redbooklibrary-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK
Binding service SessionCache-abc-myung to app redbooklibrary-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

Starting app redbooklibrary-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
Downloading liberty-for-java...
Downloaded liberty-for-java
Creating container
Downloading app package...
Downloaded app package (2.8M)
Staging...
-----> Liberty Buildpack Version: v3.8-20170308-1507
-----> Retrieving IBM 1.8.0_20170215 JRE (ibm-java-jre-8.0-4.1-pxa6480sr4fp1-20170215_01-cloud.tgz) ... (0.0s)
-----> Retrieving App Management 1.25.0_20170214-1539 (app-mgmt_v1.25-20170214-1539.zip) ... (0.0s)
         Expanding App Management to .app-management (0.2s)
-----> Retrieving com.ibm.ws.liberty-17.0.0.1-201703081507.tar.gz ... (0.0s)
         Installing archive ... (1.4s)
-----> Retrieving com.ibm.ws.liberty.ext-17.0.0.1-201703081507.tar.gz ... (0.0s)
         Installing archive ... (1.6s)
-----> Retrieving wxsclient-wlp_8.6.0.8-Pcf81547.17192424.esa ... (0.0s).
         Installing feature ... (6.1s).
-----> Retrieving and installing client jar(s) from com.ibm.ws.icap.clientJars.db2.zip (0.0s)
-----> Warning: Liberty feature set is not specified. Using the default feature set: ["beanValidation-1.1", "cdi-1.2", "ejbLite-3.2", "el-3.0", "jaxrs
-2.0", "jdbc-4.1", "jndi-1.0", "jpa-2.1", "jsf-2.2", "jsonp-1.0", "jsp-2.3", "managedBeans-1.0", "servlet-3.1", "websocket-1.1"]. For the best results
, explicitly set the features via the JBP_CONFIG_LIBERTY environment variable or deploy the application as a server directory or packaged server with
a custom server.xml file.
-----> Auto-configuration is creating config for service instance 'library_db_myung' of type 'AnalyticsWarehouse'
-----> Auto-configuration is creating config for service instance 'SessionCache-abc-myung' of type 'SessionCache'
-----> Liberty buildpack is done creating the droplet
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploaded build artifacts cache (109B)
Uploading complete
Destroying container
Uploaded droplet (219.4M)

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

App started


OK

App redbooklibrary-myung was started using this command `.liberty/initial_startup.rb`

Showing health and status for app redbooklibrary-myung in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

requested state: started
instances: 1/1
usage: 512M x 1 instances
urls: redbook-library-myung.mybluemix.net
last uploaded: Tue Mar 21 02:41:48 UTC 2017
stack: cflinuxfs2
buildpack: liberty-for-java

     state     since                    cpu      memory           disk           details
#0   running   2017-03-21 11:44:13 AM   345.3%   183.3M of 512M   293.2M of 1G

c:\dev\RedbookLibrary>cf apps
Getting apps in org SDS_Bluemix_Workshop / space Workshop as jesang.myung@gmail.com...
OK

name                    requested state   instances   memory   disk   urls
abc-java-sample         stopped           0/1         1G       1G
abc-java-sample-myung   started           1/1         1G       1G     abc-java-sample-myung.mybluemix.net
abc-java-sample-paul    started           1/1         1G       1G     abc-java-sample-paul.mybluemix.net
app-hello-mix           started           1/1         512M     1G     app-hello-mix.mybluemix.net
h2l-2-u4-1              started           1/1         1G       1G     h2l-2-u4-1.mybluemix.net
h2l-redbooklibrary      started           1/1         512M     1G     h2-redbook-library.mybluemix.net
HKT-java-sample         started           1/1         256M     1G     hkt-java-sample.mybluemix.net
hobbitApp               started           1/1         512M     1G     hobbitApp.mybluemix.net
redbooklibrary-myung    started           1/1         512M     1G     redbook-library-myung.mybluemix.net



cf에서 인스턴스 2개로 늘리기










'Cloud > Bluemix' 카테고리의 다른 글

111  (0) 2017.03.28
2-1일  (0) 2017.03.27
Secure Gateway (1-3)  (0) 2017.03.22
Azure CDN  (0) 2017.03.19
Bluemix essentials  (0) 2017.03.18