9.4. Red Hat Ceph Storage RGW를 외부 RHEL 노드로 마이그레이션


HCI(Hyperconverged Infrastructure) 또는 전용 스토리지 노드의 경우 Red Hat OpenStack Platform 컨트롤러 노드에 포함된 Ceph Object Gateway(RGW) 데몬을 기존 외부 외부 RHEL(Red Hat Enterprise Linux) 노드로 마이그레이션해야 합니다. 외부 RHEL 노드에는 일반적으로 HCI 환경 또는 Red Hat Ceph Storage 노드의 컴퓨팅 노드가 포함됩니다. 환경에 Red Hat Ceph Storage 7 이상이 있어야 하며 cephadm 또는 Ceph Orchestrator에서 관리해야 합니다.

사전 요구 사항

9.4.1. Red Hat Ceph Storage RGW 백엔드 마이그레이션

컨트롤러 노드에서 Red Hat Ceph Storage 노드로 Ceph Object Gateway(RGW) 백엔드를 마이그레이션해야 합니다. 올바른 양의 서비스를 사용 가능한 노드에 배포하기 위해 cephadm 레이블을 사용하여 지정된 데몬 유형이 배포된 노드 그룹을 참조합니다. 카디널리티 다이어그램에 대한 자세한 내용은 Red Hat Ceph Storage 데몬 카디널리티 를 참조하십시오. 다음 절차에서는 세 개의 대상 노드 cephstorage-0,cephstorage-1,cephstorage-2 라고 가정합니다.

