12.5. 安装混合架构集群


在 OpenShift Container Platform 版本 4.12.0 及更新的版本中,带有 x86_64 control plane 的集群支持两个不同 CPU 架构的混合架构 worker 节点。混合架构集群组合了每个架构的优势并支持各种工作负载。

从 4.12.0 版本,您可以将 arm64 worker 节点添加到具有 x86_64 control plane 的现有 OpenShift 集群中。在版本 4.14.0 中,您可以将 IBM PowerIBM zSystems worker 节点添加到现有的 x86_64 control plane 中。

安装的主要步骤如下:

  1. 创建并注册多架构集群。
  2. 创建 x86_64 基础架构环境,下载用于 x86_64 的 ISO,并添加 control plane。control plane 必须具有 x86_64 架构。
  3. 创建 arm64、 IBM PowerIBM zSystems 基础架构环境,下载 arm 64、IBM PowerIBM zSystems 的 ISO,并添加 worker 节点。

这些步骤在以下流程中详细介绍。

支持的平台

下表列出了支持每个 OpenShift Container Platform 版本的混合架构集群的平台。将适当的平台用于您要安装的版本。

OpenShift Container Platform 版本支持的平台第 1 天 control plane 架构第 2 天节点架构

4.12.0

  • Microsoft Azure (TP)
  • x86_64
  • arm64

4.13.0

  • Microsoft Azure
  • Amazon Web Services
  • 裸机(TP)
  • x86_64
  • x86_64
  • x86_64
  • arm64
  • arm64
  • arm64

4.14.0

  • Microsoft Azure
  • Amazon Web Services
  • 裸机
  • Google Cloud Platform
  • IBM® Power®
  • IBM Z®
  • x86_64
  • x86_64
  • x86_64
  • x86_64
  • x86_64
  • x86_64
  • arm64
  • arm64
  • arm64
  • arm64
  • ppc64le
  • s390x
重要

技术预览功能(TP)功能不被红帽产品服务等级协议(SLA)支持,且可能无法正常工作。红帽不推荐在生产环境中使用它们。这些技术预览功能可以使用户提早试用新的功能,并有机会在开发阶段提供反馈意见。

有关红帽技术预览功能支持范围的更多信息,请参阅技术预览功能支持范围

主要步骤

  1. 启动使用 API 安装 OpenShift Container Platform 的步骤。详情 请参阅附加资源部分中的 使用 Assisted Installer API 安装
  2. 当您达到安装的 "Registering a new cluster" 步骤时,将集群 注册为多架构 集群:

    $ curl -s -X POST https://api.openshift.com/api/assisted-install/v2/clusters \
    -H "Authorization: Bearer ${API_TOKEN}" \
    -H "Content-Type: application/json" \
    -d "$(jq --null-input \
       --slurpfile pull_secret ~/Downloads/pull-secret.txt '
    {
       "name": "testcluster",
       "openshift_version": "<version-number>-multi", 1
       "cpu_architecture" : "multi" 2
       "high_availability_mode": "full" 3
       "base_dns_domain": "example.com",
       "pull_secret": $pull_secret[0] | tojson
    }
    ')" | jq '.id'
    注意
    1
    multi- 选项用于 OpenShift 版本号,例如 :"4.12-multi "。
    2
    将 CPU 构架' 设置为 "multi "。
    3
    使用 full 值来指示多节点 OpenShift。
  3. 当您达到安装的"注册新的基础架构环境"步骤时,将 cpu_architecture 设置为 x86_64

    $ curl https://api.openshift.com/api/assisted-install/v2/infra-envs \
    -H "Authorization: Bearer ${API_TOKEN}" \
    -H "Content-Type: application/json" \
    -d "$(jq --null-input \
     --slurpfile pull_secret ~/Downloads/pull-secret.txt \
     --arg cluster_id ${CLUSTER_ID} '
       {
         "name": "testcluster-infra-env",
         "image_type":"full-iso",
         "cluster_id": $cluster_id,
         "cpu_architecture" : "x86_64"
         "pull_secret": $pull_secret[0] | tojson
       }
    ')" | jq '.id'
  4. 当您到达安装的"添加主机"步骤时,将 host_role 设置为 master

    注意

    如需更多信息,请参阅附加资源 中的将角色分配给主机

    $ curl https://api.openshift.com/api/assisted-install/v2/infra-envs/${INFRA_ENV_ID}/hosts/<host_id> \
    -X PATCH \
    -H "Authorization: Bearer ${API_TOKEN}" \
    -H "Content-Type: application/json" \
    -d '
       {
         "host_role":"master"
       }
    ' | jq
  5. 下载 x86_64 架构的发现镜像。
  6. 使用生成的发现镜像引导 x86_64 架构主机。
  7. 开始安装并等待集群被完全安装。
  8. 重复安装的"注册新的基础架构环境"步骤。这一次,将 cpu_architecture 设置为以下之一: ppc64le (用于 IBM Power)、s390x (用于 IBM Z)或 arm64。例如:

    $ curl -s -X POST https://api.openshift.com/api/assisted-install/v2/clusters \
    -H "Authorization: Bearer ${API_TOKEN}" \
    -H "Content-Type: application/json" \
    -d "$(jq --null-input \
       --slurpfile pull_secret ~/Downloads/pull-secret.txt '
    {
       "name": "testcluster",
       "openshift_version": "4.12",
       "cpu_architecture" : "arm64"
       "high_availability_mode": "full"
       "base_dns_domain": "example.com",
       "pull_secret": $pull_secret[0] | tojson
    }
    ')" | jq '.id'
  9. 重复安装的"添加主机"步骤。这一次,将 host_role 设置为 worker

    注意

    如需了解更多详细信息,请参阅附加资源 中的将角色分配给主机

    $ curl https://api.openshift.com/api/assisted-install/v2/infra-envs/${INFRA_ENV_ID}/hosts/<host_id> \
    -X PATCH \
    -H "Authorization: Bearer ${API_TOKEN}" \
    -H "Content-Type: application/json" \
    -d '
       {
         "host_role":"worker"
       }
    ' | jq
  10. 下载 arm64、ppc64 les390x 架构的发现镜像。
  11. 使用生成的发现镜像引导架构主机。
  12. 开始安装并等待集群被完全安装。

验证

  • 运行以下命令,查看集群中的 arm 64、ppc64les390x worker 节点:

    $ oc get nodes -o wide
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.