Learn and Be Curious

IoT

Cloud/Bluemix2017. 4. 14. 14:29

IBM

- IoT 연계


Recipes


pubsub 펍섭


트래블러 카메라 나이에 따라 맞춤광고



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

translate  (0) 2017.04.17
Watson IoT  (0) 2017.04.17
WATSON  (0) 2017.04.13
MSA  (0) 2017.04.11
Data connect  (0) 2017.04.07

WATSON

Cloud/Bluemix2017. 4. 13. 15:02

임용성 상무


Visual Recognition




Personality Insights

WM




이미지를 인식

고객이 퇴근하는길 경로에 가장 가까운 데를 찾아서

재고있는 경우 약속을 잡아줌



시스템 오픈후 영업직원들의 문의

: 왓슨




상담자의 콜비용

- 미국은 7달러

- 우리는 3천원

- 왓은은 60원

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

Watson IoT  (0) 2017.04.17
IoT  (0) 2017.04.14
MSA  (0) 2017.04.11
Data connect  (0) 2017.04.07
faro secure gateway  (0) 2017.04.07

MSA

Cloud/Bluemix2017. 4. 11. 15:08



SDS@SDS-PC C:\Users\SDS\workspace
$ git clone https://github.com/jmyung/interconnect-menu.git
Cloning into 'interconnect-menu'...
remote: Counting objects: 71, done.
remote: Total 71 (delta 0), reused 0 (delta 0), pack-reused 71
Unpacking objects: 100% (71/71), done.

SDS@SDS-PC C:\Users\SDS\workspace
$ git clone https://github.com/jmyung/interconnect-drinks.git
Cloning into 'interconnect-drinks'...
remote: Counting objects: 30, done.
remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30
Unpacking objects: 100% (30/30), done.

SDS@SDS-PC C:\Users\SDS\workspace
$ git clone https://github.com/jmyung/interconnect-food.git
Cloning into 'interconnect-food'...
remote: Counting objects: 30, done.
remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30
Unpacking objects: 100% (30/30), done.



SDS@SDS-PC C:\Users\SDS\workspace
$ cd interconnect-menu

SDS@SDS-PC C:\Users\SDS\workspace\interconnect-menu
$ mvn clean package
[INFO] Scanning for projects...
Downloading: http://dev.anyframejava.org/maven/repo/org/springframework/boot/spring-boot-starter-parent/1.4.1.RELEASE/spring-boot-starter-parent-1.4.1.RELEASE.pom
Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.4.1.RELEASE/spring-boot-starter-parent-1.4.1.RELEASE.pom
Downloaded: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.4.1.RELEASE/spring-boot-starter-parent-1.4.1.RELEASE.pom (8 KB at 5.6 KB/sec)
Downloading: http://dev.anyframejava.org/maven/repo/org/springframework/boot/spring-boot-dependencies/1.4.1.RELEASE/spring-boot-dependencies-1.4.1.RELEASE.pom
Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/1.4.1.RELEASE/spring-boot-dependencies-1.4.1.RELEASE.pom

............



SDS@SDS-PC C:\Users\SDS\workspace
$ cd interconnect-drinks

SDS@SDS-PC C:\Users\SDS\workspace\interconnect-drinks
$ mvn clean package
[INFO] Scanning for projects...
Downloading: http://dev.anyframejava.org/maven/repo/org/springframework/boot/spring-boot-starter-parent/1.4.0.RELEASE/spring-boot-starter-parent-1.4.0.RELEASE.pom
Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.4.0.RELEASE/spring-boot-starter-parent-1.4.0.RELEASE.pom
Downloaded: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.4.0.RELEASE/spring-boot-starter-parent-1.4.0.RELEASE.pom (8 KB at 6.5 KB/sec)



SDS@SDS-PC C:\Users\SDS\workspace
$ cd interconnect-drinks

SDS@SDS-PC C:\Users\SDS\workspace\interconnect-drinks
$ mvn clean package
[INFO] Scanning for projects...
Downloading: http://dev.anyframejava.org/maven/repo/org/springframework/boot/spr
Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/sprin
Downloaded: https://repo.maven.apache.org/maven2/org/springframework/boot/spring
Downloading: http://dev.anyframejava.org/maven/repo/org/springframework/boot/spr
Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/sprin
Downloaded: https://repo.maven.apache.org/maven2/org/springframework/boot/spring







SDS@SDS-PC C:\Users\SDS\workspace\interconnect-food\target
$ java -jar interconnect17-food-1.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.0.RELEASE)

2017-04-11 14:52:56.657  INFO 15512 --- [           main] c.i.m.i.food.FoodApplication             : Starting FoodApplication v1 on SDS-PC with PID 15512 (C:\Users\SDS\workspace\interconnect-food\target\interconnect17-food-1.jar started by SDS in C:\Users\SDS\workspace\interconnect-food\target)
2017-04-11 14:52:56.836  INFO 15512 --- [           main] c.i.m.i.food.FoodApplication             : No active profile set, falling back to default profiles: default
2017-04-11 14:52:57.381  INFO 15512 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@22927a81: startup date [Tue Apr 11 14:52:57 KST 2017]; root of context hierarchy
2017-04-11 14:53:16.180  INFO 15512 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8082 (http)
2017-04-11 14:53:16.418  INFO 15512 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2017-04-11 14:53:16.546  INFO 15512 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.4
2017-04-11 14:53:18.965  INFO 15512 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-04-11 14:53:19.035  INFO 15512 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 21663 ms
2017-04-11 14:53:21.436  INFO 15512 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-04-11 14:53:21.548  INFO 15512 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricFilter' to: [/*]
2017-04-11 14:53:21.549  INFO 15512 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-04-11 14:53:21.551  INFO 15512 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-04-11 14:53:21.552  INFO 15512 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-04-11 14:53:21.553  INFO 15512 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-04-11 14:53:21.554  INFO 15512 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2017-04-11 14:53:21.555  INFO 15512 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2017-04-11 14:53:23.174  INFO 15512 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@22927a81: startup date [Tue Apr 11 14:52:57 KST 2017]; root of context hierarchy
2017-04-11 14:53:23.682  INFO 15512 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/food],methods=[GET],produces=[application/json]}" onto public com.ibm.microservices.interconnect17.food.model.Food com.ibm.microservices.interconnect17.food.FoodController.getFoodMenu()
2017-04-11 14:53:23.698  INFO 15512 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-04-11 14:53:23.702  INFO 15512 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-04-11 14:53:23.779  INFO 15512 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-04-11 14:53:23.780  INFO 15512 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-04-11 14:53:23.886  INFO 15512 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-04-11 14:53:24.874  INFO 15512 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/info || /info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-04-11 14:53:25.594  INFO 15512 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-04-11 14:53:25.614  INFO 15512 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)


나머지 두개도...









C:\Users\myung\workspace\interconnect-menu>docker build -t interconnect-menu .
Sending build context to Docker daemon 21.88 MB
Step 1/5 : FROM java:8
8: Pulling from library/java
5040bd298390: Pull complete
fce5728aad85: Pull complete
76610ec20bf5: Pull complete
60170fec2151: Pull complete
e98f73de8f0d: Pull complete
11f7af24ed9c: Pull complete
49e2d6393f32: Pull complete
bb9cdec9c7f3: Pull complete
Digest: sha256:c1ff613e8ba25833d2e1940da0940c3824f03f802c449f3d1815a66b7f8c0e9d
Status: Downloaded newer image for java:8
 ---> d23bdf5b1b1b
Step 2/5 : ADD target/interconnect17-menu-1.jar app.jar
 ---> e1295c04b4db
Removing intermediate container c09366d21097
Step 3/5 : RUN bash -c 'touch /app.jar'
 ---> Running in f1901df97428
 ---> cb134cae5a04
Removing intermediate container f1901df97428
Step 4/5 : EXPOSE 8181
 ---> Running in cbae6dc42e12
 ---> a3eb06b58790
Removing intermediate container cbae6dc42e12
Step 5/5 : ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
 ---> Running in 0bb329cbf36a
 ---> a064c75dc61e
Removing intermediate container 0bb329cbf36a
Successfully built a064c75dc61e
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

C:\Users\myung\workspace\interconnect-menu>cd ..

C:\Users\myung\workspace>cd interconnect-food

C:\Users\myung\workspace\interconnect-food>docker build -t interconnect-food .
Sending build context to Docker daemon 14.75 MB
Step 1/5 : FROM java:8
 ---> d23bdf5b1b1b
Step 2/5 : ADD target/interconnect17-food-1.jar app.jar
 ---> 9dddaee0e9c7
Removing intermediate container ade8e2d33e37
Step 3/5 : RUN bash -c 'touch /app.jar'
 ---> Running in 9b320fba4238
 ---> 5cf163430714
Removing intermediate container 9b320fba4238
Step 4/5 : EXPOSE 8082
 ---> Running in 699ab0a79fcb
 ---> 0ed61e136a9e