프로세스

  1. RGW 백엔드를 마이그레이션하려는 Red Hat Ceph Storage 노드에 RGW 레이블을 추가합니다.

    $ sudo cephadm shell -- ceph orch host label add cephstorage-0 rgw;
    $ sudo cephadm shell -- ceph orch host label add cephstorage-1 rgw;
    $ sudo cephadm shell -- ceph orch host label add cephstorage-2 rgw;
    
    Added label rgw to host cephstorage-0
    Added label rgw to host cephstorage-1
    Added label rgw to host cephstorage-2
    
    $ sudo cephadm shell -- ceph orch host ls
    
    HOST       	ADDR       	LABELS      	STATUS
    cephstorage-0  192.168.24.54  osd rgw
    cephstorage-1  192.168.24.44  osd rgw
    cephstorage-2  192.168.24.30  osd rgw
    controller-0   192.168.24.45  _admin mon mgr
    controller-1   192.168.24.11  _admin mon mgr
    controller-2   192.168.24.38  _admin mon mgr
    
    6 hosts in cluster
  2. spec 디렉토리에서 RGW 사양 및 덤프를 찾습니다.

    $ SPEC_DIR=${SPEC_DIR:-"$PWD/ceph_specs"}
    $ mkdir -p ${SPEC_DIR}
    $ sudo cephadm shell -- ceph orch ls --export rgw > ${SPEC_DIR}/rgw
    $ cat ${SPEC_DIR}/rgw
    networks:
    - 172.17.3.0/24
    placement:
      hosts:
      - controller-0
      - controller-1
      - controller-2
    service_id: rgw
    service_name: rgw.rgw
    service_type: rgw
    spec:
      rgw_frontend_port: 8080
      rgw_realm: default
      rgw_zone: default

    이 예에서는 172.17.3.0/24스토리지 네트워크라고 가정합니다.

  3. placement 섹션에서 레이블rgw_frontend_port 값이 설정되어 있는지 확인합니다.

    ---
    networks:
    - 172.17.3.0/24
    1
    
    placement:
      label: rgw 
    2
    
    service_id: rgw
    service_name: rgw.rgw
    service_type: rgw
    spec:
      rgw_frontend_port: 8090 
    3
    
      rgw_realm: default
      rgw_zone: default
      rgw_frontend_ssl_certificate: ... 
    4
    
      ssl: true
    1
    RGW 백엔드가 배포되는 스토리지 네트워크를 추가합니다.
    2
    컨트롤러 노드를 rgw 레이블 로 바꿉니다.
    3
    Ceph ingress 데몬과의 충돌을 방지하려면 rgw_frontend_port 값을 8090 으로 변경합니다.
    4
    선택 사항: TLS가 활성화된 경우 영구 스토리지 구성에서 외부 Red Hat Ceph Storage 클러스터의 TLS를 사용하여 RGW 구성에 설명된 대로 SSL 인증서 및 키 연결을 추가합니다.
  4. 오케스트레이터 CLI를 사용하여 새 RGW 사양을 적용합니다.

    $ SPEC_DIR=${SPEC_DIR:-"$PWD/ceph_specs"}
    $ sudo cephadm shell -m ${SPEC_DIR}/rgw -- ceph orch apply -i /mnt/rgw

    이 명령은 재배포를 트리거합니다. 예를 들면 다음과 같습니다.

    ...
    osd.9                     	cephstorage-2
    rgw.rgw.cephstorage-0.wsjlgx  cephstorage-0  172.17.3.23:8090   starting
    rgw.rgw.cephstorage-1.qynkan  cephstorage-1  172.17.3.26:8090   starting
    rgw.rgw.cephstorage-2.krycit  cephstorage-2  172.17.3.81:8090   starting
    rgw.rgw.controller-1.eyvrzw   controller-1   172.17.3.146:8080  running (5h)
    rgw.rgw.controller-2.navbxa   controller-2   172.17.3.66:8080   running (5h)
    
    ...
    osd.9                     	cephstorage-2
    rgw.rgw.cephstorage-0.wsjlgx  cephstorage-0  172.17.3.23:8090  running (19s)
    rgw.rgw.cephstorage-1.qynkan  cephstorage-1  172.17.3.26:8090  running (16s)
    rgw.rgw.cephstorage-2.krycit  cephstorage-2  172.17.3.81:8090  running (13s)
  5. 나중에 포트 8080 에서 ingress 데몬을 활성화할 수 있도록 새 포트에서 새 RGW 백엔드에 연결할 수 있는지 확인합니다. RGW가 포함된 각 Red Hat Ceph Storage 노드에 로그인하고 Red Hat Ceph Storage 노드의 8080 및 8090 포트에 대한 연결을 허용하는 iptables 규칙을 추가합니다.

    $ iptables -I INPUT -p tcp -m tcp --dport 8080 -m conntrack --ctstate NEW -m comment --comment "ceph rgw ingress" -j ACCEPT
    $ iptables -I INPUT -p tcp -m tcp --dport 8090 -m conntrack --ctstate NEW -m comment --comment "ceph rgw backends" -j ACCEPT
    $ sudo iptables-save
    $ sudo systemctl restart iptables
  6. 기존 배포에 nftables 를 사용하는 경우 /etc/nftables/tripleo-rules.nft 를 편집하고 다음 내용을 추가합니다.

    # 100 ceph_rgw {'dport': ['8080','8090']}
    add rule inet filter TRIPLEO_INPUT tcp dport { 8080,8090 } ct state new counter accept comment "100 ceph_rgw"
  7. 파일을 저장합니다.
  8. nftables 서비스를 다시 시작합니다.

    $ sudo systemctl restart nftables
  9. 규칙이 적용되었는지 확인합니다.

    $ sudo nft list ruleset | grep ceph_rgw
  10. controller-0 과 같은 컨트롤러 노드에서 RGW 백엔드에 연결을 시도합니다.

    $ curl http://cephstorage-0.storage:8090;

    다음 출력을 확인해야 합니다.

    <?xml version="1.0" encoding="UTF-8"?><ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>anonymous</ID><DisplayName></DisplayName></Owner><Buckets></Buckets></ListAllMyBucketsResult>

    RGW 데몬이 배포된 각 노드에 대해 확인을 반복합니다.

  11. RGW 백엔드를 Red Hat Ceph Storage 노드로 마이그레이션하는 경우 HCI 노드의 경우를 제외하고 내부 API 네트워크가 없습니다. RGW keystone 엔드포인트를 재구성하여 전파한 외부 네트워크를 가리켜야 합니다.

    [ceph: root@controller-0 /]# ceph config dump | grep keystone
    global   basic rgw_keystone_url  http://172.16.1.111:5000
    
    [ceph: root@controller-0 /]# ceph config set global rgw_keystone_url http://<keystone_endpoint>:5000
    • ID 서비스를 채택할 때 < keystone_endpoint >를 OpenStackControlPlane CR에 배포된 서비스의 ID 서비스(keystone) 내부 엔드포인트로 바꿉니다. 자세한 내용은 ID 서비스 변경을 참조하십시오.

