Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 2. Configuring and deploying a multi-cell environment with the same networks

download PDF

To configure your Red Hat OpenStack Platform (RHOSP) deployment to handle multiple cells by using the same networks, you must perform the following tasks:

  1. Extract parameter information from the control plane of the overcloud stack.
  2. 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.
  3. 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.

  4. Configure each cell.
  5. 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

  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)$ openstack overcloud cell export --control-plane-stack overcloud \
     -f --output-file common/default_cell_export.yaml \
     --working-dir /home/stack/overcloud-deploy/overcloud/

    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:

    (undercloud)$ openstack overcloud roles generate \
      --roles-path /usr/share/openstack-tripleo-heat-templates/roles \
      -o common/cell_roles_data.yaml Compute CellController

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

  1. 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.
  2. Inspect the node hardware:

    (undercloud)$ openstack overcloud node introspect \
     --all-manageable --provide

    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.

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

    (undercloud)$ openstack baremetal node list
  4. 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 name or UUID of the bare-metal node.
  5. 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:

    - 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
    • 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.

  6. Provision the new nodes for your role:

    (undercloud)$ openstack overcloud node provision \
    [--stack <stack>] \
    [--network-config \]
    --output <deployment_file> \
    /home/stack/templates/overcloud-baremetal-deploy.yaml
    • 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.
  7. Monitor the provisioning progress in a separate terminal. When provisioning is successful, the node state changes from available to active:

    (undercloud)$ watch openstack baremetal node list
  8. 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:

    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
    • 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

  1. Create a new directory for the new cells:

    (undercloud)$ mkdir cells
  2. Create a new environment file for each additional cell in the cell directory, cells, for cell-specific parameters, for example, /cells/cell1.yaml.
  3. Add the following parameters to each environment file, updating the parameter values for each cell in your deployment:

    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
  4. 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] \
     -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/common/cell_roles_data.yaml \
     -e $HOME/common/default_cell_export.yaml \
     -e $HOME/cells/cell1.yaml

    Repeat this step for each cell stack until all your cell stacks are deployed.

2.5. Next steps

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.