Chapter 4. Configuring the overcloud Use Red Hat OpenStack Platform (RHOSP) director to install and configure spine leaf networking in the RHOSP overcloud. The high-level steps are: Define the overcloud networks for each leaf . Create a composable role for each leaf and attach the composable network to each respective role . Create a unique NIC configuration for each role . Change bridge mappings so that each leaf routes traffic through the specific bridge or VLAN on that leaf . Define virtual IPs (VIPs) for your overcloud endpoints, and identify the subnet for each VIP . Provision your overcloud networks and overcloud VIPs . Register the bare metal nodes in your overcloud . Note Skip steps 7, 8, and 9 if you are using pre-provisioned bare metal nodes. Introspect the bare metal nodes in your overcloud . Provision bare metal nodes . Deploy your overcloud using the configuration you set in the earlier steps . 4.1. Defining the leaf networks The Red Hat OpenStack Platform (RHOSP) director creates the overcloud leaf networks from a YAML-formatted, custom network definition file that you construct. This custom network definition file lists each composable network and its attributes and also defines the subnets needed for each leaf. Complete the following steps to create a YAML-formatted, custom network definition file that contains the specifications for your spine-leaf network on the overcloud. Later, the provisioning process creates a heat environment file from your network definition file that you include when you deploy your RHOSP overcloud. Prerequisites Access to the undercloud host and credentials for the stack user. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: Create a templates directory under /home/stack : Copy the default network definition template, routed-networks.yaml , to your custom templates directory: Example Edit your copy of the network definition template to define each base network and each of the associated leaf subnets as a composable network item. Tip For information, see Network definition file configuration options in the Installing and managing Red Hat OpenStack Platform with director guide. Example The following example demonstrates how to define the Internal API network and its leaf networks: Note You do not define the Control Plane networks in your custom network definition template, because the undercloud has already created these networks. However, you must set the parameters manually so that the overcloud can configure the NICs accordingly. For more information, see Configuring routed spine-leaf in the undercloud . Note RHOSP does not perform automatic validation of the network subnet and allocation_pools values. Ensure that you define these values consistently and that they do not conflict with existing networks. Note Add the vip parameter and set the value to true for the networks that host the Controller-based services. In this example, the InternalApi network contains these services. steps Note the path and file name of the custom network definition file that you have created. You need this information later when you provision your networks for the RHOSP overcloud. Proceed to the step Defining leaf roles and attaching networks . Additional resources Network definition file configuration options in the Installing and managing Red Hat OpenStack Platform with director guide 4.2. Defining leaf roles and attaching networks The Red Hat OpenStack Platform (RHOSP) director creates a composable role for each leaf and attaches the composable network to each respective role from a roles template that you construct. Start by copying the default Controller, Compute, and Ceph Storage roles from the director core templates, and modifying these to meet your environment's needs. After you have created all of the individual roles, you run the openstack overcloud roles generate command to concatenate them into one large custom roles data file. Prerequisites Access to the undercloud host and credentials for the stack user. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: Copy the default roles for Controller, Compute, and Ceph Storage roles that ship with RHOSP to the home directory of the stack user. Rename the files to indicate that they are leaf 0: Copy the leaf 0 files to create your leaf 1 and leaf 2 files: Edit the parameters in each file to align with their respective leaf parameters. Tip For information about the various parameters in a roles data template, see Examining role parameters in the Customizing your Red Hat OpenStack Platform deployment guide. Example - ComputeLeaf0 Example - CephStorageLeaf0 Edit the network parameter in the leaf 1 and leaf 2 files so that they align with the respective leaf network parameters. Example - ComputeLeaf1 Example - CephStorageLeaf1 Note This applies only to leaf 1 and leaf 2. The network parameter for leaf 0 retains the base subnet values, which are the lowercase names of each subnet combined with a _subnet suffix. For example, the Internal API for leaf 0 is internal_api_subnet . In each Controller, Compute, and (if present) Networker role file, add the OVN BGP agent to the list of services under the ServicesDefault parameter: Example When your role configuration is complete, run the overcloud roles generate command to generate the full roles data file. Example This creates one custom roles data file that includes all of the custom roles for each respective leaf network. steps Note the path and file name of the custom roles data file created by the overcloud roles generate command. You use this path later when you deploy your overcloud. Proceed to the step Creating a custom NIC configuration for leaf roles . Additional resources Examining role parameters in the Customizing your Red Hat OpenStack Platform deployment guide 4.3. Creating a custom NIC configuration for leaf roles Each role that the Red Hat OpenStack Platform (RHOSP) director creates requires a unique NIC configuration. Complete the following steps to create a custom set of NIC templates and a custom environment file that maps the custom templates to the respective role. Prerequisites Access to the undercloud host and credentials for the stack user. You have a custom network definition file. You have a custom roles data file. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: Copy the content from one of the default NIC templates to create a custom template for your NIC configuration. Example In this example, the single-nic-vlans NIC template is copied to use for a custom template for your NIC configuration: In each of the NIC templates that you created in the earlier step, change the NIC configuration to match the specifics for your spine-leaf topology. Example Tip For more information, see Defining custom network interface templates in the Installing and managing Red Hat OpenStack Platform with director guide. Create a custom environment file, such as spine-leaf-nic-roles-map.yaml , that contains a parameter_defaults section that maps the custom NIC templates to each custom role. Example steps Note the path and file name of your custom NIC templates and the custom environment file that maps the custom NIC templates to each custom role. You use this path later when you deploy your overcloud. Proceed to the step Configuring the leaf networks . Additional resources Defining custom network interface templates in the Installing and managing Red Hat OpenStack Platform with director guide 4.4. Configuring the leaf networks In a spine leaf architecture, each leaf routes traffic through the specific bridge or VLAN on that leaf, which is often the case with edge computing scenarios. So, you must change the default mappings where the Red Hat OpenStack Platform (RHOSP) Controller and Compute network configurations use a br-ex bridge. The RHOSP director creates the control plane network during undercloud creation. However, the overcloud requires access to the control plane for each leaf. To enable this access, you must define additional parameters in your deployment. Complete the following steps to create a custom network environment file that contains the separate network mappings and sets access to the control plane networks for the overcloud. Prerequisites Access to the undercloud host and credentials for the stack user. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: In a new custom environment file, such as spine-leaf-ctlplane.yaml , create a parameter_defaults section and set the NeutronBridgeMappings parameter for each leaf that uses the default br-ex bridge. Important The name of the custom environment file that you create to contain your network definition must end in either .yaml or .template . For flat network mappings, list each leaf in the NeutronFlatNetworks parameter and set the NeutronBridgeMappings parameter for each leaf: Example Tip For more information, see Chapter 17. Networking (neutron) Parameters in the Overcloud parameters guide For VLAN network mappings, add vlan to NeutronNetworkType , and by using NeutronNetworkVLANRanges , map VLANs for the leaf networks: Example Note You can use both flat networks and VLANs in your spine-leaf topology. Add the control plane subnet mapping for each spine-leaf network by using the <role>ControlPlaneSubnet parameter: Example steps Note the path and file name of the custom network environment file that you have created. You will need this information later when you deploy your overcloud. Proceed to the step Setting the subnet for virtual IP addresses . Additional resources Chapter 17. Networking (neutron) Parameters in the Overcloud parameters guide 4.5. Setting the subnet for virtual IP addresses By default, the Red Hat Openstack Platform (RHOSP) Controller role hosts virtual IP (VIP) addresses for each network. The RHOSP 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 the spine-leaf examples used in this document, the default base provisioning network is leaf0 instead of ctlplane-subnet . This means that you must add the value pair subnet: leaf0 to the network:ctlplane parameter to map the subnet to leaf0 . Complete the following steps to create a YAML-formatted, custom network VIP definition file that contains the overrides for your VIPs on the overcloud. Later, the provisioning process creates a heat environment file from your network VIP definition file that you include when you deploy your RHOSP overcloud. Prerequisites Access to the undercloud host and credentials for the stack user. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: In a new custom network VIP definition template, such as spine-leaf-vip-data.yaml , list the virtual IP addresses that need to be created on the specific subnet used by controller nodes. Example You can use the following parameters in your spine-leaf-vip-data.yaml file: network Sets the neutron network name. This is the only required parameter. ip_address Sets the IP address of the VIP. subnet Sets the neutron subnet name. Use to specify the subnet when creating the virtual IP neutron port. This parameter is required when your deployment uses routed networks. dns_name Sets the FQDN (Fully Qualified Domain Name). name Sets the virtual IP name. Tip For more information, see Adding a composable network in the Installing and managing Red Hat OpenStack Platform with director guide. steps Note the path and file name of the custom network VIP definition template that you have created. You use this path later when you provision your network VIPs for the RHOSP overcloud. Proceed to the step Provisioning networks and VIPs for the overcloud . 4.6. Provisioning networks and VIPs for the overcloud The Red Hat OpenStack Platform (RHOSP) provisioning process uses your network definition file to create a new heat environment file that contains your network specifications. If your deployment uses VIPs, RHOSP creates a new heat environment file from your VIP definition file. After you provision your networks and VIPs, you have two heat environment files that you use later to deploy your overcloud. Prerequisites Access to the undercloud host and credentials for the stack user. You have a network configuration template. If you are using VIPs, you have a VIP definition template. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: Provision your overcloud networks. Use the overcloud network provision command, and provide the path to the network definition file that you created earlier. Tip For more information, see Configuring and provisioning overcloud network definitions in the Installing and managing Red Hat OpenStack Platform with director guide. Example In this example, the path is /home/stack/templates/spine-leaf-networks-data.yaml . Use the --output argument to name the file created by the command. Important The name of the output file that you specify must end in either .yaml or .template . Provision your overcloud VIPs. Use the overcloud network vip provision command, with the --stack argument to name the VIP definition file that you created earlier. Use the --output argument to name the file created by the command. Tip For more information, see Configuring and provisioning network VIPs for the overcloud in the Installing and managing Red Hat OpenStack Platform with director guide. Important The name of the output file that you specify must end in either .yaml or .template . Note the path and file names of the generated output files. You use this information later when you deploy your overcloud. Verification You can use the following commands to confirm that the command created your overcloud networks and subnets: Replace <network>, <subnet>, and <port> with the name or UUID of the network, subnet, and port that you want to check. steps If you are using pre-provisioned nodes, skip to Running the overcloud deployment command . Otherwise, proceed to the step Registering bare metal nodes on the overcloud . Additional resources Configuring and provisioning overcloud network definitions in the Installing and managing Red Hat OpenStack Platform with director guide Configuring and provisioning network VIPs for the overcloud in the Installing and managing Red Hat OpenStack Platform with director guide overcloud network provision in the Command line interface reference overcloud network vip provision in the Command line interface reference 4.7. Registering bare metal nodes on the overcloud Red Hat OpenStack Platform (RHOSP) director requires a custom node definition template that specifies the hardware and power management details of your physical machines. You can create this template in JSON or YAML formats. After you register your physical machines as bare metal nodes, you introspect them, and then you finally provision them. Note If you are using pre-provisioned bare metal nodes then you can skip registering, introspecting, and provisioning bare metal nodes, and go to Deploying a spine-leaf enabled overcloud . Prerequisites Access to the undercloud host and credentials for the stack user. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: Create a new node definition template, such as barematal-nodes.yaml . Add a list of your physical machines that includes their hardware and power management details. Example Tip For more information about template parameter values and for a JSON example, see Registering nodes for the overcloud in the Installing and managing Red Hat OpenStack Platform with director guide. Verify the template formatting and syntax. Example Correct any errors and save your node definition template. Import your node definition template to RHOSP director to register each node from your template into director: Example Verification When the node registration and configuration is complete, confirm that director has successfully registered the nodes: The baremetal node list command should include the imported nodes and the status should be manageable . steps Proceed to the step, Introspecting bare metal nodes on the overcloud . Additional resources Registering nodes for the overcloud in the Installing and managing Red Hat OpenStack Platform with director guide. overcloud node import in the Command line interface reference 4.8. Introspecting bare metal nodes on the overcloud After you register a physical machine as a bare metal node, you can use OpenStack Platform (RHOSP) director introspection to automatically add then node's hardware details and create ports for each of its Ethernet MAC addresses. After you perform introspection on your bare metal nodes, the final step is to provision them. Note If you are using pre-provisioned bare metal nodes then you can skip introspecting and introspecting bare metal nodes and go to Deploying a spine-leaf enabled overcloud . Prerequisites Access to the undercloud host and credentials for the stack user. You have registered your bare metal nodes for your overcloud with RHOSP. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: Run the pre-introspection validation group to check the introspection requirements: Review the results of the validation report. (Optional) Review detailed output from a specific validation: Replace <UUID> with the UUID of the specific validation from the report that you want to review. Important A FAILED validation does not prevent you from deploying or running RHOSP. However, a FAILED validation can indicate a potential issue with a production environment. Inspect the hardware attributes of all nodes: Tip For more information, see Using director introspection to collect bare metal node hardware information in the Installing and managing Red Hat OpenStack Platform with director guide. Monitor the introspection progress logs in a separate terminal window: Verification After the introspection completes, all nodes change to an available state. steps Proceed to the step, Provisioning bare metal nodes for the overcloud . Additional resources Using director introspection to collect bare metal node hardware information in the Installing and managing Red Hat OpenStack Platform with director guide overcloud node introspect in the Command line interface reference 4.9. Provisioning bare metal nodes for the overcloud To provision your bare metal nodes for Red Hat OpenStack Platform (RHOSP), you define the quantity and attributes of the bare metal nodes that you want to deploy and assign overcloud roles to these nodes. You also define the network layout of the nodes. You add all of this information in a node definition file in YAML format. The provisioning process creates a heat environment file from your node definition file. This heat environment file contains the node specifications you configured in your node definition file, including node count, predictive node placement, custom images, and custom NICs. When you deploy your overcloud, include this heat environment file in the deployment command. The provisioning process also provisions the port resources for all networks defined for each node or role in the node definition file. Note If you are using pre-provisioned bare metal nodes then you can skip provisioning bare metal nodes and go to Deploying a spine-leaf enabled overcloud . Prerequisites Access to the undercloud host and credentials for the stack user. The bare metal nodes are registered, introspected, and available for provisioning and deployment. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: Create a bare metal nodes definition file, such as spine-leaf-baremetal-nodes.yaml , and define the node count for each role that you want to provision. Example Tip For more information about the properties that you can set bare metal node definition file, see Provisioning bare metal nodes for the overcloud in the Installing and managing Red Hat OpenStack Platform with director guide. Provision the overcloud bare metal nodes, using the overcloud node provision command. Example Important The name of the output file that you specify must end in either .yaml or .template . Monitor the provisioning progress in a separate terminal. When provisioning is successful, the node state changes from available to active : Use the metalsmith tool to obtain a unified view of your nodes, including allocations and ports: Note the path and file name of the generated output file. You need this path later when you deploy your overcloud. Verification Confirm the association of nodes to hostnames: steps Proceed to the step Deploying a spine-leaf enabled overcloud . Additional resources Provisioning bare metal nodes for the overcloud in the Installing and managing Red Hat OpenStack Platform with director guide 4.10. Deploying a spine-leaf enabled overcloud The last step in deploying your Red Hat OpenStack Platform (RHOSP) overcloud is to run the overcloud deploy command. Inputs to the command include all of the various overcloud templates and environment files that you constructed. RHOSP director uses these templates and files as a plan for how to install and configure your overcloud. Prerequisites Access to the undercloud host and credentials for the stack user. You have performed all of the steps listed in the earlier procedures in this section and have assembled all of the various heat templates and environment files to use as inputs for the overcloud deploy command. Procedure Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: Collate the custom environment files and custom templates that you need for your overcloud environment. This list includes the unedited heat template files provided with your director installation and the custom files you created. Ensure that you have the paths to the following files: Your custom network definition file that contains the specifications for your spine-leaf network on the overcloud, for example, spine-leaf-networks-data.yaml . For more information, see Defining the leaf networks . Your custom roles data file that defines a role for each leaf. Example: spine-leaf-roles.yaml . For more information, see Defining leaf roles and attaching networks Your custom environment file that contains the roles and the custom NIC template mappings for each role. Example: spine-leaf-nic-roles-map.yaml . For more information, see Creating a custom NIC configuration for leaf roles . Your custom network environment file that contains the separate network mappings and sets access to the control plane networks for the overcloud. Example: spine-leaf-ctlplane.yaml For more information, see Configuring the leaf networks . The output file from provisioning your overcloud networks. Example: spine-leaf-networks-provisioned.yaml For more information, see Provisioning networks and VIPs for the overcloud . The output file from provisioning your overcloud VIPs. Example: spine-leaf-vips-provisioned.yaml For more information, see Provisioning networks and VIPs for the overcloud . If you are not using pre-provisioned nodes, the output file from provisioning bare-metal nodes. Example: spine-leaf-baremetal-nodes-provisioned.yaml . For more information, see Provisioning bare metal nodes for the overcloud . Any other custom environment files. Enter the overcloud deploy command by carefully ordering the custom environment files and custom templates that are inputs to the command. The general rule is to specify any unedited heat template files first, followed by your custom environment files and custom templates that contain custom configurations, such as overrides to the default properties. Follow this order for listing the inputs to the overcloud deploy command: Include your custom environment file that contains your custom NIC templates mapped to each role. Example: spine-leaf-nic-roles-map.yaml , after network-environment.yaml . The network-environment.yaml file provides the default network configuration for composable network parameters, that your mapping file overrides. Note that the director renders this file from the network-environment.j2.yaml Jinja2 template. If you created any other spine leaf network environment files, include these environment files after the roles-NIC templates mapping file. Add any additional environment files. For example, an environment file with your container image locations or Ceph cluster configuration. Example This excerpt from a sample overcloud deploy command demonstrates the proper ordering of the command's inputs: Tip For more information, see Creating your overcloud in the Installing and managing Red Hat OpenStack Platform with director guide. Run the overcloud deploy command. When the overcloud creation is finished, the RHOSP director provides details to help you access your overcloud. Verification Perform the steps in Validating your overcloud deployment in the Installing and managing Red Hat OpenStack Platform with director guide. Additional resources Creating your overcloud in the Installing and managing Red Hat OpenStack Platform with director guide overcloud deploy in the Command line interface reference 4.11. Adding a new leaf to a spine-leaf deployment When increasing network capacity or adding a new physical site, you might need to add 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 stackrc undercloud credentials file: Open your network definition template, for example, /home/stack/templates/spine-leaf-networks-data.yaml . 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: 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.yaml and CephStorage1.yaml are copied for the new leaf, Compute3.yaml and CephStorage3.yaml , respectively: Edit the name and HostnameFormatDefault parameters 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: Example The Leaf 1 Ceph Storage parameters have the following values: 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: Example The Leaf 1 Ceph Storage parameters have the following values: 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: This creates a full roles_data_spine_leaf.yaml file 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.yaml and ceph-storageleaf1.yaml are copied for the new leaf, computeleaf3.yaml and ceph-storageleaf3.yaml , respectively: Open your custom environment file that contains the roles and the custom NIC template mappings for each role, for example, spine-leaf-nic-roles-map.yaml. Insert an entry for each role for the new leaf that you are adding. Example In this example, the entries ComputeLeaf3NetworkConfigTemplate and CephStorage3NetworkConfigTemplate have been added: Open your custom network environment file that contains the separate network mappings and sets access to the control plane networks for the overcloud, for example, spine-leaf-ctlplane.yaml and update the control plane parameters. Under the parameter_defaults section, add the control plane subnet mapping for the new leaf network. Also, include the external network mapping for the new leaf network. For flat network mappings, list the new leaf ( leaf3 ) in the NeutronFlatNetworks parameter and set the NeutronBridgeMappings parameter for the new leaf: For VLAN network mappings, additionally set the NeutronNetworkVLANRanges to map VLANs for the new leaf ( leaf3 ) network: Example In this example, flat network mappings are used, and the new leaf ( leaf3 ) entries are added: Provision your modified network. For more information, see Provision your overcloud networks and overcloud VIPs . In your bare metal nodes definition file that you created earlier, for example, spine-leaf-baremetal-nodes.yaml , ensure that the network_config_update variable is set to true . Example Provision your modified nodes. For more information, see Provision bare metal nodes . Redeploy your spine-leaf enabled overcloud, by following the steps in Deploying a spine-leaf enabled overcloud .

