Este contenido no está disponible en el idioma seleccionado.
Chapter 4. Configuring the overcloud
After you configure the undercloud, you can configure the remaining overcloud leaf networks with a series of configuration files. After you configure the remaining overcloud leaf networks and deploy the overcloud, the resulting deployment has multiple sets of networks with routing available.
4.1. Creating a network data file Copiar enlaceEnlace copiado en el portapapeles!
To define the leaf networks, create a network data file that contains a YAML formatted list of each composable network and its attributes. Use the subnets parameter to define the additional Leaf subnets with a base network.
Procedure
Create a new
network_data_spine_leaf.yamlfile in the home directory of thestackuser. Use the defaultnetwork_data_subnets_routed.yamlfile as a basis:cp /usr/share/openstack-tripleo-heat-templates/network_data_subnets_routed.yaml /home/stack/network_data_spine_leaf.yaml
$ cp /usr/share/openstack-tripleo-heat-templates/network_data_subnets_routed.yaml /home/stack/network_data_spine_leaf.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the
network_data_spine_leaf.yamlfile, edit the YAML list to define each base network and respective leaf subnets as a composable network item. Use the following example syntax to define a base leaf and two leaf subnets:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following example demonstrates how to define the Internal API network and its leaf networks:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You do not define the Control Plane networks in the network data file because the undercloud has already created these networks. However, you must set the parameters manually so that the overcloud can configure the NICs accordingly.
Define vip: true for the networks that contain the Controller-based services. In this example, InternalApiLeaf0 contains these services.
4.2. Creating a roles data file Copiar enlaceEnlace copiado en el portapapeles!
To define each composable role for each leaf and attach the composable networks to each respective role, complete the following steps.
Procedure
Create a custom
rolesdirectory in the home directory of thestackuser:mkdir ~/roles
$ mkdir ~/rolesCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the default Controller, Compute, and Ceph Storage roles from the director core template collection to the roles directory. Rename the files for Compute and Ceph Storage to suit Leaf 0:
cp /usr/share/openstack-tripleo-heat-templates/roles/Controller.yaml ~/roles/Controller.yaml cp /usr/share/openstack-tripleo-heat-templates/roles/Compute.yaml ~/roles/Compute0.yaml cp /usr/share/openstack-tripleo-heat-templates/roles/CephStorage.yaml ~/roles/CephStorage0.yaml
$ cp /usr/share/openstack-tripleo-heat-templates/roles/Controller.yaml ~/roles/Controller.yaml $ cp /usr/share/openstack-tripleo-heat-templates/roles/Compute.yaml ~/roles/Compute0.yaml $ cp /usr/share/openstack-tripleo-heat-templates/roles/CephStorage.yaml ~/roles/CephStorage0.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the Leaf 0 Compute and Ceph Storage files as a basis for your Leaf 1 and Leaf 2 files:
cp ~/roles/Compute0.yaml ~/roles/Compute1.yaml cp ~/roles/Compute0.yaml ~/roles/Compute2.yaml cp ~/roles/CephStorage0.yaml ~/roles/CephStorage1.yaml cp ~/roles/CephStorage0.yaml ~/roles/CephStorage2.yaml
$ cp ~/roles/Compute0.yaml ~/roles/Compute1.yaml $ cp ~/roles/Compute0.yaml ~/roles/Compute2.yaml $ cp ~/roles/CephStorage0.yaml ~/roles/CephStorage1.yaml $ cp ~/roles/CephStorage0.yaml ~/roles/CephStorage2.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
name,HostnameFormatDefault, anddeprecated_nic_config_nameparameters in the Leaf 0, Leaf 1, and Leaf 2 files so that they align with the respective Leaf parameters. For example, the parameters in the Leaf 0 Compute file have the following values:- name: ComputeLeaf0 HostnameFormatDefault: '%stackname%-compute-leaf0-%index%' deprecated_nic_config_name: 'computeleaf0.yaml'
- name: ComputeLeaf0 HostnameFormatDefault: '%stackname%-compute-leaf0-%index%' deprecated_nic_config_name: 'computeleaf0.yaml'Copy to Clipboard Copied! Toggle word wrap Toggle overflow The Leaf 0 Ceph Storage parameters have the following values:
- name: CephStorageLeaf0 HostnameFormatDefault: '%stackname%-cephstorage-leaf0-%index%' deprecated_nic_config_name: 'ceph-strorageleaf0.yaml'
- name: CephStorageLeaf0 HostnameFormatDefault: '%stackname%-cephstorage-leaf0-%index%' deprecated_nic_config_name: 'ceph-strorageleaf0.yaml'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
networkparameter in the Leaf 1 and Leaf 2 files so that they align with the respective Leaf network parameters. For example, the parameters in the Leaf 1 Compute file have the following values:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The Leaf 1 Ceph Storage parameters have the following values:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis applies only to Leaf 1 and Leaf 2. The
networkparameter for Leaf 0 retains the base subnet values, which are the lowercase names of each subnet combined with a_subnetsuffix. For example, the Internal API for Leaf 0 isinternal_api_subnet.When your role configuration is complete, run the following command to generate the full roles data file:
openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Compute Compute1 Compute2 CephStorage CephStorage1 CephStorage2
$ openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Compute Compute1 Compute2 CephStorage CephStorage1 CephStorage2Copy to Clipboard Copied! Toggle word wrap Toggle overflow This creates a full
roles_data_spine_leaf.yamlfile that includes all of the custom roles for each respective leaf network.
Each role has its own NIC configuration. Before you configure the spine-leaf configuration, you must create a base set of NIC templates to suit your current NIC configuration.
4.3. Creating a custom NIC configuration Copiar enlaceEnlace copiado en el portapapeles!
Each role requires a unique NIC configuration. Complete the following steps to create a copy of the base set of NIC templates and map the new templates to the respective NIC configuration resources.
Procedure
Change to the core heat template directory:
cd /usr/share/openstack-tripleo-heat-templates
$ cd /usr/share/openstack-tripleo-heat-templatesCopy to Clipboard Copied! Toggle word wrap Toggle overflow Render the Jinja2 templates with the
tools/process-templates.pyscript, your customnetwork_datafile, and customroles_datafile:tools/process-templates.py \ -n /home/stack/network_data_spine_leaf.yaml \ -r /home/stack/roles_data_spine_leaf.yaml \ -o /home/stack/openstack-tripleo-heat-templates-spine-leaf$ tools/process-templates.py \ -n /home/stack/network_data_spine_leaf.yaml \ -r /home/stack/roles_data_spine_leaf.yaml \ -o /home/stack/openstack-tripleo-heat-templates-spine-leafCopy to Clipboard Copied! Toggle word wrap Toggle overflow Change to the home directory:
cd /home/stack
$ cd /home/stackCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the content from one of the default NIC templates to use as a basis for your spine-leaf templates. For example, copy the
single-nic-vlansNIC template:cp -r openstack-tripleo-heat-templates-spine-leaf/network/config/single-nic-vlans/* /home/stack/templates/spine-leaf-nics/.
$ cp -r openstack-tripleo-heat-templates-spine-leaf/network/config/single-nic-vlans/* /home/stack/templates/spine-leaf-nics/.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit each NIC configuration in
/home/stack/templates/spine-leaf-nics/and change the location of the configuration script to an absolute location. Scroll to the network configuration section, which resembles the following snippet:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change the location of the script to the absolute path:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Make this change in each file for each Leaf and save the changes.
NoteFor further NIC changes, see Custom network interface templates in the Advanced Overcloud Customization guide.
-
Create a file called
spine-leaf-nics.yamland edit the file. Create a
resource_registrysection in the file and add a set of::Net::SoftwareConfigresources that map to the respective NIC templates:Copy to Clipboard Copied! Toggle word wrap Toggle overflow These resources mappings override the default resource mappings during deployment.
-
Save the
spine-leaf-nics.yamlfile. Remove the rendered template directory:
rm -rf openstack-tripleo-heat-templates-spine-leaf
$ rm -rf openstack-tripleo-heat-templates-spine-leafCopy to Clipboard Copied! Toggle word wrap Toggle overflow As a result of this procedure, you now have a set of NIC templates and an environment file that maps the required
::Net::SoftwareConfigresources to them.When you eventually run the
openstack overcloud deploycommand, ensure that you include the environment files in the following order:-
/usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml, which enables network isolation. Note that the director renders this file from thenetwork-isolation.j2.yamlJinja2 template. -
/usr/share/openstack-tripleo-heat-templates/environments/network-environment.yaml, which is the default network environment file, including default NIC resource mappings. Note that the director renders this file from thenetwork-environment.j2.yamlJinja2 template. /home/stack/templates/spine-leaf-nics.yaml, which contains your custom NIC resource mappings and overrides the default NIC resource mappings.The following command snippet demonstrates the ordering:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
-
Complete the procedures in the following sections to add details to your network environment file, and define certain aspects of the spine leaf architecture. After you complete this configuration, include this file in the
openstack overcloud deploycommand.
4.4. Setting control plane parameters Copiar enlaceEnlace copiado en el portapapeles!
You usually define networking details for isolated spine-leaf networks using a network_data file. The exception is the control plane network, which the undercloud creates. However, the overcloud requires access to the control plane for each leaf. To enable this access, you must define additional parameters in your deployment.
In this example, define the IP, subnet, and default route for the respective Control Plane network on Leaf 0.
Procedure
-
Create a file called
spine-leaf-ctlplane.yamland edit the file. Create a
parameter_defaultssection in the file and add the control plane subnet mapping for each spine-leaf network:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Save the
spine-leaf-ctlplane.yamlfile.
4.5. Setting the subnet for virtual IP addresses Copiar enlaceEnlace copiado en el portapapeles!
The Controller role typically hosts virtual IP (VIP) addresses for each network. By default, the overcloud takes the VIPs from the base subnet of each network except for the control plane. The control plane uses ctlplane-subnet, which is the default subnet name created during a standard undercloud installation.
In this spine leaf scenario, the default base provisioning network is leaf0 instead of ctlplane-subnet. This means that you must add overriding values to the VipSubnetMap parameter to change the subnet that the control plane VIP uses.
Additionally, if the VIPs for each network do not use the base subnet of one or more networks, you must add additional overrides to the VipSubnetMap parameter to ensure that the director creates VIPs on the subnet associated with the L2 network segment that connects the Controller nodes.
Procedure:
-
Create a file called
spine-leaf-vips.yamland edit the file. Create a
parameter_defaultssection in the file and add theVipSubnetMapparameter based on your requirements:If you use
leaf0for the provisioning / control plane network, set thectlplaneVIP remapping toleaf0:parameter_defaults: VipSubnetMap: ctlplane: leaf0parameter_defaults: VipSubnetMap: ctlplane: leaf0Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you use a different Leaf for multiple VIPs, set the VIP remapping to suit these requirements. For example, use the following snippet to configure the
VipSubnetMapparameter to useleaf1for all VIPs:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Save the
spine-leaf-vips.yamlfile.
4.6. Mapping separate networks Copiar enlaceEnlace copiado en el portapapeles!
By default, OpenStack Platform uses Open Virtual Network (OVN), which requires that all Controller and Compute nodes connect to a single L2 network for external network access. This means that both Controller and Compute network configurations use a br-ex bridge, which director maps to the datacentre network in the overcloud by default. This mapping is usually either for a flat network mapping or a VLAN network mapping. In a spine leaf architecture, you can change these mappings so that each Leaf routes traffic through the specific bridge or VLAN on that Leaf, which is often the case with edge computing scenarios.
Procedure
-
Create a file called
spine-leaf-separate.yamland edit the file. Create a
parameter_defaultssection in thespine-leaf-separate.yamlfile and include the external network mapping for each spine-leaf network:For flat network mappings, list each Leaf in the
NeutronFlatNetworksparameter and set theNeutronBridgeMappingsparameter for each Leaf:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For VLAN network mappings, additionally set the
NeutronNetworkVLANRangesto map VLANs for all three Leaf networks:NeutronNetworkType: 'geneve,vlan' NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000'
NeutronNetworkType: 'geneve,vlan' NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000'Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Save the
spine-leaf-separate.yamlfile.
4.7. Deploying a spine-leaf enabled overcloud Copiar enlaceEnlace copiado en el portapapeles!
When you have completed your spine-leaf overcloud configuration, complete the following steps to review each file and then run the deployment command:
Procedure
Review the
/home/stack/template/network_data_spine_leaf.yamlfile and ensure that it contains each network and subnet for each leaf.NoteThere is currently no automatic validation for the network subnet and
allocation_poolsvalues. Ensure that you define these values consistently and that there is no conflict with existing networks.-
Review the
/home/stack/templates/roles_data_spine_leaf.yamlvalues and ensure that you define a role for each leaf. -
Review the NIC templates in the
~/templates/spine-leaf-nics/directory and ensure that you define the interfaces for each role on each leaf correctly. -
Review the custom
spine-leaf-nics.yamlenvironment file and ensure that it contains aresource_registrysection that references the custom NIC templates for each role. -
Review the
/home/stack/templates/nodes_data.yamlfile and ensure that all roles have an assigned flavor and a node count. Also check that you have correctly tagged all nodes for each leaf. Run the
openstack overcloud deploycommand to apply the spine leaf configuration. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
The
network-isolation.yamlis the rendered name of the Jinja2 file in the same location (network-isolation.j2.yaml). Include this file in the deployment command to ensure that the director isolates each networks to the correct leaf. This ensures that the networks are created dynamically during the overcloud creation process. -
Include the
network-environment.yamlfile after thenetwork-isolation.yaml. Thenetwork-environment.yamlfile provides the default network configuration for composable network parameters. -
Include the
spine-leaf-nics.yamlfile after thenetwork-environment.yaml. Thespine-leaf-nics.yamlfile overrides the default NIC template mappings from thenetwork-environment.yamlfile. -
If you created any other spine leaf network environment files, include these environment files after the
spine-leaf-nics.yamlfile. - Add any additional environment files. For example, an environment file with your container image locations or Ceph cluster configuration.
-
The
- Wait until the spine-leaf enabled overcloud deploys.
4.8. Adding a new leaf to a spine-leaf deployment Copiar enlaceEnlace copiado en el portapapeles!
When increasing network capacity or adding a new physical site, you might need to a new leaf to your Red Hat OpenStack Platform (RHOSP) spine-leaf network.
Prerequisites
- Your RHOSP deployment uses a spine-leaf network topology.
Procedure
- Log in to the undercloud host as the stack user.
Source the undercloud credentials file:
source ~/stackrc
$ source ~/stackrcCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the
/usr/share/openstack-tripleo-heat-templates/network_data_spine_leaf.yamlfile, under the appropriate base network, add a leaf subnet as a composable network item for the new leaf that you are adding.Example
In this example, a subnet entry for the new leaf (
leaf3) has been added:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a roles data file for the new leaf that you are adding.
Copy a leaf Compute and a leaf Ceph Storage file for the new leaf that you are adding.
Example
In this example,
Compute1.yamlandCephStorage1.yamlare copied for the new leaf,Compute3.yamlandCephStorage3.yaml, repectively:cp ~/roles/Compute1.yaml ~/roles/Compute3.yaml cp ~/roles/CephStorage1.yaml ~/roles/CephStorage3.yaml
$ cp ~/roles/Compute1.yaml ~/roles/Compute3.yaml $ cp ~/roles/CephStorage1.yaml ~/roles/CephStorage3.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
name,HostnameFormatDefault, anddeprecated_nic_config_nameparameters in the new leaf files so that they align with the respective Leaf parameters.Example
For example, the parameters in the Leaf 1 Compute file have the following values:
- name: ComputeLeaf1 HostnameFormatDefault: '%stackname%-compute-leaf1-%index%' deprecated_nic_config_name: 'computeleaf1.yaml'
- name: ComputeLeaf1 HostnameFormatDefault: '%stackname%-compute-leaf1-%index%' deprecated_nic_config_name: 'computeleaf1.yaml'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
The Leaf 1 Ceph Storage parameters have the following values:
- name: CephStorageLeaf1 HostnameFormatDefault: '%stackname%-cephstorage-leaf1-%index%' deprecated_nic_config_name: 'ceph-strorageleaf1.yaml'
- name: CephStorageLeaf1 HostnameFormatDefault: '%stackname%-cephstorage-leaf1-%index%' deprecated_nic_config_name: 'ceph-strorageleaf1.yaml'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the network parameter in the new leaf files so that they align with the respective Leaf network parameters.
Example
For example, the parameters in the Leaf 1 Compute file have the following values:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example
The Leaf 1 Ceph Storage parameters have the following values:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow When your role configuration is complete, run the following command to generate the full roles data file. Include all of the leafs in your network and the new leaf that you are adding.
Example
In this example, leaf3 is added to leaf0, leaf1, and leaf2:
openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Compute Compute1 Compute2 Compute3 CephStorage CephStorage1 CephStorage2 CephStorage3
$ openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Compute Compute1 Compute2 Compute3 CephStorage CephStorage1 CephStorage2 CephStorage3Copy to Clipboard Copied! Toggle word wrap Toggle overflow This creates a full
roles_data_spine_leaf.yamlfile that includes all of the custom roles for each respective leaf network.
Create a custom NIC configuration for the leaf that you are adding.
Copy a leaf Compute and a leaf Ceph Storage NIC configuration file for the new leaf that you are adding.
Example
In this example,
computeleaf1.yamlandceph-storageleaf1.yamlare copied for the new leaf,computeleaf3.yamlandceph-storageleaf3.yaml, repectively:cp ~/templates/spine-leaf-nics/computeleaf1.yaml ~/templates/spine-leaf-nics/computeleaf3.yaml cp ~/templates/spine-leaf-nics/ceph-storageleaf1.yaml ~/templates/spine-leaf-nics/ceph-storageleaf3.yaml
$ cp ~/templates/spine-leaf-nics/computeleaf1.yaml ~/templates/spine-leaf-nics/computeleaf3.yaml $ cp ~/templates/spine-leaf-nics/ceph-storageleaf1.yaml ~/templates/spine-leaf-nics/ceph-storageleaf3.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow In
/usr/share/openstack-tripleo-heat-templates/network_data_spine_leaf.yaml, under theresource_registrysection in the file, add a set of::Net::SoftwareConfigresources that map to the respective NIC templates:Example
In this example, the new leaf NIC configuration files (
computeleaf3.yamlandceph-storageleaf3.yaml) have been added:Copy to Clipboard Copied! Toggle word wrap Toggle overflow These resources mappings override the default resource mappings during deployment.
As a result of this procedure, you now have a set of NIC templates and an environment file that maps the required
::Net::SoftwareConfigresources to them. When you eventually run theopenstack overcloud deploycommand, ensure that you include the environment files in the following order:/usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml, which enables network isolation.Note that the director renders this file from the
network-isolation.j2.yamlJinja2 template./usr/share/openstack-tripleo-heat-templates/environments/network-environment.yaml, which is the default network environment file, including default NIC resource mappings.Note that the director renders this file from the network-environment.j2.yaml Jinja2 template.
/home/stack/templates/spine-leaf-nics.yaml, which contains your custom NIC resource mappings and overrides the default NIC resource mappings.The following command snippet demonstrates the ordering:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Update the control plane parameters.
In
~/templates/spine-leaf-ctlplane.yaml, under theparameter_defaultssection, add the control plane subnet mapping for the new leaf network:Example
In this example, the new leaf (
leaf3) entries are added:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Map the new leaf network.
In
~/templates/spine-leaf-separate.yaml, under theparameter_defaultssection, include the external network mapping for the new leaf network.For flat network mappings, list the new leaf (
leaf3) in theNeutronFlatNetworksparameter and set theNeutronBridgeMappingsparameter for the new leaf:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For VLAN network mappings, additionally set the
NeutronNetworkVLANRangesto map VLANs for the new leaf (leaf3) network:NeutronNetworkType: 'geneve,vlan' NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000,leaf3:1:1000'
NeutronNetworkType: 'geneve,vlan' NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000,leaf3:1:1000'Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Redeploy your spine-leaf enabled overcloud, by following the steps in Section 4.7, “Deploying a spine-leaf enabled overcloud”.