Removing intermediate container 699ab0a79fcb
Step 5/5 : ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
 ---> Running in 35498b2a8cf4
 ---> b2af903c5d53
Removing intermediate container 35498b2a8cf4
Successfully built b2af903c5d53
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

C:\Users\myung\workspace\interconnect-food>cd ..

C:\Users\myung\workspace>cd interconnect-drinks

C:\Users\myung\workspace\interconnect-drinks>docker build -t interconnect-drinks.
invalid argument "interconnect-drinks." for t: Error parsing reference: "interconnect-drinks." is not a valid repository/tag: invalid reference format
See 'docker build --help'.

C:\Users\myung\workspace\interconnect-drinks>docker build -t interconnect-drinks .
Sending build context to Docker daemon 158.7 kB
Step 1/5 : FROM java:8
 ---> d23bdf5b1b1b
Step 2/5 : ADD target/interconnect17-drinks-1.jar app.jar
 ---> ca6363b94401
Removing intermediate container e7d5711a27cf
Step 3/5 : RUN bash -c 'touch /app.jar'
 ---> Running in d52c558608af
 ---> 48744b34b21d
Removing intermediate container d52c558608af
Step 4/5 : EXPOSE 8081
 ---> Running in 27f723c711e0
 ---> e55bcc3ee4d0
Removing intermediate container 27f723c711e0
Step 5/5 : ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
 ---> Running in 9f8e39003b75
 ---> 4ae20cc9997b
Removing intermediate container 9f8e39003b75
Successfully built 4ae20cc9997b
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

C:\Users\myung\workspace\interconnect-drinks>
C:\Users\myung\workspace\interconnect-drinks>dir
 C 드라이브의 볼륨에는 이름이 없습니다.
 볼륨 일련 번호: 88AA-F6B9

 C:\Users\myung\workspace\interconnect-drinks 디렉터리

2017-04-11  오후 03:15    <DIR>          .
2017-04-11  오후 03:15    <DIR>          ..
2017-04-11  오후 03:09                27 .gitignore
2017-04-11  오후 03:09             1,500 Dockerfile
2017-04-11  오후 03:09             1,957 pom.xml
2017-04-11  오후 03:09    <DIR>          src
2017-04-11  오후 03:15    <DIR>          target
               3개 파일               3,484 바이트
               4개 디렉터리  79,034,761,216 바이트 남음

C:\Users\myung\workspace\interconnect-drinks>docker images
REPOSITORY                    TAG                 IMAGE ID            CREATED              SIZE
interconnect-drinks           latest              4ae20cc9997b        About a minute ago   643 MB
interconnect-food             latest              b2af903c5d53        About a minute ago   672 MB
interconnect-menu             latest              a064c75dc61e        2 minutes ago        687 MB






PS C:\Users\myung\workspace\interconnect-drinks> docker run --name drinks -p 8081:8081 -d interconnect-drinks
885d011f28fc8145ca286628f80df55c7d20d8456068a072d001b2982eb49b30
PS C:\Users\myung\workspace\interconnect-drinks> docker ps -a
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS                    PORTS                    NAMES
885d011f28fc        interconnect-drinks           "java -Djava.secur..."   7 seconds ago       Up 7 seconds              0.0.0.0:8081->8081/tcp   drinks
e8e86bfb87a8        interconnect-food             "java -Djava.secur..."   9 minutes ago       Up 9 minutes              0.0.0.0:8082->8082/tcp   food
72f5d49a966b        human537/faro-oracle-xe-11g   "/bin/sh -c '/usr/..."   5 days ago          Exited (137) 4 days ago                            inspiring_wing
77e0c9e2a27d        human537/modified-ubuntu      "bash"                   9 days ago          Exited (137) 8 days ago                            infallible_kowalevski
cc718514202e        wnameless/oracle-xe-11g       "/bin/sh -c '/usr/..."   9 days ago          Exited (137) 8 days ago                            frosty_montalcini
PS C:\Users\myung\workspace\interconnect-drinks>
PS C:\Users\myung\workspace\interconnect-drinks>
PS C:\Users\myung\workspace\interconnect-drinks>
PS C:\Users\myung\workspace\interconnect-drinks> docker inspect 885




PS C:\Users\myung\workspace> docker run --name menu -p 8181:8181 -e DRINKS_URL="172.17.0.3" -e FOOD_URL="172.17.0.2" -d interconnect-menu
0c4a32a7791e7876ca75bbaf717c2e282d3cb3a8def29a1ff7e8420e6b47417d
PS C:\Users\myung\workspace>
PS C:\Users\myung\workspace>
PS C:\Users\myung\workspace>
PS C:\Users\myung\workspace> docker ps -a
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS                    PORTS                    NAMES
0c4a32a7791e        interconnect-menu             "java -Djava.secur..."   16 seconds ago      Up 15 seconds             0.0.0.0:8181->8181/tcp   menu
885d011f28fc        interconnect-drinks           "java -Djava.secur..."   6 minutes ago       Up 6 minutes              0.0.0.0:8081->8081/tcp   drinks
e8e86bfb87a8        interconnect-food             "java -Djava.secur..."   15 minutes ago      Up 15 minutes             0.0.0.0:8082->8082/tcp   food





PS C:\Users\myung\workspace\interconnect-menu> cf ic build -t registry.ng.bluemix.net/myungspace2/interconnect-menu .
Sending build context to Docker daemon 21.88 MB
Step 1 : FROM java:8
8: Pulling from library/java
5040bd298390: Pull complete
fce5728aad85: Pull complete
76610ec20bf5: Pull complete
60170fec2151: Pull complete
e98f73de8f0d: Pull complete
11f7af24ed9c: Pull complete
49e2d6393f32: Pull complete
bb9cdec9c7f3: Pull complete
Digest: sha256:c1ff613e8ba25833d2e1940da0940c3824f03f802c449f3d1815a66b7f8c0e9d
Status: Downloaded newer image for java:8
 ---> d23bdf5b1b1b
Step 2 : ADD target/interconnect17-menu-1.jar app.jar
 ---> ab5605a380b1
Removing intermediate container 8fb1e109720e
Step 3 : RUN bash -c 'touch /app.jar'
 ---> Running in 87a2824116cc
 ---> b93e6ba3054a
Removing intermediate container 87a2824116cc
Step 4 : EXPOSE 8181
 ---> Running in 205b8c30034d
 ---> 12bd98940632
Removing intermediate container 205b8c30034d
Step 5 : ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
 ---> Running in f51aa4b5df17
 ---> e65a66d587c1
Removing intermediate container f51aa4b5df17
Successfully built e65a66d587c1
The push refers to a repository [registry.ng.bluemix.net/myungspace2/interconnect-menu]
878bf7e79e8d: Pushed
827a92fc3669: Pushed
35c20f26d188: Pushed
c3fe59dd9556: Pushed
6ed1a81ba5b6: Pushed
a3483ce177ce: Pushed
ce6c8756685b: Pushed
30339f20ced0: Pushed
0eb22bfb707d: Pushed
a2ae92ffcd29: Pushed
latest: digest: sha256:017aa43640058e107fbda58800c132dba4dc70b35b84d79eda819f0fcc12776a size: 2424
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
PS C:\Users\myung\workspace\interconnect-menu>
PS C:\Users\myung\workspace\interconnect-menu>
PS C:\Users\myung\workspace\interconnect-menu>
PS C:\Users\myung\workspace\interconnect-menu>
PS C:\Users\myung\workspace\interconnect-menu>
PS C:\Users\myung\workspace\interconnect-menu>
PS C:\Users\myung\workspace\interconnect-menu> cf ic images
time="2017-04-11T16:33:16+09:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
REPOSITORY                                                TAG                 IMAGE ID            CREATED             SIZE
registry.ng.bluemix.net/ibm-integration-bus               latest              44542305ed6c        2 weeks ago         688 MB
registry.ng.bluemix.net/ibmnode                           v4                  8cdce2b2ed17        2 weeks ago         196 MB
registry.ng.bluemix.net/ibmnode                           latest              8cdce2b2ed17        2 weeks ago         196 MB
registry.ng.bluemix.net/ibmnode                           v1.1                43d76a861d88        2 weeks ago         184 MB
registry.ng.bluemix.net/ibm_wa_agent                      latest              3d38f3e80fd7        6 weeks ago         435 MB
registry.ng.bluemix.net/ibm-websphere-extreme-scale       latest              2585787ad664        5 days ago          478 MB
registry.ng.bluemix.net/ibmliberty                        javaee7             96285b81d9df        2 months ago        314 MB
registry.ng.bluemix.net/ibmliberty                        latest              96285b81d9df        2 months ago        314 MB
registry.ng.bluemix.net/ibmliberty                        microProfile        50854bcc98c3        2 months ago        237 MB
registry.ng.bluemix.net/ibm-node-strong-pm                latest              3fc4ae24eb0e        8 weeks ago         259 MB
registry.ng.bluemix.net/ibm-backup-restore                latest              5875429769e7        4 weeks ago         203 MB
registry.ng.bluemix.net/ibmliberty                        webProfile7         6b2b8341fa32        2 months ago        276 MB
registry.ng.bluemix.net/ibmnode                           v1.2                d7c434e2e040        2 weeks ago         190 MB
registry.ng.bluemix.net/ibm-mq                            latest              222b6a6fea85        13 days ago         793 MB
registry.ng.bluemix.net/ibmliberty                        webProfile6         211f521035a2        2 months ago        268 MB
registry.ng.bluemix.net/myungspace2/interconnect-drinks   latest              c8576e749e6c        24 minutes ago      269 MB
registry.ng.bluemix.net/myungspace2/interconnect-food     latest              856bfc55216e        7 minutes ago       269 MB
registry.ng.bluemix.net/myungspace2/interconnect-menu     latest              e65a66d587c1        2 minutes ago       282 MB





