2.4. CivetWeb ポートの変更

Ansible を使用して Ceph Object Gateway をインストールすると、ポート 8080 で実行するように CivetWeb が設定されます。Ansible は、Ceph 設定ファイルに以下のような行を追加することでこれを行います。

rgw frontends = civetweb port=192.168.122.199:8080 num_threads=100
重要

Ceph 設定ファイルに rgw frontends = civetweb 行が含まれていない場合、Ceph Object Gateway はポート 7480 をリッスンします。rgw_frontends = civetweb 行が含まれているがポートが指定されていない場合、Ceph Object Gateway はポート 80 をリッスンします。

重要

Ansible は、Ceph Object Gateway がポート 8080 をリッスンするように設定し、Red Hat Ceph Storage 4 をインストールするためのサポート対象の方法として ceph-ansible を使用するため、ポート 8080 は Red Hat Ceph Storage 4 ドキュメントのデフォルトのポートとみなされます。

前提条件

  • 稼働中の Red Hat Ceph Storage 4.1 クラスターがある。
  • Ceph Object Gateway ノードがある。

手順

  1. ゲートウェイノードで、/etc/ceph/ ディレクトリーで Ceph 設定ファイルを開きます。
  2. 以下の例のような Ceph Object Gateway (RGW) クライアントセクションを見つけます。

    [client.rgw.gateway-node1]
    host = gateway-node1
    keyring = /var/lib/ceph/radosgw/ceph-rgw.gateway-node1/keyring
    log file = /var/log/ceph/ceph-rgw-gateway-node1.log
    rgw frontends = civetweb port=192.168.122.199:8080 num_threads=100

    [client.rgw.gateway-node1] の見出しは、Ceph Storage Cluster クライアントを設定する時に Ceph 設定ファイルのこの部分を特定します。クライアントタイプは rgw で識別される Ceph Object Gateway で、ノードの名前は gateway-node1 です。

  3. デフォルトの Ansible 設定ポート 808080 に変更するには、rgw frontends 行を編集します。

    rgw frontends = civetweb port=192.168.122.199:80 num_threads=100

    rgw_frontends キーと値のペアの port=port-number の間に空白がないことを確認します。

    ポートを変更する他のゲートウェイノードでこの手順を繰り返します。

  4. 各ゲートウェイノードから Ceph Object Gateway サービスを再起動して、新規ポートの設定を有効にします。

    # systemctl restart ceph-radosgw.target
  5. 各ゲートウェイノードのファイアウォールで、設定したポートが開いていることを確認します。

    # firewall-cmd --list-all
  6. ポートが開かない場合は、ポートを追加し、ファイアウォール設定を再読み込みします。

    # firewall-cmd --zone=public --add-port 80/tcp --permanent
    # firewall-cmd --reload