3.2. 외부 모드를 위한 OpenShift Data foundation Cluster 생성
Red Hat OpenStack 플랫폼에 배포된 OpenShift Container Platform에 OpenShift Data Foundation Operator를 설치한 후 새 OpenShift Data Foundation 클러스터를 생성해야 합니다.
사전 요구 사항
- OpenShift Data Foundation 4.10을 배포하기 전에 OpenShift Container Platform 버전이 4.10 이상인지 확인합니다.
- OpenShift Data Foundation Operator가 설치되어 있어야 합니다. 자세한 내용은 Operator Hub를 사용하여 OpenShift Data Foundation Operator 설치를 참조하십시오.
외부 클러스터에는 Red Hat Ceph Storage 버전 4.2z1 이상이 필요합니다. 자세한 내용은 Red Hat Ceph Storage 릴리스 및 해당 Ceph 패키지 버전에 대한 지식 기반 문서를 참조하십시오.
Red Hat Ceph Storage 클러스터를 4.1.1 미만의 버전에서 최신 릴리스로 업데이트했으며 새로 배포된 클러스터가 아닌 경우, 외부 모드에서 CephFS PVC를 생성할 수 있도록 Red Hat Ceph Storage 클러스터에서 CephFS 풀의 애플리케이션 유형을 수동으로 설정해야 합니다.
자세한 내용은 외부 모드에서 CephFS PVC 생성 문제 해결을 참조하십시오.
- Red Hat Ceph Storage에는 Ceph 대시보드가 설치되어 있어야 합니다. 자세한 내용은 Ceph 대시보드 설치 및 액세스를 참조하십시오.
- Red Hat은 외부 Red Hat Ceph Storage 클러스터에 PG Autoscaler를 활성화하는 것이 좋습니다. 자세한 내용은 Red Hat Ceph Storage 문서 의 배치 그룹 자동 확장기 섹션을 참조하십시오.
- 외부 Ceph 클러스터에는 사용할 기존 RBD 풀이 미리 구성되어 있어야 합니다. 존재하지 않는 경우 OpenShift Data Foundation 배포를 진행하기 전에 Red Hat Ceph Storage 관리자에게 문의하십시오. Red Hat은 각 OpenShift Data Foundation 클러스터마다 별도의 풀을 사용하는 것이 좋습니다.
절차
Operators
설치된 Operator 를 클릭하여 설치된 모든 Operator를 확인합니다. 선택한 프로젝트가
openshift-storage인지 확인합니다.-
스토리지 클러스터의 OpenShift Data Foundation
인스턴스 생성 링크를 클릭합니다. Mode(모드)를 External (외부)으로 선택합니다. 기본적으로 Internal는 배포 모드로 선택됩니다.
그림 3.1. 스토리지 클러스터 생성 양식의 외부 클러스터에 연결
- Connect to external cluster(외부 클러스터에 연결) 섹션에서 Download Script (스크립트 다운로드) 링크를 클릭하여 Ceph 클러스터 세부 정보를 추출하기 위한 python 스크립트를 다운로드합니다.
RHCS(Red Hat Ceph Storage) 클러스터 세부 정보를 추출하려면 RHCS 관리자에게 문의하여
admin 키가있는 Red Hat Ceph Storage 노드에서 다운로드한 python 스크립트를 실행합니다.RHCS 노드에서 다음 명령을 실행하여 사용 가능한 인수 목록을 확인합니다.
python3 ceph-external-cluster-details-exporter.py --help
# python3 ceph-external-cluster-details-exporter.py --helpCopy to Clipboard Copied! Toggle word wrap Toggle overflow 중요Red Hat Ceph Storage 4.x 클러스터가 Red Hat Enterprise Linux 7.x(RHEL 7.x) 클러스터에 배포된 경우
python3대신python3을 사용합니다.참고MON 컨테이너(컨테이너화된 배포) 내부 또는 MON 노드(rpm 배포)에서 스크립트를 실행할 수도 있습니다.
RHCS 클러스터에서 외부 클러스터 세부 정보를 검색하려면 다음 명령을 실행합니다.
python3 ceph-external-cluster-details-exporter.py \ --rbd-data-pool-name <rbd block pool name> [optional arguments]
# python3 ceph-external-cluster-details-exporter.py \ --rbd-data-pool-name <rbd block pool name> [optional arguments]Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예를 들면 다음과 같습니다.
python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name ceph-rbd --monitoring-endpoint xxx.xxx.xxx.xxx --monitoring-endpoint-port xxxx --rgw-endpoint xxx.xxx.xxx.xxx:xxxx --run-as-user client.ocs
# python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name ceph-rbd --monitoring-endpoint xxx.xxx.xxx.xxx --monitoring-endpoint-port xxxx --rgw-endpoint xxx.xxx.xxx.xxx:xxxx --run-as-user client.ocsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 위 예에서
-
--rBD-data-pool-name은 OpenShift Data Foundation에서 블록 스토리지를 제공하는 데 사용되는 필수 매개 변수입니다. -
--RGW-endpoint는 선택 사항입니다. Ceph Rados Gateway for OpenShift Data Foundation을 통해 오브젝트 스토리지를 프로비저닝해야 하는 경우 이 매개변수를 제공합니다.<ip_address>:<port>형식으로 끝점을 제공합니다. -
--monitoring-endpoint는 선택 사항입니다. OpenShift Container Platform 클러스터에서 연결할 수 있는 활성ceph-mgr의 IP 주소입니다. 제공하지 않으면 값이 자동으로 채워집니다. -
--monitoring-endpoint-port는 선택 사항입니다. 이 포트는--monitoring-endpoint에서 지정하는ceph-mgrPrometheus 내보내기와 연결된 포트입니다. 제공하지 않으면 값이 자동으로 채워집니다. -- run-as-user는 스크립트에서 생성된 Ceph 사용자의 이름을 제공하는 데 사용되는 선택적 매개 변수입니다. 이 매개변수를 지정하지 않으면 기본 사용자 이름client.healthchecker가 생성됩니다. 새 사용자에 대한 권한은 다음과 같이 설정됩니다.- 대문자: [mgr] allow command config
- 대문자: [mon] allow r, allow command quorum_status, allow command version, allow command version
대문자: [osd] allow rwx pool=
RGW_POOL_PREFIX.rgw.meta, r pool=.rgw.root허용, rw pool=RGW_POOL_PREFIX.rgw.control허용, rx pool=RGW_POOL_POOL_PREFIX.rgw.log, 허용 allow x pool=RGW_POOL_PREFIX.rgw.buckets.indexpython 스크립트를 사용하여 생성된 JSON 출력의 예:
[{"name": "rook-ceph-mon-endpoints", "kind": "ConfigMap", "data": {"data": "xxx.xxx.xxx.xxx:xxxx", "maxMonId": "0", "mapping": "{}"}}, {"name": "rook-ceph-mon", "kind": "Secret", "data": {"admin-secret": "admin-secret", "fsid": "<fs-id>", "mon-secret": "mon-secret"}}, {"name": "rook-ceph-operator-creds", "kind": "Secret", "data": {"userID": "client.healthchecker", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-node", "kind": "Secret", "data": {"userID": "csi-rbd-node", "userKey": "<user-key>"}}, {"name": "ceph-rbd", "kind": "StorageClass", "data": {"pool": "ceph-rbd"}}, {"name": "monitoring-endpoint", "kind": "CephCluster", "data": {"MonitoringEndpoint": "xxx.xxx.xxx.xxx", "MonitoringPort": "xxxx"}}, {"name": "rook-csi-rbd-provisioner", "kind": "Secret", "data": {"userID": "csi-rbd-provisioner", "userKey": "<user-key>"}}, {"name": "rook-csi-cephfs-provisioner", "kind": "Secret", "data": {"adminID": "csi-cephfs-provisioner", "adminKey": "<admin-key>"}}, {"name": "rook-csi-cephfs-node", "kind": "Secret", "data": {"adminID": "csi-cephfs-node", "adminKey": "<admin-key>"}}, {"name": "cephfs", "kind": "StorageClass", "data": {"fsName": "cephfs", "pool": "cephfs_data"}}, {"name": "ceph-rgw", "kind": "StorageClass", "data": {"endpoint": "xxx.xxx.xxx.xxx:xxxx", "poolPrefix": "default"}}][{"name": "rook-ceph-mon-endpoints", "kind": "ConfigMap", "data": {"data": "xxx.xxx.xxx.xxx:xxxx", "maxMonId": "0", "mapping": "{}"}}, {"name": "rook-ceph-mon", "kind": "Secret", "data": {"admin-secret": "admin-secret", "fsid": "<fs-id>", "mon-secret": "mon-secret"}}, {"name": "rook-ceph-operator-creds", "kind": "Secret", "data": {"userID": "client.healthchecker", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-node", "kind": "Secret", "data": {"userID": "csi-rbd-node", "userKey": "<user-key>"}}, {"name": "ceph-rbd", "kind": "StorageClass", "data": {"pool": "ceph-rbd"}}, {"name": "monitoring-endpoint", "kind": "CephCluster", "data": {"MonitoringEndpoint": "xxx.xxx.xxx.xxx", "MonitoringPort": "xxxx"}}, {"name": "rook-csi-rbd-provisioner", "kind": "Secret", "data": {"userID": "csi-rbd-provisioner", "userKey": "<user-key>"}}, {"name": "rook-csi-cephfs-provisioner", "kind": "Secret", "data": {"adminID": "csi-cephfs-provisioner", "adminKey": "<admin-key>"}}, {"name": "rook-csi-cephfs-node", "kind": "Secret", "data": {"adminID": "csi-cephfs-node", "adminKey": "<admin-key>"}}, {"name": "cephfs", "kind": "StorageClass", "data": {"fsName": "cephfs", "pool": "cephfs_data"}}, {"name": "ceph-rgw", "kind": "StorageClass", "data": {"endpoint": "xxx.xxx.xxx.xxx:xxxx", "poolPrefix": "default"}}]Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
.
json 확장자를 사용하여 JSON 출력을 파일에 저장합니다.참고OpenShift Data Foundation이 원활하게 작동하려면 스토리지 클러스터를 생성한 후에도 RHCS 외부 클러스터에서 JSON 파일을 사용하여 업로드할 매개 변수(RGW 엔드포인트, CephFS 세부 정보, RBD 풀 등)가 여전히 변경되지 않았는지 확인합니다.
외부 클러스터 메타데이터
찾아보기 를 클릭하여 JSON 파일을 선택하고 업로드합니다. JSON 파일의 콘텐츠가 채워져 텍스트 상자에 표시됩니다.
그림 3.2. JSON 파일 콘텐츠
생성을 클릭합니다.
Create(만들기) 버튼은
.json파일을 업로드한 후에만 활성화됩니다.
검증 단계
설치된 스토리지 클러스터의 최종 상태가
단계로 표시되는지 확인합니다. 녹색 눈금 표시가 있는 ready입니다.-
Operators
설치된 Operator 스토리지 클러스터 링크를 클릭하여 스토리지 클러스터 설치 상태를 확인합니다. - 또는 Operator Details(운영자 세부 정보 ) 탭에 있는 경우 Storage Cluster(스토리지 클러스터 ) 탭을 클릭하여 상태를 확인할 수 있습니다.
-
Operators
- OpenShift Data Foundation, Pod 및 StorageClass가 성공적으로 설치되었는지 확인하려면 외부 모드 OpenShift Data Foundation 설치 확인을 참조하십시오.