5.3. インデペンデントモードでの Red Hat Openshift Container Storage のデプロイ
インベントリファイルで、
[OSEv3:children]
セクションにglusterfs
を追加して、[glusterfs]
グループを有効にします。[OSEv3:children] masters etcd nodes glusterfs
[OSEv3:vars]
セクションに以下の変数を追加し、設定に合わせてそれらを調整します。[OSEv3:vars] ... openshift_storage_glusterfs_namespace=app-storage openshift_storage_glusterfs_storageclass=true openshift_storage_glusterfs_storageclass_default=false openshift_storage_glusterfs_block_deploy=true openshift_storage_glusterfs_block_host_vol_create=true openshift_storage_glusterfs_block_host_vol_size=100 openshift_storage_glusterfs_block_storageclass=true openshift_storage_glusterfs_block_storageclass_default=false openshift_storage_glusterfs_is_native=false openshift_storage_glusterfs_heketi_is_native=true openshift_storage_glusterfs_heketi_executor=ssh openshift_storage_glusterfs_heketi_ssh_port=22 openshift_storage_glusterfs_heketi_ssh_user=root openshift_storage_glusterfs_heketi_ssh_sudo=false openshift_storage_glusterfs_heketi_ssh_keyfile="/root/.ssh/id_rsa"
注記openshift_storage_glusterfs_block_host_vol_size
は整数を取ります。これは、Gi単位のボリュームのサイズです。GlusterFS ストレージをホストする各ストレージノードのエントリーを含む
[glusterfs]
セクションを追加します。ノードごとにglusterfs_devices
を GlusterFS クラスターの一部として完全に管理される raw ブロックデバイスの一覧に設定します。少なくとも 1 つのデバイスが記載されている必要があります。各デバイスは、パーティションや LVM PV がないベアでなければなりません。また、glusterfs_ip
をノードのIPアドレスに設定します。変数の指定は以下の形式になります。<hostname_or_ip> glusterfs_zone=<zone_number> glusterfs_ip=<ip_address> glusterfs_devices='[ "</path/to/device1/>", "</path/to/device2>", ... ]'
以下は例になります。
[glusterfs] gluster1.example.com glusterfs_zone=1 glusterfs_ip=192.168.10.11 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' gluster2.example.com glusterfs_zone=2 glusterfs_ip=192.168.10.12 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' gluster3.example.com glusterfs_zone=3 glusterfs_ip=192.168.10.13 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]'
上記の手順では、より大きな完全なインベントリファイルに追加する必要のあるオプションについて詳しく説明しています。完全なインベントリーファイルを使用して {gluster} をデプロイするには、ファイルパスを以下の Playbook へのオプションとして提供します。
初回の OpenShift Container Platform インストールの場合
ansible-playbook -i <path_to_inventory_file> /usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml ansible-playbook -i <path_to_inventory_file> /usr/share/ansible/openshift-ansible/playbooks/deploy_cluster.yml
既存の OpenShift Container Platform クラスターへのスタンドアロンインストールの場合
ansible-playbook -i <path_to_inventory_file> /usr/share/ansible/openshift-ansible/playbooks/openshift-glusterfs/config.yml
ブリック多重化は、1つのプロセスに複数のブリックを追加できる機能です。これにより、リソースの消費が減少し、同じメモリー消費量で前より多くのブリックを実行できるようになります。各クラスターの Red Hat Gluster Storage ノードのいずれかで以下のコマンドを実行して、brick-multiplexing を有効にします。
以下のコマンドを実行して、ブリックの多重化を有効にします。
# gluster vol set all cluster.brick-multiplex on
以下は例になります。
# gluster vol set all cluster.brick-multiplex on Brick-multiplexing is supported only for container workloads(Independent or Converged mode). Also it is advised to make sure that either all volumes are in stopped state or no bricks are running before this option is modified.Do you still want to continue? (y/n) y volume set: success
heketidb ボリュームを再起動します。
# gluster vol stop heketidbstorage Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y volume stop: heketidbstorage: success
# gluster vol start heketidbstorage volume start: heketidbstorage: success