20.6. 将新的控制器节点部署到 overcloud
要将新控制器节点部署到 overcloud,请完成以下步骤。
先决条件
- 新 Controller 节点必须注册、检查和标记以进行置备。如需更多信息,请参阅置备裸机 overcloud 节点
流程
登录到 director 并提供
stackrc
凭证文件:$ source ~/stackrc
使用原始
overcloud-baremetal-deploy.yaml
环境文件置备 overcloud:$ openstack overcloud node provision --stack overcloud --network-config --output /home/stack/templates/overcloud-baremetal-deployed.yaml /home/stack/templates/overcloud-baremetal-deploy.yaml
注意如果要使用相同的调度、放置或 IP 地址,您可以编辑
overcloud-baremetal-deploy.yaml
环境文件。在instances
部分中,为新 controller-0 实例设置主机名、名称和网络。例如:- name: Controller count: 3 hostname_format: controller-%index% defaults: resource_class: BAREMETAL.controller networks: - network: external subnet: external_subnet - network: internal_api subnet: internal_api_subnet01 - network: storage subnet: storage_subnet01 - network: storage_mgmt subnet: storage_mgmt_subnet01 - network: tenant subnet: tenant_subnet01 network_config: template: templates/multiple_nics/multiple_nics_dvr.j2 default_route_network: - external instances: - hostname: controller-0 name: baremetal-35400-leaf1-2 networks: - network: external subnet: external_subnet fixed_ip: 10.0.0.224 - network: internal_api subnet: internal_api_subnet01 fixed_ip: 172.17.0.97 - network: storage subnet: storage_subnet01 fixed_ip: 172.18.0.24 - network: storage_mgmt subnet: storage_mgmt_subnet01 fixed_ip: 172.19.0.129 - network: tenant subnet: tenant_subnet01 fixed_ip: 172.16.0.11 - name: Compute count: 2 hostname_format: compute-%index% defaults: [ ... ]
置备节点时,从
overcloud-baremetal-deploy.yaml
文件中删除instances
部分。要在新 Controller 节点上创建
cephadm
用户,请导出包含新主机信息的基本 Ceph 规格:$ openstack overcloud ceph spec --stack overcloud \ /home/stack/templates/overcloud-baremetal-deployed.yaml \ -o ceph_spec_host.yaml
注意如果您的环境使用自定义角色,请包含
--roles-data
选项。将
cephadm
用户添加到新的 Controller 节点:$ openstack overcloud ceph user enable \ --stack overcloud ceph_spec_host.yaml
将新角色添加到 Ceph 集群:
$ sudo cephadm shell \ -- ceph orch test add controlller-3 <IP_ADDRESS> <LABELS> 192.168.24.31 _admin mon mgr Inferring fsid 4cf401f9-dd4c-5cda-9f0a-fa47fbf12b31 Using recent ceph image undercloud-0.ctlplane.redhat.local:8787/rh-osbs/rhceph@sha256:3075e8708792ebd527ca14849b6af4a11256a3f881ab09b837d7af0f8b2102ea Added host 'controller-3' with addr '192.168.24.31'
- 将 <IP_ADDRESS> 替换为 Controller 节点的 IP 地址。
- 将 <LABELS> 替换为任何所需的 Ceph 标签。
重新运行
openstack overcloud deploy
命令:$ openstack overcloud deploy --stack overcloud --templates \ -n /home/stack/templates/network_data.yaml \ -r /home/stack/templates/roles_data.yaml \ -e /home/stack/templates/overcloud-baremetal-deployed.yaml \ -e /home/stack/templates/overcloud-networks-deployed.yaml \ -e /home/stack/templates/overcloud-vips-deployed.yaml \ -e /home/stack/templates/bootstrap_node.yaml \ -e [ ... ]
注意如果替换 Controller 节点是 bootstrap 节点,请包含
bootstrap_node.yaml
环境文件。