搜索

15.2. 部署 Real-time Compute 角色

download PDF

Red Hat OpenStack Platform (RHOSP) director 为 ComputeRealTime 角色提供模板,您可以使用它来部署实时 Compute 节点。您必须执行额外的步骤来指定 Compute 节点实时。

流程

  1. 基于 /usr/share/openstack-tripleo-heat-templates/environments/compute-real-time-example.yaml 文件,创建一个 compute-real-time.yaml 环境文件,该文件为 ComputeRealTime 角色设置参数。

    cp /usr/share/openstack-tripleo-heat-templates/environments/compute-real-time-example.yaml /home/stack/templates/compute-real-time.yaml

    该文件必须包含以下参数的值:

    • IsolCpusListNovaComputeCpuDedicatedSet :隔离 CPU 内核和虚拟 CPU 列表,以便为实时工作负载保留。这个值取决于您的实时 Compute 节点的 CPU 硬件。
    • NovaComputeCpuSharedSet :要为仿真程序线程保留的主机 CPU 列表。
    • KernelArgs :用来传递给 Real-time Compute 节点的内核的参数。例如,您可以使用 default_hugepagesz=1G hugepagesz=1G hugepages=<number_of_1G_pages_to_reserve> hugepagesz=2M hugepages=<number_of_2M_pages> 定义具有多个大小的客户机的内存要求。在这个示例中,默认大小为 1GB,但您也可以保留 2M 巨页。
    • NovaComputeDisableIrqBalance :确保为 Real-time Compute 节点将此参数设置为 true,因为 tuned 服务为实时部署管理 IRQ 平衡,而不是 irqbalance 服务。
  2. ComputeRealTime 角色添加到您的角色数据文件并重新生成该文件。例如:

    $ openstack overcloud roles generate -o /home/stack/templates/rt_roles_data.yaml Controller Compute ComputeRealTime

    此命令生成 ComputeRealTime 角色,其内容类似以下示例,并将 ImageDefault 选项设置为 overcloud-realtime-compute

    - name: ComputeRealTime
      description: |
        Compute role that is optimized for real-time behaviour. When using this role
        it is mandatory that an overcloud-realtime-compute image is available and
        the role specific parameters IsolCpusList, NovaComputeCpuDedicatedSet and
        NovaComputeCpuSharedSet are set accordingly to the hardware of the real-time compute nodes.
      CountDefault: 1
      networks:
        InternalApi:
          subnet: internal_api_subnet
        Tenant:
          subnet: tenant_subnet
        Storage:
          subnet: storage_subnet
      HostnameFormatDefault: '%stackname%-computerealtime-%index%'
      ImageDefault: overcloud-realtime-compute
      RoleParametersDefault:
        TunedProfileName: "realtime-virtual-host"
        KernelArgs: ""      # these must be set in an environment file
        IsolCpusList: ""    # or similar according to the hardware
        NovaComputeCpuDedicatedSet: ""  # of real-time nodes
        NovaComputeCpuSharedSet: ""     #
        NovaLibvirtMemStatsPeriodSeconds: 0
      ServicesDefault:
        - OS::TripleO::Services::Aide
        - OS::TripleO::Services::AuditD
        - OS::TripleO::Services::BootParams
        - OS::TripleO::Services::CACerts
        - OS::TripleO::Services::CephClient
        - OS::TripleO::Services::CephExternal
        - OS::TripleO::Services::CertmongerUser
        - OS::TripleO::Services::Collectd
        - OS::TripleO::Services::ComputeCeilometerAgent
        - OS::TripleO::Services::ComputeNeutronCorePlugin
        - OS::TripleO::Services::ComputeNeutronL3Agent
        - OS::TripleO::Services::ComputeNeutronMetadataAgent
        - OS::TripleO::Services::ComputeNeutronOvsAgent
        - OS::TripleO::Services::Docker
        - OS::TripleO::Services::Fluentd
        - OS::TripleO::Services::IpaClient
        - OS::TripleO::Services::Ipsec
        - OS::TripleO::Services::Iscsid
        - OS::TripleO::Services::Kernel
        - OS::TripleO::Services::LoginDefs
        - OS::TripleO::Services::MetricsQdr
        - OS::TripleO::Services::MySQLClient
        - OS::TripleO::Services::NeutronBgpVpnBagpipe
        - OS::TripleO::Services::NeutronLinuxbridgeAgent
        - OS::TripleO::Services::NeutronVppAgent
        - OS::TripleO::Services::NovaCompute
        - OS::TripleO::Services::NovaLibvirt
        - OS::TripleO::Services::NovaLibvirtGuests
        - OS::TripleO::Services::NovaMigrationTarget
        - OS::TripleO::Services::ContainersLogrotateCrond
        - OS::TripleO::Services::OpenDaylightOvs
        - OS::TripleO::Services::Podman
        - 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::Timesync
        - OS::TripleO::Services::Timezone
        - OS::TripleO::Services::TripleoFirewall
        - OS::TripleO::Services::TripleoPackages
        - OS::TripleO::Services::Vpp
        - OS::TripleO::Services::OVNController
        - OS::TripleO::Services::OVNMetadataAgent

    有关自定义角色和 roles-data.yaml 的常规信息,请参阅 角色

  3. 创建 compute-realtime 类别,以标记您要为实时工作负载指定的节点。例如:

    $ source ~/stackrc
    $ openstack flavor create --id auto --ram 6144 --disk 40 --vcpus 4 compute-realtime
    $ openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" --property "capabilities:profile"="compute-realtime" compute-realtime
  4. 使用 compute-realtime 配置集标记您要为实时工作负载指定的每个节点。

    $ openstack baremetal node set --property capabilities='profile:compute-realtime,boot_option:local' <node_uuid>
  5. 通过创建包含以下内容的环境文件,将 ComputeRealTime 角色映射到 compute-realtime 类别:

    parameter_defaults:
      OvercloudComputeRealTimeFlavor: compute-realtime
  6. 使用其他环境文件将环境文件和新角色文件添加到堆栈中,并部署 overcloud:

    (undercloud)$ openstack overcloud deploy --templates \
     -e [your environment files] \
     -r /home/stack/templates/rt~/my_roles_data.yaml \
     -e home/stack/templates/compute-real-time.yaml
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.