728x90

Lab 1에 이은 Lab 2입니다. replica를 만들고 모니터링하는 방법을 실습하는 내용입니다.

 

---- Scale apps with replicas

1. replica set 업데이트

먼저 Lab 1에서 배포한 deployment를 조회합니다.

[root@db2 Lab 2]# kubectl get deployment 
NAME          READY   UP-TO-DATE   AVAILABLE   AGE 
hello-world   1/1     1            1           30m

 

edit명령으로 deployment 설정파일을 수정합니다.

kubectl edit deployment

spec: 
  progressDeadlineSeconds: 600 
  replicas: 1                            // 1을 10으로 변경하고 저장 //
  revisionHistoryLimit: 10 
  selector: 
    matchLabels: 
      run: hello-world 
  strategy: 
    rollingUpdate: 
      maxSurge: 25% 
      maxUnavailable: 25% 
    type: RollingUpdate 
  template: 
    metadata: 
      creationTimestamp: null 
      labels: 
        run: hello-world 
[root@db2 Lab 2]# kubectl edit deployment hello-world 
deployment.apps/hello-world edited 


2. 변경한 사항 적용하기


kubectl rollout status deployment/hello-world

[root@db2 Lab 2]# kubectl rollout status deployment/hello-world
deployment "hello-world" successfully rolled out


3. pod 확인하기

kubectl get pods

[root@db2 Lab 2]# kubectl get pods 
NAME                           READY   STATUS    RESTARTS   AGE 
hello-world-684dfdd9c5-b48hq   1/1     Running   0          2m32s 
hello-world-684dfdd9c5-gjf4p   1/1     Running   0          35m 
hello-world-684dfdd9c5-jqssq   1/1     Running   0          2m32s 
hello-world-684dfdd9c5-nwx8x   1/1     Running   0          2m32s 
hello-world-684dfdd9c5-p9ccg   1/1     Running   0          2m32s 
hello-world-684dfdd9c5-q6grb   1/1     Running   0          2m32s 
hello-world-684dfdd9c5-sw7qt   1/1     Running   0          2m32s 
hello-world-684dfdd9c5-tbswg   1/1     Running   0          2m32s 
hello-world-684dfdd9c5-vq9jn   1/1     Running   0          2m32s 
hello-world-684dfdd9c5-w8xwp   1/1     Running   0          2m32s 



----------- Update and roll back apps

1. 새 컨테이너 빌드

ibmcloud cr build --tag us.icr.io/<my_namespace>/hello-world:2 .

[root@db2 Lab 2]# ibmcloud cr build --tag us.icr.io/skjeong4/hello-world:2 . 
Sending build context to Docker daemon  14.85kB 
Step 1/6 : FROM node:9.4.0-alpine 
 ---> b5f94997f35f 
Step 2/6 : COPY app.js . 
 ---> Using cache 
 ---> 7709ec5f4400 
Step 3/6 : COPY package.json . 
 ---> Using cache 
 ---> e7a815f63218 
Step 4/6 : RUN npm install &&    apk update &&    apk upgrade 
 ---> Using cache 
 ---> 8cf455abe99a 
Step 5/6 : EXPOSE  8080 
 ---> Using cache 
 ---> 6d43110f568e 
Step 6/6 : CMD node app.js 
 ---> Using cache 
 ---> 34a819beea5a 
Successfully built 34a819beea5a 
Successfully tagged us.icr.io/skjeong4/hello-world:2 
The push refers to repository [us.icr.io/skjeong4/hello-world] 
99f142d4db2d: Layer already exists 
9043b37014f9: Layer already exists 
7eab2e812ea7: Layer already exists 
0804854a4553: Layer already exists 
6bd4a62f5178: Layer already exists 
9dfa40a0da3b: Layer already exists 
2: digest: sha256:a22a1e31c72344a671dad2c2343bb9238929b3c140306b986a187fc16e268c93 size: 1576 
OK 
[root@db2 Lab 2]# ibmcloud cr images 
Listing images... 
Repository                       Tag      Digest         Namespace   Created      Size    Security status 
us.icr.io/skjeong4/hello-world   2        a22a1e31c723   skjeong4    1 hour ago   27 MB   No Issues 
us.icr.io/skjeong4/hello-world   latest   a22a1e31c723   skjeong4    1 hour ago   27 MB   No Issues 
OK 


