Questo contenuto non è disponibile nella lingua selezionata.
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
Computerole for the Compute nodes in a cell, and the dedicatedCellControllerrole 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
CellControllerrole.NoteIf 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 Copia collegamentoCollegamento copiato negli appunti!
Extract parameter information from the first cell, named default, in the basic overcloud stack.
Procedure
-
Log in to the undercloud as the
stackuser. Source the
stackrcfile:[stack@director ~]$ source ~/stackrcExport the cell configuration and password information from the
defaultcell 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.yamlThis command exports the
EndpointMap,HostsEntry,AllNodesConfig,GlobalConfigparameters, and the password information, to the common environment file.TipIf the environment file already exists, enter the command with the
--force-overwriteor-foption.
2.2. Creating a cell roles file Copia collegamentoCollegamento copiato negli appunti!
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.yamlthat includes theComputeandCellControllerroles:(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 Copia collegamentoCollegamento copiato negli appunti!
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.
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
cellcontrollerovercloud flavor for the cell controller node:(undercloud)$ openstack flavor create --id auto \ --ram <ram_size_mb> --disk <disk_size_gb> \ --vcpus <no_vcpus> cellcontroller-
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.NoteThese properties are not used for scheduling instances. However, the Compute scheduler does use the disk size to determine the root partition size.
-
Replace
Retrieve a list of your nodes to identify their UUIDs:
(undercloud)$ openstack baremetal node listTag 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.Associate the
cellcontrollerflavor with the custom cell controller resource class:(undercloud)$ openstack flavor set \ --property resources:CUSTOM_BAREMETAL_CELL_CONTROLLER=1 \ cellcontrollerTo 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_.NoteA 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:
(undercloud)$ openstack flavor set \ --property resources:VCPU=0 --property resources:MEMORY_MB=0 \ --property resources:DISK_GB=0 cellcontroller
2.4. Configuring and deploying each cell stack with the same network Copia collegamentoCollegamento copiato negli appunti!
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:
(undercloud)$ mkdir 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:
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%'To allocate a network resource to the cell and register cells to the network, add the following parameters to each environment file:
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.yamlAdd 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/common/cell_roles_data.yaml \ -e $HOME/common/default_cell_export.yaml \ -e $HOME/cells/cell1.yamlRepeat this step for each cell stack until all your cell stacks are deployed.