PS C:\Users\myung\workspace\interconnect-menu> cf ic group create --name drinks_group -p 8081 --memory 128 --auto --min 1 --max 2 --desired 1 registry.ng.bluemix.net/my
ungspace2/interconnect-drinks
OK
The container group creation was requested.
The container group "drinks_group" (id: a87ce820-72ff-4fc4-9343-41f00e963047) was created.
Minimum container instances: 1
Maximum container instances: 2
Desired container instances: 1
PS C:\Users\myung\workspace\interconnect-menu> cf ic group create --name food_group -p 8082 --memory 128 --auto --min 1 --max 2 --desired 1 registry.ng.bluemix.net/myun
gspace2/interconnect-food
OK
The container group creation was requested.
The container group "food_group" (id: 77590c4d-d833-428c-bbad-b046d063f598) was created.
Minimum container instances: 1
Maximum container instances: 2
Desired container instances: 1



food 172.29.0.5
drinks 172.29.0.3



PS C:\Users\myung> cf ic group create --name menu_group -p 8181 --memory 128 --auto --min 1 --max 2 --desired 1 -e DRINKS_URL="172.29.0.3" -e FOOD_URL="172.29.0.5" regi
stry.ng.bluemix.net/myungspace2/interconnect-menu
OK
The container group creation was requested.
The container group "menu_group" (id: 9fb61857-e29f-46af-b23a-7876212c83d0) was created.
Minimum container instances: 1
Maximum container instances: 2
Desired container instances: 1
PS C:\Users\myung> cf ic group list
Group ID                               Name           Status               Created                         Updated   Port
9fb61857-e29f-46af-b23a-7876212c83d0   menu_group     CREATE_IN_PROGRESS   2017-04-11 16:45:03 +0900 KST             8181
77590c4d-d833-428c-bbad-b046d063f598   food_group     CREATE_COMPLETE      2017-04-11 16:39:04 +0900 KST             8082
a87ce820-72ff-4fc4-9343-41f00e963047   drinks_group   CREATE_COMPLETE      2017-04-11 16:36:05 +0900 KST             8081
PS C:\Users\myung> cf ic ps
time="2017-04-11T16:46:27+09:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
CONTAINER ID        IMAGE                                                            COMMAND             CREATED             STATUS              PORTS               NAMES
02e96fbd-e39        registry.ng.bluemix.net/myungspace2/interconnect-menu:latest     ""                  48 seconds ago      Running             8181/tcp            me-fsyt-xvj6lrrwx2ad-koqznuqqqi3s-server-xkffaa35xsdv
4a6794a1-3a4        registry.ng.bluemix.net/myungspace2/interconnect-food:latest     ""                  6 minutes ago       Running             8082/tcp            fo-nt3t-cnut4ls3mruo-x5nb77aetejj-server-e5a4cpaqtbps
a6808dec-db1        registry.ng.bluemix.net/myungspace2/interconnect-drinks:latest   ""                  9 minutes ago       Running             8081/tcp            dr-awf5-gvba3pstdnqo-pssnexfpbbyg-server-so2rsdmui5yy





PS C:\Users\myung> cf ic route map -n interconnect2017-myung -d mybluemix.net menu_group
OK
The route mapping was requested for 'menu_group' to 'interconnect2017-myung.mybluemix.net'.




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

IoT  (0) 2017.04.14
WATSON  (0) 2017.04.13
Data connect  (0) 2017.04.07
faro secure gateway  (0) 2017.04.07
Cloud Tranformation Master Planning  (0) 2017.04.06

Data connect

Cloud/Bluemix2017. 4. 7. 15:22

SDS@SDS-PC C:\Users\SDS

$ cf create-service DataWorks_Gen3 Starter-GA dataconnect-integration

Creating service instance dataconnect-integration in org jmyung / space dev as human537@nate.com...

OK


Attention: The plan `Starter-GA` of service `DataWorks_Gen3` is not free.  The instance `dataconnect-integration` will incur a cost.  Contact your administrator if you think this is in error.



SDS@SDS-PC C:\Users\SDS

$

SDS@SDS-PC C:\Users\SDS

$ cf create-service-key dataconnect-integration dc-credential

Creating service key dc-credential for service instance dataconnect-integration as human537@nate.com...

OK


SDS@SDS-PC C:\Users\SDS

$ create-service cloudantNoSQLDB Lite cloudantTodo

'create-service'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는

배치 파일이 아닙니다.


SDS@SDS-PC C:\Users\SDS

$ cf create-service cloudantNoSQLDB Lite cloudantTodo

Creating service instance cloudantTodo in org jmyung / space dev as human537@nate.com...

OK


SDS@SDS-PC C:\Users\SDS

$ cf create-service-key cloudantTodo toDoCredential

Creating service key toDoCredential for service instance cloudantTodo as human537@nate.com...

OK


SDS@SDS-PC C:\Users\SDS

$ cf service-key cloudantTodo toDoCredential

Getting key toDoCredential for service instance cloudantTodo as human537@nate.com...


{

 "host": "b583c3ab-2f25-4448-8358-165f72590a16-bluemix.cloudant.com",

 "password": "7119cff61c80d2a48bf313f000e87bc2d57525b97688a7774cc89ed3df5799c6",

 "port": 443,

 "url": "https://b583c3ab-2f25-4448-8358-165f72590a16-bluemix:7119cff61c80d2a48bf313f000e87bc2d57525b97688a7774cc89ed3df5799c6@b583c3ab-2f25-4448-8358-165f72590a16-bluemix.cloudant.com",

 "username": "b583c3ab-2f25-4448-8358-165f72590a16-bluemix"

}


SDS@SDS-PC C:\Users\SDS

$



111



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

WATSON  (0) 2017.04.13
MSA  (0) 2017.04.11
faro secure gateway  (0) 2017.04.07
Cloud Tranformation Master Planning  (0) 2017.04.06
bluemix에 faro oracle 이미지 올리기  (0) 2017.04.06

1. sql 오류수정


[movie-mybatis.xml]