2. 새 컨테이너를 기존 deployment에 업데이트

kubectl set image deployment/hello-world hello-world=us.icr.io//hello-world:2

[root@db2 Lab 2]# kubectl set image deployment/hello-world hello-world=us.icr.io/skjeong4/hello-world:2 
deployment.apps/hello-world image updated 


3. 업데이트 내역 확인

kubectl rollout status deployment/hello-world
kubectl get replicasets

[root@db2 Lab 2]# kubectl rollout status deployment/hello-world 
deployment "hello-world" successfully rolled out 
[root@db2 Lab 2]# kubectl get replicasets 
NAME                     DESIRED   CURRENT   READY   AGE 
hello-world-5c6cb477cf   10        10        10      5m12s 
hello-world-684dfdd9c5   0         0         0       109m 


4. 어플리케이션 실행 테스트 (curl 또는 웹)

curl <public-IP>:<nodeport>

[root@db2 Lab 2]# curl xxx.xxx.xx.xxx:32412 
Hello world from hello-world-5c6cb477cf-7r9dv! Your app is up and running in a cluster! 


5. 업데이트 롤백하기

kubectl rollout undo deployment/<name-of-deployment>

[root@db2 Lab 2]# kubectl rollout undo deployment/hello-world 
deployment "hello-world" successfully rolled out


---- Check the health of apps

1. Lab 2 디렉토리의 healthcheck.yml 파일 수정

image: ".icr.io//hello-world:2"
=> image: ".icr.io/skjeong4/hello-world:2"

2. IBM 클라우드의 클러스터 대시보드에서 디플로이먼트/파드/레플리카셋등 확인

728x90

'cloud' 카테고리의 다른 글

Kubernetes Essentials with IBM Cloud - Lab 1  (0) 2020.03.18
728x90

요즘 IBM Badge 모으는 재미에 빠졌네요. 오늘은 쿠버네티스 기본에 대해서 공부했습니다.

과정명은 Container & Kubernetes Essentials with IBM Cloud입니다.

Lab 1의 과정을 정리해봤습니다. 제가 연습한 실습 환경은 CentOS 7입니다.

아래 사이트를 순서대로 따라한 것입니다. 조금 시행착오는 있을 수 있는데 어렵지 않습니다.

 

참고 사이트 :

https://cloud.ibm.com/docs/cli?topic=cloud-cli-getting-started

https://github.com/IBM/container-service-getting-started-wt

 

---- 초기 구성


1. IBM Cloud CLI 설치

Linux에서 IBM Cloud에 접근할 수 있는 커맨드라인 인터페이스를 설치합니다.

curl -sL https://ibm.biz/idt-installer | bash

 

2. IBM Cloud 로그인

ibmcloud login -a cloud.ibm.com -r us-south -g default

ibmcloud ks cluster config --cluster bpkadubd0gijteu5rpt0

[root@db2 ~]# ibmcloud ks cluster ls
OK
Name        ID                     State    Created      Workers   Location   Version       Resource Group Name   Provider
mycluster   bpkadubd0gijteu5rpt0   normal   5 days ago   1         Dallas     1.16.7_1524   default               classic



---- IBM Cloud에 이미지 푸시

1. 네임스페이스 추가
<참고> 도커 데몬이 실행중인지 확인, 실행중이 아니라면 도커 데몬 실행
systemctl status docker
systemctl start docker

ibmcloud cr login
ibmcloud cr namespace-add <my_namespace>

