Learn and Be Curious

3-2 webinar

Cloud/Bluemix2017. 4. 4. 10:38

Kubernetes


container라는 개념은 30년전부터 있었다


dockek는 4년된 신생회사


[Container Orchestration]

container + cluster



초기에는 구글에서 만들어짐



ibm 2주전 beta버전

docker , kubernetes ... seamless



특징

load balancing

scale out


[클러스터 부가적 특징]

- 컨테이너 차원 보안, x포스?

- 모든 클러스터는 싱글 테넌트로 제공

- ibm cloud 서비스를 사용하기 쉽다


쿠버네티스의 scale out이

블루믹스 cloud foundry의 scale out과 동일한지?

예) 메모리나, 스루풋, 리스폰스 타임의 min, max를 설정해서 인스턴스가 줄고늘고


차이가 있다면 뭐가 있는지?

지원이 안되는게 있다면 뭐가 있는지?


쿠퍼네티스는 설정을 더 강화할 수 있다.




design your own cluster

...methodology



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

Faro test  (0) 2017.04.05
TLS  (0) 2017.04.04
3-1  (0) 2017.04.03
docker ubuntu ssh client 설치 & push & pull  (0) 2017.04.02
docker에 oracle 설치  (0) 2017.04.02

3-1

Cloud/Bluemix2017. 4. 3. 11:11

API Connect


                  before bluemix         after bluemix

deployment from 3 to 5 per day to 25 to 30

개발시간단축

Active deploy

800만달러중 160만달러 감축



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

TLS  (0) 2017.04.04
3-2 webinar  (0) 2017.04.04
docker ubuntu ssh client 설치 & push & pull  (0) 2017.04.02
docker에 oracle 설치  (0) 2017.04.02
2-5  (0) 2017.03.31


1. docker ubuntu ssh client 설치 및 접속


PS C:\Users\myung> docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                       PORTS                                                      NAMES
cc718514202e        wnameless/oracle-xe-11g   "/bin/sh -c '/usr/..."   12 hours ago        Up About an hour             8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp   frosty_montalcini


1b14c702a2cb        ubuntu                    "bash"                   21 hours ago        Exited (130) 4 seconds ago                                                              focused_dubinsky


PS C:\Users\myung> docker attach 1b14c702a2cb

                              docker exec -it 1b14c702a2cb bash (이렇게 해도 실행된다. 무슨차이??)



root@1b14c702a2cb:/usr/bin# apt-get update

root@1b14c702a2cb:/usr/bin# apt-get install openssh-client

root@1b14c702a2cb:/usr/bin# ssh 192.168.1.243 -p 49160




2. modified ubuntu image 만들기


PS C:\Users\myung> docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                     PORTS                                                      NAMES
cc718514202e        wnameless/oracle-xe-11g   "/bin/sh -c '/usr/..."   12 hours ago        Up 2 hours                 8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp   frosty_montalcini
1b14c702a2cb        ubuntu                    "bash"                   22 hours ago        Exited (0) 5 minutes ago                                                              focused_dubinsky
PS C:\Users\myung> docker commit 1b14c702a2cb jmyung/modified-ubuntu
sha256:1bab40e82f3e32a8a82d508d7b3fbb60f161c34bc3368ec6e02282a7dc827da3
PS C:\Users\myung> docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
jmyung/modified-ubuntu    latest              1bab40e82f3e        19 seconds ago      184 MB
ubuntu                    latest              0ef2e08ed3fa        4 weeks ago         130 MB
wnameless/oracle-xe-11g   latest              51fad6f11394        6 weeks ago         2.24 GB
hello-world               latest              48b5124b2768        2 months ago        1.84 kB
PS C:\Users\myung> docker run -it -d jmyung/modified-ubuntu bash
3f1e5de5c78c72508aaca97799f10f4f85eb8dfce60e6c60ddbed0eaf33dd954
PS C:\Users\myung>
PS C:\Users\myung> docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                     PORTS                                                      NAMES
3f1e5de5c78c        jmyung/modified-ubuntu    "bash"                   12 seconds ago      Up 12 seconds                                                                         sharp_austin
cc718514202e        wnameless/oracle-xe-11g   "/bin/sh -c '/usr/..."   12 hours ago        Up 2 hours                 8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp   frosty_montalcini
1b14c702a2cb        ubuntu                    "bash"                   22 hours ago        Exited (0) 6 minutes ago                                                              focused_dubinsky
PS C:\Users\myung> docker attach 3f1e5de5c78c



