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:

  1. Prepare the control plane for cell network routing on the overcloud stack.
  2. Extract parameter information from the control plane of the overcloud stack.
  3. Configure the cell network routing on the cell stacks.
  4. 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.
  5. 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.

  6. Configure each cell.
  7. Deploy each cell stack.

3.1. Prerequisites

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

  1. Log in to the undercloud as the stack user.
  2. Source the stackrc file:

    [stack@director ~]$ source ~/stackrc
  3. Create a new directory for the common stack configuration:

    (undercloud)$ mkdir common
  4. Copy the default network_data_subnets_routed.yaml file to your common directory to add a composable network for your overcloud stack:

    (undercloud)$ cp /usr/share/openstack-tripleo-heat-templates/network_data_subnets_routed.yaml ~/common/network_data_routed_multi_cell.yaml

    For more information on composable networks, see Custom composable networks in the Advanced Overcloud Customization guide.

  5. 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.
  6. Ensure that the interfaces in the NIC template for each role include <network_name>InterfaceRoutes, for example:

                -
                   type: vlan
                   vlan_id:
                       get_param: InternalApiNetworkVlanID
                   addresses:
                   -
                     ip_netmask:
                         get_param: InternalApiIpSubnet
                   routes:
                     get_param: InternalApiInterfaceRoutes
  7. Add the network_data_routed_multi_cell.yaml file to the overcloud stack with your other environment files and deploy the overcloud:

    (undercloud)$ openstack overcloud deploy --templates \
     --stack overcloud \
     -n /home/stack/common/network_data_routed_multi_cell.yaml \
     -e [your environment files]

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

  1. Log in to the undercloud as the stack user.
  2. Source the stackrc file:

    [stack@director ~]$ source ~/stackrc
  3. 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:

    (undercloud)$ sudo --preserve-env openstack overcloud cell export \
     --output-file common/default_cell_export.yaml

    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

  1. 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:

    (undercloud)$ openstack overcloud roles generate \
      --roles-path /usr/share/openstack-tripleo-heat-templates/roles \
      -o cell1/cell1_roles_data.yaml \
      Compute:ComputeCell1 \
      CellController:CellControllerCell1
  2. Add the HostnameFormatDefault to each role definition in your new cell roles file:

    - name: ComputeCell1
      ...
      HostnameFormatDefault: '%stackname%-compute-cell1-%index%'
      ServicesDefault:
      ...
      networks:
      ...
    - name: CellControllerCell1
      ...
      HostnameFormatDefault: '%stackname%-cellcontrol-cell1-%index%'
      ServicesDefault:
      ...
      networks:
      ...
  3. Add the Networking service (neutron) DHCP and Metadata agents to the ComputeCell1 and CellControllerCell1 roles, if they are not already present:

    - 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:
      ...
  4. Add the subnets you configured in network_data_routed_multi_cell.yaml to the ComputeCell1 and CellControllerCell1 roles:

    - 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

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

  1. Create the cellcontrollercell1 overcloud flavor for the cell1 controller node:

    (undercloud)$ openstack flavor create --id auto \
     --ram <ram_size_mb> --disk <disk_size_gb> \
     --vcpus <no_vcpus> cellcontrollercell1
    • 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.

  2. Retrieve a list of your nodes to identify their UUIDs:

    (undercloud)$ openstack baremetal node list
  3. Tag each bare metal node that you want to designate as a cell controller with a custom cell controller resource class:

    (undercloud)$ openstack baremetal node set \
     --resource-class baremetal.CELL-CONTROLLER <node>

    Replace <node> with the ID of the bare metal node.

  4. Associate the cellcontrollercell1 flavor with the custom cell controller resource class:

    (undercloud)$ openstack flavor set \
     --property resources:CUSTOM_BAREMETAL_CELL_CONTROLLER=1 \
      cellcontrollercell1

    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.

  5. Set the following flavor properties to prevent the Compute scheduler from using the bare metal flavor properties to schedule instances:

    (undercloud)$ openstack flavor set \
     --property resources:VCPU=0 --property resources:MEMORY_MB=0 \
     --property resources:DISK_GB=0 cellcontrollercell1

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

  1. Create a new environment file for the additional cell in the cell directory for cell-specific parameters, for example, /home/stack/cell1/cell1.yaml.
  2. Add the following parameters to the environment file:

    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
  3. To run the Compute metadata API in each cell instead of in the global Controller, add the following parameter to your cell environment file:

    parameter_defaults:
      NovaLocalMetadataPerCell: True
  4. Add the virtual IP address (VIP) information for the cell to your cell environment file:

    parameter_defaults:
      ...
      VipSubnetMap:
        InternalApi: internal_api_cell1
        Storage: storage_cell1
        StorageMgmt: storage_mgmt_cell1
        External: external_subnet

    This creates virtual IP addresses on the subnet associated with the L2 network segment that the cell Controller nodes are connected to.

  5. Add the environment files to the stack with your other environment files and deploy the cell stack:

    (undercloud)$ 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

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

  1. Add the following configuration to an environment file for the overcloud stack to update the network configuration with the new cell subnet:

    parameter_defaults:
      NetworkDeploymentActions: ['CREATE','UPDATE']
  2. Add the configuration for the new cell subnet to /common/network_data_routed_multi_cell.yaml.
  3. Deploy the overcloud stack:

    (undercloud)$ openstack overcloud deploy --templates \
     --stack overcloud \
     -n /home/stack/common/network_data_routed_multi_cell.yaml \
     -e [your environment files]
  4. Optional: Reset NetworkDeploymentActions to the default for the next deployment:

    parameter_defaults:
      NetworkDeploymentActions: ['CREATE']

3.8. Next steps