[root@db2 Lab 1]# ibmcloud cr namespace-add skjeong4 
Adding namespace 'skjeong4'... 
Successfully added namespace 'skjeong4' 
OK 

 

2. Lab 1 폴더로 이동하여 도커 이미지 빌드

 

ibmcloud cr build --tag us.icr.io/<my_namespace>/hello-world .

[root@db2 Lab 1]# ibmcloud cr build --tag us.icr.io/skjeong4/hello-world . 
Sending build context to Docker daemon  14.85kB 
Step 1/6 : FROM node:9.4.0-alpine 
 ---> b5f94997f35f 
Step 2/6 : COPY app.js . 
 ---> Using cache 
 ---> 7709ec5f4400 
Step 3/6 : COPY package.json . 
 ---> Using cache 
 ---> e7a815f63218 
Step 4/6 : RUN npm install &&    apk update &&    apk upgrade 
 ---> Using cache 
 ---> 8cf455abe99a 
Step 5/6 : EXPOSE  8080 
 ---> Using cache 
 ---> 6d43110f568e 
Step 6/6 : CMD node app.js 
 ---> Using cache 
 ---> 34a819beea5a 
Successfully built 34a819beea5a 
Successfully tagged us.icr.io/skjeong4/hello-world:latest 
The push refers to repository [us.icr.io/skjeong4/hello-world] 
99f142d4db2d: Pushed 
9043b37014f9: Pushed 
7eab2e812ea7: Pushed 
0804854a4553: Pushed 
6bd4a62f5178: Pushed 
9dfa40a0da3b: Pushed 
latest: digest: sha256:a22a1e31c72344a671dad2c2343bb9238929b3c140306b986a187fc16e268c93 size: 1576 
OK


3. 도커 이미지 빌드 확인

[root@db2 Lab 1]# ibmcloud cr images 
Listing images... 
Repository                       Tag      Digest         Namespace   Created          Size    Security status 
us.icr.io/skjeong4/hello-world   latest   a22a1e31c723   skjeong4    30 minutes ago   27 MB   No Issues 
OK

 


---- 배포

1. 클러스터 설정 파일 가져오기 및 환경변수 적용

ibmcloud ks cluster-config <yourclustername>

[root@db2 Lab 1]# ibmcloud ks cluster-config mycluster 
WARNING: This legacy command is deprecated and will soon be unsupported. Use the 'ibmcloud ks cluster config' command instead. 
For more information, see 'https://ibm.biz/iks-cli-v1' 
WARNING: The behavior of this command in your current CLI version is deprecated, and becomes unsupported when CLI version 1.0 is released in March 2020. To use the new behavior now, set the 'IKS_BETA_VERSION' environment variable. In bash, run 'export IKS_BETA_VERSION=1'. 
Note: Changing the beta version can include other breaking changes. For more information, see 'https://ibm.biz/iks-cli-v1' 
OK 
The configuration for mycluster was downloaded successfully. 
Export environment variables to start using Kubernetes. 
export KUBECONFIG=/root/.bluemix/plugins/container-service/clusters/mycluster/kube-config-hou02-mycluster.yml 


2. 클러스터에 이미지 배포 - pod 생성

kubectl run hello-world --image=us.icr.io/<namespace>/hello-world

[root@db2 Lab 1]# kubectl delete deployment hello-world 
deployment.apps "hello-world" deleted 
[root@db2 Lab 1]# kubectl run hello-world --image=us.icr.io/skjeong4/hello-world 
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead. 
deployment.apps/hello-world created 



3. pod 생성 확인

kubectl get pods

[root@db2 Lab 1]# kubectl get pods
NAME                           READY   STATUS              RESTARTS   AGE
hello-world-684dfdd9c5-gjf4p   0/1     ContainerCreating   0          5s
[root@db2 Lab 1]# kubectl get pods
NAME                           READY   STATUS    RESTARTS   AGE
hello-world-684dfdd9c5-gjf4p   1/1     Running   0          10s


