Chapter 2. Configuring and deploying a multi-cell environment with the same networks To configure your Red Hat OpenStack (RHOSP) deployment to handle multiple cells by using the same networks, you must perform the following tasks: Extract parameter information from the control plane of the overcloud stack. Create a cell roles file. You can use the default Compute role for the Compute nodes in a cell, and the dedicated CellController role for the cell controller node. You can also create custom roles for use in your multi-cell environment, such as a custom role for each cell stack. For more information on creating custom roles, see Composable services and custom roles . Configure a cell controller flavor for the CellController role. Note If you created a custom role for your multi-cell environment, you must also configure a flavor for the custom role. Configure each cell. Deploy each cell stack. 2.1. 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. 2.2. Creating a cell roles file You can create a common cell roles file for use by all cell stacks when the stacks use the same network and no custom roles are required. Procedure Generate a new roles data file named cell_roles_data.yaml that includes the Compute and CellController roles: 2.3. Designating a host for the CellController role To designate a bare metal node for the CellController role, you must configure a flavor and resource class to use to tag the node for the CellController role. The following procedure creates a flavor and a bare metal resource class for the CellController role. Tip If you created a custom role for your multiple cell environment, you can follow this procedure to configure the flavor and resource class for the custom role, by substituting the cell controller names with the name of your custom role. Procedure Create the cellcontroller overcloud flavor for the cell 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 cellcontroller 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: 2.4. Configuring and deploying each cell stack with the same network You must configure each cell stack to use the networks of the overcloud stack, and identify the cell as an additional cell in the deployment. You must also configure the node flavors, and the number of Controller and Compute nodes in the cell. Procedure Create a new directory for the new cells: Create a new environment file for each additional cell in the cell directory, cells , for cell-specific parameters, for example, /cells/cell1.yaml . Add the following parameters to each environment file, updating the parameter values for each cell in your deployment: To allocate a network resource to the cell and register cells to the network, add the following parameters to each environment file: Add the environment files to the stack with your other environment files and deploy the cell stack: Repeat this step for each cell stack until all your cell stacks are deployed. 2.5. steps Creating and managing the cell within the Compute service

Commands:
[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 common/cell_roles_data.yaml Compute CellController
(undercloud)USD openstack flavor create --id auto --ram <ram_size_mb> --disk <disk_size_gb> --vcpus <no_vcpus> cellcontroller
(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 cellcontroller
(undercloud)USD openstack flavor set --property resources:VCPU=0 --property resources:MEMORY_MB=0 --property resources:DISK_GB=0 cellcontroller
(undercloud)USD mkdir cells
resource_registry: 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 OvercloudCellControllerFlavor: cellcontroller OvercloudComputeFlavor: compute # Number of controllers/computes in the cell CellControllerCount: 3 ComputeCount: 1 # Node names must be unique across all cells ComputeHostnameFormat: 'cell1-compute-%index%' CellControllerHostnameFormat: 'cell1-cellcontroller-%index%'
resource_registry: OS::TripleO::CellController::Net::SoftwareConfig: /home/stack/templates/nic-configs/cellcontroller.yaml OS::TripleO::Compute::Net::SoftwareConfig: /home/stack/templates/nic-configs/compute.yaml
(undercloud)USD openstack overcloud deploy --templates --stack cell1 -e [your environment files] -r USDHOME/common/cell_roles_data.yaml -e USDHOME/common/default_cell_export.yaml -e USDHOME/cells/cell1.yaml