付録B 設定ファイルのサンプルについて

B.1. luks_tang_inventory.yml ファイルについて

B.1.1. ディスク暗号化の設定パラメーター

hc_nodes(必須)

ホストのバックエンド FQDN を使用するハイパーコンバージドホストの一覧およびそのホストの設定詳細。ホスト固有の設定は、ホストのバックエンド FQDN の下に定義されます。すべてのホストに共通する設定は vars: セクションで定義されます。

hc_nodes:
  hosts:
    host1backend.example.com:
      [configuration specific to this host]
    host2backend.example.com:
    host3backend.example.com:
    host4backend.example.com:
    host5backend.example.com:
    host6backend.example.com:
  vars:
    [configuration common to all hosts]
blacklist_mpath_devices(オプション)

デフォルトでは、Red Hat Virtualization Host はマルチパス設定を有効にし、ディスクに基礎となるマルチパス設定がなくても、すべてのディスクに一意のマルチパス名とワールドワイド識別子を提供します。マルチパスデバイス名が一覧表示されるデバイスに使用されていないようにマルチパス設定がない場合は、このセクションを追加してください。ここに記載されていないディスクは、マルチパス構成が利用可能であると想定され、インベントリーファイルの後続のセクションで定義する際には、/dev/sdxの代わりにパスフォーマット/dev/mapper/<WWID>が必要となります。

4 つのデバイス(sda、sdb、sdc、および sdd)を持つサーバーでは、以下の設定は 2 つのデバイスのみをブラックリストに指定します。パスの形式 /dev/mapper/<WWID> は、この一覧に記載されていないデバイスで想定されています。

hc_nodes:
  hosts:
    host1backend.example.com:
      blacklist_mpath_devices:
        - sdb
        - sdc
gluster_infra_luks_devices (required)

暗号化するデバイスの一覧と、各デバイスに使用する暗号化パスフレーズの一覧。

hc_nodes:
  hosts:
    host1backend.example.com:
      gluster_infra_luks_devices:
        - devicename: /dev/sdb
          passphrase: Str0ngPa55#
devicename
デバイスの名前(/dev/sdx 形式)。
passphrase
暗号化を設定する際にこのデバイスに使用するパスワード。NBDE(Network-Bound Disk Encryption)を使用したディスク暗号化が設定されると、新しいランダムキーが生成され、セキュリティーが強化されます。
rootpassphrase(必須)

このホストへのオペレーティングシステムのインストール時に Encrypt my data を選択したときに使用したパスワード。

hc_nodes:
  hosts:
    host1backend.example.com:
      rootpassphrase: h1-Str0ngPa55#
rootdevice(必須)

このホストへのオペレーティングシステムのインストール時に Encrypt my data を選択したときに暗号化されたルートデバイス。

hc_nodes:
  hosts:
    host1backend.example.com:
      rootdevice: /dev/sda2
Networkinterface(必須)

このホストが NBDE 鍵サーバーに到達するために使用するネットワークインターフェース。

hc_nodes:
  hosts:
    host1backend.example.com:
      networkinterface: ens3s0f0
ip_version(必須)

IPv4 ネットワークまたは IPv6 ネットワークを使用するかどうか。有効な値は IPv4 および IPv6 です。デフォルト値はありません。混合ネットワークはサポートされません。

hc_nodes:
  vars:
    ip_version: IPv4
ip_config_method (required)

DHCP または静的ネットワークを使用するかどうか。有効な値は dhcp および static です。デフォルト値はありません。

hc_nodes:
  vars:
    ip_config_method: dhcp

このオプションの他の有効な値は static です。これには、以下の追加パラメーターが必要で、ホストごとに個別に定義されます。

hc_nodes:
  hosts:
    host1backend.example.com:
      ip_config_method: static
      host_ip_addr: 192.168.1.101
      host_ip_prefix: 24
      host_net_gateway: 192.168.1.100
    host2backend.example.com:
      ip_config_method: static
      host_ip_addr: 192.168.1.102
      host_ip_prefix: 24
      host_net_gateway: 192.168.1.100
    host3backend.example.com:
      ip_config_method: static
      host_ip_addr: 192.168.1.102
      host_ip_prefix: 24
      host_net_gateway: 192.168.1.100