참고 > pod 생성에 오류가 있는 경우 확인 방법

[root@db2 Lab 1]# kubectl get pods 
NAME                           READY   STATUS         RESTARTS   AGE 
hello-world-5dd7d6d7d4-78g4h   0/1     ErrImagePull   0          3s 
[root@db2 Lab 1]# kubectl delete deployment hello-world 
deployment.apps "hello-world" deleted 
[root@db2 Lab 1]# kubectl describe pod hello-world-5dd7d6d7d4-78g4h 
Name:               hello-world-5dd7d6d7d4-78g4h 
Namespace:          default 
Priority:           0 
PriorityClassName:   
Node:               10.77.223.248/10.77.223.248 
Start Time:         Thu, 12 Mar 2020 10:47:52 +0900 
Labels:             pod-template-hash=5dd7d6d7d4 
                    run=hello-world 
Annotations:        kubernetes.io/psp: ibm-privileged-psp 
Status:             Pending 
IP:                 xxx.xx.xx.xx 
Controlled By:      ReplicaSet/hello-world-5dd7d6d7d4 
Containers: 
  hello-world: 
    Container ID: 
    Image:          us.icr.io/skjeong4/hello-world:1 
    Image ID: 
    Port:            
    Host Port:       
    State:          Waiting 
      Reason:       ImagePullBackOff 
    Ready:          False 
    Restart Count:  0 
    Environment:     
    Mounts: 
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-zj8ts (ro) 
Conditions: 
  Type              Status 
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes: 
  default-token-zj8ts: 
    Type:        Secret (a volume populated by a Secret) 
    SecretName:  default-token-zj8ts 
    Optional:    false 
QoS Class:       BestEffort 
Node-Selectors:   
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 600s 
                 node.kubernetes.io/unreachable:NoExecute for 600s 
Events: 
  Type     Reason     Age               From                    Message 
  ----     ------     ----              ----                    ------- 
  Normal   Scheduled  13s               default-scheduler       Successfully assigned default/hello-world-5dd7d6d7d4-78g4h to 10.77.223.248 
  Warning  Failed     12s               kubelet, 10.77.223.248  Failed to pull image "us.icr.io/skjeong4/hello-world:1": rpc error: code = NotFound desc = failed to pull and unpack image "us.icr.io/skjeong4/hello-world:1": failed to resolve reference "us.icr.io/skjeong4/hello-world:1": us.icr.io/skjeong4/hello-world:1: not found 
  Warning  Failed     12s               kubelet, 10.77.223.248  Error: ErrImagePull 
  Normal   BackOff    11s               kubelet, 10.77.223.248  Back-off pulling image "us.icr.io/skjeong4/hello-world:1" 
  Warning  Failed     11s               kubelet, 10.77.223.248  Error: ImagePullBackOff 
  Normal   Pulling    0s (x2 over 12s)  kubelet, 10.77.223.248  Pulling image "us.icr.io/skjeong4/hello-world:1" 


3. 해당 pod에 서비스 포트 할당

kubectl expose deployment/hello-world --type="NodePort" --port=8080

[root@db2 Lab 1]# kubectl expose deployment/hello-world --type="NodePort" --port=8080 
service/hello-world exposed 


4. 클러스터에 배포된 포트 확인

kubectl describe service <name-of-deployment>

[root@db2 Lab 1]# kubectl describe service hello-world 
Name:                     hello-world 
Namespace:                default 
Labels:                   run=hello-world 
Annotations:               
Selector:                 run=hello-world 
Type:                     NodePort 
IP:                       xxx.xx.xxx.xxx 
Port:                       8080/TCP 
TargetPort:               8080/TCP 
NodePort:                   32412/TCP 
Endpoints:                xxx.xx.xx.xx:8080 
Session Affinity:         None 
External Traffic Policy:  Cluster 
Events:                    