9.4.2. Red Hat Ceph Storage 인그레스 데몬 배포

Ceph ingress 데몬을 배포하려면 다음 작업을 수행합니다.

  1. 기존 ceph_rgw 구성을 제거합니다.
  2. director Operator가 생성한 설정을 정리합니다.
  3. Object Storage 서비스(swift)를 재배포합니다.

ingress 데몬을 배포하면 두 개의 새 컨테이너가 생성됩니다.

  • HAProxy - 백엔드에 도달하는 데 사용합니다.
  • keepalived: 가상 IP 주소를 소유하는 데 사용합니다.

rgw 레이블을 사용하여 Ceph Object Gateway(RGW) 데몬을 호스팅하는 노드 수에만 ingress 데몬을 배포합니다. 노드 간에 데몬을 배포하는 방법에 대한 자세한 내용은 Red Hat Ceph Storage 데몬 카디널리티 를 참조하십시오.

이 절차를 완료하면 Ingress 데몬에서 RGW 백엔드에 도달하고 Object Storage 서비스 CLI를 통해 RGW를 사용할 수 있습니다.

프로세스

  1. 각 컨트롤러 노드에 로그인하고 /var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg 파일에서 다음 구성을 삭제합니다.

    listen ceph_rgw
      bind 10.0.0.103:8080 transparent
      mode http
      balance leastconn
      http-request set-header X-Forwarded-Proto https if { ssl_fc }
      http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
      http-request set-header X-Forwarded-Port %[dst_port]
      option httpchk GET /swift/healthcheck
      option httplog
      option forwardfor
       server controller-0.storage.redhat.local 172.17.3.73:8080 check fall 5 inter 2000 rise 2
      server controller-1.storage.redhat.local 172.17.3.146:8080 check fall 5 inter 2000 rise 2
      server controller-2.storage.redhat.local 172.17.3.156:8080 check fall 5 inter 2000 rise 2
  2. haproxy-bundle 을 다시 시작하고 시작했는지 확인합니다.

    [root@controller-0 ~]# sudo pcs resource restart haproxy-bundle
    haproxy-bundle successfully restarted
    
    
    [root@controller-0 ~]# sudo pcs status | grep haproxy
    
      * Container bundle set: haproxy-bundle [undercloud-0.ctlplane.redhat.local:8787/rh-osbs/rhosp17-openstack-haproxy:pcmklatest]:
        * haproxy-bundle-podman-0   (ocf:heartbeat:podman):  Started controller-0
        * haproxy-bundle-podman-1   (ocf:heartbeat:podman):  Started controller-1
        * haproxy-bundle-podman-2   (ocf:heartbeat:podman):  Started controller-2
  3. 포트 8080에 프로세스가 연결되어 있지 않은지 확인합니다.

    [root@controller-0 ~]# ss -antop | grep 8080
    [root@controller-0 ~]#

    Object Storage 서비스(swift) CLI에서 연결을 설정하지 못할 것으로 예상할 수 있습니다.

    (overcloud) [root@cephstorage-0 ~]# swift list
    
    HTTPConnectionPool(host='10.0.0.103', port=8080): Max retries exceeded with url: /swift/v1/AUTH_852f24425bb54fa896476af48cbe35d3?format=json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc41beb0430>: Failed to establish a new connection: [Errno 111] Connection refused'))
  4. HAProxy 및 Keepalived 둘 다에 필요한 이미지를 설정합니다.

    [ceph: root@controller-0 /]# ceph config set mgr mgr/cephadm/container_image_haproxy registry.redhat.io/rhceph/rhceph-haproxy-rhel9:latest
    [ceph: root@controller-0 /]# ceph config set mgr mgr/cephadm/container_image_keepalived registry.redhat.io/rhceph/keepalived-rhel9:latest
  5. controller-0 에서 rgw_ingress 라는 파일을 생성합니다.

    $ SPEC_DIR=${SPEC_DIR:-"$PWD/ceph_specs"}
    $ vim ${SPEC_DIR}/rgw_ingress
  6. 다음 내용을 rgw_ingress 파일에 붙여넣습니다.

    ---
    service_type: ingress
    service_id: rgw.rgw
    placement:
      label: rgw
    spec:
      backend_service: rgw.rgw
      virtual_ip: 10.0.0.89/24
      frontend_port: 8080
      monitor_port: 8898
      virtual_interface_networks:
        - <external_network>
      ssl_cert: ...
  7. Ceph 오케스트레이터 CLI를 사용하여 rgw_ingress 사양을 적용합니다.

    $ SPEC_DIR=${SPEC_DIR:-"$PWD/ceph_specs"}
    $ cephadm shell -m ${SPEC_DIR}/rgw_ingress -- ceph orch apply -i /mnt/rgw_ingress
  8. 수신이 배포될 때까지 기다린 후 결과 끝점을 쿼리합니다.

    $ sudo cephadm shell -- ceph orch ls
    
    NAME                 	PORTS            	RUNNING  REFRESHED  AGE  PLACEMENT
    crash                                         	6/6  6m ago 	3d   *
    ingress.rgw.rgw      	10.0.0.89:8080,8898  	6/6  37s ago	60s  label:rgw
    mds.mds                   3/3  6m ago 	3d   controller-0;controller-1;controller-2
    mgr                       3/3  6m ago 	3d   controller-0;controller-1;controller-2
    mon                       3/3  6m ago 	3d   controller-0;controller-1;controller-2
    osd.default_drive_group   15  37s ago	3d   cephstorage-0;cephstorage-1;cephstorage-2
    rgw.rgw   ?:8090          3/3  37s ago	4m   label:rgw
    $ curl 10.0.0.89:8080
    
    ---
    <?xml version="1.0" encoding="UTF-8"?><ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>anonymous</ID><DisplayName></DisplayName></Owner><Buckets></Buckets></ListAllMyBucketsResult>[ceph: root@controller-0 /]#
    —