3. image rename


PS C:\Users\myung> docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
jmyung/modified-ubuntu    latest              1bab40e82f3e        4 minutes ago       184 MB
ubuntu                    latest              0ef2e08ed3fa        4 weeks ago         130 MB
wnameless/oracle-xe-11g   latest              51fad6f11394        6 weeks ago         2.24 GB
ello-world               latest              48b5124b2768        2 months ago        1.84 kB

PS C:\Users\myung> docker tag 1bab40e82f3e human537/modified-ubuntu


PS C:\Users\myung> docker images
REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
human537/modified-ubuntu   latest              1bab40e82f3e        6 minutes ago       184 MB
jmyung/modified-ubuntu     latest              1bab40e82f3e        6 minutes ago       184 MB
ubuntu                     latest              0ef2e08ed3fa        4 weeks ago         130 MB
wnameless/oracle-xe-11g    latest              51fad6f11394        6 weeks ago         2.24 GB
hello-world                latest              48b5124b2768        2 months ago        1.84 kB

PS C:\Users\myung> docker rmi jmyung/modified-ubuntu
Untagged: jmyung/modified-ubuntu:latest
PS C:\Users\myung> docker images
REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
human537/modified-ubuntu   latest              1bab40e82f3e        7 minutes ago       184 MB
ubuntu                     latest              0ef2e08ed3fa        4 weeks ago         130 MB
wnameless/oracle-xe-11g    latest              51fad6f11394        6 weeks ago         2.24 GB
hello-world                latest              48b5124b2768        2 months ago        1.84 kB



4. login & push


PS C:\Users\myung> docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: human537
Password:
Login Succeeded
PS C:\Users\myung> docker images
REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
human537/jmyung            modified-ubuntu     1bab40e82f3e        41 minutes ago      184 MB
human537/modified-ubuntu   latest              1bab40e82f3e        41 minutes ago      184 MB
ubuntu                     latest              0ef2e08ed3fa        4 weeks ago         130 MB
wnameless/oracle-xe-11g    latest              51fad6f11394        6 weeks ago         2.24 GB
hello-world                latest              48b5124b2768        2 months ago        1.84 kB
PS C:\Users\myung> docker push human537/modified-ubuntu
The push refers to a repository [docker.io/human537/modified-ubuntu]
3634175b47ba: Pushed
56827159aa8b: Pushed
440e02c3dcde: Pushed
29660d0e5bb2: Pushed
85782553e37a: Pushed
745f5be9952c: Pushed
latest: digest: sha256:477821c9bed41182bce393be27e82a3cf492dc911d06a3fe8a9b4108532fabff size: 1569
PS C:\Users\myung> docker push human537/jmyung:modified-ubuntu
The push refers to a repository [docker.io/human537/jmyung]
3634175b47ba: Mounted from human537/modified-ubuntu
56827159aa8b: Mounted from human537/modified-ubuntu
440e02c3dcde: Mounted from human537/modified-ubuntu
29660d0e5bb2: Mounted from human537/modified-ubuntu
85782553e37a: Mounted from human537/modified-ubuntu
745f5be9952c: Mounted from human537/modified-ubuntu
modified-ubuntu: digest: sha256:477821c9bed41182bce393be27e82a3cf492dc911d06a3fe8a9b4108532fabff size: 1569














5. 이미지 삭제 & pull