5. 클러스터의 Public IP 확인

ibmcloud ks workers <name-of-cluster>

[root@db2 script]# ibmcloud ks workers mycluster 
OK 
ID                                                     Public IP        Private IP      Flavor   State    Status   Zone    Version 
kube-bpkadubd0gijteu5rpt0-mycluster-default-00000094   xxx.xxx.xx.xxx   xx.xx.xxx.xxx   free     normal   Ready    hou02   1.16.7_1525

 

6. 클러스터에 배포된 어플리케이션 실행

 

curl <public-IP>:<nodeport>

[root@db2 Lab 3]# curl xxx.xxx.xx.xxx:32412
Hello world from hello-world-684dfdd9c5-fll85! Your app is up and running in a cluster!
728x90

'cloud' 카테고리의 다른 글

Kubernetes Essentials with IBM Cloud - Lab 2  (0) 2020.03.18
728x90

인포믹스 12.10이 출시되면서 인포믹스 모니터링 도구인 OAT가 Android와 iOS용으로도 공개되었습니다.

Mobile OAT를 실행하려면 OpenAdmin Tool 3.11 버전이 설치되어 있어야합니다.

아래는 제 iphone으로 실행한 화면을 캡쳐한 것입니다.

 

OAT 주소, 언어, 모니터링 항목들을 설정하는 화면입니다.

 

그룹 로그인에서는 OAT에 등록한 인스턴스 리스트를 간략하게 보여줍니다.

 

 

아래와 같이 OAT의 주소를 직접 입력할 수 있습니다.

 

 

DBSPACE 사용량에 대한 모니터링 내역입니다.

 

 

아직은 모니터링 할 수 있는 영역이 다소 제한적이지만 현재로서도 상당히 유용한 툴인 것은 분명합니다.

많은 관리자와 사용자가 사용하면서 개선이 이루어 진다면 좋겠습니다.

728x90
728x90

한국피자헛
사용자 편의성과 유연성 갖춘
Oracle JD Edwards EnterpriseOne 도입하여 독보적인 피자브랜드 입지 강화

 

■ (주)한국피자헛 Seoul, Korea

■ 산업 l 식음료 서비스
- 매장수 : 약 330 여 개

■ 오라클 제품 및 서비스
- Oracle JD Edwards EnterpriseOne
- Oracle Database 10g

■ 주요 도입 효과
- 엑셀로 관리한 데이터를 쉽게 입력할 수 있는 등 사용자 편의성 강화
- 뛰어난 유연성으로 EDI를 통해 3rd Party 시스템과 연계가 쉬움
- 결산일이 7일 이상 에서 1.5일로 줄어드는 등 경영관리업무 혁신
- 구현이 쉬우며 관리가 편리함
- 저렴한 비용

 

 

“한국피자헛은 지난 1993년부터 사용하던 Oracle JD Edwards World를 Oracle JD Edwards EnterpriseOne으로 업그레이드하여 업무효율성을 향상시켰다. Oracle JD Edwards EnterpriseOne은 관리나 구현이 쉽고 사용자 편의성과 유연성 뿐만 아니라 비용이 저렴해 중견.중소기업을 위한 최적의 솔루션이라고 할 수 있다.”

 

길재민 부장 _한국피자헛 정보지원센터 전산팀

 

 

22년간 독보적인 피자브랜드로 자리매김

 

(주)한국피자헛은 1997년 펩시 그룹에서 독립한 얌 브랜드(YUM Brands, INC.)의 한국 지사로, 1985년 이태원 1호점을 오픈하며 한국에 피자를 본격적 으로 소개한 이후 꾸준하게 업계 1위를 지키고 있다. 한국피자헛은 전국에 약 330여 개의 매장을 운영하고 있으며, 2004년 말에는 46%라는 시장 점유율을 기록하는 등 독보적인 위치에 있다.또 한국인이 좋아하는 다양한 피자를 출시해 경쟁 력을 확고히 하며 동시에 개발 메뉴를 전세계로 전파해 타 국가 피자헛에서 한국을 벤치마킹하고 있다.특히 한국피자헛은 전세계 80여 개국 중 에 미국, 영국에 이어 세 번째로 좋은 실적을 달성하며 지속적인 성장을 이뤄가고 있다.

 

