2.4. 使用相同的网络配置和部署每个单元堆栈
您必须将每个单元堆栈配置为使用 overcloud 堆栈的网络,并将单元标识为部署中的额外单元。您还必须配置节点类别,以及单元格中的 Controller 和 Compute 节点数量。
流程
为新单元创建一个新目录:
(undercloud)$ mkdir cells-
为单元目录(
cells)中每个额外单元创建一个新的环境文件,用于特定于单元的参数,例如/cells/cell1.yaml。 为每个环境文件添加以下参数,更新部署中每个单元的参数值:
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)$ 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.yaml为每个单元堆栈重复此步骤,直到部署所有单元堆栈。