PS C:\Users\myung> docker rmi 1bab40e82f3e
Error response from daemon: conflict: unable to delete 1bab40e82f3e (must be forced) - image is referenced in multiple repositories
PS C:\Users\myung> docker rmi -f 1bab40e82f3e
Untagged: human537/jmyung:modified-ubuntu
Untagged: human537/jmyung@sha256:477821c9bed41182bce393be27e82a3cf492dc911d06a3fe8a9b4108532fabff
Untagged: human537/modified-ubuntu:latest
Untagged: human537/modified-ubuntu@sha256:477821c9bed41182bce393be27e82a3cf492dc911d06a3fe8a9b4108532fabff
Deleted: sha256:1bab40e82f3e32a8a82d508d7b3fbb60f161c34bc3368ec6e02282a7dc827da3
PS C:\Users\myung> docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
ubuntu                    latest              0ef2e08ed3fa        4 weeks ago         130 MB
wnameless/oracle-xe-11g   latest              51fad6f11394        6 weeks ago         2.24 GB
hello-world               latest              48b5124b2768        2 months ago        1.84 kB
PS C:\Users\myung> docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                         PORTS                                                      NAMES
3f1e5de5c78c        1bab40e82f3e              "bash"                   53 minutes ago      Exited (130) 52 minutes ago                                                               sharp_austin
cc718514202e        wnameless/oracle-xe-11g   "/bin/sh -c '/usr/..."   13 hours ago        Up 2 hours                     8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp   frosty_montal
1b14c702a2cb        ubuntu                    "bash"                   23 hours ago        Exited (0) About an hour ago                                                              focused_dubin
PS C:\Users\myung>
PS C:\Users\myung> docker rm 3f1e5de5c78c 1b14c702a2cb
3f1e5de5c78c
1b14c702a2cb
PS C:\Users\myung> docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                                                      NAMES
cc718514202e        wnameless/oracle-xe-11g   "/bin/sh -c '/usr/..."   13 hours ago        Up 3 hours          8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp   frosty_montalcini
PS C:\Users\myung> docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
ubuntu                    latest              0ef2e08ed3fa        4 weeks ago         130 MB
wnameless/oracle-xe-11g   latest              51fad6f11394        6 weeks ago         2.24 GB
hello-world               latest              48b5124b2768        2 months ago        1.84 kB

PS C:\Users\myung> docker rmi 0ef2e08ed3fa
Untagged: ubuntu:latest
Untagged: ubuntu@sha256:dd7808d8792c9841d0b460122f1acf0a2dd1f56404f8d1e56298048885e45535
Deleted: sha256:0ef2e08ed3fabfc44002ccb846c4f2416a2135affc3ce39538834059606f32dd
Deleted: sha256:0d58a35162057295d273c5fb8b7e26124a31588cdadad125f4bce63b638dddb5
Deleted: sha256:cb7f997e049c07cdd872b8354052c808499937645f6164912c4126015df036cc
Deleted: sha256:fcb4581c4f016b2e9761f8f69239433e1e123d6f5234ca9c30c33eba698487cc
Deleted: sha256:b53cd3273b78f7f9e7059231fe0a7ed52e0f8e3657363eb015c61b2a6942af87
Deleted: sha256:745f5be9952c1a22dd4225ed6c8d7b760fe0d3583efd52f91992463b53f7aea3
PS C:\Users\myung> docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
wnameless/oracle-xe-11g   latest              51fad6f11394        6 weeks ago         2.24 GB
hello-world               latest              48b5124b2768        2 months ago        1.84 kB
PS C:\Users\myung> docker run -it -d human537/modified-ubuntu
Unable to find image 'human537/modified-ubuntu:latest' locally
latest: Pulling from human537/modified-ubuntu
fec6b243e075: Pull complete
190e0e9a3e79: Pull complete
0d79cf192e4c: Pull complete
38398c307b51: Pull complete
356665655a72: Pull complete
1bfe0107edf2: Pull complete
Digest: sha256:477821c9bed41182bce393be27e82a3cf492dc911d06a3fe8a9b4108532fabff
Status: Downloaded newer image for human537/modified-ubuntu:latest
77e0c9e2a27d640fcf93b8552b5ad244c0f8dc7563d1495de4e9a38803c7707f
PS C:\Users\myung>




