4.9. 为 overcloud 配置 CPU 架构

Red Hat OpenStack Platform (RHOSP)默认将 overcloud 的 CPU 架构配置为 x86_64。您还可以在 POWER (ppc64le)硬件上部署 overcloud Compute 节点。对于 Compute 节点集群,可使用相同的架构,或使用 x86_64 和 ppc64le 系统的组合。

注意

undercloud、Controller 节点、Ceph Storage 节点及所有其他系统仅在 x86_64 硬件上才受支持。

4.9.1. 将 POWER (ppc64le)配置为 overcloud 的单一 CPU 架构

overcloud 上 Compute 节点的默认 CPU 架构是 x86_64。要在 POWER (ppc64le)硬件上部署 overcloud Compute 节点,您可以将架构更改为 ppc64le。

流程

  1. undercloud.conf 文件中禁用 iPXE:

    [DEFAULT]
    ipxe_enabled = False
    注意

    对于 RHOSP 16.2.1 及更早版本,此配置会导致部署中的任何 x86_64 节点在 PXE/legacy 模式中启动。要为 overcloud 配置多个 CPU 架构,请参阅 配置多个 CPU 架构 overcloud

  2. 安装 undercloud:

    [stack@director ~]$ openstack undercloud install

    有关更多信息,请参阅在 undercloud 上安装 director

  3. 等待安装脚本完成。
  4. 获取并上传 overcloud 节点的镜像。有关更多信息,请参阅 获取 overcloud 节点的镜像

4.9.2. 配置多个 CPU 架构 overcloud

对于 RHOSP 16.2.2 及更新的版本,您可以将 undercloud 配置为在架构包含 POWER (ppc64le)和 x86_64 UEFI 节点时支持 PXE 和 iPXE 引导模式。

注意

当您的架构包含 POWER (ppc64le)节点时,RHOSP 16.2.1 及更早版本只支持 PXE 引导。

流程

  1. undercloud.conf 文件中启用 iPXE:

    [DEFAULT]
    ipxe_enabled = True
  2. 为 undercloud、undercloud_noIronicIPXEEnabled.yaml 创建自定义环境文件。
  3. 要将默认裸机置备服务(ironic) iPXE 设置更改为 PXE,请在 undercloud_noIronicIPXEEnabled.yaml 中添加以下配置:

    parameter_defaults:
      IronicIPXEEnabled: false
      IronicInspectorIPXEEnabled: true
  4. 如果您的架构包含 ppc64le 节点,请在 undercloud_noIronicIPXEEnabled.yaml 中添加以下配置来禁用引导超时:

    parameter_defaults:
      ExtraConfig:
        ironic::config::ironic_config:
          ipmi/disable_boot_timeout:
            value: 'false'
  5. undercloud.conf 文件中包含自定义环境文件:

    [DEFAULT]
    ...
    custom_env_files = undercloud_noIronicIPXEEnabled.yaml
  6. 安装 undercloud:

    [stack@director ~]$ openstack undercloud install

    有关更多信息,请参阅在 undercloud 上安装 director

  7. 等待安装脚本完成。
  8. 注册 overcloud 节点:

    (undercloud)$ openstack overcloud node import ~/nodes.json

    有关注册 overcloud 节点的更多信息,请参阅为 overcloud 注册节点

  9. 等待节点完成注册和配置。
  10. 确认 director 已成功注册节点:

    (undercloud)$ openstack baremetal node list
  11. 检查每个注册的节点的现有功能:

    $ openstack baremetal node show <node> -f json -c properties | jq -r .properties.capabilities
  12. 通过将 boot_mode:uefi 添加到节点的现有容量中,将每个注册节点的引导模式设置为 uefi

    $ openstack baremetal node set --property capabilities="boot_mode:uefi,<capability_1>,...,<capability_n>" <node>
    • <node> 替换为裸机节点的 ID。
    • <capability_1& gt; 以及所有功能(直到 & lt;capability_n& gt;)替换为您在第 6 步中获得的每个功能。
  13. 获取并上传 overcloud 节点的镜像。如需更多信息,请参阅 多个 CPU 架构 overcloud 镜像
  14. 为每个节点设置引导模式:

    • 对于旧的/PXE:

      $ openstack baremetal node set --boot-interface pxe <node_name>
    • 对于 iPXE:

      $ openstack baremetal node set --boot-interface ipxe <node_name>

4.9.3. 在多架构 overcloud 中使用 Ceph Storage

在多架构云中配置对外部 Ceph 的访问时,请将 CephAnsiblePlaybook 参数设置为 /usr/share/ceph-ansible/site.yml.sample,同时也包括您的客户端密钥和其他 Ceph 相关参数。

例如:

parameter_defaults:
  CephAnsiblePlaybook: /usr/share/ceph-ansible/site.yml.sample
  CephClientKey: AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ==
  CephClusterFSID: 4b5c8c0a-ff60-454b-a1b4-9747aa737d19
  CephExternalMonHost: 172.16.1.7, 172.16.1.8

4.9.4. 在多架构 overcloud 中使用可组合服务

以下服务通常是组成 Controller 节点的一部分,在自定义角色中使用它们当前还是技术预览:

  • Block Storage 服务 (cinder)
  • Image 服务 (glance)
  • Identity 服务 (keystone)
  • Networking 服务 (neutron)
  • Object Storage 服务 (swift)
注意

红帽不支持技术预览功能。

