8.2.2. ボリュームの I/O 暗号化の有効化
サーバーとクライアント間の I/O 暗号化を有効にします。
サーバーとは、Red Hat Gluster Storage Pod が実行されている OpenShift ノードです。
クライアントとは、Red Hat Gluster Storage が実行されていない残りの OpenShift ノードです。
- さらなる手順に進む前に、Red Hat Openshift Container Storage がデプロイされていることを確認します。詳細は、https://access.redhat.com/documentation/ja-jp/red_hat_openshift_container_storage/3.11/html-single/deployment_guide/#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-Setting_the_environment-Deploy_CNS を参照してください。
静的にプロビジョニングされたボリュームまたは動的にプロビジョニングされたボリュームを作成できます。ボリュームの静的プロビジョニングの詳細は、https://access.redhat.com/documentation/ja-jp/red_hat_openshift_container_storage/3.11/html-single/operations_guide/#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-OpenShift_Creating_Persistent_Volumes-Static_Prov を参照してください。ボリュームの動的プロビジョニングに関する詳細は、https://access.redhat.com/documentation/ja-jp/red_hat_openshift_container_storage/3.11/html-single/operations_guide/#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-OpenShift_Creating_Persistent_Volumes-Dynamic_Prov を参照してください。
注記静的にプロビジョニングされたボリュームの作成時に暗号化を有効にするには、以下のコマンドを実行します。
# heketi-cli volume create --size=100 --gluster-volume-options="client.ssl on","server.ssl on"
以下のコマンドを実行してボリュームを停止します。
# oc rsh <gluster_pod_name> gluster volume stop VOLNAME
gluster pod nameは、ボリュームが属する信頼済みストレージプールの Red Hat Gluster Storage Pod のいずれかの名前です。
注記VOLNAME を取得するには、以下のコマンドを実行します。
# oc describe pv <pv_name>
以下に例を示します。
# oc describe pv pvc-01569c5c-1ec9-11e7-a794-005056b38171 Name: pvc-01569c5c-1ec9-11e7-a794-005056b38171 Labels: <none> StorageClass: fast Status: Bound Claim: storage-project/storage-claim68 Reclaim Policy: Delete Access Modes: RWO Capacity: 1Gi Message: Source: Type: Glusterfs (a Glusterfs mount on the host that shares a pod's lifetime) EndpointsName: glusterfs-dynamic-storage-claim68 Path: vol_0e81e5d6e46dcbf02c11ffd9721fca28 ReadOnly: false No events.
VOLNAME は、上記の出力の"path"の値です。
ボリュームにアクセスする全サーバーの共通名の一覧を設定します。ボリュームにアクセスできるクライアントの共通名を含めるようにしてください。
# oc rsh <gluster_pod_name> gluster volume set VOLNAME auth.ssl-allow 'server1,server2,server3,client1,client2,client3'
注記auth.ssl-allow オプションの値として* を設定すると、TLS 認証されたクライアントはアプリケーション側からボリュームをマウントおよびアクセスできます。したがって、オプションの値を * に設定するか、または信頼済みストレージプールのノードおよびクライアントの共通名を指定します。
ボリュームで client.ssl オプションおよび server.ssl オプションを有効にします。
# oc rsh <gluster_pod_name> gluster volume set VOLNAME client.ssl on # oc rsh <gluster_pod_name> gluster volume set VOLNAME server.ssl on
ボリュームを起動します。
# oc rsh <gluster_pod_name> gluster volume start VOLNAME