7.3. 使用预置备节点为动态路由创建 OpenStackDataPlaneNodeSet CR
要在带有预置备节点的 OpenShift (RHOSO)环境中的 Red Hat OpenStack Services (RHOSO)环境中为动态路由配置数据平面,请为 Compute 节点创建一个 OpenStackDataPlaneNodeSet CR,并为 Networker 节点创建一个 OpenStackDataPlaneNodeSet CR。Networker 节点包含 OVN 网关机箱。
为作为 Compute 节点的 data plane 中的预置备节点的逻辑分组定义 OpenStackDataPlaneNodeSet 自定义资源(CR)。您可以根据部署需要定义尽可能多的 Compute 节点设置。每个节点只能包含在一个 OpenStackDataPlaneNodeSet CR 中。每个节点集只能连接到一个 Compute 单元。默认情况下,节点集连接到 cell1。如果自定义 control plane 使其包含额外的 Compute 单元,您必须指定节点集连接的单元。有关添加计算单元的更多信息,请参阅 自定义 Red Hat OpenStack Services on OpenShift 部署指南中的将 OpenStack DataPlaneNodeSet CR 连接到计算单元。
目前,在动态路由环境中,无法分发 RHOSO control plane 的限制。因此,您必须有一个托管 OVN 网关机箱的专用 Networker 节点。在以后的 RHOSO 发行版本中将解决这个限制。如需更多信息,请参阅 OSPRH-661。
您可以使用 nodeTemplate 字段配置通用属性,以应用到 OpenStackDataPlaneNodeSet CR 中的所有节点,以及用于特定于节点属性的 nodeTemplate.nodes 字段。特定于节点的配置覆盖来自 nodeTemplate 的继承值。
有关从预置备节点设置的 OpenStackDataPlaneNodeSet CR 示例,请参阅 预置备的节点的 OpenStackDataPlaneNodeSet CR 示例。
流程
在工作站上创建一个名为
openstack_compute_node_set.yaml的文件,以定义OpenStackDataPlaneNodeSetCR:apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneNodeSet metadata: name: openstack-compute-nodes1 namespace: openstack spec: env:2 - name: ANSIBLE_FORCE_COLOR value: "True"将 data plane 上的 Compute 节点连接到 control plane 网络:
spec: ... networkAttachments: - ctlplane指定此集合中的节点是预置备:
preProvisioned: true添加您创建的 SSH 密钥 secret,以便 Ansible 连接到数据平面上的 Compute 节点:
nodeTemplate: ansibleSSHPrivateKeySecret: <secret-key>-
将
<secret-key> 替换为您在创建 data plane secret 中设置的此节点的 SSH 密钥SecretCR 的名称,如dataplane-ansible-ssh-private-key-secret。
-
将
-
在 Red Hat OpenShift Container Platform (RHOCP)集群上的
openstack命名空间中创建持久性卷声明(PVC)以存储日志。将volumeMode设置为Filesystem,将accessModes设置为ReadWriteOnce。不要为使用 NFS 卷插件的 PersistentVolume (PV)的日志请求存储。NFS 与 FIFO 不兼容,ansible-runner创建一个 FIFO 文件来存储日志。有关 PVC 的详情,请参考 RHOCP Storage 指南中的 了解持久性存储 和 规划部署 中的 Red Hat OpenShift Container Platform 集群要求。 为 data plane 节点启用持久性日志记录:
nodeTemplate: ... extraMounts: - extraVolType: Logs volumes: - name: ansible-logs persistentVolumeClaim: claimName: <pvc_name> mounts: - name: ansible-logs mountPath: "/runner/artifacts"-
将
<pvc_name> 替换为 RHOCP 集群中的 PVC 存储名称。
-
将
指定管理网络:
nodeTemplate: ... managementNetwork: ctlplane指定用于提供用户名和密码的
SecretCR,以注册节点的操作系统并启用存储库。以下示例演示了如何将节点注册到 CDN。有关如何在 Red Hat Satellite 6.13 中注册节点的详情,请参阅管理主机。nodeTemplate: ... ansible: ansibleUser: cloud-admin1 ansiblePort: 22 ansibleVarsFrom: - prefix: subscription_manager_ secretRef: name: subscription-manager - prefix: registry_ secretRef: name: redhat-registry ansibleVars:2 edpm_bootstrap_command: | subscription-manager register --username {{ subscription_manager_username }} --password {{ subscription_manager_password }} subscription-manager release --set=9.4 subscription-manager repos --disable=* subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms --enable=rhoso-18.0-for-rhel-9-x86_64-rpms --enable=rhceph-7-tools-for-rhel-9-x86_64-rpms edpm_bootstrap_release_version_package: []- 1
- 2
- 自定义一组节点的 Ansible 变量。有关可以使用的 Ansible 变量的列表,请参阅 https://openstack-k8s-operators.github.io/edpm-ansible/。
有关红帽客户门户网站注册命令的完整列表,请参阅 https://access.redhat.com/solutions/253273。有关如何登录到
registry.redhat.io的详情,请参考 https://access.redhat.com/RegistryAuthentication#creating-registry-service-accounts-6。添加要应用到 Compute 节点的网络配置模板。以下示例将单个 NIC VLAN 网络配置应用到 data plane 节点:
nodeTemplate: ... ansible: ... ansibleVars: ... edpm_network_config_os_net_config_mappings: edpm-compute-0: nic1: 52:54:04:60:55:221 neutron_physical_bridge_name: br-ex neutron_public_interface_name: eth0 edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} {% for network in nodeset_networks %} {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} {%- endfor %} {% set min_viable_mtu = mtu_list | max %} network_config: - type: ovs_bridge name: {{ neutron_physical_bridge_name }} use_dhcp: false use_dhcpv6: true - type: interface name: nic1 use_dhcp: true defroute: false - type: interface name: nic2 use_dhcp: false defroute: false dns_servers: {{ ctlplane_dns_nameservers }} domain: {{ dns_search_domains }} addresses: - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} - type: interface name: nic3 use_dhcp: false addresses: - ip_netmask: {{ lookup('vars', 'bgpnet0_ip') }}/30 - type: interface name: nic4 use_dhcp: false addresses: - ip_netmask: {{ lookup('vars', 'bgpnet1_ip') }}/30 - type: interface name: lo addresses: - ip_netmask: {{ lookup('vars', 'bgpmainnet_ip') }}/32 - ip_netmask: {{ lookup('vars', 'bgpmainnetv6_ip') }}/128 - ip_netmask: {{ lookup('vars', 'internalapi_ip') }}/32 - ip_netmask: {{ lookup('vars', 'storage_ip') }}/32 - ip_netmask: {{ lookup('vars', 'tenant_ip') }}/32 - ip_netmask: {{ lookup('vars', 'octavia_ip') }}/32- 1
- 将
nic1更新为分配给 NIC 的 MAC 地址,以用于 Compute 节点上的网络配置。
有关其他模板,请参阅
roles/edpm_network_config/templates。有关 data plane 网络配置的更多信息,请参阅配置网络服务 中的 自定义数据平面网络。在
nodeTemplate部分下,添加此组中一组 Compute 节点的通用配置。此OpenStackDataPlaneNodeSet中的每个节点都会继承此配置:- 示例
edpm_frr_bgp_ipv4_src_network: bgpmainnet edpm_frr_bgp_neighbor_password: f00barZ edpm_frr_bgp_uplinks: - nic3 - nic4 edpm_ovn_encap_ip: '{{ lookup(''vars'', ''bgpmainnet_ip'') }}'有关可用于配置通用节点属性的属性的信息,请参阅
OpenStackDataPlaneNodeSetCR规格属性。
在此节点集中定义每个节点:
nodes: edpm-compute-0:1 hostName: edpm-compute-0 networks:2 - name: ctlplane subnetName: subnet1 defaultRoute: true fixedIP: 192.168.122.1003 - name: internalapi subnetName: subnet1 fixedIP: 172.17.0.100 - name: storage subnetName: subnet1 fixedIP: 172.18.0.100 - name: tenant subnetName: subnet1 fixedIP: 172.19.0.100 - name: BgpNet0 subnetName: subnet0 fixedIP: 100.64.0.2 - name: BgpNet1 subnetName: subnet0 fixedIP: 100.65.0.2 - name: BgpMainNet subnetName: subnet0 fixedIP: 172.30.0.2 ansible: ansibleHost: 192.168.122.100 ansibleUser: cloud-admin ansibleVars:4 fqdn_internal_api: edpm-compute-0.example.com edpm-compute-1: hostName: edpm-compute-1 networks: - name: ctlplane subnetName: subnet1 defaultRoute: true fixedIP: 192.168.122.101 - name: internalapi subnetName: subnet1 fixedIP: 172.17.0.101 - name: storage subnetName: subnet1 fixedIP: 172.18.0.101 - name: tenant subnetName: subnet1 fixedIP: 172.19.0.101 - name: BgpNet0 subnetName: subnet0 fixedIP: 100.64.1.2 - name: BgpNet1 subnetName: subnet0 fixedIP: 100.65.1.2 - name: BgpMainNet subnetName: subnet0 fixedIP: 172.30.1.2 ansible: ansibleHost: 192.168.122.101 ansibleUser: cloud-admin ansibleVars: fqdn_internal_api: edpm-compute-1.example.com注意-
在
nodes部分中定义的节点可以配置nodeTemplate部分中配置的同一 Ansible 变量。其中,为特定节点和nodeTemplate部分配置了 Ansible 变量,则特定于节点的值会覆盖nodeTemplate部分中的值。 -
您不需要为节点复制所有
nodeTemplateAnsible 变量,以覆盖默认值并设置一些特定于节点的值。您只需要配置您要为节点覆盖的 Ansible 变量。 -
许多
ansibleVars在名称中包含edpm,它代表 "External Data Plane Management"。
有关可用于配置节点属性的属性的信息,请参阅
OpenStackDataPlaneNodeSetCR 属性。-
在
在
services部分中,确保包含frr和ovn-bgp-agent服务:- 示例
services: - download-cache - redhat - bootstrap - configure-network - install-os - configure-os - frr - validate-network - ssh-known-hosts - run-os - reboot-os - install-certs - ovn - neutron-metadata - ovn-bgp-agent - libvirt - nova
-
保存
openstack_compute_node_set.yaml定义文件。 创建 data plane 资源:
$ oc create --save-config -f openstack_compute_node_set.yaml -n openstack通过确认状态为
SetupReady来验证 data plane 资源是否已创建:$ oc wait openstackdataplanenodeset openstack-compute-nodes \ --for condition=SetupReady --timeout=10m当状态为
SetupReady时,命令会返回一个condition met信息,否则会返回超时错误。有关 data plane 条件和状态的详情,请参考 Data plane 条件和状态。
验证是否为节点集合创建了
Secret资源:$ oc get secret | grep openstack-compute-nodes dataplanenodeset-openstack-compute-nodes Opaque 1 3m50s验证是否已创建服务:
$ oc get openstackdataplaneservice -n openstack NAME AGE download-cache 46m bootstrap 46m configure-network 46m validate-network 46m frr 46m install-os 46m ...
为作为 Networker 节点的数据平面节点的逻辑分组定义 OpenStackDataPlaneNodeSet 自定义资源(CR)。您可以根据部署需要定义任意数量的 Networker 节点设置。
目前,在动态路由环境中,无法分发 RHOSO control plane 的限制。因此,您必须有一个托管 OVN 网关机箱的专用 Networker 节点。在以后的 RHOSO 发行版本中将解决这个限制。如需更多信息,请参阅 OSPRH-661。
您可以使用 nodeTemplate 字段配置通用属性,以应用到 OpenStackDataPlaneNodeSet CR 中的所有节点,以及用于特定于节点属性的 nodeTemplate.nodes 字段。特定于节点的配置覆盖来自 nodeTemplate 的继承值。
有关从预置备节点设置的 OpenStackDataPlaneNodeSet CR 示例,请参阅 预置备的节点的 OpenStackDataPlaneNodeSet CR 示例。
流程
在工作站上创建一个名为
openstack_networker_node_set.yaml的文件,以定义OpenStackDataPlaneNodeSetCR:apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneNodeSet metadata: name: openstack-networker-nodes1 namespace: openstack spec: env:2 - name: ANSIBLE_FORCE_COLOR value: "True"将数据平面中的 Networker 节点连接到 control plane 网络:
spec: ... networkAttachments: - ctlplane指定此集合中的节点是预置备:
preProvisioned: true添加您创建的 SSH 密钥 secret,以便 Ansible 连接到数据平面上的 Networker 节点:
nodeTemplate: ansibleSSHPrivateKeySecret: <secret-key>-
将
<secret-key> 替换为您在创建 data plane secret 中设置的此节点的 SSH 密钥SecretCR 的名称,如dataplane-ansible-ssh-private-key-secret。
-
将
-
在 Red Hat OpenShift Container Platform (RHOCP)集群上的
openstack命名空间中创建持久性卷声明(PVC)以存储日志。将volumeMode设置为Filesystem,将accessModes设置为ReadWriteOnce。不要为使用 NFS 卷插件的 PersistentVolume (PV)的日志请求存储。NFS 与 FIFO 不兼容,ansible-runner创建一个 FIFO 文件来存储日志。有关 PVC 的详情,请参考 RHOCP Storage 指南中的 了解持久性存储 和 规划部署 中的 Red Hat OpenShift Container Platform 集群要求。 为 data plane 节点启用持久性日志记录:
nodeTemplate: ... extraMounts: - extraVolType: Logs volumes: - name: ansible-logs persistentVolumeClaim: claimName: <pvc_name> mounts: - name: ansible-logs mountPath: "/runner/artifacts"-
将
<pvc_name> 替换为 RHOCP 集群中的 PVC 存储名称。
-
将
指定管理网络:
nodeTemplate: ... managementNetwork: ctlplane指定用于提供用户名和密码的
SecretCR,以注册节点的操作系统并启用存储库。以下示例演示了如何将节点注册到 CDN。有关如何在 Red Hat Satellite 6.13 中注册节点的详情,请参阅管理主机。nodeTemplate: ... ansible: ansibleUser: cloud-admin1 ansiblePort: 22 ansibleVarsFrom: - prefix: subscription_manager_ secretRef: name: subscription-manager - prefix: registry_ secretRef: name: redhat-registry ansibleVars:2 edpm_bootstrap_command: | subscription-manager register --username {{ subscription_manager_username }} --password {{ subscription_manager_password }} subscription-manager release --set=9.4 subscription-manager repos --disable=* subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms --enable=rhoso-18.0-for-rhel-9-x86_64-rpms --enable=rhceph-7-tools-for-rhel-9-x86_64-rpms edpm_bootstrap_release_version_package: []- 1
- 2
- 自定义一组节点的 Ansible 变量。有关可以使用的 Ansible 变量的列表,请参阅 https://openstack-k8s-operators.github.io/edpm-ansible/。
有关红帽客户门户网站注册命令的完整列表,请参阅 https://access.redhat.com/solutions/253273。有关如何登录到
registry.redhat.io的详情,请参考 https://access.redhat.com/RegistryAuthentication#creating-registry-service-accounts-6。添加网络配置模板以应用到您的网络节点。以下示例将单个 NIC VLAN 网络配置应用到 data plane 节点:
nodeTemplate: ... ansible: ... ansibleVars: ... edpm_network_config_os_net_config_mappings: edpm-networker-0: nic1: 52:54:04:60:55:221 neutron_physical_bridge_name: br-ex neutron_public_interface_name: eth0 edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} {% for network in nodeset_networks %} {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} {%- endfor %} {% set min_viable_mtu = mtu_list | max %} network_config: - type: ovs_bridge name: {{ neutron_physical_bridge_name }} use_dhcp: false use_dhcpv6: true - type: interface name: nic1 use_dhcp: true defroute: false - type: interface name: nic2 use_dhcp: false defroute: false dns_servers: {{ ctlplane_dns_nameservers }} domain: {{ dns_search_domains }} addresses: - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} - type: interface name: nic3 use_dhcp: false addresses: - ip_netmask: {{ lookup('vars', 'bgpnet0_ip') }}/30 - type: interface name: nic4 use_dhcp: false addresses: - ip_netmask: {{ lookup('vars', 'bgpnet1_ip') }}/30 - type: interface name: lo addresses: - ip_netmask: {{ lookup('vars', 'bgpmainnet_ip') }}/32 - ip_netmask: {{ lookup('vars', 'bgpmainnetv6_ip') }}/128 - ip_netmask: {{ lookup('vars', 'internalapi_ip') }}/32 - ip_netmask: {{ lookup('vars', 'storage_ip') }}/32 - ip_netmask: {{ lookup('vars', 'tenant_ip') }}/32 - ip_netmask: {{ lookup('vars', 'octavia_ip') }}/32- 1
- 将
nic1更新为分配给 NIC 的 MAC 地址,以用于 Compute 节点上的网络配置。
有关其他模板,请参阅
roles/edpm_network_config/templates。如需有关 data plane 网络配置的更多信息,请参阅配置 网络服务指南中的 自定义 数据平面网络。在
nodeTemplate部分下,添加此组中 Networker 节点集合的通用配置。此OpenStackDataPlaneNodeSet中的每个节点都会继承此配置:- 示例
edpm_frr_bgp_ipv4_src_network: bgpmainnet edpm_frr_bgp_neighbor_password: f00barZ edpm_frr_bgp_uplinks: - nic3 - nic4 edpm_ovn_encap_ip: '{{ lookup(''vars'', ''bgpmainnet_ip'') }}'有关可用于配置通用节点属性的属性的信息,请参阅
OpenStackDataPlaneNodeSetCR规格属性。
在此节点集中定义每个节点:
nodes: edpm-networker-0:1 hostName: edpm-networker-0 networks:2 - name: ctlplane subnetName: subnet1 defaultRoute: true fixedIP: 192.168.122.1003 - name: internalapi subnetName: subnet1 fixedIP: 172.17.0.100 - name: storage subnetName: subnet1 fixedIP: 172.18.0.100 - name: tenant subnetName: subnet1 fixedIP: 172.19.0.100 - name: BgpNet0 subnetName: subnet0 fixedIP: 100.64.0.2 - name: BgpNet1 subnetName: subnet0 fixedIP: 100.65.0.2 - name: BgpMainNet subnetName: subnet0 fixedIP: 172.30.0.2 ansible: ansibleHost: 192.168.122.100 ansibleUser: cloud-admin ansibleVars:4 fqdn_internal_api: edpm-networker-0.example.com edpm-networker-1: hostName: edpm-networker-1 networks: - name: ctlplane subnetName: subnet1 defaultRoute: true fixedIP: 192.168.122.101 - name: internalapi subnetName: subnet1 fixedIP: 172.17.0.101 - name: storage subnetName: subnet1 fixedIP: 172.18.0.101 - name: tenant subnetName: subnet1 fixedIP: 172.19.0.101 - name: BgpNet0 subnetName: subnet0 fixedIP: 100.64.0.2 - name: BgpNet1 subnetName: subnet0 fixedIP: 100.65.0.2 - name: BgpMainNet subnetName: subnet0 fixedIP: 172.30.0.2 ansible: ansibleHost: 192.168.122.101 ansibleUser: cloud-admin ansibleVars: fqdn_internal_api: edpm-networker-1.example.com注意-
在
nodes部分中定义的节点可以配置nodeTemplate部分中配置的同一 Ansible 变量。其中,为特定节点和nodeTemplate部分配置了 Ansible 变量,则特定于节点的值会覆盖nodeTemplate部分中的值。 -
您不需要为节点复制所有
nodeTemplateAnsible 变量,以覆盖默认值并设置一些特定于节点的值。您只需要配置您要为节点覆盖的 Ansible 变量。 -
许多
ansibleVars在名称中包含edpm,它代表 "External Data Plane Management"。
有关可用于配置节点属性的属性的信息,请参阅
OpenStackDataPlaneNodeSetCR 属性。-
在
在
services部分中,确保包含frr和ovn-bgp-agent服务。注意不要在 此节点集中包含
ssh-known-hosts服务,因为它已包含在 Compute 节点设置 CR 中。此服务 仅包含在 一个节点设置 CR 中,因为它是一个全局服务。- 示例
services: - download-cache - bootstrap - configure-network - install-os - configure-os - frr - validate-network - run-os - reboot-os - install-certs - ovn - neutron-metadata - ovn-bgp-agent
-
保存
openstack_networker_node_set.yaml定义文件。 为数据平面创建 Networker 节点资源:
$ oc create --save-config -f openstack_networker_node_set.yaml -n openstack通过确认状态为
SetupReady来验证 data plane 资源是否已创建:$ oc wait openstackdataplanenodeset openstack-networker-nodes --for condition=SetupReady --timeout=10m当状态为
SetupReady时,命令会返回一个condition met信息,否则会返回超时错误。有关 data plane 条件和状态的详情,请参考 Data plane 条件和状态。
验证是否为节点集合创建了
Secret资源:$ oc get secret | grep openstack-networker-nodes dataplanenodeset-openstack-networker-nodes Opaque 1 3m50s验证是否已创建服务:
$ oc get openstackdataplaneservice -n openstack NAME AGE download-cache 46m bootstrap 46m configure-network 46m validate-network 46m frr 46m install-os 46m ...
7.3.3. 用于动态路由的预置备节点的 OpenStackDataPlaneNodeSet CR 示例 复制链接链接已复制到粘贴板!
以下示例 OpenStackDataPlaneNodeSet CR 从预置备的 Compute 节点创建一个节点,其中包含一些特定于节点的配置。这个示例包括可选字段。查看示例,并将可选字段更新为您的环境的正确值,或者在使用 OpenShift (RHOSO)部署中的 Red Hat OpenStack Services (RHOSO)部署中的示例之前删除它们。
将本示例中的 OpenStackDataPlaneNodeSet CR 的名称更新为反映集合中节点的名称。OpenStackDataPlaneNodeSet CR 名称必须是唯一的,仅包含小写字母数字字符和 - (hyphens)或 . (periods),以字母数字字符开头和结尾,且最大长度为 53 个字符。
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
name: openstack-compute-nodes
namespace: openstack
spec:
env:
- name: ANSIBLE_FORCE_COLOR
value: "True"
networkAttachments:
- ctlplane
preProvisioned: true
nodeTemplate:
ansibleSSHPrivateKeySecret: dataplane-ansible-ssh-private-key-secret
extraMounts:
- extraVolType: Logs
volumes:
- name: ansible-logs
persistentVolumeClaim:
claimName: <pvc_name>
mounts:
- name: ansible-logs
mountPath: "/runner/artifacts"
managementNetwork: ctlplane
ansible:
ansibleUser: cloud-admin
ansiblePort: 22
ansibleVarsFrom:
- prefix: subscription_manager_
secretRef:
name: subscription-manager
- prefix: registry_
secretRef:
name: redhat-registry
ansibleVars:
edpm_bootstrap_command: |
subscription-manager register --username {{ subscription_manager_username }} --password {{ subscription_manager_password }}
subscription-manager release --set=9.4
subscription-manager repos --disable=*
subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms --enable=rhoso-18.0-for-rhel-9-x86_64-rpms --enable=rhceph-7-tools-for-rhel-9-x86_64-rpms
edpm_bootstrap_release_version_package: []
edpm_network_config_os_net_config_mappings:
edpm-compute-0:
nic1: 52:54:04:60:55:22
neutron_physical_bridge_name: br-ex
neutron_public_interface_name: eth0
edpm_network_config_template: |
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in nodeset_networks %}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
- type: ovs_bridge
name: {{ neutron_physical_bridge_name }}
mtu: {{ min_viable_mtu }}
use_dhcp: false
dns_servers: {{ ctlplane_dns_nameservers }}
domain: {{ dns_search_domains }}
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }}
routes: {{ ctlplane_host_routes }}
members:
- type: interface
name: nic1
mtu: {{ min_viable_mtu }}
# force the MAC address of the bridge to this interface
primary: true
{% for network in nodeset_networks %}
- type: vlan
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}
nodes:
edpm-compute-0:
hostName: edpm-compute-0
networks:
- name: ctlplane
subnetName: subnet1
defaultRoute: true
fixedIP: 192.168.122.100
- name: internalapi
subnetName: subnet1
fixedIP: 172.17.0.100
- name: storage
subnetName: subnet1
fixedIP: 172.18.0.100
- name: tenant
subnetName: subnet1
fixedIP: 172.19.0.100
ansible:
ansibleHost: 192.168.122.100
ansibleUser: cloud-admin
ansibleVars:
fqdn_internal_api: edpm-compute-0.example.com
edpm-compute-1:
hostName: edpm-compute-1
networks:
- name: ctlplane
subnetName: subnet1
defaultRoute: true
fixedIP: 192.168.122.101
- name: internalapi
subnetName: subnet1
fixedIP: 172.17.0.101
- name: storage
subnetName: subnet1
fixedIP: 172.18.0.101
- name: tenant
subnetName: subnet1
fixedIP: 172.19.0.101
ansible:
ansibleHost: 192.168.122.101
ansibleUser: cloud-admin
ansibleVars:
fqdn_internal_api: edpm-compute-1.example.com