Oracle JD Edwards EnterpriseOne으로 업그레이드

 

한국피자헛은 지난 2003년에 Oracle JD Edwards EnterpriseOne으로 업그레이드 하였다. 기존 시스템에서는 나라별로 서버를 따로 두고 운영 하였으나, Oracle JD Edwards EnterpriseOne으로 업그레이드 한 후에 시스템 서버는 각 로컬에 두지만 미국 본사에서 통합 관리를 하고 있으며 재무와 구매, Inventory 등의 업무를 효율적으로 처리하고 있다.

 

사용자 편의성 갖춘 재무분야 최고 솔루션

 

Oracle JD Edwards EnterpriseOne의 가장 큰 장점은 사용자 편의성이다. 기존 Oracle JD Edwards World는 외부 시스템과 연결 시 따로 프로그래밍 하는 등 불편한 점이 있었으나, 새로 도입한 Oracle JD Edwards EnterpriseOne은 재무 담당자가 엑셀로 관리한 데이터를 쉽게 시스템에 입력할 수 있으며, 하위 시스템과 연결이 따로 필요 없어 업무 효율성이 향상되었다. 또, 트랜잭션 타입별, document 타입별 로 각각 다른 회계계정코드와 자유자재로 연계(mapping)이 가능하여 실무자가 사용하기 편해졌다. 또다른 Oracle JD Edwards EnterpriseOne의 장점은 유연성이다. 기존에 Oracle JD Edwards World 를 사용할 때에는 Inventory나 구매 모듈에 연계하기 위해 협력사(third party)도 반드시 Oracle JD Edwards World를 사용해야기 때문에, 어려움이 많았으며 데이터와 시스템 오류가 빈번했으나 Oracle JD Edwards EnterpriseOne으로 업그레이드한 후, 협력사에서는 각기 사용하기 쉬운 시스템을 사용하고 이를 EDI(Electronic Data Interchange)를 통해 Oracle JD Edwards EnterpriseOne과 연결하여 사용과 관리가 쉬워지고 데이터 정합성과 신뢰성이 확보되었다. 이처럼 Oracle JD Edwards EnterpriseOne은 뛰어난 유연성을 갖추고 있어 다른 시스템과 연계가 쉬운 것이 가장 큰 장점이며, 이는 중견.중소기업에 꼭 필요한 요소라고 할 수 있다.

 

중견.중소기업을 위한 최적의 솔루션, Oracle JD Edwards EnterpriseOne

 

중견.중소규모 기업의 IT 환경은 대기업과 달리 쉽게 구현할 수 있어야 하며, 사용과 관리가 용이해야 한다. Oracle JD Edwards EnterpriseOne은 이러한 요구사항에 맞는 솔루션으로, 가볍고 사용하기 쉬우며, 비용도 저렴하다. 한국피자헛은 이번에 시스템을 업그레이드 하면서 하위 시스템과 독립적으로 운영이 가능하며, 여러 시스템과 연계가 쉬워 유연성이 뛰어난 Oracle JD Edwards EnterpriseOne의 장점을 십분 활용하고 있다.


출처 : 한국 IBM

728x90

'optim' 카테고리의 다른 글

JDE 주요테이블  (0) 2011.10.22
Optim 7.3.1 TDM Troubleshooting  (0) 2011.09.01
optim link  (0) 2011.04.06
OptimEBS 6.1 Application Setup 이슈 (P2P)  (0) 2011.03.02
[참고] 피플소프트 한국상륙 초읽기  (0) 2009.12.11

+ Recent posts