27.3.4.2.7. 例: OpenShift ロギングおよびメトリクス用のコンバージドモード
インベントリーファイルの
[OSEv3:vars]
セクションに次の変数を追加し、設定に合わせてそれらを調整します。[OSEv3:vars] ... openshift_metrics_install_metrics=true openshift_metrics_hawkular_nodeselector={"node-role.kubernetes.io/infra": "true"} 1 openshift_metrics_cassandra_nodeselector={"node-role.kubernetes.io/infra": "true"} 2 openshift_metrics_heapster_nodeselector={"node-role.kubernetes.io/infra": "true"} 3 openshift_metrics_storage_kind=dynamic openshift_metrics_storage_volume_size=10Gi openshift_metrics_cassandra_pvc_storage_class_name="glusterfs-registry-block" 4 openshift_logging_install_logging=true openshift_logging_kibana_nodeselector={"node-role.kubernetes.io/infra": "true"} 5 openshift_logging_curator_nodeselector={"node-role.kubernetes.io/infra": "true"} 6 openshift_logging_es_nodeselector={"node-role.kubernetes.io/infra": "true"} 7 openshift_logging_storage_kind=dynamic openshift_logging_es_pvc_size=10Gi 8 openshift_logging_elasticsearch_storage_type=pvc 9 openshift_logging_es_pvc_storage_class_name="glusterfs-registry-block" 10 openshift_storage_glusterfs_registry_namespace=infra-storage openshift_storage_glusterfs_registry_block_deploy=true openshift_storage_glusterfs_registry_block_host_vol_size=100 openshift_storage_glusterfs_registry_block_storageclass=true openshift_storage_glusterfs_registry_block_storageclass_default=false
- 1 2 3 5 6 7
- 統合 OpenShift Container レジストリー、ロギングおよびメトリクスは、管理者が OpenShift Container Platform クラスターにサービスを提供するためにデプロイしたアプリケーションであるインフラストラクチャーアプリケーション専用のノードで実行することを推奨します。
- 4 10
- ロギングとメトリクスに使用する StorageClass を指定します。この名前は、ターゲットの GlusterFS クラスター (例:
glusterfs-<name>-block
) 名から生成されます。この例ではregistry
にデフォルト設定されています。 - 8
- OpenShift ロギングでは、PVC のサイズを指定する必要があります。ここで指定される値は単なる例であり、推奨される値ではありません。
- 9
- 永続 Elasticsearch ストレージを使用している場合は、ストレージタイプを
pvc
に設定します。
注記これらの変数とその他の変数の詳細は GlusterFS ロールに関する README を参照してください。
[OSEv3:children]
セクションにglusterfs_registry
を追加して、[glusterfs_registry]
グループを有効にします。[OSEv3:children] masters nodes glusterfs_registry
GlusterFS ストレージをホストする各ストレージノードのエントリーを含む
[glusterfs_registry]
セクションを追加します。ノードごとに、glusterfs_devices
を GlusterFS クラスターの一部として完全に管理される raw ブロックデバイスの一覧に設定します。少なくとも 1 つのデバイスを一覧に含める必要があります。各デバイスはパーティションや LVM PV がないベアでなければなりません。変数は次の形式で指定します。<hostname_or_ip> glusterfs_devices='[ "</path/to/device1/>", "</path/to/device2>", ... ]'
以下に例を示します。
[glusterfs_registry] node11.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' node12.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' node13.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]'
[glusterfs_registry]
の下に一覧表示されているホストを[nodes]
グループに追加します。[nodes] ... node11.example.com openshift_node_group_name="node-config-infra" node12.example.com openshift_node_group_name="node-config-infra" node13.example.com openshift_node_group_name="node-config-infra"
注記前述の手順では、インベントリーファイルに追加する必要のある一部のオプションのみを指定しています。Red Hat Gluster Storage をデプロイするには、完全なインベントリーファイルを使用します。
Playbook ディレクトリーに切り替え、インストール Playbook を実行します。インベントリーファイルの相対パスをオプションとして指定します。
OpenShift Container Platform の新規インストール:
$ cd /usr/share/ansible/openshift-ansible $ ansible-playbook -i <path_to_inventory_file> playbooks/prerequisites.yml $ ansible-playbook -i <path_to_inventory_file> playbooks/deploy_cluster.yml
既存の OpenShift Container Platform クラスターへのインストール:
$ cd /usr/share/ansible/openshift-ansible $ ansible-playbook -i <path_to_inventory_file> playbooks/openshift-glusterfs/config.yml