第6章 デプロイメントの例
6.1. テナントネットワークを使用した模範的なインストールシナリオ
本項では、OpenStack を使用した実稼働環境における OpenDaylight のインストールの例を考察します。このシナリオでは、テナントトラフィックの分離にトンネリング (VXLAN) が使用されます。
6.1.1. 物理トポロジー
このシナリオのトポロジーは、6 つのノードで構成されます。
- 1 x director アンダークラウドノード
- 3 x OpenStack オーバークラウドコントローラー。OpenStack サービスに加えて OpenDaylight SDN コントローラーがインストール済み。
- 2 x OpenStack オーバークラウドコンピュートノード
6.1.2. 物理ネットワーク環境のプランニング
オーバークラウドのコントローラーノードは、それぞれ、3 つのネットワークインターフェースカード (NIC) を使用します。
| 名前 | 目的 |
|---|---|
|
nic1 |
Management ネットワーク (例: SSH を介したノードへのアクセス) |
|
nic2 |
テナント (VXLAN) キャリア、Provisioning (PXE、DHCP)、Internal API ネットワーク |
|
nic3 |
パブリック API のネットワークアクセス |
オーバークラウドのコンピュートノードには 3 つの NIC が実装されます。
| 名前 | 目的 |
|---|---|
|
nic1 |
Management ネットワーク |
|
nic2 |
Tenant キャリアー、Provisioning、Internal API ネットワーク |
|
nic3 |
External (Floating IP) ネットワーク |
アンダークラウドノードには 2 つの NIC が実装されます。
| 名前 | 目的 |
|---|---|
|
nic1 |
Management ネットワークに使用 |
|
nic2 |
Provisioning ネットワークに使用 |
6.1.3. NIC の接続性のプランニング
この場合は、環境ファイルは番号付けられた抽象的なインターフェースデバイス名 (nic1、nic2) を使用し、ホストのオペレーティングシステムで提示されている実際のデバイス名 (例: eth0、eno2 など) は使用しません。同じロールに属するホストに全く同じネットワークインターフェースデバイス名は必要ありません。 1 つのホストが em1 と em2 のインターフェースを使用して、他のホストが eno1 と eno2 を使用しても問題はありません。各 NIC は nic1 および nic2 と呼ばれます。
抽象化された NIC スキームでは、稼働中かつ接続済みのインターフェースにのみ依存します。ホストによってインターフェースが異なる場合には、ホストを接続するのに必要な最小限のインターフェース数を使用すれば十分です。たとえば、1 台のホストに物理インターフェースが 4 つあり、他のホストには 6 つある場合、nic1、nic2、nic3、nic4 のみを使用して、両ホストに 4 本のケーブルを接続します。
6.1.4. ネットワーク、VLAN、IP のプランニング
このシナリオでは、ネットワーク分離を使用して、Management、Provisioning、Internal API、Tenant、Public API、Floating IP のネットワークトラフィックを分離します。
図6.1 このシナリオで使用するネットワークトポロジーの詳細

