티스토리 뷰
[ UPGRADING A CLUSTER ]
Install Guide에 따르면 버전업그레이드 Automated 방식과 Manual 방식이 있으며, 본 내용은 Manual 방식으로 진행된다.
해당 내용은 'OpenShift_Container_Platform-3.4-Installation_and_Configuration-en-US.pdf'의 Chapter5를 참고한다.
1. 사전 준비 작업
- push docker images - update yum repository - 각 서버 openshift 패키지 업그레이드 - Etcd 백업 - Master 서버작업 ㄴ Upgrading Master Components ㄴ Updating Policy Definitions - Nodes 서버작업 - Upgrading the Router - Updating the Default Image Streams and Templates - Upgrading the EFK Logging Stack - Upgrading Cluster Metrics |
3. 업그레이드 수행
1단계 : openshift 3.4 docker image 다운로드 및 push
Download Images |
Push Images |
# 다운로드 docker push registry.access.redhat.com/openshift3/ose-haproxy-router:v3.4.1.5 &&\ docker push registry.access.redhat.com/openshift3/ose-deployer:v3.4.1.5 &&\ docker push registry.access.redhat.com/openshift3/ose-sti-builder:v3.4.1.5 &&\ docker push registry.access.redhat.com/openshift3/ose-docker-builder:v3.4.1.5 &&\ docker push registry.access.redhat.com/openshift3/ose-pod:v3.4.1.5 &&\ docker push registry.access.redhat.com/openshift3/ose-docker-registry:v3.4.1.5 docker pull registry.access.redhat.com/openshift3/logging-deployer:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/logging-elasticsearch:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/logging-kibana:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/logging-fluentd:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/logging-curator:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/logging-auth-proxy:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/metrics-deployer:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/metrics-hawkular-metrics:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/metrics-cassandra:3.4.1 &&\ docker pull registry.access.redhat.com/openshift3/metrics-heapster:3.4.1 # Retagging docker tag registry.access.redhat.com/openshift3/ose-haproxy-router:v3.4.1.5 openshift3/ose-haproxy-router:v3.4.1.10 # Create tarballs docker save -o ose34.tar \ openshift3/ose-haproxy-router:v3.4.1.10 &&\ openshift3/ose-deployer:v3.4.1.10 &&\ openshift3/ose-sti-builder:v3.4.1.10 &&\ openshift3/ose-docker-builder:v3.4.1.10 &&\ openshift3/ose-pod:v3.4.1.10 &&\ openshift3/ose-docker-registry:v3.4.1.10 docker save -o ose34-metric.tar \ openshift3/logging-deployer:3.4.1 &&\ openshift3/logging-elasticsearch:3.4.1 &&\ openshift3/logging-kibana:3.4.1 &&\ openshift3/logging-fluentd:3.4.1 &&\ openshift3/logging-curator:3.4.1 &&\ openshift3/logging-auth-proxy:3.4.1 &&\ openshift3/metrics-deployer:3.4.1 &&\ openshift3/metrics-hawkular-metrics:3.4.1 &&\ openshift3/metrics-cassandra:3.4.1 &&\ openshift3/metrics-heapster:3.4.1 |
# loading docker images docker load -i ose34.tar docker load -i ose34-metric.tar # push docker images docker push openshift3/ose-haproxy-router:v3.4.1.10 &&\ docker push openshift3/ose-deployer:v3.4.1.10 &&\ docker push openshift3/ose-sti-builder:v3.4.1.10 &&\ docker push openshift3/ose-docker-builder:v3.4.1.10 &&\ docker push openshift3/ose-pod:v3.4.1.10 &&\ docker push openshift3/ose-docker-registry:v3.4.1.10 docker push openshift3/logging-deployer:3.4.1 &&\ docker push openshift3/logging-elasticsearch:3.4.1 &&\ docker push openshift3/logging-kibana:3.4.1 &&\ docker push openshift3/logging-fluentd:3.4.1 &&\ docker push openshift3/logging-curator:3.4.1 &&\ docker push openshift3/logging-auth-proxy:3.4.1 &&\ docker push openshift3/metrics-deployer:3.4.1 &&\ docker push openshift3/metrics-hawkular-metrics:3.4.1 &&\ docker push openshift3/metrics-cassandra:3.4.1 &&\ docker push openshift3/metrics-heapster:3.4.1 |
2단계 : Yum repository 변경, 3.3 패키지 대시 3.4 패키지 재정의
$ yum clean all
$ yum repolist
3단계 : 각 서버 openshift 패키지 업그레이드
$ yum install atomic-openshift-utils
$ yum install atomic-openshift-excluder atomic-openshift-dockerexcluder
4단계 : etcd 백업(master에 embedded etcd인 경우)
* etcdctl 명령어가 먹히지 않을경우 yum install etcd 로 설치
$ ETCD_DATA_DIR=/var/lib/etcd
$ etcdctl backup --data-dir $ETCD_DATA_DIR --backup-dir $ETCD_DATA_DIR.bak.170321
drwxr-xr-x. 3 etcd etcd 19 Mar 21 13:08 etcd
drwx------. 3 root root 19 Mar 21 14:05 etcd.bak.170321
5단계 : Upgrading Master Components
$ atomic-openshift-excluder unexclude
$ yum update etcd
$ systemctl restart etcd (1대만 실행할 경우 remote etcd의 버전이 안맞아 에러 발생, 동시에 진행)
request version incompatibility (remote version is too low: remote[6648eed0773ccc39]
$ yum upgrade atomic-openshift\*
$ systemctl restart atomic-openshift-master-controllers
$ systemctl restart atomic-openshift-master-api
$ journalctl -r -u atomic-openshift-master-controllers
$ journalctl -r -u atomic-openshift-master-api
$ systemctl restart atomic-openshift-node
$ systemctl restart openvswitch
$ journalctl -r -u openvswitch
$ journalctl -r -u atomic-openshift-node
$ yum update docker (1.10.3 -> 1.12.6)
$ systemctl reboot (master서버 순차적으로 진행)
$ atomic-openshift-excluder exclude
$ oadm policy reconcile-cluster-roles
$ oadm policy reconcile-cluster-roles \
--additive-only=true \
--confirm
---> 결과
clusterrole/cluster-reader
clusterrole/storage-admin
clusterrole/admin
clusterrole/edit
clusterrole/basic-user
clusterrole/cluster-status
clusterrole/system:deployer
clusterrole/system:registry
clusterrole/registry-admin
<----
$ oadm policy reconcile-cluster-role-bindings \
--exclude-groups=system:authenticated \
--exclude-groups=system:authenticated:oauth \
--exclude-groups=system:unauthenticated \
--exclude-users=system:anonymous \
--additive-only=true \
--confirm
$ oadm policy reconcile-sccs \
--additive-only=true \
--confirm
6단계 : Upgrading Nodes
$ atomic-openshift-excluder unexclude (노드서버)
# pod가 생성되지 않게 하는 설정....pod 이관작업이므로 1대씩 수행
$ oadm manage-node node1.ocp.com --schedulable=false
$ oadm manage-node node2.ocp.com --schedulable=false
9단계 : Upgrading the EFK Logging Stack
$ oc project logging
$ oc apply -n openshift -f \
/usr/share/ansible/openshift-ansible/roles/openshift_hosted_templates/files/v1.4/enterprise/logging-deployer.yaml
$ oc process logging-deployer-account-template | oc apply -f - ---> 에러발생
error: template "logging-deployer-account-template" could not be found
error: no objects passed to apply
$ oadm policy add-cluster-role-to-user oauth-editor \
system:serviceaccount:logging:logging-deployer
$ oadm policy add-cluster-role-to-user rolebinding-reader \
system:serviceaccount:logging:aggregated-logging-elasticsearch
$ oadm policy add-scc-to-user privileged \
system:serviceaccount:logging:aggregated-logging-fluentd
$ oc new-app logging-deployer-template -p MODE=upgrade
10단계 : Upgrading Cluster Metrics
$ oadm policy add-role-to-user view \
system:serviceaccount:openshift-infra:hawkular \
-n openshift-infra
$ oc new-app --as=system:serviceaccount:openshift-infra:metrics-deployer \
-f /usr/share/openshift/examples/infrastructure-templates/enterprise/metrics-deployer.yaml \
-p HAWKULAR_METRICS_HOSTNAME=hawkular-metrics.app.ocp.com \
-p MODE=refresh \
-p IMAGE_PREFIX=10.1.0.48:5000/openshift3/ \
-p IMAGE_VERSION=3.4.1
위 작업을 통해 업그레이드 작업을 마치고 기능검증 진행.
- Pod 생성
- EAP 이미지로 scale out 확인
- metric 정상 동작 확인 등
- 마 침 -
'RedHat OpenShift > 기술문서' 카테고리의 다른 글
[빌드] Dockerfile 빌드 (0) | 2017.05.24 |
---|---|
[기타] Docker Hub 사용방법 (0) | 2017.05.19 |
[도커] WEB-WAS 프록시 연결 (0) | 2017.04.20 |
[도커] 커스텀 도커 이미지 생성 centos/apache (0) | 2017.04.17 |
[구성] WEB pod/WAS pod 연동 (0) | 2017.04.12 |
- Total
- Today
- Yesterday
- mf
- 23mm
- 보문호수
- 필름시뮬레이션
- 수지
- xt3 #MMCA #국립현대미술관
- m42 135mm
- 야경
- 퍼플라떼
- 매거진스탠딩
- 논뷰
- XF23
- 55mm
- SAVOR
- 전붙이기
- 손주등장
- Classic Chrome
- 연대앞
- 황용식
- XT3
- 신촌
- 캠핑
- XF14
- 예전사진
- XF23mm
- 브런치
- m42 55mm
- m42
- velvia
- xf14mm
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |