4.3. レジストリーを使用したコンバージドモードでの Red Hat Openshift Container Storage のデプロイ

  1. インベントリーファイルで、[OSEv3:vars] セクションに以下の変数を追加し、設定に合わせてそれらを調整します。

    openshift_storage_glusterfs_registry_namespace=app-storage
    openshift_storage_glusterfs_registry_storageclass=true
    openshift_storage_glusterfs_registry_storageclass_default=false
    openshift_storage_glusterfs_registry_block_deploy=true
    openshift_storage_glusterfs_registry_block_host_vol_create=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
  2. インベントリーファイルの [OSEv3:vars] に以下の変数を設定します。

    [OSEv3:vars]
    ...
    openshift_hosted_registry_storage_kind=glusterfs
    openshift_hosted_registry_storage_volume_size=5Gi
    openshift_hosted_registry_selector='node-role.kubernetes.io/infra=true'
  3. [OSEv3:children] セクションに glusterfs_registry を追加して、`[glusterfs_registry]` グループを有効にします。

    [OSEv3:children]
    masters
    etcd
    nodes
    glusterfs_registry
  4. GlusterFS ストレージをホストする各ストレージノードのエントリーを含む [glusterfs_registry] セクションを追加します。ノードごとに、 glusterfs_devices を GlusterFS クラスターの一部として完全に管理される raw ブロックデバイスの一覧に設定します。少なくとも 1 つのデバイスを一覧に含める必要があります。各デバイスはパーティションや LVM PV がないベアでなければなりません。変数は次の形式で指定します。

    <hostname_or_ip> glusterfs_zone=<zone_number> glusterfs_devices='[ "</path/to/device1/>", "</path/to/device2>", ... ]'

    以下に例を示します。

    [glusterfs_registry]
    node106.example.com glusterfs_zone=1 glusterfs_devices='["/dev/sdd"]'
    node107.example.com glusterfs_zone=2 glusterfs_devices='["/dev/sdd"]'
    node108.example.com glusterfs_zone=3 glusterfs_devices='["/dev/sdd"]'
    • [glusterfs_registry] の下に一覧表示されているホストを [nodes] グループに追加します。

      [nodes]
      ...
      node106.example.com openshift_node_group_name="node-config-compute"
      node107.example.com openshift_node_group_name="node-config-compute"
      node108.example.com openshift_node_group_name="node-config-compute"
  5. 上記の手順では、より大きな完全なインベントリファイルに追加する必要のあるオプションについて詳しく説明しています。完全なインベントリーファイルを使用して {gluster} をデプロイするには、ファイルパスを以下の Playbook へのオプションとして提供します。

    1. 初回の 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
    2. 既存の OpenShift Container Platform クラスターへのスタンドアロンインストールの場合

      ansible-playbook -i <path_to_inventory_file> /usr/share/ansible/openshift-ansible/playbooks/openshift-glusterfs/config.yml
  6. デプロイメントを確認するには、「デプロイメントの確認」 を参照してください。