以下の表には、各ネットワークに関連付けられる VLAN ID と IP サブネットをまとめています。
| ネットワーク | VLAN ID | IP サブネット |
|---|---|---|
|
プロビジョニング |
ネイティブ |
192.0.5.0/24 |
|
Internal API |
600 |
172.17.0.0/24 |
|
Tenant |
603 |
172.16.0.0/24 |
|
パブリック API |
411 |
10.35.184.144/28 |
|
Floating IP |
412 |
10.35.186.146/28 |
OpenStack Platform director は br-isolated OVS ブリッジを作成し、ネットワーク設定ファイルの定義に従って各ネットワークの VLAN インターフェースを追加します。director は br-ex ブリッジも作成して、関連するネットワークインターフェースが接続されます。
ホスト間の接続性を提供する物理ネットワークスイッチが、VLAN ID を適用するように適切に設定されていることを確認します。ホストに接続する全スイッチポートは、VLAN を使用して「trunk」として設定する必要があります。ここで「trunk」という用語は、複数の VLAN ID が同じポートを通過できるポートという意味で使用しています。
物理スイッチの設定に関する内容は、本書の対象範囲外です。
network-environment.yaml ファイルの TenantNetworkVlanID 属性を使用して、VXLAN トンネリングを使用する場合の Tenant ネットワークの VLAN タグを定義することができます (例: VXLAN テナントのトラフィックが VLAN タグ付けされた下層のネットワーク上で転送される)。Tenant ネットワークがネイティブ VLAN 上で実行されるようにした方が望ましい場合には、この値を空にすることも可能です。また、VLAN テナント種別のネットワークを使用する場合には、TenantNetworkVlanID に指定されている値以外の VLAN タグを使用することができる点にも注意してください。
6.1.5. このシナリオで使用する OpenDaylight の設定ファイル
このシナリオにおける OpenStack と OpenDaylight のデプロイには、アンダークラウドで以下のデプロイメントコマンドを実行しています。
$ openstack overcloud deploy --debug \ --templates \ --environment-file "$HOME/extra_env.yaml" \ --libvirt-type kvm \ -e /home/stack/baremetal-vlan/network-environment.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight.yaml \ --log-file overcloud_install.log &> overcloud_install.log
また、本ガイドでは、このシナリオに使用した設定ファイルとその内容を記載し、使用した設定についても説明しています。
6.1.5.1. extra_env.yaml ファイル
このファイルにはパラメーターが 1 つしかありません。
parameter_defaults:
OpenDaylightProviderMappings: 'datacentre:br-ex,tenant:br-isolated'
これらは、OpenDaylight によって制御される各ノードのマッピングです。物理ネットワーク datacenter は、br-ex OVS ブリッジにマッピングされ、Tenant ネットワークのトラフィックは br-isolated OVS ブリッジにマッピングされます。
6.1.5.2. undercloud.conf ファイル
このファイルは。/home/stack/baremetal-vlan/ ディレクトリーにあります。
ファイルのパスは、カスタマイズされたバージョンの設定ファイルをポイントしています。
[DEFAULT] local_ip = 192.0.5.1/24 network_gateway = 192.0.5.1 undercloud_public_vip = 192.0.5.2 undercloud_admin_vip = 192.0.5.3 local_interface = eno2 network_cidr = 192.0.5.0/24 masquerade_network = 192.0.5.0/24 dhcp_start = 192.0.5.5 dhcp_end = 192.0.5.24 inspection_iprange = 192.0.5.100,192.0.5.120
上記の例では、Provisioning ネットワーク用の 192.0.5.0/24 サブネットが使用されています。物理インターフェース eno2 はアンダークラウドノードでプロビジョニング用に使用されます。
6.1.5.3. network-environment.yaml ファイル
これは、ネットワークを設定するメインのファイルで、/home/stack/baremetal-vlan/ ディレクトリーにあります。以下のファイルでは、VLAN ID と IP サブネットが異なるネットワークとプロバイダーマッピングに指定されます。nic-configs ディレクトリー内の controller.yaml および compute.yaml は、コントローラーノードとコンピュートノードのネットワーク設定を指定するのに使用されます。
この例では、コントローラーノードの数 (3) とコンピュートノードの数 (2) が指定されています。
resource_registry:
# Specify the relative/absolute path to the config files you want to use for
# override the default.
OS1::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
# Network isolation configuration
# Service section
# If some service should be disable, use the following example
# OS::TripleO::Network::Management: OS::Heat::None
OS::TripleO::Network::External: /usr/share/openstack-tripleo-heat-templates/network/external.yaml
OS::TripleO::Network::InternalApi: /usr/share/openstack-tripleo-heat-templates/network/internal_api.yaml
OS::TripleO::Network::Tenant: /usr/share/openstack-tripleo-heat-templates/network/tenant.yaml
OS::TripleO::Network::Management: OS::Heat::None
OS::TripleO::Network::StorageMgmt: OS::Heat::None
OS::TripleO::Network::Storage: OS::Heat::None
# Port assignments for the VIP addresses
OS::TripleO::Network::Ports::ExternalVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
OS::TripleO::Network::Ports::InternalApiVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/internal_api.yaml
OS::TripleO::Network::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/vip.yaml
OS::TripleO::Network::Ports::StorageVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Network::Ports::StorageMgmtVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
# Port assignments for the controller role
OS::TripleO::Controller::Ports::ExternalPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
OS::TripleO::Controller::Ports::InternalApiPort: /usr/share/openstack-tripleo-heat-templates/network/ports/internal_api.yaml
OS::TripleO::Controller::Ports::TenantPort: /usr/share/openstack-tripleo-heat-templates/network/ports/tenant.yaml
OS::TripleO::Controller::Ports::ManagementPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Controller::Ports::StoragePort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Controller::Ports::StorageMgmtPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
# Port assignments for the Compute role
OS::TripleO::Compute::Ports::ExternalPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
OS::TripleO::Compute::Ports::InternalApiPort: /usr/share/openstack-tripleo-heat-templates/network/ports/internal_api.yaml
OS::TripleO::Compute::Ports::TenantPort: /usr/share/openstack-tripleo-heat-templates/network/ports/tenant.yaml
OS::TripleO::Compute::Ports::ManagementPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Compute::Ports::StoragePort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Compute::Ports::StorageMgmtPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
# Port assignments for service virtual IP addresses for the controller role
OS::TripleO::Controller::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/vip.yaml
parameter_defaults:
# Customize all these values to match the local environment
InternalApiNetCidr: 172.17.0.0/24
TenantNetCidr: 172.16.0.0/24
ExternalNetCidr: 10.35.184.144/28
# CIDR subnet mask length for provisioning network
ControlPlaneSubnetCidr: '24'
InternalApiAllocationPools: [{'start': '172.17.0.10', 'end': '172.17.0.200'}]
TenantAllocationPools: [{'start': '172.16.0.100', 'end': '172.16.0.200'}]
# Use an External allocation pool which will leave room for floating IP addresses
ExternalAllocationPools: [{'start': '10.35.184.146', 'end': '10.35.184.157'}]
# Set to the router gateway on the external network
ExternalInterfaceDefaultRoute: 10.35.184.158
# Gateway router for the provisioning network (or Undercloud IP)
ControlPlaneDefaultRoute: 192.0.5.254
# Generally the IP of the Undercloud
EC2MetadataIp: 192.0.5.1
InternalApiNetworkVlanID: 600
TenantNetworkVlanID: 603
ExternalNetworkVlanID: 411
# Define the DNS servers (maximum 2) for the overcloud nodes
DnsServers: ["10.35.28.28","8.8.8.8"]
# May set to br-ex if using floating IP addresses only on native VLAN on bridge br-ex
NeutronExternalNetworkBridge: "''"
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling.
NeutronTunnelTypes: ''
# The tenant network type for Neutron (vlan or vxlan).
NeutronNetworkType: 'vxlan'
# The OVS logical->physical bridge mappings to use.
# NeutronBridgeMappings: 'datacentre:br-ex,tenant:br-isolated'
# The Neutron ML2 and OpenVSwitch vlan mapping range to support.
NeutronNetworkVLANRanges: 'datacentre:412:412'
# Nova flavor to use.
OvercloudControlFlavor: baremetal
OvercloudComputeFlavor: baremetal
# Number of nodes to deploy.
ControllerCount: 3
ComputeCount: 2
# Sets overcloud nodes custom names
# http://docs.openstack.org/developer/tripleo-docs/advanced_deployment/node_placement.html#custom-hostnames
ControllerHostnameFormat: 'controller-%index%'
ComputeHostnameFormat: 'compute-%index%'
CephStorageHostnameFormat: 'ceph-%index%'
ObjectStorageHostnameFormat: 'swift-%index%'6.1.5.4. controller.yaml ファイル
このファイルは、/home/stack/baremetal-vlan/nic-configs/ ディレクトリー内にあります。この例では、br-isolated と br-ex の 2 つのスイッチを定義しています。nic2 は br-isolated の下、nic3 は br-ex の下です。
heat_template_version: pike
description: >
Software Config to drive os-net-config to configure VLANs for the
controller role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal API network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet: # Only populated when including environments/network-management.yaml
default: ''
description: IP address/subnet on the management network
type: string
ExternalNetworkVlanID:
default: ''
description: Vlan ID for the external network traffic.
type: number
InternalApiNetworkVlanID:
default: ''
description: Vlan ID for the internal_api network traffic.
type: number
TenantNetworkVlanID:
default: ''
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID:
default: 23
description: Vlan ID for the management network traffic.
type: number
ExternalInterfaceDefaultRoute:
default: ''
description: default route for the external network
type: string
ControlPlaneSubnetCidr: # Override this with parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.
type: string
DnsServers: # Override this with parameter_defaults
default: []
description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
type: comma_delimited_list
EC2MetadataIp: # Override this with parameter_defaults
description: The IP address of the EC2 metadata server.
type: string
resources:
OsNetConfigImpl:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
os_net_config:
network_config:
-
type: ovs_bridge
name: br-isolated
use_dhcp: false
dns_servers: {get_param: DnsServers}
addresses:
-
ip_netmask:
list_join:
- '/'
- - {get_param: ControlPlaneIp}
- {get_param: ControlPlaneSubnetCidr}
routes:
-
ip_netmask: 169.254.169.254/32
next_hop: {get_param: EC2MetadataIp}
members:
-
type: interface
name: nic2
# force the MAC address of the bridge to this interface
primary: true
-
type: vlan
vlan_id: {get_param: InternalApiNetworkVlanID}
addresses:
-
ip_netmask: {get_param: InternalApiIpSubnet}
-
type: vlan
vlan_id: {get_param: TenantNetworkVlanID}
addresses:
-
ip_netmask: {get_param: TenantIpSubnet}
-
type: ovs_bridge
name: br-ex
use_dhcp: false
dns_servers: {get_param: DnsServers}
members:
-
type: interface
name: nic3
# force the MAC address of the bridge to this interface
-
type: vlan
vlan_id: {get_param: ExternalNetworkVlanID}
addresses:
-
ip_netmask: {get_param: ExternalIpSubnet}
routes:
-
default: true
next_hop: {get_param: ExternalInterfaceDefaultRoute}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value: {get_resource: OsNetConfigImpl}6.1.5.5. compute.yaml ファイル
このファイルは /home/stack/baremetal-vlan/nic-configs/ ディレクトリーにあります。コンピュートのオプションの大半はコントローラーのオプションと同じです。この例では、nic3 は、外部接続 (Floating IP ネットワーク) に使用される br-ex の下にあります。
heat_template_version: pike
description: >
Software Config to drive os-net-config to configure VLANs for the
Compute role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal API network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet: # Only populated when including environments/network-management.yaml
default: ''
description: IP address/subnet on the management network
type: string
InternalApiNetworkVlanID:
default: ''
description: Vlan ID for the internal_api network traffic.
type: number
TenantNetworkVlanID:
default: ''
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID:
default: 23
description: Vlan ID for the management network traffic.
type: number
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage mgmt network
type: string
ControlPlaneSubnetCidr: # Override this with parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.
type: string
ControlPlaneDefaultRoute: # Override this with parameter_defaults
description: The default route of the control plane network.
type: string
DnsServers: # Override this with parameter_defaults
default: []
description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
type: comma_delimited_list
EC2MetadataIp: # Override this with parameter_defaults
description: The IP address of the EC2 metadata server.
type: string
ExternalInterfaceDefaultRoute:
default: ''
description: default route for the external network
type: string
resources:
OsNetConfigImpl:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
os_net_config:
network_config:
-
type: ovs_bridge
name: br-isolated
use_dhcp: false
dns_servers: {get_param: DnsServers}
addresses:
-
ip_netmask:
list_join:
- '/'
- - {get_param: ControlPlaneIp}
- {get_param: ControlPlaneSubnetCidr}
routes:
-
ip_netmask: 169.254.169.254/32
next_hop: {get_param: EC2MetadataIp}
-
next_hop: {get_param: ControlPlaneDefaultRoute}
members:
-
type: interface
name: nic2
# force the MAC address of the bridge to this interface
primary: true
-
type: vlan
vlan_id: {get_param: InternalApiNetworkVlanID}
addresses:
-
ip_netmask: {get_param: InternalApiIpSubnet}
-
type: vlan
vlan_id: {get_param: TenantNetworkVlanID}
addresses:
-
ip_netmask: {get_param: TenantIpSubnet}
-
type: ovs_bridge
name: br-ex
use_dhcp: false
members:
-
type: interface
name: nic3
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value: {get_resource: OsNetConfigImpl}6.1.6. このシナリオで使用する Red Hat OpenStack Platform director の設定ファイル
6.1.6.1. neutron.conf ファイル
このファイルは、/etc/neutron/ ディレクトリーにあり、以下の情報が含まれています。
[DEFAULT] service_plugins=odl-router_v2,trunk
6.1.6.2. ml2_conf.ini ファイル
このファイルは、/etc/neutron/plugins/ml2/ ディレクトリーにあり、以下の情報が含まれています。
[ml2] type_drivers = vxlan,vlan,flat,gre tenant_network_types = vxlan mechanism_drivers = opendaylight_v2 [ml2_type_vlan] network_vlan_ranges = datacentre:412:412 [ml2_odl] password = admin username = admin url = http://172.17.1.18:8081/controller/nb/v2/neutron
- [ml2] セクションの下には、ネットワーク種別として VXLAN が使用されており、opendaylight_v2 メカニズムドライバーが指定されている点に注意してください。
- [ml2_type_vlan] の下には、network-environment.yaml ファイルで設定されているのと同じマッピングを指定する必要があります。
- [ml2_odl] の下には、OpenDaylightController にアクセスするための設定が記載されているはずです。
この情報を使用して、OpenDaylight コントローラーへのアクセスを確認することができます。
$ curl -H "Content-Type:application/json" -u admin:admin http://172.17.1.18:8081/controller/nb/v2/neutron/networks
6.2. プロバイダーネットワークを使用する模範的なインストールシナリオ
このインストールシナリオでは、テナントネットワークではなく、プロバイダーネットワークを使用した OpenStack と OpenDaylight の例を示します。外部の neutron プロバイダーネットワークは、レイヤー 3 (L3) およびその他のネットワークサービスを提供する物理ネットワークインフラストラクチャーに仮想マシンインスタンスをブリッジングします。大半の場合は、プロバイダーネットワークは、VLAN ID を使用してレイヤー 2 (L2) セグメンテーションを実装します。プロバイダーネットワークは、プロバイダーネットワーク上で仮想マシンインスタンスの起動をサポートする各コンピュートノードでプロバイダーブリッジにマッピングします。
6.2.1. 物理トポロジー
このシナリオのトポロジーは、6 つのノードで構成されます。
- 1 x director アンダークラウドノード
- 3 x OpenStack オーバークラウドコントローラー。OpenStack サービスに加えて OpenDaylight SDN コントローラーがインストール済み。
- 2 x OpenStack オーバークラウドコンピュートノード
6.2.2. 物理ネットワーク環境のプランニング
オーバークラウドコントローラーノードはそれぞれ、4 つのネットワークインターフェースカード (NIC) を使用します。
| 名前 | 目的 |
|---|---|
|
nic1 |
Management ネットワーク (例: SSH を介したノードへのアクセス) |
|
nic2 |
Provisioning (PXE、DHCP)、Internal API ネットワーク |
|
nic3 |
Tenant ネットワーク |
|
nic4 |
Public API ネットワーク、Floating IP ネットワーク |
オーバークラウドのコンピュートノードには、4 つの NIC が実装されます。
| 名前 | 目的 |
|---|---|
|
nic1 |
Management ネットワーク |
|
nic2 |
Provisioning および Internal API ネットワーク |
|
nic3 |
Tenant ネットワーク |
|
nic4 |
Floating IP ネットワーク |
アンダークラウドノードには 2 つの NIC が実装されます。
| 名前 | 目的 |
|---|---|
|
nic1 |
Management ネットワークに使用 |
|
nic2 |
Provisioning ネットワークに使用 |
6.2.3. NIC の接続性のプランニング
この場合は、環境ファイルは番号付けられた抽象的なインターフェースデバイス名 (nic1、nic2) を使用し、ホストのオペレーティングシステムで提示されている実際のデバイス名 (例: eth0、eno2 など) は使用しません。同じロールに属するホストに全く同じネットワークインターフェースデバイス名は必要ありません。 1 つのホストが em1 と em2 のインターフェースを使用して、他のホストが eno1 と eno2 を使用しても問題はありません。各 NIC は nic1 および nic2 と呼ばれます。
抽象化された NIC スキームでは、稼働中かつ接続済みのインターフェースにのみ依存します。ホストによってインターフェースが異なる場合には、ホストを接続するのに必要な最小限のインターフェース数を使用すれば十分です。たとえば、1 台のホストに物理インターフェースが 4 つあり、他のホストには 6 つある場合、nic1、nic2、nic3、nic4 のみを使用して、両ホストに 4 本のケーブルを接続します。
6.2.4. ネットワーク、VLAN、IP のプランニング
このシナリオでは、ネットワーク分離を使用して、Management、Provisioning、Internal API、Tenant、Public API、Floating IP のネットワークトラフィックを分離します。
図6.2 このシナリオで使用するネットワークトポロジーの詳細

