Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

4.2. ネットワークの設定

本項では、オーバークラウドのネットワーク設定を検証します。これには、特定のネットワークトラフィックを使用し、負荷分散オプションでオーバークラウドを設定できるようにサービスを分離することが含まれます。

4.2.1. ネットワークの分離

director は、分離オーバークラウドネットワークを構成する手段を提供します。つまり、オーバークラウドの環境はネットワークトラフィックの種別を異なるネットワークに分割し、ネットワークトラフィックを特定のネットワークインターフェースまたはボンディングに割り当てます。分離ネットワークの設定後、director は OpenStack サービスが分離ネットワークを使用するように設定します。分離ネットワークが設定されていない場合には、すべてのサービスがプロビジョニングネットワーク上で実行されます。

まず、オーバークラウドには、ネットワークインターフェースのテンプレートセットが必要です。これらのテンプレートをカスタマイズして、ロールごとにノードインターフェースを設定します。これらのテンプレートは YAML 形式の標準の Heat テンプレートです。director には、使用を開始するためのテンプレート例が含まれています。

  • /usr/share/openstack-tripleo-heat-templates/network/config/single-nic-vlans: ロールごとに VLAN 設定を持つ単一 NIC 用のテンプレートが含まれるディレクトリー。
  • /usr/share/openstack-tripleo-heat-templates/network/config/bond-with-vlans: ロールごとにボンディングされた NIC 設定用のテンプレートが含まれるディレクトリー。

ネットワークインターフェースの設定に関する詳しい情報は、『 director のインストールと使用方法』 を参照してください。

次に、ネットワーク環境ファイルを作成します。このファイルは、オーバークラウドのネットワーク環境を記述し、ネットワークインターフェース設定テンプレートをポイントする Heat 環境ファイルです。このファイルは、IP アドレス範囲と共にネットワークのサブネットおよび VLAN も定義します。これらの値は、ローカル環境用にカスタマイズすることができます。

このシナリオでは、/home/stack/network-environment.yaml として保存された以下のネットワーク環境ファイルを使用します。

resource_registry:
  OS::TripleO::BlockStorage::Net::SoftwareConfig: /home/stack/templates/my-overcloud/network/config/bond-with-vlans/cinder-storage.yaml
  OS::TripleO::Compute::Net::SoftwareConfig: /home/stack/templates/my-overcloud/network/config/bond-with-vlans/compute.yaml
  OS::TripleO::Controller::Net::SoftwareConfig: /home/stack/templates/my-overcloud/network/config/bond-with-vlans/controller.yaml
  OS::TripleO::ObjectStorage::Net::SoftwareConfig: /home/stack/templates/my-overcloud/network/config/bond-with-vlans/swift-storage.yaml
  OS::TripleO::CephStorage::Net::SoftwareConfig: /home/stack/templates/my-overcloud/network/config/bond-with-vlans/ceph-storage.yaml

parameter_defaults:
  InternalApiNetCidr: 172.16.20.0/24
  TenantNetCidr: - 172.16.22.0/24
  StorageNetCidr: 172.16.21.0/24
  StorageMgmtNetCidr: 172.16.19.0/24
  ExternalNetCidr: 172.16.23.0/24
  InternalApiAllocationPools: [{'start': '172.16.20.10', 'end': '172.16.20.200'}]
  TenantAllocationPools: [{'start': '172.16.22.10', 'end': '172.16.22.200'}]
  StorageAllocationPools: [{'start': '172.16.21.10', 'end': '172.16.21.200'}]
  StorageMgmtAllocationPools: [{'start': '172.16.19.10', 'end': '172.16.19.200'}]
  # Leave room for floating IPs in the External allocation pool
  ExternalAllocationPools: [{'start': '172.16.23.10', 'end': '172.16.23.60'}]
  # Set to the router gateway on the external network
  ExternalInterfaceDefaultRoute: 172.16.23.1
  # Gateway router for the provisioning network (or Undercloud IP)
  ControlPlaneDefaultRoute: 192.0.2.254
  # The IP address of the EC2 metadata server. Generally the IP of the Undercloud
  EC2MetadataIp: 192.0.2.1
  # Define the DNS servers (maximum 2) for the overcloud nodes
  DnsServers: ["8.8.8.8","8.8.4.4"]
  InternalApiNetworkVlanID: 201
  StorageNetworkVlanID: 202
  StorageMgmtNetworkVlanID: 203
  TenantNetworkVlanID: 204
  ExternalNetworkVlanID: 100
  # Set to "br-ex" if using floating IPs on native VLAN on bridge br-ex
  NeutronExternalNetworkBridge: "''"
  # Customize bonding options if required
  BondInterfaceOvsOptions:
    "bond_mode=balance-tcp lacp=active other-config:lacp-fallback-ab=true"

ネットワーク環境設定に関する詳しい情報は、『 director のインストールと使用方法』 を参照してください。

keystone_admin_ssh の仮想 IP に接続できるように、director ホストが Internal API ネットワークにアクセスできるようにします。