Commands:
source ~/stackrc
mkdir /home/stack/templates
cp /usr/share/openstack-tripleo-heat-templates/network-data-samples/ routed-networks.yaml /home/stack/templates/spine-leaf-networks-data.yaml
- name: InternalApi name_lower: internal_api vip: true mtu: 1500 subnets: internal_api_subnet: ip_subnet: 172.16.32.0/24 gateway_ip: 172.16.32.1 allocation_pools: - start: 172.16.32.4 end: 172.16.32.250 vlan: 20 internal_api_leaf1_subnet: ip_subnet: 172.16.33.0/24 gateway_ip: 172.16.33.1 allocation_pools: - start: 172.16.33.4 end: 172.16.33.250 vlan: 30 internal_api_leaf2_subnet: ip_subnet: 172.16.34.0/24 gateway_ip: 172.16.34.1 allocation_pools: - start: 172.16.34.4 end: 172.16.34.250 vlan: 40
source ~/stackrc
cp /usr/share/openstack-tripleo-heat-templates/roles/Controller.yaml ~/roles/Controller0.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 ~/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
- name: ComputeLeaf0 HostnameFormatDefault: '%stackname%-compute-leaf0-%index%'
- name: CephStorageLeaf0 HostnameFormatDefault: '%stackname%-cephstorage-leaf0-%index%'
- name: ComputeLeaf1 networks: InternalApi: subnet: internal_api_leaf1 Tenant: subnet: tenant_leaf1 Storage: subnet: storage_leaf1
- name: CephStorageLeaf1 networks: Storage: subnet: storage_leaf1 StorageMgmt: subnet: storage_mgmt_leaf1
- name: ControllerRack1 ServicesDefault: - OS::TripleO::Services::Frr - OS::TripleO::Services::OVNBgpAgent
openstack overcloud roles generate --roles-path ~/roles -o spine-leaf-roles-data.yaml Controller Compute Compute1 Compute2 CephStorage CephStorage1 CephStorage2
source ~/stackrc
cp -r /usr/share/ansible/roles/tripleo_network_config/ templates/single-nic-vlans/* /home/stack/templates/spine-leaf-nics/.
{% set mtu_list = [ctlplane_mtu] %} {% for network in role_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_subnet_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 role_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 %}
parameter_defaults: %%ROLE%%NetworkConfigTemplate: <path_to_ansible_jinja2_nic_config_file>
parameter_defaults: Controller0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' Controller1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' Controller2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' ComputeLeaf0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' ComputeLeaf1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' ComputeLeaf2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' CephStorage0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' CephStorage1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' CephStorage2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
source ~/stackrc
parameter_defaults: NeutronFlatNetworks: leaf0,leaf1,leaf2 Controller0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Controller1Parameters: NeutronBridgeMappings: "leaf0:br-ex" Controller2Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute1Parameters: NeutronBridgeMappings: "leaf1:br-ex" Compute2Parameters: NeutronBridgeMappings: "leaf2:br-ex"
parameter_defaults: NeutronNetworkType: 'geneve,vlan' NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000' Controller0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Controller1Parameters: NeutronBridgeMappings: "leaf0:br-ex" Controller2Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute1Parameters: NeutronBridgeMappings: "leaf1:br-ex" Compute2Parameters: NeutronBridgeMappings: "leaf2:br-ex"
parameter_defaults: NeutronFlatNetworks: leaf0,leaf1,leaf2 Controller0Parameters: NeutronBridgeMappings: "leaf0:br-ex" ControllerControlPlaneSubnet: leaf0 Controller1Parameters: NeutronBridgeMappings: "leaf0:br-ex" Controller1ControlPlaneSubnet: leaf0 Controller2Parameters: NeutronBridgeMappings: "leaf0:br-ex" Controller2ControlPlaneSubnet: leaf0 Compute0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute0ControlPlaneSubnet: leaf0 CephStorage0Parameters: CephStorage0ControlPlaneSubnet: leaf0 Compute1Parameters: NeutronBridgeMappings: "leaf1:br-ex" Compute1ControlPlaneSubnet: leaf1 CephStorage1Parameters: CephStorage1ControlPlaneSubnet: leaf1 Compute2Parameters: NeutronBridgeMappings: "leaf2:br-ex" Compute2ControlPlaneSubnet: leaf2 CephStorage2Parameters: CephStorage2ControlPlaneSubnet: leaf2
source ~/stackrc
- network: storage_mgmt subnet: storage_mgmt_subnet_leaf1 - network: internal_api subnet: internal_api_subnet_leaf1 - network: storage subnet: storage_subnet_leaf1 - network: external subnet: external_subnet_leaf1 ip_address: 172.20.11.50 - network: ctlplane subnet: leaf0 - network: oc_provisioning subnet: oc_provisioning_subnet_leaf1 - network: storage_nfs subnet: storage_nfs_subnet_leaf1
source ~/stackrc
openstack overcloud network provision --output spine-leaf-networks-provisioned.yaml /home/stack/templates/spine-leaf-networks-data.yaml
openstack overcloud network vip provision --stack spine-leaf-overcloud --output spine-leaf-vips-provisioned.yaml /home/stack/templates/spine-leaf-vip-data.yaml
openstack network list openstack subnet list openstack network show <network> openstack subnet show <subnet> openstack port list openstack port show <port>
source ~/stackrc
nodes: - name: "node01" ports: - address: "aa:aa:aa:aa:aa:aa" physical_network: ctlplane local_link_connection: switch_id: "52:54:00:00:00:00" port_id: p0 cpu: 4 memory: 6144 disk: 40 arch: "x86_64" pm_type: "ipmi" pm_user: "admin" pm_password: "p@55w0rd!" pm_addr: "192.168.24.205" - name: "node02" ports: - address: "bb:bb:bb:bb:bb:bb" physical_network: ctlplane local_link_connection: switch_id: "52:54:00:00:00:00" port_id: p0 cpu: 4 memory: 6144 disk: 40 arch: "x86_64" pm_type: "ipmi" pm_user: "admin" pm_password: "p@55w0rd!" pm_addr: "192.168.24.206"
openstack overcloud node import --validate-only ~/templates/ baremetal-nodes.yaml
openstack overcloud node import ~/baremetal-nodes.yaml
openstack baremetal node list
source ~/stackrc
validation run --group pre-introspection
validation history get --full <UUID>
openstack overcloud node introspect --all-manageable --provide
sudo tail -f /var/log/containers/ironic-inspector/ironic-inspector.log
source ~/stackrc
- name: Controller count: 3 defaults: networks: - network: ctlplane vif: true - network: external subnet: external_subnet - network: internal_api subnet: internal_api_subnet01 - network: storage subnet: storage_subnet01 - network: storage_mgmt subnet: storage_mgmt_subnet01 - network: tenant subnet: tenant_subnet01 network_config: template: /home/stack/templates/spine-leaf-nics/single-nic-vlans.j2 default_route_network: - external - name: Compute0 count: 1 defaults: networks: - network: ctlplane vif: true - network: internal_api subnet: internal_api_subnet02 - network: tenant subnet: tenant_subnet02 - network: storage subnet: storage_subnet02 network_config: template: /home/stack/templates/spine-leaf-nics/single-nic-vlans.j2 - name: Compute1
openstack overcloud node provision --stack spine_leaf_overcloud --network-config --output spine-leaf-baremetal-nodes-provisioned.yaml /home/stack/templates/spine-leaf-baremetal-nodes.yaml
watch openstack baremetal node list
metalsmith list
openstack baremetal allocation list
source ~/stackrc
openstack overcloud deploy --templates -n /home/stack/templates/spine-leaf-networks-data.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/services/frr.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/services/ovn-bgp-agent.yaml -e /home/stack/templates/spine-leaf-nic-roles-map.yaml -e /home/stack/templates/spine-leaf-ctlplane.yaml -e /home/stack/templates/spine-leaf-baremetal-provisioned.yaml -e /home/stack/templates/spine-leaf-networks-provisioned.yaml -e /home/stack/templates/spine-leaf-vips-provisioned.yaml -e /home/stack/containers-prepare-parameter.yaml -e /home/stack/inject-trust-anchor-hiera.yaml -r /home/stack/templates/spine-leaf-roles-data.yaml
source ~/stackrc
- name: InternalApi name_lower: internal_api vip: true vlan: 10 ip_subnet: '172.18.0.0/24' allocation_pools: [{'start': '172.18.0.4', 'end': '172.18.0.250'}] gateway_ip: '172.18.0.1' subnets: internal_api_leaf1: vlan: 11 ip_subnet: '172.18.1.0/24' allocation_pools: [{'start': '172.18.1.4', 'end': '172.18.1.250'}] gateway_ip: '172.18.1.1' internal_api_leaf2: vlan: 12 ip_subnet: '172.18.2.0/24' allocation_pools: [{'start': '172.18.2.4', 'end': '172.18.2.250'}] gateway_ip: '172.18.2.1' internal_api_leaf3: vlan: 13 ip_subnet: '172.18.3.0/24' allocation_pools: [{'start': '172.18.3.4', 'end': '172.18.3.250'}] gateway_ip: '172.18.3.1'
cp ~/roles/Compute1.yaml ~/roles/Compute3.yaml cp ~/roles/CephStorage1.yaml ~/roles/CephStorage3.yaml
- name: ComputeLeaf1 HostnameFormatDefault: '%stackname%-compute-leaf1-%index%'
- name: CephStorageLeaf1 HostnameFormatDefault: '%stackname%-cephstorage-leaf1-%index%'
- name: ComputeLeaf1 networks: InternalApi: subnet: internal_api_leaf1 Tenant: subnet: tenant_leaf1 Storage: subnet: storage_leaf1
- name: CephStorageLeaf1 networks: Storage: subnet: storage_leaf1 StorageMgmt: subnet: storage_mgmt_leaf1
openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Controller1 Controller2 Compute Compute1 Compute2 Compute3 CephStorage CephStorage1 CephStorage2 CephStorage3
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
parameter_defaults: %%ROLE%%NetworkConfigTemplate: <path_to_ansible_jinja2_nic_config_file>
parameter_defaults: Controller0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' Controller1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' Controller2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' ComputeLeaf0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' ComputeLeaf1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' ComputeLeaf2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' ComputeLeaf3NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' CephStorage0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' CephStorage1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' CephStorage2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2' CephStorage3NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
parameter_defaults: NeutronFlatNetworks: leaf0,leaf1,leaf2,leaf3 Controller0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute1Parameters: NeutronBridgeMappings: "leaf1:br-ex" Compute2Parameters: NeutronBridgeMappings: "leaf2:br-ex" Compute3Parameters: NeutronBridgeMappings: "leaf3:br-ex"
NeutronNetworkType: 'geneve,vlan' NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000,leaf3:1:1000'
parameter_defaults: NeutronFlatNetworks: leaf0,leaf1,leaf2,leaf3 Controller0Parameters: NeutronBridgeMappings: "leaf0:br-ex" ControllerControlPlaneSubnet: leaf0 Controller1Parameters: NeutronBridgeMappings: "leaf0:br-ex" Controller1ControlPlaneSubnet: leaf0 Controller2Parameters: NeutronBridgeMappings: "leaf0:br-ex" Controller2ControlPlaneSubnet: leaf0 Compute0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute0ControlPlaneSubnet: leaf0 Compute1Parameters: NeutronBridgeMappings: "leaf1:br-ex" Compute1ControlPlaneSubnet: leaf1 Compute2Parameters: NeutronBridgeMappings: "leaf2:br-ex" Compute2ControlPlaneSubnet: leaf2 Compute3Parameters: NeutronBridgeMappings: "leaf3:br-ex" Compute3ControlPlaneSubnet: leaf3
- name: Controller count: 3 defaults: networks: - network: ctlplane vif: true - network: external subnet: external_subnet - network: internal_api subnet: internal_api_subnet01 - network: storage subnet: storage_subnet01 - network: storage_mgmt subnet: storage_mgmt_subnet01 - network: tenant subnet: tenant_subnet01 network_config: template: /home/stack/templates/spine-leaf-nics/single-nic-vlans.j2 default_route_network: - external network_config_update: true