PS C:\Users\myung> docker images
REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
human537/modified-ubuntu   latest              1bab40e82f3e        About an hour ago   184 MB
wnameless/oracle-xe-11g    latest              51fad6f11394        6 weeks ago         2.24 GB
hello-world                latest              48b5124b2768        2 months ago        1.84 kB
PS C:\Users\myung> docker ps -a
CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS              PORTS                                                      NAMES
77e0c9e2a27d        human537/modified-ubuntu   "bash"                   2 minutes ago       Up 2 minutes                                                                   infallible_kowalevski
cc718514202e        wnameless/oracle-xe-11g    "/bin/sh -c '/usr/..."   13 hours ago        Up 3 hours          8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp   frosty_montalcini
PS C:\Users\myung> docker attach 77e0c9e2a27d
root@77e0c9e2a27d:/#
root@77e0c9e2a27d:/#
root@77e0c9e2a27d:/# ll
total 72
drwxr-xr-x   1 root root 4096 Apr  2 05:58 ./
drwxr-xr-x   1 root root 4096 Apr  2 05:58 ../
-rwxr-xr-x   1 root root    0 Apr  2 05:58 .dockerenv*

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

3-2 webinar  (0) 2017.04.04
3-1  (0) 2017.04.03
docker에 oracle 설치  (0) 2017.04.02
2-5  (0) 2017.03.31
111  (0) 2017.03.28



https://hub.docker.com/r/wnameless/oracle-xe-11g/






docker pull wnameless/oracle-xe-11g


Run this, if you want the database to be connected remotely:


docker run -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g




hostname: localhost

port: 49161

sid: xe

username: system

password: oracle

Password for SYS & SYSTEM


oracle

Login by SSH


ssh root@localhost -p 49160

password: admin

Support custom DB Initialization



PS C:\Users\myung> docker ps -a

CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                   PORTS                                                      NAMES

cc718514202e        wnameless/oracle-xe-11g   "/bin/sh -c '/usr/..."   27 minutes ago      Up 27 minutes        8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp   frosty_montalcini

1b14c702a2cb        ubuntu                    "bash"                   9 hours ago         Exited (0) 9 hours ago focused_dubinsky










포트포워딩 설정해주려면, 우선 방화벽을 해제해야함.

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

3-1  (0) 2017.04.03
docker ubuntu ssh client 설치 & push & pull  (0) 2017.04.02
2-5  (0) 2017.03.31
111  (0) 2017.03.28
2-1일  (0) 2017.03.27

2-5

Cloud/Bluemix2017. 3. 31. 14:56

loose ties 

openid, oauth

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

docker ubuntu ssh client 설치 & push & pull  (0) 2017.04.02
docker에 oracle 설치  (0) 2017.04.02
111  (0) 2017.03.28
2-1일  (0) 2017.03.27
Secure Gateway (1-3)  (0) 2017.03.22

111

Cloud/Bluemix2017. 3. 28. 09:30

C:\Users\tec12>cf login api.ng.bluemix.net -u jesang.myung@gmail.com

API endpoint: https://api.ng.bluemix.net


Password>

Authenticating...

OK


Select an org (or press enter to skip):

1. SDS_Bluemix_Workshop

2. jesang.myung


Org> 1

Targeted org SDS_Bluemix_Workshop


Targeted space Workshop




API endpoint:   https://api.ng.bluemix.net (API version: 2.54.0)

User:           jesang.myung@gmail.com

Org:            SDS_Bluemix_Workshop

Space:          Workshop





==============================================================




Gateway ID

QDUbfnknX5C_prod_ng


169.46.21.20




http://cap-sg-prd-2.integration.ibmcloud.com:16473/BackEndWS/ToDoWebServicesService



[JDBC]

cap-sg-prd-2.integration.ibmcloud.com:16473


[http]

sg-us-south-4-3.integration.ibmcloud.com:15999


[jms]

sg-us-south-4-3.integration.ibmcloud.com:15815



[REST]