有关可组合服务的更多信息,请参阅高级 Overcloud 自定义指南中的可组合服务和自定义角色。通过以下示例了解如何将列出的服务从 Controller 节点移至专用 ppc64le 节点:

(undercloud) [stack@director ~]$ rsync -a /usr/share/openstack-tripleo-heat-templates/. ~/templates
(undercloud) [stack@director ~]$ cd ~/templates/roles
(undercloud) [stack@director roles]$ cat <<EO_TEMPLATE >ControllerPPC64LE.yaml
###############################################################################
# Role: ControllerPPC64LE                                                     #
###############################################################################
- name: ControllerPPC64LE
  description: |
    Controller role that has all the controller services loaded and handles
    Database, Messaging and Network functions.
  CountDefault: 1
  tags:
    - primary
    - controller
  networks:
    - External
    - InternalApi
    - Storage
    - StorageMgmt
    - Tenant
  # For systems with both IPv4 and IPv6, you may specify a gateway network for
  # each, such as ['ControlPlane', 'External']
  default_route_networks: ['External']
  HostnameFormatDefault: '%stackname%-controllerppc64le-%index%'
  ImageDefault: ppc64le-overcloud-full
  ServicesDefault:
    - OS::TripleO::Services::Aide
    - OS::TripleO::Services::AuditD
    - OS::TripleO::Services::CACerts
    - OS::TripleO::Services::CephClient
    - OS::TripleO::Services::CephExternal
    - OS::TripleO::Services::CertmongerUser
    - OS::TripleO::Services::CinderApi
    - OS::TripleO::Services::CinderBackendDellPs
    - OS::TripleO::Services::CinderBackendDellSc
    - OS::TripleO::Services::CinderBackendDellEMCUnity
    - OS::TripleO::Services::CinderBackendDellEMCVMAXISCSI
    - OS::TripleO::Services::CinderBackendDellEMCVNX
    - OS::TripleO::Services::CinderBackendDellEMCXTREMIOISCSI
    - OS::TripleO::Services::CinderBackendNetApp
    - OS::TripleO::Services::CinderBackendScaleIO
    - OS::TripleO::Services::CinderBackendVRTSHyperScale
    - OS::TripleO::Services::CinderBackup
    - OS::TripleO::Services::CinderHPELeftHandISCSI
    - OS::TripleO::Services::CinderScheduler
    - OS::TripleO::Services::CinderVolume
    - OS::TripleO::Services::Collectd
    - OS::TripleO::Services::Docker
    - OS::TripleO::Services::Fluentd
    - OS::TripleO::Services::GlanceApi
    - OS::TripleO::Services::GlanceRegistry
    - OS::TripleO::Services::Ipsec
    - OS::TripleO::Services::Iscsid
    - OS::TripleO::Services::Kernel
    - OS::TripleO::Services::Keystone
    - OS::TripleO::Services::LoginDefs
    - OS::TripleO::Services::MySQLClient
    - OS::TripleO::Services::NeutronApi
    - OS::TripleO::Services::NeutronBgpVpnApi
    - OS::TripleO::Services::NeutronSfcApi
    - OS::TripleO::Services::NeutronCorePlugin
    - OS::TripleO::Services::NeutronDhcpAgent
    - OS::TripleO::Services::NeutronL2gwAgent
    - OS::TripleO::Services::NeutronL2gwApi
    - OS::TripleO::Services::NeutronL3Agent
    - OS::TripleO::Services::NeutronLbaasv2Agent
    - OS::TripleO::Services::NeutronLbaasv2Api
    - OS::TripleO::Services::NeutronLinuxbridgeAgent
    - OS::TripleO::Services::NeutronMetadataAgent
    - OS::TripleO::Services::NeutronML2FujitsuCfab
    - OS::TripleO::Services::NeutronML2FujitsuFossw
    - OS::TripleO::Services::NeutronOvsAgent
    - OS::TripleO::Services::NeutronVppAgent
    - OS::TripleO::Services::Ntp
    - OS::TripleO::Services::ContainersLogrotateCrond
    - OS::TripleO::Services::OpenDaylightOvs
    - OS::TripleO::Services::Rhsm
    - OS::TripleO::Services::RsyslogSidecar
    - OS::TripleO::Services::Securetty
    - OS::TripleO::Services::SensuClient
    - OS::TripleO::Services::SkydiveAgent
    - OS::TripleO::Services::Snmp
    - OS::TripleO::Services::Sshd
    - OS::TripleO::Services::SwiftProxy
    - OS::TripleO::Services::SwiftDispersion
    - OS::TripleO::Services::SwiftRingBuilder
    - OS::TripleO::Services::SwiftStorage
    - OS::TripleO::Services::Timezone
    - OS::TripleO::Services::TripleoFirewall
    - OS::TripleO::Services::TripleoPackages
    - OS::TripleO::Services::Tuned
    - OS::TripleO::Services::Vpp
    - OS::TripleO::Services::OVNController
    - OS::TripleO::Services::OVNMetadataAgent
    - OS::TripleO::Services::Ptp
EO_TEMPLATE
(undercloud) [stack@director roles]$ sed -i~ -e '/OS::TripleO::Services::\(Cinder\|Glance\|Swift\|Keystone\|Neutron\)/d' Controller.yaml
(undercloud) [stack@director roles]$ cd ../
(undercloud) [stack@director templates]$ openstack overcloud roles generate \
    --roles-path roles -o roles_data.yaml \
    Controller Compute ComputePPC64LE ControllerPPC64LE BlockStorage ObjectStorage CephStorage