Chapter 3. Configuring and deploying a multi-cell environment with routed networks Important The content in this section is available in this release as a Technology Preview , and therefore is not fully supported by Red Hat. It should only be used for testing, and should not be deployed in a production environment. For more information, see Technology Preview . To configure your Red Hat OpenStack (RHOSP) deployment to handle multiple cells with routed networks, you must perform the following tasks: Prepare the control plane for cell network routing on the overcloud stack. Extract parameter information from the control plane of the overcloud stack. Configure the cell network routing on the cell stacks. Create cell roles files for each stack. You can use the default Compute role as a base for the Compute nodes in a cell, and the dedicated CellController role as a base for the cell controller node. You can also create custom roles for use in your multi-cell environment. For more information on creating custom roles, see Composable services and custom roles . Designate a host for each custom role you create. Note This procedure is for an environment with a single control plane network. If your environment has multiple control plane networks, such as a spine leaf network environment, then you must also designate a host for each role in each leaf network so that you can tag nodes into each leaf. For more information, see Designating a role for leaf nodes . Configure each cell. Deploy each cell stack. 3.1. Prerequisites You have configured your undercloud for routed networks. For more information, see Configuring routed spine-leaf in the undercloud . 3.2. Preparing the control plane and default cell for cell network routing You must configure routes on the overcloud stack for the overcloud stack to communicate with the cells. To achieve this, create a network data file that defines all networks and subnets in the main stack, and use this file to deploy both the overcloud stack and the cell stacks. Procedure Log in to the undercloud as the stack user. Source the stackrc file: Create a new directory for the common stack configuration: Copy the default network_data_subnets_routed.yaml file to your common directory to add a composable network for your overcloud stack: For more information on composable networks, see Composable networks in the Director installation and usage guide. Update the configuration in /common/network_data_routed_multi_cell.yaml for your network, and update the cell subnet names for easy identification, for example, change internal_api_leaf1 to internal_api_cell1 . Ensure that the interfaces in the NIC template for each role include <network_name>InterfaceRoutes , for example: Add the network_data_routed_multi_cell.yaml file to the overcloud stack with your other environment files and deploy the overcloud: 3.3. Extracting parameter information from the overcloud stack control plane Extract parameter information from the first cell, named default , in the basic overcloud stack. Procedure Log in to the undercloud as the stack user. Source the stackrc file: Export the cell configuration and password information from the default cell in the overcloud stack to a new common environment file for the multi-cell deployment: This command exports the EndpointMap , HostsEntry , AllNodesConfig , GlobalConfig parameters, and the password information, to the common environment file. Tip If the environment file already exists, enter the command with the --force-overwrite or -f option. 3.4. Creating cell roles files for routed networks When each stack uses a different network, create a cell roles file for each cell stack that includes a custom cell role. Note You must create a flavor for each custom role. For more information, see Designating hosts for cell roles . Procedure Generate a new roles data file that includes the CellController role, along with other roles you need for the cell stack. The following example generates the roles data file cell1_roles_data.yaml , which includes the roles CellController and Compute : Add the HostnameFormatDefault to each role definition in your new cell roles file: Add the Networking service (neutron) DHCP and Metadata agents to the ComputeCell1 and CellControllerCell1 roles, if they are not already present: Add the subnets you configured in network_data_routed_multi_cell.yaml to the ComputeCell1 and CellControllerCell1 roles: 3.5. Designating hosts for cell roles To designate a bare-metal node for a cell role, you must configure the bare-metal node with a resource class to use to tag the node for the cell role. Perform the following procedure to create a bare-metal resource class for the cellcontrollercell1 role. Repeat this procedure for each custom role, by substituting the cell controller names with the name of your custom role. Note The following procedure applies to new overcloud nodes that have not yet been provisioned. To assign a resource class to an existing overcloud node that has already been provisioned, scale down the overcloud to unprovision the node, then scale up the overcloud to reprovision the node with the new resource class assignment. For more information, see Scaling overcloud nodes . Procedure Register the bare-metal node for the cellcontrollercell1 role by adding it to your node definition template: node.json or node.yaml . For more information, see Registering nodes for the overcloud in the Installing and managing Red Hat OpenStack Platform with director guide. Inspect the node hardware: For more information, see Creating an inventory of the bare-metal node hardware in the Installing and managing Red Hat OpenStack Platform with director guide. Retrieve a list of your nodes to identify their UUIDs: Tag each bare-metal node that you want to designate as a cell controller with a custom cell controller resource class: Replace <node> with the name or UUID of the bare-metal node. Add the cellcontrollercell1 role to your node definition file, overcloud-baremetal-deploy.yaml , and define any predictive node placements, resource classes, network topologies, or other attributes that you want to assign to your nodes: Replace <role_topology_file> with the name of the network topology file to use for the cellcontrollercell1 role, for example, cell1_controller_net_top.j2 . You can reuse an existing network topology or create a new custom network interface template for the role or cell. For more information, see Custom network interface templates in the Installing and managing Red Hat OpenStack Platform with director guide. To use the default network definition settings, do not include network_config in the role definition. For more information about the properties that you can use to configure node attributes in your node definition file, see Bare-metal node provisioning attributes . For an example node definition file, see Example node definition file . Provision the new nodes for your role: Optional: Replace <stack> with the name of the stack for which the bare-metal nodes are provisioned. Defaults to overcloud . Optional: Include the --network-config optional argument to provide the network definitions to the cli-overcloud-node-network-config.yaml Ansible playbook. If you have not defined the network definitions in the node definition file by using the network_config property, then the default network definitions are used. Replace <deployment_file> with the name of the heat environment file to generate for inclusion in the deployment command, for example /home/stack/templates/overcloud-baremetal-deployed.yaml . Monitor the provisioning progress in a separate terminal. When provisioning is successful, the node state changes from available to active : If you ran the provisioning command without the --network-config option, then configure the <Role>NetworkConfigTemplate parameters in your network-environment.yaml file to point to your NIC template files: Replace <role_topology_file> with the name of the file that contains the network topology of the cellcontrollercell1 role, for example, cell1_controller_net_top.j2 . Set to controller.j2 to use the default network topology. 3.6. Configuring and deploying each cell stack with routed networks Perform the following procedure to configure one cell stack, cell1 . Repeat the procedure for each additional cell stack you want to deploy until all your cell stacks are deployed. Procedure Create a new environment file for the additional cell in the cell directory for cell-specific parameters, for example, /home/stack/cell1/cell1.yaml . Add the following parameters to the environment file: To run the Compute metadata API in each cell instead of in the global Controller, add the following parameter to your cell environment file: Add the virtual IP address (VIP) information for the cell to your cell environment file: This creates virtual IP addresses on the subnet associated with the L2 network segment that the cell Controller nodes are connected to. Add the environment files to the stack with your other environment files and deploy the cell stack: 3.7. Adding a new cell subnet after deployment To add a new cell subnet to your overcloud stack after you have deployed your multi-cell environment, you must update the value of NetworkDeploymentActions to include 'UPDATE' . Procedure Add the following configuration to an environment file for the overcloud stack to update the network configuration with the new cell subnet: Add the configuration for the new cell subnet to /common/network_data_routed_multi_cell.yaml . Deploy the overcloud stack: Optional: Reset NetworkDeploymentActions to the default for the deployment: 3.8. steps Creating and managing the cell within the Compute service

Commands:
[stack@director ~]USD source ~/stackrc
(undercloud)USD mkdir common
(undercloud)USD cp /usr/share/openstack-tripleo-heat-templates/network_data_subnets_routed.yaml ~/common/network_data_routed_multi_cell.yaml
- type: vlan vlan_id: get_param: InternalApiNetworkVlanID addresses: - ip_netmask: get_param: InternalApiIpSubnet routes: get_param: InternalApiInterfaceRoutes
(undercloud)USD openstack overcloud deploy --templates --stack overcloud -e [your environment files] -n /home/stack/common/network_data_routed_multi_cell.yaml -e /home/stack/templates/overcloud-baremetal-deployed.yaml -e /home/stack/templates/overcloud-networks-deployed.yaml -e /home/stack/templates/overcloud-vip-deployed.yaml
[stack@director ~]USD source ~/stackrc
(undercloud)USD openstack overcloud cell export --control-plane-stack overcloud -f --output-file common/default_cell_export.yaml --working-dir /home/stack/overcloud-deploy/overcloud/
(undercloud)USD openstack overcloud roles generate --roles-path /usr/share/openstack-tripleo-heat-templates/roles -o cell1/cell1_roles_data.yaml Compute:ComputeCell1 CellController:CellControllerCell1
- name: ComputeCell1 HostnameFormatDefault: '%stackname%-compute-cell1-%index%' ServicesDefault: networks: - name: CellControllerCell1 HostnameFormatDefault: '%stackname%-cellcontrol-cell1-%index%' ServicesDefault: networks:
- name: ComputeCell1 HostnameFormatDefault: '%stackname%-compute-cell1-%index%' ServicesDefault: - OS::TripleO::Services::NeutronDhcpAgent - OS::TripleO::Services::NeutronMetadataAgent networks: - name: CellControllerCell1 HostnameFormatDefault: '%stackname%-cellcontrol-cell1-%index%' ServicesDefault: - OS::TripleO::Services::NeutronDhcpAgent - OS::TripleO::Services::NeutronMetadataAgent networks:
- name: ComputeCell1 networks: InternalApi: subnet: internal_api_subnet_cell1 Tenant: subnet: tenant_subnet_cell1 Storage: subnet: storage_subnet_cell1 - name: CellControllerCell1 networks: External: subnet: external_subnet InternalApi: subnet: internal_api_subnet_cell1 Storage: subnet: storage_subnet_cell1 StorageMgmt: subnet: storage_mgmt_subnet_cell1 Tenant: subnet: tenant_subnet_cell1
(undercloud)USD openstack overcloud node introspect --all-manageable --provide
(undercloud)USD openstack baremetal node list
(undercloud)USD openstack baremetal node set --resource-class baremetal.CELL-CONTROLLER <node>
- name: cellcontrollercell1 count: 1 defaults: resource_class: baremetal.CELL1-CONTROLLER network_config: template: /home/stack/templates/nic-config/<role_topology_file> instances: - hostname: cell1-cellcontroller-%index% name: cell1controller
(undercloud)USD openstack overcloud node provision [--stack <stack>] [--network-config \] --output <deployment_file> /home/stack/templates/overcloud-baremetal-deploy.yaml
(undercloud)USD watch openstack baremetal node list
parameter_defaults: ComputeNetworkConfigTemplate: /home/stack/templates/nic-configs/compute.j2 CellControllerCell1NetworkConfigTemplate: /home/stack/templates/nic-configs/<role_topology_file> ControllerNetworkConfigTemplate: /home/stack/templates/nic-configs/controller.j2
resource_registry: OS::TripleO::CellControllerCell1::Net::SoftwareConfig: /home/stack/templates/nic-configs/cellcontroller.yaml OS::TripleO::ComputeCell1::Net::SoftwareConfig: /home/stack/templates/nic-configs/compute.yaml parameter_defaults: # Specify that this is an additional cell NovaAdditionalCell: True # Enable local metadata API for each cell NovaLocalMetadataPerCell: True #Disable network creation in order to use the `network_data.yaml` file from the overcloud stack, # and create ports for the nodes in the separate stacks on the existing networks. ManageNetworks: false # Specify that this is an additional cell NovaAdditionalCell: True # The DNS names for the VIPs for the cell CloudDomain: redhat.local CloudName: cell1.redhat.local CloudNameInternal: cell1.internalapi.redhat.local CloudNameStorage: cell1.storage.redhat.local CloudNameStorageManagement: cell1.storagemgmt.redhat.local CloudNameCtlplane: cell1.ctlplane.redhat.local
parameter_defaults: NovaLocalMetadataPerCell: True
parameter_defaults: VipSubnetMap: InternalApi: internal_api_cell1 Storage: storage_cell1 StorageMgmt: storage_mgmt_cell1 External: external_subnet
(undercloud)USD openstack overcloud deploy --templates --stack cell1 -e [your environment files] -e /home/stack/templates/overcloud-baremetal-deployed.yaml -e /home/stack/templates/overcloud-networks-deployed.yaml -e /home/stack/templates/overcloud-vip-deployed.yaml -r /home/stack/cell1/cell1_roles_data.yaml -n /home/stack/common/network_data_spine_leaf.yaml -e /home/stack/common/default_cell_export.yaml -e /home/stack/cell1/cell1.yaml
parameter_defaults: NetworkDeploymentActions: ['CREATE','UPDATE']
(undercloud)USD openstack overcloud deploy --templates --stack overcloud -n /home/stack/common/network_data_routed_multi_cell.yaml -e [your environment files]
parameter_defaults: NetworkDeploymentActions: ['CREATE']