Error 500: javax.ws.rs.ProcessingException: java.lang.IllegalStateException: IllegalStateException invoking http://sg-us-south-4-3.integration.ibmcloud.com:15999/BackEndREST/ToDoRESTApp/ToDoREST: Already connected


[WS]

Error 500: javax.xml.ws.soap.SOAPFaultException: Could not find conduit initiator for address: sg-us-south-4-3.integration.ibmcloud.com:15999 and transport: http://schemas.xmlsoap.org/soap/http


[JMS]

[err] java.lang.NullPointerException

[err] at com.ibmcloud.servlet.UserLoginServlet.doPost(UserLoginServlet.java:87)

[err] at com.ibmcloud.servlet.UserLoginServlet.doGet(UserLoginServlet.java:61)

[err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

[err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

[err] at [internal classes]

[err] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

[err] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

[err] at java.lang.Thread.run(Unknown Source)

wlp-server-myung.mybluemix.net - [22/03/2017:09:20:43.367 +0000] "POST /FrontEndJMS/UserLoginServlet HTTP/1.1" 302 48 0 "https://wlp-server-myung.mybluemix.net/FrontEndJMS/UserLogin.jsp?msg=null" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 108.168.250.153:32555 x_forwarded_for:"211.109.179.194" x_forwarded_proto:"https" vcap_request_id:df96a427-8ec6-469f-40a3-f5470e7b9203 response_time:0.02358492 app_id:96c17c5a-fb95-422e-b869-aa1a6c0571dd x_global_transaction_id:"581096055"

wlp-server-myung.mybluemix.net - [22/03/2017:09:20:43.574 +0000] "GET /FrontEndJMS/UserLogin.jsp?msg=null HTTP/1.1" 200 0 964 "https://wlp-server-myung.mybluemix.net/FrontEndJMS/UserLogin.jsp?msg=null" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 108.168.250.153:18750 x_forwarded_for:"211.109.179.194" x_forwarded_proto:"https" vcap_request_id:5d0fac96-5531-4b62-6083-96d26dfd36fa response_time:0.026780624 app_id:96c17c5a-fb95-422e-b869-aa1a6c0571dd x_global_transaction_id:"2179265789"



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

docker에 oracle 설치  (0) 2017.04.02
2-5  (0) 2017.03.31
2-1일  (0) 2017.03.27
Secure Gateway (1-3)  (0) 2017.03.22
day2  (0) 2017.03.21

2-1일

Cloud/Bluemix2017. 3. 27. 16:56

system of record

system of engagement


피자2판


https://en.wikipedia.org/wiki/Eventual_consistency


http://stackoverflow.com/questions/2312969/webservices-are-stateless




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

2-5  (0) 2017.03.31
111  (0) 2017.03.28
Secure Gateway (1-3)  (0) 2017.03.22
day2  (0) 2017.03.21
Azure CDN  (0) 2017.03.19

C:\Users\tec12>cf ic namespace set myungspace
myungspace

C:\Users\tec12>cf ic myungspace get
FAILED
The IBM Containers CLI must be initialized. Enter "cf ic init" to initialize it.




C:\Users\tec12>cf ic namespace get
FAILED
The client key pair could not be loaded. Enter "cf ic init" to initialize it.



C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/$(cf ic namespace get)/todosrv
Incorrect usage.
The command, options, or arguments were specified incorrectly. Review the following usage information and enter the command again.

USAGE:
   cf ic cpi SOURCE_IMAGE_NAME DESTINATION_IMAGE_NAME


C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/myungspace/todosrv
FAILED
The IBM Containers CLI must be initialized. Enter "cf ic init" to initialize it.




C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/namespace/todosrv
FAILED
The IBM Containers CLI must be initialized. Enter "cf ic init" to initialize it.




C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/myungspace/todosrv
FAILED
The IBM Containers CLI must be initialized. Enter "cf ic init" to initialize it.




C:\Users\tec12>cf ic init
Deleting old configuration file...
Generating client certificates for IBM Containers...
Storing client certificates in C:\Users\tec12\.ice\certs\...

Storing client certificates in C:\Users\tec12\.ice\certs\containers-api.ng.bluemix.net\9d450733-342f-47c4-9404-4cd9600100ba...

OK
The client certificates were retrieved.

Checking local Docker configuration...
You are authenticated with the IBM Containers API,
however the local Docker daemon is not reachable to authenticate it
with the IBM Containers registry. You can still run IBM Containers
commands, but you cannot push or pull images unless you start the local Docker daemon.

You can choose from two ways to use the Docker CLI with IBM Containers:


Option 1: This option allows you to use 'cf ic' for managing containers on IBM Containers while still using the Docker CLI directly to manage your loc
al Docker host.
        Use this Cloud Foundry IBM Containers plug-in without affecting the local Docker environment:


        Example Usage:
        cf ic ps
        cf ic images

Option 2: Use the Docker CLI directly. In this shell, override the local Docker environment by setting these variables to connect to IBM Containers. C
opy and paste the following commands:
        Note: Only some Docker commands are supported with this option. Run cf ic help to see which commands are supported.

If you are using the Windows command prompt (cmd.exe), copy and paste the following commands:

        set DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443
        set DOCKER_CERT_PATH=C:\Users\tec12\.ice\certs\containers-api.ng.bluemix.net\9d450733-342f-47c4-9404-4cd9600100ba
        set DOCKER_TLS_VERIFY=1

If you are using Windows PowerShell, copy and paste the following commands:

        $Env:DOCKER_HOST="tcp://containers-api.ng.bluemix.net:8443"
        $Env:DOCKER_CERT_PATH="C:\Users\tec12\.ice\certs\containers-api.ng.bluemix.net\9d450733-342f-47c4-9404-4cd9600100ba"
        $Env:DOCKER_TLS_VERIFY="1"

If you are using Docker QuickStart Terminal, copy and paste the following commands:

        export DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443
        export DOCKER_CERT_PATH=C:\Users\tec12\.ice\certs\containers-api.ng.bluemix.net\9d450733-342f-47c4-9404-4cd9600100ba
        export DOCKER_TLS_VERIFY=1

        Example Usage:
        docker ps
        docker images


C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/myungspace/todosrv
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM vbudi/todosrv1
latest: Pulling from vbudi/todosrv1
8387d9ff0016: Pull complete
3b52deaaf0ed: Pull complete
4bd501fad6de: Pull complete
a3ed95caeb02: Pull complete
93fd2bf28096: Pull complete
c5515e403af1: Pull complete
Digest: sha256:e6fd811a731070d09e428eee57fa129aa6abba6a95193624bdb1def0f094747c
Status: Downloaded newer image for vbudi/todosrv1:latest
 ---> 851c8cc47727
Successfully built 851c8cc47727
The push refers to a repository [registry.ng.bluemix.net/myungspace/todosrv]
5f70bf18a086: Pushed
ae8c3609d76f: Pushed
bd778046a484: Pushed
0d81735d8272: Pushed
982549bd6b32: Pushed
8698b31c92d5: Pushed
latest: digest: sha256:787f48d7fe9997cd41afa8d356f3c9791321e699058261bd31e24ceef58b8ae2 size: 3842
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context wil
l have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

C:\Users\tec12>cf ic images
REPOSITORY                                            TAG                 IMAGE ID            CREATED             SIZE
registry.ng.bluemix.net/ibm_wa_agent                  latest              3d38f3e80fd7        3 weeks ago         434.9 MB
registry.ng.bluemix.net/ibmliberty                    microProfile        50854bcc98c3        9 weeks ago         237.3 MB
registry.ng.bluemix.net/ibmliberty                    latest              96285b81d9df        9 weeks ago         314.1 MB
registry.ng.bluemix.net/ibmliberty                    javaee7             96285b81d9df        9 weeks ago         314.1 MB
registry.ng.bluemix.net/ibmliberty                    webProfile7         6b2b8341fa32        9 weeks ago         276 MB
registry.ng.bluemix.net/ibmnode                       v4                  acec21732cb5        6 weeks ago         192.5 MB
registry.ng.bluemix.net/ibmnode                       latest              acec21732cb5        6 weeks ago         192.5 MB
registry.ng.bluemix.net/ibmnode                       v1.1                fd4d70c5451b        6 weeks ago         181.5 MB
registry.ng.bluemix.net/ibmnode                       v1.2                640ed14065df        6 weeks ago         187.7 MB
registry.ng.bluemix.net/ibm-websphere-extreme-scale   latest              f98d12aad014        2 weeks ago         465.8 MB
registry.ng.bluemix.net/ibmliberty                    webProfile6         211f521035a2        9 weeks ago         267.6 MB
registry.ng.bluemix.net/ibm-node-strong-pm            latest              3fc4ae24eb0e        5 weeks ago         259.1 MB
registry.ng.bluemix.net/ibm-integration-bus           latest              ec198557875c        6 weeks ago         683.4 MB
registry.ng.bluemix.net/ibm-backup-restore            latest              4b5d9037c97a        6 weeks ago         207.9 MB
registry.ng.bluemix.net/ibm-mq                        latest              f099132ebc16        7 days ago          782.4 MB
registry.ng.bluemix.net/myungspace/todosrv            latest              851c8cc47727        9 months ago        404.1 MB

C:\Users\tec12>cf ic run -m 512 -p9080:9080 -p9443:9443 -p7276:7276 -p5432:5432 --name integration registry.ng.bluemix.net/myungspace/todosrv
cd7b583c-4e06-4045-ac55-28407cbf6b88

C:\Users\tec12>









C:\Users\tec12>cf ic ip request
OK
The IP address "169.46.21.18" was obtained.

C:\Users\tec12>cf ip bind 169.46.21.18 integration
'ip' is not a registered command. See 'cf help'

C:\Users\tec12>cf ic ip bind 169.46.21.18 integration
FAILED

Exception binding floating ip 169.46.21.18 of type ntype to container cd7b583c-4e06-4045-ac55-28407cbf6b88 for space_guid=9d450733-342f-47c4-9404-4cd9
600100ba, user_doc_otherattrs=['api_key', 'cloud_backend', 'created_date', 'crypto', 'get_fields', 'has_field', 'id', 'last_bm_bearer_token', 'last_bm
_login', 'last_bm_refresh_token', 'last_bm_roleset', 'namespace', 'openstack_password', 'openstack_userid', 'org_uuid', 'pw_encryption_enabled', 'rev'
, 'service_uuid', 'space_uuid', 'tenant_id', 'tenant_name', 'tls_user_cert', 'tls_user_key', 'type', 'updated_date', 'user_email', 'user_family_name',
 'user_given_name', 'user_id', 'user_is_ibm', 'user_locale'], tenant_id=e53bbebdaf1f4263a17bc3ef842d10bb, tenant_name=BM_9d450733-342f-47c4-9404-4cd96
00100ba_700ec452a61ac477, creds_otherkeys=['user_doc', 'auth_token', 'auth_url', 'image_endpoint', 'provided_tenant', 'tenant_user', 'tenant', 'heat_e
ndpoint', 'tenant_id', 'tenant_password', 'network_endpoint'], openstack_userid=f53ae186e7d9ec70-1c9be200-3f46-415c-a2d0-20cd4377329f: floating ip not
 found




C:\Users\tec12>cf ic ip request
OK
The IP address "169.46.21.20" was obtained.

C:\Users\tec12>cf ic ip bind 169.46.21.20 integration
OK
The IP address was bound successfully.





















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

111  (0) 2017.03.28
2-1일  (0) 2017.03.27
day2  (0) 2017.03.21
Azure CDN  (0) 2017.03.19
Bluemix essentials  (0) 2017.03.18

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

Azure CDN

Cloud/Bluemix2017. 3. 19. 14:56

http://icerainbow.tistory.com/

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

111  (0) 2017.03.28
2-1일  (0) 2017.03.27
Secure Gateway (1-3)  (0) 2017.03.22
day2  (0) 2017.03.21
Bluemix essentials  (0) 2017.03.18