SELECT * FROM (SELECT ROWNUM() AS RNUM, LIST.* FROM (
에서

SELECT * FROM (SELECT ROWNUM AS RNUM, LIST.* FROM (

으로


수정후 아래 영화목록이 보여야함



2. Secure gateway 설정


Connecting to 169.46.29.61:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-45-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
Last login: Thu Apr  6 11:56:03 2017 from 125.143.162.194
root@instance-0056c14a:~# wget https://www.sudo.ws/sudo/dist/packages/Ubuntu/16.04/sudo_1.8.19-3_amd64.deb
--2017-04-06 15:19:40--  https://www.sudo.ws/sudo/dist/packages/Ubuntu/16.04/sudo_1.8.19-3_amd64.deb
Resolving www.sudo.ws (www.sudo.ws)... 65.102.237.118
Connecting to www.sudo.ws (www.sudo.ws)|65.102.237.118|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1497562 (1.4M) [application/octet-stream]
Saving to: 'sudo_1.8.19-3_amd64.deb'

sudo_1.8.19-3_amd64.deb                              100%[=====================================================================================================================>]   1.43M   412KB/s    in 3.6s   

2017-04-06 15:19:46 (412 KB/s) - 'sudo_1.8.19-3_amd64.deb' saved [1497562/1497562]

root@instance-0056c14a:~# dpkg -i sudo_1.8.19-3_amd64.deb
Selecting previously unselected package sudo.
(Reading database ... 16851 files and directories currently installed.)
Preparing to unpack sudo_1.8.19-3_amd64.deb ...
Unpacking sudo (1.8.19-3) ...
Setting up sudo (1.8.19-3) ...





root@instance-0056c14a:~# wget https://sgmanager.ng.bluemix.net/installers/ibm-securegateway-client-1.7.0+client_amd64.deb
--2017-04-06 15:28:44--  https://sgmanager.ng.bluemix.net/installers/ibm-securegateway-client-1.7.0+client_amd64.deb
Resolving sgmanager.ng.bluemix.net (sgmanager.ng.bluemix.net)... 158.85.156.18
Connecting to sgmanager.ng.bluemix.net (sgmanager.ng.bluemix.net)|158.85.156.18|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-debian-package]
Saving to: 'ibm-securegateway-client-1.7.0+client_amd64.deb'

ibm-securegateway-client-1.7.0+client_amd64.deb          [  <=>                                                                                                                 ]  11.48M  43.4MB/s    in 0.3s   

2017-04-06 15:28:45 (43.4 MB/s) - 'ibm-securegateway-client-1.7.0+client_amd64.deb' saved [12033964]


root@instance-0056c14a:~# dpkg -i ibm-securegateway-client-1.7.0+client_amd64.deb
Selecting previously unselected package ibm-securegateway-client.
(Reading database ... 16960 files and directories currently installed.)
Preparing to unpack ibm-securegateway-client-1.7.0+client_amd64.deb ...
[preinst] =============================================================================
[preinst] Started on: Thursday - April 06, 2017 - 15:29:58.437279709
[preinst] Running for userid: root with uid: 0
[preinst] The operation for this install is: install
[preinst] =============================================================================
[preinst] INFO: Performing install operation.
Stop and restart the client during install or upgrade? [y/n]?
[preinst] INFO:
[preinst] INFO: Creating the secgwadmin GID for Secure Gateway client.
[preinst] INFO: The group secgwadmin does not exist, creating it...
[preinst] INFO: The group secgwadmin was created successfully.
[preinst] INFO: Checking to make sure the GID for secgwadmin was created.
[preinst] INFO: Creating the secgwadmin UID for Secure Gateway client.
[preinst] INFO: The user secgwadmin does not exist, creating it without a homedir...
[preinst] INFO: The user secgwadmin was created successfully.
[preinst] INFO: Checking to make sure the homedir for secgwadmin was created.
[preinst] =============================================================================
[preinst] Completed with SUCCESS
[preinst] Ended on: Thursday - April 06, 2017 - 15:30:16.336764257
[preinst] =============================================================================
[preinst]
[preinst]
Unpacking ibm-securegateway-client (1.7.0) ...
Setting up ibm-securegateway-client (1.7.0) ...
[postinst] =============================================================================
[postinst] Started on: Thursday - April 06, 2017 - 15:30:18.676652046
[postinst] Running for userid: root with uid: 0
[postinst] The operation for this install is: configure
[postinst] =============================================================================
[postinst] INFO: Performing configure operation
[postinst] INFO: Checking if /var/empty is in filesystem
[postinst] WARNING: /var/empty is NOT in filesystem, creating it
[postinst] INFO: Checking if mail folder for /var/mail/securegateway is in filesystem
[postinst] INFO: Creating mail folder for /var/mail/securegateway
[postinst] INFO: Checking if /var/log/securegateway is in filesystem
[postinst] WARNING: /var/log/securegateway is NOT in filesystem, creating it
[postinst] INFO: Stop and restart the client during this installation: No
[postinst] WARNING: Either you entered No or the prompt to stop and restart the client lapsed!
[postinst] WARNING: The client will NOT be stopped and restarted during this installation.
[postinst] WARNING: You must stop and restart the client manually after the installation has completed.
Enter the gateway IDs, separated by spaces: o0024FlG5dw_prod_ng
[postinst] INFO:
[postinst] INFO: The gateway ID for this install is: o0024FlG5dw_prod_ng
Enter the gateway ID security tokens separated by spaces, enter 'none' for no security token:
[postinst] INFO:
[postinst] WARNING: The security token is not set
[postinst] INFO: Do you wish to change the startup logging level, values are INFO, DEBUG, ERROR or TRACE, default is INFO
Enter log level for each gateway separated by spaces. Enter 'none' or 'INFO' for default log level:
[postinst] INFO:
[postinst] INFO: The logging level for this secure gateway instance is defaults to: INFO
[postinst] INFO: Supply ACL File for processing [optional].
Supply ACL File each gateway separated by spaces. Enter none if no ACL file:
[postinst] INFO:
[postinst] INFO: The Access Control List (ACL) file for this gateway instance is NOT SET
Would you like to use the client UI (Y/N):
Please provide the port the run client UI, default is 9003:
[postinst] WARNING: Invalid value provided, setting port to default 9003.
[postinst] INFO: Your responses have been saved in the /etc/ibm/sgenvironment.conf configuration file.
Couldn't find an alternative telinit implementation to spawn.
Failed to connect to bus: No such file or directory
[postinst] INFO: Process securegateway_client is already stopped or was never started, continuing...
[postinst] INFO: Creating or updating auto-start configuration for your system
[postinst] INFO: Copying [/opt/ibm/securegateway/client/upstart/securegateway_clientd] file to /usr/local/bin...
[postinst] INFO: Chowning [/opt/ibm/securegateway/client/upstart/securegateway_clientd] file in /usr/local/bin to secgwadmin:secgwadmin...
[postinst] INFO: Chmoding [/opt/ibm/securegateway/client/upstart/securegateway_clientd] file in /usr/local/bin to 755...
[postinst] INFO: Copying [/opt/ibm/securegateway/client/upstart/securegateway_client.conf] file to /etc/init ...
[postinst] INFO: Copying [/opt/ibm/securegateway/client/upstart/securegateway_client.service] file to /lib/systemd/system...
Failed to connect to bus: No such file or directory
[postinst] INFO: Preparing to set permissions on directories and executable files...
[postinst] INFO: Checking the secgwadmin userid exists...
[postinst] INFO: Found user secgwadmin, checking the secgwadmin group exists...
[postinst] INFO: Found user and group secgwadmin, setting ownership and permissions for secgwadmin
[postinst] INFO: ...Setting ownership
[postinst] INFO: /bin/chown -R secgwadmin:secgwadmin /opt/ibm/node-v6.9.4-linux-x64
[postinst] INFO: ...Setting permissions
[postinst] INFO: /bin/chmod -R 755 /opt/ibm/node-v6.9.4-linux-x64/bin files...
[postinst] INFO: /bin/chmod -R 755 /opt/ibm/node-v6.9.4-linux-x64/lib/node_modules/npm/bin files...
[postinst] INFO: Checking if /usr/local/bin is in filesystem
[postinst] INFO: ...Symlinking IBM NODE into system
[postinst] INFO: /bin/ln -sf /opt/ibm/node-v6.9.4-linux-x64/bin/node /usr/local/bin/node
[postinst] INFO: /bin/ln -sf /opt/ibm/node-v6.9.4-linux-x64/bin/npm /usr/local/bin/npm
[postinst] INFO: /bin/ln -sf ../lib/node_modules/npm/bin/npm-cli.js /opt/ibm/node-v6.9.4-linux-x64/bin/npm
[postinst] INFO: Calling node install for production modules from /opt/ibm/securegateway
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
ibm-bluemix-secure-gateway-client@1.7.0 /opt/ibm/securegateway/client
├─┬ async@2.0.1
│ └── lodash@4.17.4
├─┬ compression@1.6.1
│ ├─┬ accepts@1.3.3
│ │ └── negotiator@0.6.1

...................


npm WARN ibm-bluemix-secure-gateway-client@1.7.0 No repository field.
Couldn't find an alternative telinit implementation to spawn.
Failed to connect to bus: No such file or directory
[postinst] INFO: securegateway_client may or may not be running...
[postinst] INFO: Should we start or restart it? No
[postinst] WARNING: User had requested not to start the securegateway_client process,
[postinst] WARNING: it has to be started manually.
[postinst] INFO: +-PLEASE NOTE---------------------------------------------------------+
[postinst] INFO: | To run the client using a different gateway ID and other values you |
[postinst] INFO: | can update the /etc/ibm/sgenvironment.conf upstart environment file.|
[postinst] INFO: +---------------------------------------------------------------------+
[postinst] INFO: +-PLEASE NOTE---------------------------------------------------------+
[postinst] INFO: | The installer automatically enables auto-start daemon capability for|
[postinst] INFO: | systems that are supported. To disable, or enable it on systems that|
[postinst] INFO: | are not automatically supported, see the README markdown file. . . .|
[postinst] INFO: +---------------------------------------------------------------------+
[postinst] INFO: You can change the language for Secure Gateway client service logs in /etc/ibm/sgenvironment.conf
[postinst] =============================================================================
[postinst] Completed with SUCCESS
[postinst] Ended on: Thursday - April 06, 2017 - 15:31:09.761345913
[postinst] =============================================================================





root@instance-0056c14a:~# cd /opt/ibm/securegateway/client/
root@instance-0056c14a:/opt/ibm/securegateway/client# node lib/secgwclient.js o0024FlG5dw_prod_ng

IBM Bluemix Secure Gateway Client Version 1.7.0
************************************************************************************************
You  are running the  IBM Secure  Gateway Client for Bluemix. When you enter the provided docker
command the IBM Secure Gateway Client  for Bluemix automatically downloads as a Docker image and
is executed on your system/device. This is released under an IBM license. The  license agreement
for IBM  Secure Gateway Client for Bluemix is available at the following location:

http://www.ibm.com/software/sla/sladb.nsf/lilookup/986C7686F22D4D3585257E13004EA6CB?OpenDocument

Your use of the components of the package and  dependencies constitutes your acceptance  of this
license agreement. If you do  not want to accept the license, immediately quit  the container by
closing the  terminal  window or by  entering 'quit' followed by the ENTER key. Then, delete any
pulled Docker image from your device.

For client documentation, please view the ReadMe located at:
.rpm and .deb installers: /opt/ibm/securegateway/docs/
.dmg installer:           <installation location>/ibm/securegateway/docs/
.exe installer:           <installation location>\Secure Gateway Client\ibm\securegateway\docs\
************************************************************************************************


<press enter for the command line>
[2017-04-06 15:39:31.771] [INFO] (Client ID 1051) No password provided. The UI will not require a password for access
[2017-04-06 15:39:31.785] [WARN] (Client ID 1051) UI Server started. The UI is not currently password protected
[2017-04-06 15:39:31.786] [INFO] (Client ID 1051) Visit localhost:9003/dashboard to view the UI.
[2017-04-06 15:39:32.125] [INFO] (Client ID 1057) Setting log level to INFO
[2017-04-06 15:39:32.280] [INFO] (Client ID 1057) The Secure Gateway tunnel is connected
[2017-04-06 15:39:32.304] [INFO] (Client ID o0024FlG5dw_Og2) Your Client ID is o0024FlG5dw_Og2
[2017-04-06 15:39:32.306] [INFO] (Client ID o0024FlG5dw_Og2) Synchronizing ACL rules
o0024FlG5dw_Og2> acl allow :1521






[comm.properties 수정]

#****** Oracle sample **********************************************************
datasource.driverClass=oracle.jdbc.driver.OracleDriver
datasource.jdbcUrl=jdbc:oracle:thin:@sg-us-south-3-3.integration.ibmcloud.com:16984:xe
datasource.username=sds
datasource.password=sds
datasource.sql.path.ddl=classpath:/sql/ddl/oracle
datasource.sql.path.initdata=classpath:/sql/initdata/oracle
datasource.sql.path.mybatis=classpath:/sql/mybatis/oracle/**/*-mybatis.xml




SDS@SDS-PC C:\Users\SDS
$ cf push faro-myung2 -p C:\Users\SDS\workspace\Faro\target\faro-0.0.1.war -b https://github.com/cloudfoundry/java-buildpack.git  --no-manifest
Creating app faro-myung2 in org jesang.myung / space test as jesang.myung@gmail.com...
OK

Creating route faro-myung2.mybluemix.net...
OK

Binding faro-myung2.mybluemix.net to faro-myung2...
OK

Uploading faro-myung2...
Uploading app files from: C:\Users\SDS\AppData\Local\Temp\unzipped-app847300895
Uploading 3M, 1456 files
Done uploading
OK

Starting app faro-myung2 in org jesang.myung / space test as jesang.myung@gmail.com...
Creating container
Successfully created container
Downloading app package...
Downloaded app package (47.4M)
Staging...
-----> Java Buildpack Version: 6d7989a | https://github.com/cloudfoundry/java-buildpack.git#6d7989a
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (0.7s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (2.0s)
-----> Downloading Open JDK Like Memory Calculator 3.8.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-3.8.0_RELEASE.tar.gz (0.0s)
       Loaded Classes: 20085, Threads: 300, JAVA_OPTS: ''
-----> Downloading Container Certificate Trust Store 2.0.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-certificate-trust-store/container-certificate-trust-store-2.0.0_RELEASE.jar (0.0s)
       Adding certificates to .java-buildpack/container_certificate_trust_store/truststore.jks (0.9s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (0.1s)
       Modifying /WEB-INF/web.xml for Auto Reconfiguration
-----> Downloading Tomcat Instance 8.5.13 from https://java-buildpack.cloudfoundry.org/tomcat/tomcat-8.5.13.tar.gz (0.3s)
-----> Downloading Tomcat Lifecycle Support 2.5.0_RELEASE from https://java-buildpack.cloudfoundry.org/tomcat-lifecycle-support/tomcat-lifecycle-support-2.5.0_RELEASE.jar (0.0s)
-----> Downloading Tomcat Access Logging Support 2.5.0_RELEASE from https://java-buildpack.cloudfoundry.org/tomcat-access-logging-support/tomcat-access-logging-support-2.5.0_RELEASE.jar (0.0s)
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (54M)
Uploaded droplet (99.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
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
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

App faro-myung2 was started using this command `CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-3.8.0_RELEASE -totMemory=$MEMORY_LIMIT -stackThreads=300 -loadedClasses=21808 -poolType=metaspace) && echo JVM Memory Configuration: $CALCULATED_MEMORY &&  JAVA_HOME=$PWD/.java-buildpack/open_jdk_jre JAVA_OPTS="-Djava.io.tmpdir=$TMPDIR $CALCULATED_MEMORY -agentpath:$PWD/.java-buildpack/open_jdk_jre/bin/jvmkill-1.6.0_RELEASE=printHeapHistogram=1 -Djavax.net.ssl.trustStore=$PWD/.java-buildpack/container_certificate_trust_store/truststore.jks -Djavax.net.ssl.trustStorePassword=java-buildpack-trust-store-password -Djava.endorsed.dirs=$PWD/.java-buildpack/tomcat/endorsed -Daccess.logging.enabled=false -Dhttp.port=$PORT" exec $PWD/.java-buildpack/tomcat/bin/catalina.sh run`

Showing health and status for app faro-myung2 in org jesang.myung / space test as jesang.myung@gmail.com...
OK

requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: faro-myung2.mybluemix.net
last uploaded: Thu Apr 6 16:22:43 UTC 2017
stack: cflinuxfs2
buildpack: https://github.com/cloudfoundry/java-buildpack.git

     state     since                    cpu      memory         disk         details
#0   running   2017-04-07 01:25:56 AM   151.6%   343.7M of 1G   196M of 1G






앱이 안올라오고 실패하면, 대시보드에서 app 지우고 다시 push하면 성공할 수 있음


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

MSA  (0) 2017.04.11
Data connect  (0) 2017.04.07
Cloud Tranformation Master Planning  (0) 2017.04.06
bluemix에 faro oracle 이미지 올리기  (0) 2017.04.06
API Connect  (0) 2017.04.05

IaaS, PaaS 변경 => 비용절감


서버:1300대


1단계 : 클라우드 기반 App구조 개선 타당성 검증 (2개월)

  - 대상선정 효과검증

2단계 : 상세전환계획 및 Gov 수립 (2개월)

  - 로드랩, ROI

3단계 : 구조전환 사전준비 (2개월)

  -



[ASIS분석수행]

1. App특성, 컴플라이언스

  - 그룹연계, 공정밀접

  - 망분리, 개인정보

  - 패키지app -> PaaS전환고려 (불가시 IaaS 대상으로 분류)

  - 협업입장에서 DR을 가지고 있어야 하나? 고민 (클라우드로 가면 instance를 그때그때 살릴수있다)

  - Unix에서 x86으로 다운사이징 필요 (U2L. 유닉스는 클라우드에 못옮김)

  - 설비간 통신방식 : 전환 어려움 (나중에 투자를 통해 재구축을 할 필요가 보임)

  - 고객사의 보안장비 솔루션을 클라우드에 어떻게 적용하느나 ... 거의 매핑안됨

     ... 레벨을 낮추거나 HW->SW로 변경하거나 블루믹스

  - 클라우드 전환후 TOBE변화예측 (유지, 절감, 삭제)

  - PaaS를 못가는 이유를 왼쪽에서 찾음 (필터링), 레거시 ->private cloud -> iaas -> paas

  - 비용절감 : 중복업무량이 얼마만큼 축소되는가? Infra자원이 얼마만큼 축소되는가

     ...기존에 넉넉하게 가져가는 부분을 autoscaling으로 최소화해야함 (평균치, 피크치 고려)

  - devops : 표준화플랫폼 및 툴활용을 통한 효율화 (레가시는 워낙 다양했었음)

 

app 

-절감 업무감소량 (HR)  금액

-삭제 업무감소량 (HR)  금액

infra

-절감 업무감소량 (HR)  금액

-삭제 업무감소량 (HR)  금액


  - 인프라 혁신 : 서버리스(PaaS), 오토스케일링

  - colocation zone 활용?

  - 전체 21%의 saving (목표는 30%프로였음)

  - 아키텍쳐?


- cloud native (마이크로 서비스형태로 바꿔야한다...아키텍쳐를 다 뜯어고쳐야 전환비용이 많이 들어가고)

    , enabled? (전환비용)

- MSA : 3단계로 들어가 있음

  - db는 뭘 쓰고 있는지? 혹시 오라클을 쓰고있는걸 고수하고있는지? 올해부터 온프레미스는 기존대로 받지만, 클라우드 오라클은 2배....


  - 기간계 




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

Data connect  (0) 2017.04.07
faro secure gateway  (0) 2017.04.07
bluemix에 faro oracle 이미지 올리기  (0) 2017.04.06
API Connect  (0) 2017.04.05
Faro test  (0) 2017.04.05



PS C:\Users\myung> cf ic namespace get

paul001


PS C:\Users\myung> cf ic cpi human537/faro-oracle-xe-11g registry.ng.bluemix.net/paul001/farodb

pool is not available on Windows"

Sending build context to Docker daemon 2.048 kB

Step 1 : FROM human537/faro-oracle-xe-11g

latest: Pulling from human537/faro-oracle-xe-11g

8aec416115fd: Pull complete

695f074e24e3: Pull complete

946d6c48c2a7: Pull complete

bc7277e579f0: Pull complete

2508cbcde94b: Pull complete

0f39b2269587: Pull complete

72a6f16c5b79: Pull complete

c99f725b2c54: Pull complete

Digest: sha256:359591dc5e272652f844d3e45bb1057db0d2b37983acab6b6a4c1db2083d0677

Status: Downloaded newer image for human537/faro-oracle-xe-11g:latest

 ---> 65990f33eee1

Successfully built 65990f33eee1

The push refers to a repository [registry.ng.bluemix.net/paul001/farodb]

e6953f5a85ec: Pushed

6736e6f4038d: Pushed

000db08ae46d: Pushed

5eb5bd4c5014: Pushed

d195a7a18c70: Pushed

af605e724c5a: Pushed

59f161c3069d: Pushed

4f03495a4d7d: Pushed

latest: digest: sha256:b8ebc1817ce370e18697809f43d45b0a9565cbf923a31fe4d7936aada967846f size: 1996

SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and

directories.


PS C:\Users\myung> cf ic run -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true --name farodb registry.ng.bluemix.net/paul001/farodb


time="2017-04-06T01:04:03+09:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"

6d56bcfa-8f7e-4de3-84ee-4792e406dc39




$ cf ic ip request

OK

The IP address "169.46.29.61" was obtained.


SDS@SDS-PC C:\Users\SDS

$ cf ic ip bind 169.46.29.61 farodb

OK

The IP address was bound successfully.



[SSH접속]

root / admin


Connecting to 169.46.28.116:22...

Connection established.

To escape to local shell, press 'Ctrl+Alt+]'.


Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-45-generic x86_64)


 * Documentation:  https://help.ubuntu.com

 * Management:     https://landscape.canonical.com

 * Support:        https://ubuntu.com/advantage

Last login: Sun Apr  2 15:17:05 2017 from 172.17.0.1

root@instance-0055fecc:~# ll

total 40

drwx------  5 root root 4096 Apr  2 14:44 ./

drwxr-xr-x 22 root root 4096 Apr  5 16:08 ../

-rw-------  1 root root 2075 Apr  2 16:14 .bash_history

-rw-r--r--  1 root root 3106 Oct 22  2015 .bashrc

drwx------  2 root root 4096 Apr  1 16:48 .cache/

-rw-r--r--  1 root root  148 Aug 17  2015 .profile

-rw-------  1 root root 3338 Apr  2 14:16 .viminfo

-rw-r--r--  1 root root   26 Apr  2 09:24 afiedt.buf

drwxr-xr-x  4 root root 4096 Apr  2 13:15 faro_sql/

drwxr-xr-x  3 root root 4096 Apr  1 16:18 oradiag_root/




[Oracle DB 접속]

sds / sds








[이클립스에 Faro 올리기]

1. Import > Exsiting projects into workspace 

2. ISDP-master.zip 선택

3. applicationContext-datasource.xml 을 아래로 갈아끼기


<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:jdbc="http://www.springframework.org/schema/jdbc"

xmlns:util="http://www.springframework.org/schema/util"

xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/jdbc

http://www.springframework.org/schema/jdbc/spring-jdbc.xsd

http://www.springframework.org/schema/util

http://www.springframework.org/schema/util/spring-util-4.0.xsd">


<bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">

<property name="driverClass" value="#{comProps['datasource.driverClass']}" />

<property name="jdbcUrl" value="#{comProps['datasource.jdbcUrl']}" />

<property name="username" value="#{comProps['datasource.username']}" />

<property name="password" value="#{comProps['datasource.password']}" />

<property name="logStatementsEnabled" value="true" />

</bean>


<util:list id="databaseScriptsList" value-type="org.springframework.core.io.Resource">

</util:list>


<bean id="dataSourceInitializer" class="org.springframework.jdbc.datasource.init.DataSourceInitializer">

<property name="dataSource" ref="dataSource" />

<property name="databasePopulator">

<bean class="org.springframework.jdbc.datasource.init.ResourceDatabasePopulator">

<property name="scripts" ref="databaseScriptsList" />

<property name="sqlScriptEncoding" value="UTF-8" />

<property name="ignoreFailedDrops" value="true" />

</bean>

</property>

</bean>


<bean id="messageSource" class="com.sds.faro.common.context.support.DatabaseDrivenMessageSource" depends-on="dataSourceInitializer">

<constructor-arg index="0" ref="com.sds.faro.admin.messagemgn.service.MessageService" />

<constructor-arg index="1" ref="com.sds.faro.admin.language.service.LanguageMgnService" />

<constructor-arg index="2" value="#{comProps['defaultLang']}" />

</bean>

</beans>



4. pom.xml을 아래로 주석처리


<!-- <repository>

<id>anyframe-ui</id>

<url>http://70.121.224.52:8081/nexus/content/repositories/anyframe-java-commercial/</url>

<releases>

<enabled>true</enabled>

</releases>

<snapshots>

<enabled>true</enabled>

<updatePolicy>always</updatePolicy>

</snapshots>

</repository> -->


<!-- <dependency>

<groupId>aui-fileuploader</groupId>

<artifactId>aui-fileuploader</artifactId>

<version>1.0.0</version>

</dependency> -->




5. comm.properties
아래로 대체

#****** H2 sample **************************************************************
#datasource.driverClass=org.h2.Driver
#datasource.jdbcUrl=jdbc:h2:~/.adminPortal/h2
#datasource.username=ADMIN_PORTAL
#datasource.password=ENC(LSW+1di4okO990/POg+HYQ==)
#datasource.sql.path.ddl=classpath:/sql/ddl/oracle
#datasource.sql.path.initdata=classpath:/sql/initdata/oracle
#datasource.sql.path.mybatis=classpath:/sql/mybatis/oracle/**/*-mybatis.xml
#****** Oracle sample **********************************************************
datasource.driverClass=oracle.jdbc.driver.OracleDriver
datasource.jdbcUrl=jdbc:oracle:thin:@169.46.29.61:1521:XE
datasource.username=sds
datasource.password=sds
datasource.sql.path.ddl=classpath:/sql/ddl/oracle
datasource.sql.path.initdata=classpath:/sql/initdata/oracle
datasource.sql.path.mybatis=classpath:/sql/mybatis/oracle/**/*-mybatis.xml
















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

faro secure gateway  (0) 2017.04.07
Cloud Tranformation Master Planning  (0) 2017.04.06
API Connect  (0) 2017.04.05
Faro test  (0) 2017.04.05
TLS  (0) 2017.04.04

API Connect

Cloud/Bluemix2017. 4. 5. 18:00

| | | `-- ansi-regex@2.0.0
| | +-- strip-ansi@3.0.1
| | | `-- ansi-regex@2.0.0
| | `-- supports-color@2.0.0
| +-- cli-table@0.3.1
| | `-- colors@1.0.3
| +-- cvss@1.0.1
| +-- https-proxy-agent@1.0.0
| | +-- agent-base@2.0.1
| | | `-- semver@5.0.3
| | +-- debug@2.2.0
| | | `-- ms@0.7.1
| | `-- extend@3.0.0
| +-- joi@6.10.1
| | +-- hoek@2.16.3
| | +-- isemail@1.2.0
| | +-- moment@2.12.0
| | `-- topo@1.1.0
| +-- nodesecurity-npm-utils@5.0.0
| +-- path-is-absolute@1.0.0
| +-- rc@1.1.6
| | +-- deep-extend@0.4.1
| | +-- ini@1.3.4
| | +-- minimist@1.2.0
| | `-- strip-json-comments@1.0.4
| +-- semver@5.1.0
| +-- subcommand@2.0.3
| | +-- cliclopts@1.1.1
| | +-- debug@2.2.0
| | | `-- ms@0.7.1
| | +-- minimist@1.2.0
| | `-- xtend@4.0.1
| `-- wreck@6.3.0
|   +-- boom@2.10.1
|   `-- hoek@2.16.3
+-- serve-favicon@2.4.2
| +-- etag@1.8.0
| +-- fresh@0.5.0
| +-- ms@1.0.0
| `-- parseurl@1.3.1
`-- strong-error-handler@1.2.1
  +-- http-status@0.2.5
  `-- js2xmlparser@2.0.2
    `-- xmlcreate@0.1.1

하위 프로세스 npm install이(가) 코드 0(으)로 종료되었습니다.

swagger 및 제품 정의 업데이트 중
C:\Users\SDS\pgintegration\definitions\pgintegration.yaml swagger 설명 작성됨
pgintegration-product.yaml 제품 정의 작성됨[pgintegration:1.0.0]

다음 단계:

  앱에 대한 디렉토리 변경
    $ cd C:\Users\SDS\pgintegration

  앱에서 모델 작성
    $ apic create --type model

  API를 작성하고, API Connect를 사용하여 이를 실행, 관리, 적용 및 배치합니다.
    $ apic edit

  앱 실행
    $ apic start


C:\Users\SDS>cd pgintegration

C:\Users\SDS\pgintegration>apic edit

The user model "User" is attached to an application that does not specify
whether other sessions should be invalidated when a password or
an email has changed. Session invalidation is important for security
reasons as it allows users to recover from various account breach
situations.

We recommend turning this feature on by setting
"logoutSessionsOnSensitiveChanges" to true in
server/config.json (unless you have implemented your own solution
for token invalidation).

We also recommend enabling "injectOptionsFromRemoteContext" in
User's settings (typically via common/models/*.json file).
This setting is required for the invalidation algorithm to keep
the current session valid.

Express server listening on http://127.0.0.1:9000
loopback deprecated loopback#context middleware is deprecated. See https://docs.strongloop.com/display/APIC/Using%20current%20context for more details
. ..\AppData\Roaming\npm\node_modules\apiconnect\node_modules\loopback\server\middleware\rest.js:60:32

swagger 및 제품 정의 업데이트 중
C:\Users\SDS\pgintegration\definitions\pgintegration.yaml swagger 설명 작성됨

swagger 및 제품 정의 업데이트 중
C:\Users\SDS\pgintegration\definitions\pgintegration.yaml swagger 설명 작성됨
^C일괄 작업을 끝내시겠습니까 (Y/N)? y

C:\Users\SDS\pgintegration>apic start
pgintegration-gw이(가) 제한시간 내에 포트를 리턴하지 않았습니다.
Error: 서비스 pgintegration-gw이(가) 시작되었지만 제한시간 내에 초기화되지 않았습니다. 로그 버퍼 덤핑 중입니다.
2017-04-05T07:59:26.569Z pid:1624 worker:0 INFO strong-agent native addon missing, install a compiler
2017-04-05T07:59:26.573Z pid:1624 worker:0 INFO strong-agent v2.1.2 profiling app 'microgateway' pid '1624'
2017-04-05T07:59:26.576Z pid:1624 worker:0 INFO strong-agent[1624] started profiling agent
2017-04-05T07:59:26.577Z pid:1624 worker:0 INFO supervisor starting (pid 1624)
2017-04-05T07:59:26.584Z pid:1624 worker:0 INFO strong-agent strong-agent using strong-cluster-control v2.2.3
2017-04-05T07:59:26.586Z pid:1624 worker:0 INFO supervisor reporting metrics to `internal:`
2017-04-05T07:59:26.719Z pid:1624 worker:0 INFO strong-agent not profiling, agent metrics requires a valid license.
2017-04-05T07:59:26.719Z pid:1624 worker:0 Please contact sales@strongloop.com for assistance.
2017-04-05T07:59:26.721Z pid:1624 worker:0 INFO supervisor size set to 1
2017-04-05T07:59:27.990Z pid:1624 worker:0 INFO supervisor started worker 1 (pid 16452)
2017-04-05T07:59:27.991Z pid:1624 worker:0 INFO supervisor resized to 1
2017-04-05T07:59:28.627Z pid:16452 worker:1 INFO strong-agent native addon missing, install a compiler
2017-04-05T07:59:28.628Z pid:16452 worker:1 INFO strong-agent v2.1.2 profiling app 'microgateway' pid '16452'
2017-04-05T07:59:28.632Z pid:16452 worker:1 INFO strong-agent[16452] started profiling agent
2017-04-05T07:59:29.097Z pid:16452 worker:1 Error: Fail to load environment variables:  { Error: ENOENT: no such file or directory, open 'C:\Users\SDS
\AppData\Roaming\npm\node_modules\apiconnect\node_modules\microgateway\env.yaml'
2017-04-05T07:59:29.097Z pid:16452 worker:1     at Error (native)
2017-04-05T07:59:29.098Z pid:16452 worker:1     at Object.fs.openSync (fs.js:640:18)
2017-04-05T07:59:29.098Z pid:16452 worker:1     at Object.fs.readFileSync (fs.js:508:33)
2017-04-05T07:59:29.098Z pid:16452 worker:1     at Function.Utils.getStringFromFile (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_mod
ules\yamljs\lib\Utils.js:271:19)
2017-04-05T07:59:29.098Z pid:16452 worker:1     at Function.Yaml.parseFile (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\yaml
js\lib\Yaml.js:46:21)
2017-04-05T07:59:29.098Z pid:16452 worker:1     at Function.Yaml.load (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\yamljs\li
b\Yaml.js:89:17)
2017-04-05T07:59:29.098Z pid:16452 worker:1     at Object.<anonymous> (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\microgate
way\index.js:18:22)
2017-04-05T07:59:29.098Z pid:16452 worker:1     at Module._compile (module.js:570:32)
2017-04-05T07:59:29.098Z pid:16452 worker:1     at Object.Module._extensions..js (module.js:579:10)
2017-04-05T07:59:29.099Z pid:16452 worker:1     at Module.load (module.js:487:32)
2017-04-05T07:59:29.099Z pid:16452 worker:1     at tryModuleLoad (module.js:446:12)
2017-04-05T07:59:29.099Z pid:16452 worker:1     at Function.Module._load (module.js:438:3)
2017-04-05T07:59:29.099Z pid:16452 worker:1     at Object.<anonymous> (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-su
pervisor\bin\sl-run.js:77:19)
2017-04-05T07:59:29.099Z pid:16452 worker:1     at Module._compile (module.js:570:32)
2017-04-05T07:59:29.099Z pid:16452 worker:1     at Object.Module._extensions..js (module.js:579:10)
2017-04-05T07:59:29.099Z pid:16452 worker:1     at Module.load (module.js:487:32)
2017-04-05T07:59:29.099Z pid:16452 worker:1   errno: -4058,
2017-04-05T07:59:29.099Z pid:16452 worker:1   code: 'ENOENT',
2017-04-05T07:59:29.100Z pid:16452 worker:1   syscall: 'open',
2017-04-05T07:59:29.100Z pid:16452 worker:1   path: 'C:\\Users\\SDS\\AppData\\Roaming\\npm\\node_modules\\apiconnect\\node_modules\\microgateway\\env.
yaml' }
2017-04-05T07:59:38.162Z pid:16452 worker:1 Error: not able to perform the handshake with APIM, error: Error: can not load default private key
2017-04-05T07:59:38.162Z pid:16452 worker:1     at Object.exports.handshakeWithAPIm (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_mod
ules\microgateway\utils\utils.js:192:14)
2017-04-05T07:59:38.162Z pid:16452 worker:1     at performHandshake (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\microgatewa
y\lib\analytics.js:251:9)
2017-04-05T07:59:38.162Z pid:16452 worker:1     at sendAnalytics (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\microgateway\l
ib\analytics.js:49:3)
2017-04-05T07:59:38.162Z pid:16452 worker:1     at Object.<anonymous> (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\microgate
way\lib\microgw.js:37:9)
2017-04-05T07:59:38.162Z pid:16452 worker:1     at Module._compile (module.js:570:32)
2017-04-05T07:59:38.162Z pid:16452 worker:1     at Object.Module._extensions..js (module.js:579:10)
2017-04-05T07:59:38.162Z pid:16452 worker:1     at Module.load (module.js:487:32)
2017-04-05T07:59:38.162Z pid:16452 worker:1     at tryModuleLoad (module.js:446:12)
2017-04-05T07:59:38.162Z pid:16452 worker:1     at Function.Module._load (module.js:438:3)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Module.require (module.js:497:17)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Module.module.__proto__.require (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modu
les\strong-agent\lib\agent.js:183:42)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at require (internal/module.js:20:19)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Object.<anonymous> (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\microgate
way\index.js:35:1)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Module._compile (module.js:570:32)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Object.Module._extensions..js (module.js:579:10)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Module.load (module.js:487:32)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at tryModuleLoad (module.js:446:12)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Function.Module._load (module.js:438:3)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Object.<anonymous> (C:\Users\SDS\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-su
pervisor\bin\sl-run.js:77:19)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Module._compile (module.js:570:32)
2017-04-05T07:59:38.163Z pid:16452 worker:1     at Object.Module._extensions..js (module.js:579:10)
2017-04-05T07:59:38.164Z pid:16452 worker:1     at Module.load (module.js:487:32)
2017-04-05T07:59:38.389Z pid:16452 worker:1 INFO strong-agent not profiling, agent metrics requires a valid license.
2017-04-05T07:59:38.391Z pid:16452 worker:1 Please contact sales@strongloop.com for assistance.


C:\Users\SDS\pgintegration>apic start
pgintegration 서비스가 시작됨  포트 4001에서
pgintegration-gw 서비스가 시작됨  포트 4002에서



C:\Users\SDS>curl -s http://localhost:4001/api/users | python -m json.tool
[
    {
        "name": "                    ",
        "password": ""
    },
    {
        "name": "1                   ",
        "password": "1"
    },
    {
        "name": "asd                 ",
        "password": "asd"
    },
    {
        "name": "myung               ",
        "password": "12345"
    },
    {
        "name": "myung2              ",
        "password": "123qwe"
    },
    {
        "name": "myung3              ",
        "password": "123qwe"
    },
    {
        "name": "myung5              ",
        "password": "123qwe"
    },
    {
        "name": "myung7              ",
        "password": "123qwe"
    },
    {
        "name": "vbudi               ",
        "password": "passw0rd"
    }
]

C:\Users\SDS>curl -s http://localhost:4001/api/todos | python -m json.tool
[
    {
        "category": "PERSONAL            ",
        "description": "Initial todo list",
        "id": 1,
        "name": "vbudi               "
    },
    {
        "category": "PERSONAL            ",
        "description": "More todo items",
        "id": 2,
        "name": "vbudi               "
    },
    {
        "category": "asd                 ",
        "description": "asd",
        "id": 1,
        "name": "asd                 "
    }
]

C:\Users\SDS>apic stop


C:\Users\SDS>apic login
API Connect 서버 입력
? Server: us.apiconnect.ibmcloud.com
us.apiconnect.ibmcloud.com에 로그인됨






C:\Users\SDS\pgintegration>apic config:set catalog=apic-catalog://us.apiconnect.ibmcloud.com/orgs/jesangmyung-test/catalogs/sb
catalog: apic-catalog://us.apiconnect.ibmcloud.com/orgs/jesangmyung-test/catalogs/sb



C:\Users\SDS\pgintegration\definitions>apic publish pgintegration-product.yaml
jesangmyung-test:sb에 pgintegration-product.yaml 스테이징[pgintegration:1.0.0]
pgintegration-product.yaml을(를) jesangmyung-test:sb에 공개함[pgintegration:1.0.0]

C:\Users\SDS\pgintegration\definitions>

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

Cloud Tranformation Master Planning  (0) 2017.04.06
bluemix에 faro oracle 이미지 올리기  (0) 2017.04.06
Faro test  (0) 2017.04.05
TLS  (0) 2017.04.04
3-2 webinar  (0) 2017.04.04

Faro test

Cloud/Bluemix2017. 4. 5. 01:12

C:\Users\myung\workspace>cf push faro_test -p Faro -b https://github.com/cloudfoundry/java-buildpack.git --no-manifest

Creating app faro_test in org jesang.myung / space test as jesang.myung@gmail.com...

OK


Creating route faro-test.mybluemix.net...

OK


Binding faro-test.mybluemix.net to faro_test...

OK


Uploading faro_test...

Uploading app files from: C:\Users\myung\workspace\Faro

Uploading 6.1M, 1932 files

Done uploading

OK


Starting app faro_test in org jesang.myung / space test as jesang.myung@gmail.com...

Creating container

Downloading app package...

-----> Java Buildpack Version: e5e1ae0 | https://github.com/cloudfoundry/java-buildpack.git#e5e1ae0

No container can run this application. Please ensure that you’ve pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.

Staging failed: Exited with status 223

Destroying container


FAILED

Error restarting application: BuildpackCompileFailed


TIP: use 'cf logs faro_test --recent' for more information

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

bluemix에 faro oracle 이미지 올리기  (0) 2017.04.06
API Connect  (0) 2017.04.05
TLS  (0) 2017.04.04
3-2 webinar  (0) 2017.04.04
3-1  (0) 2017.04.03

TLS

Cloud/Bluemix2017. 4. 4. 15:11

Cert : 나는 누구다

Keystore : 키가 저장됨

Truststore : cert가 저장됨 CA


openssl : 키나 서트를 생성

위는 liberty에서 







root@instance-0054bdaa:~/ssl#

root@instance-0054bdaa:~/ssl# openssl genrsa -out private.key 3072

Generating RSA private key, 3072 bit long modulus

..........................++

.........................................................................++

e is 65537 (0x10001)

root@instance-0054bdaa:~/ssl# ll

total 24

drwxr-xr-x 2 root root  4096 Apr  4 05:14 ./

drwx------ 6 root root  4096 Apr  4 05:14 ../

-rw-r--r-- 1 root root 10909 Apr  4 05:13 openssl.cnf

-rw-r--r-- 1 root root  2455 Apr  4 05:14 private.key

root@instance-0054bdaa:~/ssl# openssl req -new -x509 -key private.key -sha256 -out newcert.pem -days 1024 -config openssl.cnf

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [AU]:US

State or Province Name (full name) [Some-State]:.

Locality Name (eg, city) []:.

Organization Name (eg, company) [Internet Widgits Pty Ltd]:.

Organizational Unit Name (eg, section) []:.

Common Name (e.g. server FQDN or YOUR name) []:169.46.31.205

Email Address []:jesang.myung@gmail.com

root@instance-0054bdaa:~/ssl# ll

total 28

drwxr-xr-x 2 root root  4096 Apr  4 05:19 ./

drwx------ 6 root root  4096 Apr  4 05:14 ../

-rw-r--r-- 1 root root  1614 Apr  4 05:19 newcert.pem

-rw-r--r-- 1 root root 10909 Apr  4 05:13 openssl.cnf

-rw-r--r-- 1 root root  2455 Apr  4 05:14 private.key

root@instance-0054bdaa:~/ssl# cat private.key newcert.pem > SAN.pem

root@instance-0054bdaa:~/ssl# openssl pkcs12 -export -in newcert.pem -inkey private.key -out server.p12 -name backend

Enter Export Password:

Verifying - Enter Export Password:

root@instance-0054bdaa:~/ssl# ll

total 36

drwxr-xr-x 2 root root  4096 Apr  4 05:21 ./

drwx------ 6 root root  4096 Apr  4 05:14 ../

-rw-r--r-- 1 root root  4069 Apr  4 05:20 SAN.pem

-rw-r--r-- 1 root root  1614 Apr  4 05:19 newcert.pem

-rw-r--r-- 1 root root 10909 Apr  4 05:13 openssl.cnf

-rw-r--r-- 1 root root  2455 Apr  4 05:14 private.key

-rw-r--r-- 1 root root  3388 Apr  4 05:21 server.p12


root@instance-0054bdaa:~/ssl# export PATH=$PATH:/opt/ibm/java-x86_64-80/bin

root@instance-0054bdaa:~/ssl# cd /opt/ibm/wlp/usr/s

servers/ shared/

root@instance-0054bdaa:~/ssl# cd /opt/ibm/wlp/usr/servers/defaultServer/resources/security/

root@instance-0054bdaa:/opt/ibm/wlp/usr/servers/defaultServer/resources/security# ll

total 16

drwxr-x--- 2 root root 4096 Feb 16  2016 ./

drwxr-x--- 3 root root 4096 Feb 16  2016 ../

-rw-r----- 1 root root 2171 Feb 16  2016 key.jks

-rw------- 1 root root  895 Feb 16  2016 ltpa.keys

root@instance-0054bdaa:/opt/ibm/wlp/usr/servers/defaultServer/resources/security# keytool -importkeystore \

> -deststorepass passw0rd -destkeypass passw0rd -destkeystore key.jks \

> -srckeystore /root/ssl/server.p12 -srcstoretype PKCS12 -srcstorepass passw0rd \

> -alias backend


keytool -importkeystore -deststorepass passw0rd -destkeypass passw0rd -destkeystore key.jks -srckeystore /root/ssl/server.p12 -srcstoretype PKCS12 -srcstorepass passw0rd -alias backend



root@instance-0054bdaa:/opt/ibm/wlp/usr/servers/defaultServer/resources/security#





root@instance-0054bdaa:/opt/ibm/wlp/bin# ./server stop defaultServer

Stopping server defaultServer.

Server defaultServer stopped.

root@instance-0054bdaa:/opt/ibm/wlp/bin# ./server start defaultServer

Starting server defaultServer.

Server defaultServer started with process ID 2058.

root@instance-0054bdaa:/opt/ibm/wlp/bin# exit

exit








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

API Connect  (0) 2017.04.05
Faro test  (0) 2017.04.05
3-2 webinar  (0) 2017.04.04
3-1  (0) 2017.04.03
docker ubuntu ssh client 설치 & push & pull  (0) 2017.04.02