gluster_infra_tangservers

http:// を含む NBDE キーサーバーまたはサーバーのアドレス。サーバーがデフォルト(80)以外のポートを使用する場合は、URL の最後に :_port_ を追加してポートを指定します。

hc_nodes:
  vars:
    gluster_infra_tangservers:
      - url: http://key-server1.example.com
      - url: http://key-server2.example.com:80

B.1.2. 例: luks_tang_inventory.yml

動的に割り当てられる IP アドレス

hc_nodes:
  hosts:
    host1-backend.example.com:
      blacklist_mpath_devices:
        - sda
        - sdb
        - sdc
      gluster_infra_luks_devices:
        - devicename: /dev/sdb
          passphrase: dev-sdb-encrypt-passphrase
        - devicename: /dev/sdc
          passphrase: dev-sdc-encrypt-passphrase
      rootpassphrase: host1-root-passphrase
      rootdevice: /dev/sda2
      networkinterface: eth0
    host2-backend.example.com:
      blacklist_mpath_devices:
        - sda
        - sdb
        - sdc
      gluster_infra_luks_devices:
        - devicename: /dev/sdb
          passphrase: dev-sdb-encrypt-passphrase
        - devicename: /dev/sdc
          passphrase: dev-sdc-encrypt-passphrase
      rootpassphrase: host2-root-passphrase
      rootdevice: /dev/sda2
      networkinterface: eth0
    host3-backend.example.com:
      blacklist_mpath_devices:
        - sda
        - sdb
        - sdc
      gluster_infra_luks_devices:
        - devicename: /dev/sdb
          passphrase: dev-sdb-encrypt-passphrase
        - devicename: /dev/sdc
          passphrase: dev-sdc-encrypt-passphrase
      rootpassphrase: host3-root-passphrase
      rootdevice: /dev/sda2
      networkinterface: eth0
  vars:
    ip_version: IPv4
    ip_config_method: dhcp
    gluster_infra_tangservers:
      - url: http://key-server1.example.com:80
      - url: http://key-server2.example.com:80

静的 IP アドレス

hc_nodes:
  hosts:
    host1-backend.example.com:
      blacklist_mpath_devices:
        - sda
        - sdb
        - sdc
      gluster_infra_luks_devices:
        - devicename: /dev/sdb
          passphrase: dev-sdb-encrypt-passphrase
        - devicename: /dev/sdc
          passphrase: dev-sdc-encrypt-passphrase
      rootpassphrase: host1-root-passphrase
      rootdevice: /dev/sda2
      networkinterface: eth0
      host_ip_addr: host1-static-ip
      host_ip_prefix: network-prefix
      host_net_gateway: default-network-gateway
    host2-backend.example.com:
      blacklist_mpath_devices:
        - sda
        - sdb
        - sdc
      gluster_infra_luks_devices:
        - devicename: /dev/sdb
          passphrase: dev-sdb-encrypt-passphrase
        - devicename: /dev/sdc
          passphrase: dev-sdc-encrypt-passphrase
      rootpassphrase: host2-root-passphrase
      rootdevice: /dev/sda2
      networkinterface: eth0
      host_ip_addr: host1-static-ip
      host_ip_prefix: network-prefix
      host_net_gateway: default-network-gateway
    host3-backend.example.com:
      blacklist_mpath_devices:
        - sda
        - sdb
        - sdc
      gluster_infra_luks_devices:
        - devicename: /dev/sdb
          passphrase: dev-sdb-encrypt-passphrase
        - devicename: /dev/sdc
          passphrase: dev-sdc-encrypt-passphrase
      rootpassphrase: host3-root-passphrase
      rootdevice: /dev/sda2
      networkinterface: eth0
      host_ip_addr: host1-static-ip
      host_ip_prefix: network-prefix
      host_net_gateway: default-network-gateway
  vars:
    ip_version: IPv4
    ip_config_method: static
    gluster_infra_tangservers:
      - url: http://key-server1.example.com:80
      - url: http://key-server2.example.com:80