以下の表には、各ネットワークに関連付けられる VLAN ID と IP サブネットをまとめています。
| ネットワーク | VLAN ID | IP サブネット |
|---|---|---|
|
プロビジョニング |
ネイティブ |
192.0.5.0/24 |
|
Internal API |
600 |
172.17.0.0/24 |
|
Tenant |
554,555-601 |
172.16.0.0/24 |
|
パブリック API |
552 |
192.168.210.0/24 |
|
Floating IP |
553 |
10.35.186.146/28 |
OpenStack Platform director は br-isolated OVS ブリッジを作成し、ネットワーク設定ファイルの定義に従って各ネットワークの VLAN インターフェースを追加します。br-ex ブリッジも director によって自動的に作成され、関連するネットワークインターフェースが接続されます。
ホスト間の接続性を提供する物理ネットワークスイッチが、VLAN ID を適用するように適切に設定されていることを確認します。ホストに接続する全スイッチポートは、VLAN を使用して trunk として設定する必要があります。ここで「trunk」という用語は、複数の VLAN ID が同じポートを通過できるポートという意味で使用しています。
物理スイッチの設定に関する内容は、本書の対象範囲外です。
network-environment.yaml の TenantNetworkVlanID で、VXLAN トンネリングを使用する場合の Tenant ネットワークの VLAN タグを定義することができます (VXLAN テナントのトラフィックが VLAN タグ付けされた下層のネットワーク上で転送される)。Tenant ネットワークがネイティブ VLAN 上で実行されるようにした方が望ましい場合には、この値を空にすることも可能です。また、VLAN テナント種別のネットワークを使用する場合には、 TenantNetworkVlanID に指定されている値以外の VLAN タグを使用することができる点にも注意してください。
6.2.5. このシナリオで使用する OpenDaylight の設定ファイル
このシナリオにおける OpenStack と OpenDaylight のデプロイには、アンダークラウドで以下のデプロイメントコマンドを実行しています。
$ openstack overcloud deploy --debug \ --templates \ --environment-file "$HOME/extra_env.yaml" \ --libvirt-type kvm \ -e /home/stack/baremetal-vlan/network-environment.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight.yaml \ --log-file overcloud_install.log &> overcloud_install.log
本ガイドには、このシナリオの設定ファイル、設定ファイルの内容、設定に関する説明も記載しています。
6.2.5.1. extra_env.yaml ファイル
このファイルにはパラメーターが 1 つしかありません。
parameter_defaults:
OpenDaylightProviderMappings: 'datacentre:br-ex,tenant:br-vlan'
これらは、OpenDaylight によって制御される各ノードのマッピングです。物理ネットワーク datacenter は、br-ex OVS ブリッジにマッピングされ、Tenant ネットワークのトラフィックは br-vlan OVS ブリッジにマッピングされます。
6.2.5.2. undercloud.conf ファイル
このファイルは /home/stack/ ディレクトリー内にあります。
ファイルのパスは、カスタマイズされたバージョンの設定ファイルをポイントしています。
[DEFAULT] local_ip = 192.0.5.1/24 network_gateway = 192.0.5.1 undercloud_public_vip = 192.0.5.2 undercloud_admin_vip = 192.0.5.3 local_interface = eno2 network_cidr = 192.0.5.0/24 masquerade_network = 192.0.5.0/24 dhcp_start = 192.0.5.5 dhcp_end = 192.0.5.24 inspection_iprange = 192.0.5.100,192.0.5.120
上記の例では、Provisioning ネットワーク用の 192.0.5.0/24 サブネットが使用されています。物理インターフェース eno2 はアンダークラウドノードでプロビジョニング用に使用されます。
6.2.5.3. network-environment.yaml ファイル
これは、ネットワークを設定する主要なファイルで、/home/stack/baremetal-vlan/ ディレクトリーにあります。以下のファイルでは、VLAN ID と IP サブネットが異なるネットワークとプロバイダーマッピングに指定されます。nic-configs ディレクトリー内の controller.yaml および compute.yaml ファイルは、コントローラーノードとコンピュートノードのネットワーク設定を指定するのに使用されます。
この例では、コントローラーノードの数 (3) とコンピュートノードの数 (2) が指定されています。
resource_registry:
# Specify the relative/absolute path to the config files you want to use for override the default.
OS::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
# Network isolation configuration
# Service section
# If some service should be disabled, use the following example
# OS::TripleO::Network::Management: OS::Heat::None
OS::TripleO::Network::External: /usr/share/openstack-tripleo-heat-templates/network/external.yaml
OS::TripleO::Network::InternalApi: /usr/share/openstack-tripleo-heat-templates/network/internal_api.yaml
OS::TripleO::Network::Tenant: /usr/share/openstack-tripleo-heat-templates/network/tenant.yaml
OS::TripleO::Network::Management: OS::Heat::None
OS::TripleO::Network::StorageMgmt: OS::Heat::None
OS::TripleO::Network::Storage: OS::Heat::None
# Port assignments for the VIPs
OS::TripleO::Network::Ports::ExternalVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
OS::TripleO::Network::Ports::InternalApiVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/internal_api.yaml
OS::TripleO::Network::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/vip.yaml
OS::TripleO::Network::Ports::StorageVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Network::Ports::StorageMgmtVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
# Port assignments for the controller role
OS::TripleO::Controller::Ports::ExternalPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
OS::TripleO::Controller::Ports::InternalApiPort: /usr/share/openstack-tripleo-heat-templates/network/ports/internal_api.yaml
OS::TripleO::Controller::Ports::TenantPort: /usr/share/openstack-tripleo-heat-templates/network/ports/tenant.yaml
OS::TripleO::Controller::Ports::ManagementPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Controller::Ports::StoragePort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Controller::Ports::StorageMgmtPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
# Port assignments for the compute role
OS::TripleO::Compute::Ports::ExternalPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
OS::TripleO::Compute::Ports::InternalApiPort: /usr/share/openstack-tripleo-heat-templates/network/ports/internal_api.yaml
OS::TripleO::Compute::Ports::TenantPort: /usr/share/openstack-tripleo-heat-templates/network/ports/tenant.yaml
OS::TripleO::Compute::Ports::ManagementPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Compute::Ports::StoragePort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Compute::Ports::StorageMgmtPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
# Port assignments for service virtual IPs for the controller role
OS::TripleO::Controller::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/vip.yaml
OS::TripleO::NodeUserData: /home/stack/baremetal-vlan/firstboot-config.yaml
parameter_defaults:
# Customize all these values to match the local environment
InternalApiNetCidr: 172.17.0.0/24
TenantNetCidr: 172.16.0.0/24
ExternalNetCidr: 192.168.210.0/24
# CIDR subnet mask length for provisioning network
ControlPlaneSubnetCidr: '24'
InternalApiAllocationPools: [{'start': '172.17.0.10', 'end': '172.17.0.200'}]
TenantAllocationPools: [{'start': '172.16.0.100', 'end': '172.16.0.200'}]
# Use an External allocation pool which will leave room for floating IPs
ExternalAllocationPools: [{'start': '192.168.210.2', 'end': '192.168.210.12'}]
# Set to the router gateway on the external network
ExternalInterfaceDefaultRoute: 192.168.210.1
# Gateway router for the provisioning network (or Undercloud IP)
ControlPlaneDefaultRoute: 192.0.5.1
# Generally the IP of the Undercloud
EC2MetadataIp: 192.0.5.1
InternalApiNetworkVlanID: 600
TenantNetworkVlanID: 554
ExternalNetworkVlanID: 552
# Define the DNS servers (maximum 2) for the overcloud nodes
DnsServers: ["10.35.28.28","8.8.8.8"]
# May set to br-ex if using floating IPs only on native VLAN on bridge br-ex
NeutronExternalNetworkBridge: "''"
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling.
NeutronTunnelTypes: ''
# The tenant network type for Neutron (vlan or vxlan).
NeutronNetworkType: 'vlan'
# The OVS logical->physical bridge mappings to use.
# NeutronBridgeMappings: 'datacentre:br-ex,tenant:br-isolated'
# The Neutron ML2 and OpenVSwitch vlan mapping range to support.
NeutronNetworkVLANRanges: 'datacentre:552:553,tenant:555:601'
# Nova flavor to use.
OvercloudControlFlavor: baremetal
OvercloudComputeFlavor: baremetal
# Number of nodes to deploy.
ControllerCount: 3
ComputeCount: 2
# Sets overcloud nodes custom names
# http://docs.openstack.org/developer/tripleo-docs/advanced_deployment/node_placement.html#custom-hostnames
ControllerHostnameFormat: 'controller-%index%'
ComputeHostnameFormat: 'compute-%index%'
CephStorageHostnameFormat: 'ceph-%index%'
ObjectStorageHostnameFormat: 'swift-%index%'6.2.5.4. controller.yaml ファイル
このファイルは、/home/stack/baremetal-vlan/nic-configs/ ディレクトリーにあります。この例では、br-isolated、br-vlan、br-ex のスイッチを定義しています。nic2 は br-isolated の下、nic3 は br-ex の下です。
heat_template_version: pike
description: >
Software Config to drive os-net-config to configure VLANs for the
controller role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal API network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet: # Only populated when including environments/network-management.yaml
default: ''
description: IP address/subnet on the management network
type: string
ExternalNetworkVlanID:
default: ''
description: Vlan ID for the external network traffic.
type: number
InternalApiNetworkVlanID:
default: ''
description: Vlan ID for the internal_api network traffic.
type: number
TenantNetworkVlanID:
default: ''
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID:
default: 23
description: Vlan ID for the management network traffic.
type: number
ExternalInterfaceDefaultRoute:
default: ''
description: default route for the external network
type: string
ControlPlaneSubnetCidr: # Override this with parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.
type: string
DnsServers: # Override this with parameter_defaults
default: []
description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
type: comma_delimited_list
EC2MetadataIp: # Override this with parameter_defaults
description: The IP address of the EC2 metadata server.
type: string
resources:
OsNetConfigImpl:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
os_net_config:
network_config:
-
type: interface
name: nic1
use_dhcp: false
-
type: ovs_bridge
name: br-isolated
use_dhcp: false
dns_servers: {get_param: DnsServers}
addresses:
-
ip_netmask:
list_join:
- '/'
- - {get_param: ControlPlaneIp}
- {get_param: ControlPlaneSubnetCidr}
routes:
-
ip_netmask: 169.254.169.254/32
next_hop: {get_param: EC2MetadataIp}
members:
-
type: interface
name: nic2
# force the MAC address of the bridge to this interface
primary: true
-
type: vlan
vlan_id: {get_param: InternalApiNetworkVlanID}
addresses:
-
ip_netmask: {get_param: InternalApiIpSubnet}
-
type: ovs_bridge
name: br-ex
use_dhcp: false
dns_servers: {get_param: DnsServers}
members:
-
type: interface
name: nic4
# force the MAC address of the bridge to this interface
-
type: vlan
vlan_id: {get_param: ExternalNetworkVlanID}
addresses:
-
ip_netmask: {get_param: ExternalIpSubnet}
routes:
-
default: true
next_hop: {get_param: ExternalInterfaceDefaultRoute}
-
type: ovs_bridge
name: br-vlan
use_dhcp: false
dns_servers: {get_param: DnsServers}
members:
-
type: interface
name: nic3
-
type: vlan
vlan_id: {get_param: TenantNetworkVlanID}
addresses:
-
ip_netmask: {get_param: TenantIpSubnet}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value: {get_resource: OsNetConfigImpl}6.2.5.5. compute.yaml ファイル
このファイルは /home/stack/baremetal-vlan/nic-configs/ ディレクトリーにあります。コンピュートのオプションの大半はコントローラーのオプションと同じです。この例では、nic4 は、外部接続 (Floating IP ネットワーク) に使用される br-ex の下にあります。
heat_template_version: pike
description: >
Software Config to drive os-net-config to configure VLANs for the
compute role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal API network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet: # Only populated when including environments/network-management.yaml
default: ''
description: IP address/subnet on the management network
type: string
InternalApiNetworkVlanID:
default: ''
description: Vlan ID for the internal_api network traffic.
type: number
TenantNetworkVlanID:
default: ''
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID:
default: 23
description: Vlan ID for the management network traffic.
type: number
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage mgmt network
type: string
ControlPlaneSubnetCidr: # Override this with parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.
type: string
ControlPlaneDefaultRoute: # Override this with parameter_defaults
description: The default route of the control plane network.
type: string
DnsServers: # Override this with parameter_defaults
default: []
description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
type: comma_delimited_list
EC2MetadataIp: # Override this with parameter_defaults
description: The IP address of the EC2 metadata server.
type: string
ExternalInterfaceDefaultRoute:
default: ''
description: default route for the external network
type: string
resources:
OsNetConfigImpl:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
os_net_config:
network_config:
-
type: interface
name: nic1
use_dhcp: false
-
type: ovs_bridge
name: br-isolated
use_dhcp: false
dns_servers: {get_param: DnsServers}
addresses:
-
ip_netmask:
list_join:
- '/'
- - {get_param: ControlPlaneIp}
- {get_param: ControlPlaneSubnetCidr}
routes:
-
ip_netmask: 169.254.169.254/32
next_hop: {get_param: EC2MetadataIp}
-
next_hop: {get_param: ControlPlaneDefaultRoute}
default: true
members:
-
type: interface
name: nic2
# force the MAC address of the bridge to this interface
primary: true
-
type: vlan
vlan_id: {get_param: InternalApiNetworkVlanID}
addresses:
-
ip_netmask: {get_param: InternalApiIpSubnet}
-
type: ovs_bridge
name: br-ex
use_dhcp: false
members:
-
type: interface
name: nic4
-
type: ovs_bridge
name: br-vlan
use_dhcp: false
dns_servers: {get_param: DnsServers}
members:
-
type: interface
name: nic3
-
type: vlan
vlan_id: {get_param: TenantNetworkVlanID}
addresses:
-
ip_netmask: {get_param: TenantIpSubnet}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value: {get_resource: OsNetConfigImpl}6.2.6. このシナリオで使用する Red Hat OpenStack Platform director の設定ファイル
6.2.6.1. neutron.conf ファイル
このファイルは、/etc/neutron/ ディレクトリーにあり、以下の情報が含まれています。
[DEFAULT] service_plugins=odl-router_v2,trunk
6.2.6.2. ml2_conf.ini ファイル
このファイルは、/etc/neutron/plugins/ml2/ ディレクトリーにあり、以下の情報が含まれています。
[DEFAULT] [ml2] type_drivers = vxlan,vlan,flat,gre tenant_network_types = vlan mechanism_drivers = opendaylight_v2 extension_drivers = qos,port_security path_mtu = 0 [ml2_type_flat] flat_networks = datacentre [ml2_type_geneve] [ml2_type_gre] tunnel_id_ranges = 1:4094 [ml2_type_vlan] network_vlan_ranges = datacentre:552:553,tenant:555:601 [ml2_type_vxlan] vni_ranges = 1:4094 vxlan_group = 224.0.0.1 [securitygroup] [ml2_odl] password=<PASSWORD> username=<USER> url=http://172.17.0.10:8081/controller/nb/v2/neutron
-
[ml2] セクションの下には、ネットワーク種別として VXLAN が使用されており、
opendaylight_v2メカニズムドライバーが指定されている点に注意してください。 -
[ml2_type_vlan] の下で、
network-environment.yamlファイルと同じマッピングを設定します。 - [ml2_odl] の下には、OpenDaylightController にアクセスするための設定が記載されているはずです。
この情報を使用して、OpenDaylight コントローラーへのアクセスを確認することができます。
$ curl -H "Content-Type:application/json" -u admin:admin http://172.17.1.18:8081/controller/nb/v2/neutron/networks

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.