9.4.3. Object Storage 서비스 엔드 포인트 생성 또는 업데이트

RGW 수신을 배포하는 데 사용한 동일한 네트워크에서 예약한 새 가상 IP 주소(VIP)를 구성하려면 Object Storage 서비스(swift) 끝점을 생성하거나 업데이트해야 합니다.

프로세스

  1. 현재 swift 끝점 및 서비스를 나열합니다.

     $ oc rsh openstackclient openstack endpoint list | grep 'swift.*object'
     $ oc rsh openstackclient openstack service list | grep 'swift.*object'
  2. 서비스와 끝점이 없는 경우 누락된 swift 리소스를 생성합니다.

    $ oc rsh openstackclient openstack service create --name swift --description 'OpenStack Object Storage' object-store
    $ oc rsh openstackclient openstack role add --user swift --project service member
    $ oc rsh openstackclient openstack role add --user swift --project service admin
    > for i in public internal; do
    >     oc rsh openstackclient endpoint create --region regionOne object-store $i http://<RGW_VIP>:8080/swift/v1/AUTH_%\(tenant_id\)s
    > done
    $ oc rsh openstackclient openstack role add --project admin --user admin swiftoperator
    • &lt ;RGW_VIP&gt;를 Ceph RGW ingress VIP로 바꿉니다.
  3. 엔드 포인트가 있는 경우 올바른 RGW ingress VIP를 가리키도록 끝점을 업데이트합니다.

    $ oc rsh openstackclient openstack endpoint set --url http://<RGW_VIP>:8080/swift/v1/AUTH_%\(tenant_id\)s <swift_public_endpoint_uuid>
    $ oc rsh openstackclient openstack endpoint set --url http://<RGW_VIP>:8080/swift/v1/AUTH_%\(tenant_id\)s <swift_internal_endpoint_uuid>
    $ oc rsh openstackclient openstack endpoint list | grep object
    | 0d682ad71b564cf386f974f90f80de0d | regionOne | swift        | object-store | True    | public    | http://172.18.0.100:8080/swift/v1/AUTH_%(tenant_id)s    |
    | b311349c305346f39d005feefe464fb1 | regionOne | swift        | object-store | True    | internal  | http://172.18.0.100:8080/swift/v1/AUTH_%(tenant_id)s    |
    • & lt;swift_public_endpoint_uuid >를 swift 공용 끝점의 UUID로 바꿉니다.
    • & lt;swift_internal_endpoint_uuid >를 swift 내부 끝점의 UUID로 바꿉니다.
  4. 마이그레이션된 서비스를 테스트합니다.

    $ oc rsh openstackclient openstack container list --debug
    
    ...
    ...
    ...
    REQ: curl -g -i -X GET http://keystone-public-openstack.apps.ocp.openstack.lab -H "Accept: application/json" -H "User-Agent: openstacksdk/1.0.2 keystoneauth1/5.1.3 python-requests/2.25.1 CPython/3.9.23"
    Starting new HTTP connection (1): keystone-public-openstack.apps.ocp.openstack.lab:80
    http://keystone-public-openstack.apps.ocp.openstack.lab:80 "GET / HTTP/1.1" 300 298
    RESP: [300] content-length: 298 content-type: application/json date: Mon, 14 Jul 2025 17:41:29 GMT location: http://keystone-public-openstack.apps.ocp.openstack.lab/v3/ server: Apache set-cookie: b5697f82cf3c19ece8be533395142512=d5c6a9ee2
    267c4b63e9f656ad7565270; path=/; HttpOnly vary: X-Auth-Token x-openstack-request-id: req-452e42c5-e60f-440f-a6e8-fe1b9ea89055
    RESP BODY: {"versions": {"values": [{"id": "v3.14", "status": "stable", "updated": "2020-04-07T00:00:00Z", "links": [{"rel": "self", "href": "http://keystone-public-openstack.apps.ocp.openstack.lab/v3/"}], "media-types": [{"base": "applic
    ation/json", "type": "application/vnd.openstack.identity-v3+json"}]}]}}
    GET call to http://keystone-public-openstack.apps.ocp.openstack.lab/ used request id req-452e42c5-e60f-440f-a6e8-fe1b9ea89055
    
    ...
    
    REQ: curl -g -i -X GET "http://172.18.0.100:8080/swift/v1/AUTH_44477474b0dc4b5b8911ceec23a22246?format=json" -H "User-Agent: openstacksdk/1.0.2 keystoneauth1/5.1.3 python-requests/2.25.1 CPython/3.9.23" -H "X-Auth-Token: {SHA256}ec5deca0be37bd8bfe659f132b9cdf396b8f409db5dc16972d50cbf3f28474d4"
    Starting new HTTP connection (1): 172.18.0.100:8080
    http://172.18.0.100:8080 "GET /swift/v1/AUTH_44477474b0dc4b5b8911ceec23a22246?format=json HTTP/1.1" 200 2
    RESP: [200] accept-ranges: bytes content-length: 2 content-type: application/json; charset=utf-8 date: Mon, 14 Jul 2025 17:41:31 GMT x-account-bytes-used: 0 x-account-bytes-used-actual: 0 x-account-container-count: 0 x-account-object-count: 0 x-account-storage-policy-default-placement-bytes-used: 0 x-account-storage-policy-default-placement-bytes-used-actual: 0 x-account-storage-policy-default-placement-container-count: 0 x-account-storage-policy-default-placement-object-count: 0 x-openstack-request-id: tx000001e95361131ccf694-006875414a-7753-default x-timestamp: 1752514891.25991 x-trans-id: tx000001e95361131ccf694-006875414a-7753-default
    RESP BODY: []
    GET call to http://172.18.0.100:8080/swift/v1/AUTH_44477474b0dc4b5b8911ceec23a22246?format=json used request id tx000001e95361131ccf694-006875414a-7753-default
    
    clean_up ListContainer:
    END return value: 0
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동