Chapter 2. Configuring and deploying a multi-cell environment with the same networks To configure your Red Hat OpenStack Platform (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 . Designate a host for the CellController role. Note If you created a custom role for your multi-cell environment, you must also designate a host 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 the bare-metal node with a resource class to tag the node for the CellController role. Tip If you created a custom role for your multiple cell environment, you can follow this procedure to configure the resource class for the 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 CellController 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 CellController 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 <cell_topology_file> with the name of the network topology file to use for the cell stacks, for example, compute.j2 . Replace <role_topology_file> with the name of the network topology file to use for the CellController role, for example, cell_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 CellController role, for example, cell_controller_net_top.j2 . Set to compute.j2 to use the default network topology. 2.4. Configuring and deploying each cell stack with the same network You must configure each cell stack to identify the cell as an additional cell in the deployment. 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: 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 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 common/cell_roles_data.yaml Compute CellController
(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: Controller count: 3 - name: Compute count: 3 defaults: network_config: template: /home/stack/templates/nic-config/<cell_topology_file> instances: - hostname: cell1-compute-%index% name: computecell1 - hostname: cell1-compute-%index% name: computecell2 - hostname: cell1-compute-%index% name: computecell3 - name: CellController count: 1 defaults: resource_class: baremetal.CELL-CONTROLLER network_config: template: /home/stack/templates/nic-config/<role_topology_file> instances: - hostname: cell1-cellcontroller-%index% name: cellcontroller
(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 CellControllerNetworkConfigTemplate: /home/stack/templates/nic-configs/<role_topology_file> ControllerNetworkConfigTemplate: /home/stack/templates/nic-configs/controller.j2
(undercloud)USD mkdir cells
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
(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 USDHOME/common/cell_roles_data.yaml -e USDHOME/common/default_cell_export.yaml -e USDHOME/cells/cell1.yaml