티스토리 뷰
07. Aggregating Container Logs
Elasticsearch: An object store where all logs are stored.
Fluentd: Gathers logs from nodes and feeds them to Elasticsearch.
Kibana: A web UI for Elasticsearch.
가. 사전준비
$ oadm new-project logging --node-selector="" $ oc project logging
[node-selector 확인]
지정되 있을경우 특정 logging이 배포되는 위치가 제한되므로 지정하지 않는것을 권장
$ oc describe project logging
Name: logging
Namespace: <none>
Created: 19 hours ago
Labels: <none>
Annotations: openshift.io/description=
openshift.io/display-name=
openshift.io/node-selector=
openshift.io/sa.scc.mcs=s0:c7,c4
openshift.io/sa.scc.supplemental-groups=1000050000/10000
openshift.io/sa.scc.uid-range=1000050000/10000
Display Name: <none>
Description: <none>
Status: Active
Node Selector: <none>
Quota: <none>
Resource limits: <none>
[계정 생성 및 권한 부여]
$ oc new-app logging-deployer-account-template
--> Deploying template "logging-deployer-account-template" in project "openshift"
logging-deployer-account-template
---------
Template for creating the deployer account and roles needed for the aggregated logging deployer. Create as cluster-admin.
--> Creating resources with label app=logging-deployer-account-template ...
serviceaccount "logging-deployer" created
serviceaccount "aggregated-logging-kibana" created
serviceaccount "aggregated-logging-elasticsearch" created
serviceaccount "aggregated-logging-fluentd" created
serviceaccount "aggregated-logging-curator" created
clusterrole "oauth-editor" created
clusterrole "daemonset-admin" created
rolebinding "logging-deployer-edit-role" created
rolebinding "logging-deployer-dsadmin-role" created
--> Success
Run 'oc status' to view your app.
$ oadm policy add-cluster-role-to-user oauth-editor \ system:serviceaccount:logging:logging-deployer
$ oadm policy add-cluster-role-to-user cluster-reader \ system:serviceaccount:logging:aggregated-logging-fluentd
$ oc create secret generic logging-deployer
secret "logging-deployer" created
$ oc edit scc privileged
~ 중략 ~
- system:serviceaccount:management-infra:inspector-admin - system:serviceaccount:default:registry - system:serviceaccount:openshift:logging-deployer
나. 설치
$ vi /etc/origin/master/master-config.yaml
admissionConfig: apiLevels: - v1 apiVersion: v1 assetConfig: logoutURL: "" masterPublicURL: https://master1.ocp.com publicURL: https://master1.ocp.com/console/ metricsPublicURL: "https://hawkular-metrics.app.ocp.com/hawkular/metrics" loggingPublicURL: "https://kibana.app.ocp.com"
~ 중략 ~
$ systemctl restart atomic-openshift-master.service
또는
$ systemctl restart atomic-openshift-master-api.service
$ systemctl restart atomic-openshift-master-controllers.service
$ oc new-app logging-deployer-template \
--param IMAGE_PREFIX=registry.access.redhat.com/openshift3/ \ --param KIBANA_HOSTNAME=kibana.app.ocp.com \ --param KIBANA_OPS_HOSTNAME=kibana-ops.app.ocp.com \ --param MASTER_URL=https://master1.ocp.com:443 \ --param PUBLIC_MASTER_URL=https://master1.ocp.com:443 \ --param INSECURE_REGISTRY=true \ --param ES_OPS_INSTANCE_RAM=1G \ --param MODE=install
실행과 동시에 컨테이너가 생성되는 화면
[확인 - View achive 버튼 활성화]
kibana 접속화면
다. 제거
$ oc new-app logging-deployer-template \
--param IMAGE_PREFIX=registry.access.redhat.com/openshift3/ \ --param KIBANA_HOSTNAME=kibana.app.ocp.com \ --param KIBANA_OPS_HOSTNAME=kibana-ops.app.ocp.com \ --param MASTER_URL=https://master1.ocp.com:443 \ --param PUBLIC_MASTER_URL=https://master1.ocp.com:443 \ --param INSECURE_REGISTRY=true \ --param ES_OPS_INSTANCE_RAM=1G \ --param MODE=uninstall
'RedHat OpenShift > 기술문서' 카테고리의 다른 글
[기타] CLI 명령어 Part-1 (0) | 2017.01.31 |
---|---|
[기본구성] 01.기본 프로젝트 (0) | 2017.01.23 |
[설치] 06. Hwakular Metrics (0) | 2017.01.18 |
[기타] Roles and Bindings (0) | 2017.01.18 |
[설치] 05. Ansible Inventory 지시자 정리 (0) | 2017.01.11 |
- Total
- Today
- Yesterday
- 논뷰
- 보문호수
- 매거진스탠딩
- XF23mm
- 연대앞
- 퍼플라떼
- 브런치
- XF14
- xf14mm
- velvia
- 신촌
- 예전사진
- 23mm
- 수지
- m42 135mm
- XF23
- 손주등장
- SAVOR
- 55mm
- m42
- xt3 #MMCA #국립현대미술관
- 황용식
- mf
- 전붙이기
- XT3
- 야경
- 필름시뮬레이션
- Classic Chrome
- m42 55mm
- 캠핑
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |