Chapter 3. Configuring and deploying a multi-cell environment with routed networks 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 . Configure a flavor 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 create a flavor for each role in each leaf network so that you can tag nodes into each leaf. For more information, see Creating flavors and tagging nodes for leaf networks . 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 Custom composable networks in the Advanced Overcloud Customization 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 a flavor and resource class to use to tag the node for the cell role. Perform the following procedure to create a flavor and 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. Procedure Create the cellcontrollercell1 overcloud flavor for the cell1 controller node: Replace <ram_size_mb> with the RAM of the bare metal node, in MB. Replace <disk_size_gb> with the size of the disk on the bare metal node, in GB. Replace <no_vcpus> with the number of CPUs on the bare metal node. Note These properties are not used for scheduling instances. However, the Compute scheduler does use the disk size to determine the root partition size. 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 ID of the bare metal node. Associate the cellcontrollercell1 flavor with the custom cell controller resource class: To determine the name of a custom resource class that corresponds to a resource class of a Bare Metal service node, convert the resource class to uppercase, replace each punctuation mark with an underscore, and prefix with CUSTOM_ . Note A flavor can request only one instance of a bare metal resource class. Set the following flavor properties to prevent the Compute scheduler from using the bare metal flavor properties to schedule instances: 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 -n /home/stack/common/network_data_routed_multi_cell.yaml -e [your environment files]
[stack@director ~]USD source ~/stackrc
(undercloud)USD sudo --preserve-env openstack overcloud cell export --output-file common/default_cell_export.yaml
(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 flavor create --id auto --ram <ram_size_mb> --disk <disk_size_gb> --vcpus <no_vcpus> cellcontrollercell1
(undercloud)USD openstack baremetal node list
(undercloud)USD openstack baremetal node set --resource-class baremetal.CELL-CONTROLLER <node>
(undercloud)USD openstack flavor set --property resources:CUSTOM_BAREMETAL_CELL_CONTROLLER=1 cellcontrollercell1
(undercloud)USD openstack flavor set --property resources:VCPU=0 --property resources:MEMORY_MB=0 --property resources:DISK_GB=0 cellcontrollercell1
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 OS::TripleO::Network::Ports::OVNDBsVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml OS::TripleO::Network::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml parameter_defaults: #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 CloudName: cell1.ooo.test CloudNameInternal: cell1.internalapi.ooo.test CloudNameStorage: cell1.storage.ooo.test CloudNameStorageManagement: cell1.storagemgmt.ooo.test CloudNameCtlplane: cell1.ctlplane.ooo.test # Map the flavors to use for the CellController and Compute roles OvercloudCellControllerCell1Flavor: cellcontrollercell1 OvercloudComputeCell1Flavor: computecell1 # Number of controllers/computes in the cell CellControllerCell1Count: 3 ComputeCell1Count: 1
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] -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']