Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

27.3.4.2.3. 镜像名称和版本标签变量

为了防止 OpenShift Container Platform pod 在导致使用不同 OpenShift Container Platform 版本的集群中断后进行升级,建议您为所有容器化组件指定镜像名称和版本标签。这些变量是:

  • openshift_storage_glusterfs_image
  • openshift_storage_glusterfs_block_image
  • openshift_storage_glusterfs_s3_image
  • openshift_storage_glusterfs_heketi_image
注意

只有在对应的部署变量(以 _block_deploy_s3_deploy结尾)的相应部署变量,才需要 gluster-blockgluster-s3 的镜像变量。

为了使部署成功,需要有效的镜像标签。将 <tag> 替换为与 OpenShift Container Platform 3.11 兼容的 Red Hat Gluster Storage 版本,如清单文件中以下变量互操作性表格 中所述:

  • openshift_storage_glusterfs_image=registry.redhat.io/rhgs3/rhgs-server-rhel7:<tag>
  • openshift_storage_glusterfs_block_image=registry.redhat.io/rhgs3/rhgs-gluster-block-prov-rhel7:<tag>
  • openshift_storage_glusterfs_s3_image=registry.redhat.io/rhgs3/rhgs-s3-server-rhel7:<tag>
  • openshift_storage_glusterfs_heketi_image=registry.redhat.io/rhgs3/rhgs-volmanager-rhel7:<tag>
  • openshift_storage_glusterfs_registry_image=registry.redhat.io/rhgs3/rhgs-server-rhel7:<tag>
  • openshift_storage_glusterfs_block_registry_image=registry.redhat.io/rhgs3/rhgs-gluster-block-prov-rhel7:<tag>
  • openshift_storage_glusterfs_s3_registry_image=registry.redhat.io/rhgs3/rhgs-s3-server-rhel7:<tag>
  • openshift_storage_glusterfs_heketi_registry_image=registry.redhat.io/rhgs3/rhgs-volmanager-rhel7:<tag>

有关变量的完整列表,请参阅 GitHub 上的 GlusterFS 角色 README

配置了变量后,会根据安装情况有几个可用的 playbook:

  • 集群安装的主要 playbook 可用于在 OpenShift Container Platform 初始安装的情况下部署 GlusterFS 集群。

    • 这包括部署使用 GlusterFS 存储的集成 OpenShift Container Registry。
    • 这不包括 OpenShift Logging 或 OpenShift Metrics,因为当前仍然是一个单独的步骤。如需更多信息,请参阅 OpenShift Logging 和 Metrics 的聚合模式
  • playbooks/openshift-glusterfs/config.yml 可用于将集群部署到现有的 OpenShift Container Platform 安装中。
  • playbooks/openshift-glusterfs/registry.yml 可用于将集群部署到现有的 OpenShift Container Platform 安装中。另外,这将部署使用 GlusterFS 存储的集成的 OpenShift 容器 Registry。

    重要

    在 OpenShift Container Platform 集群中不能有已存在的 registry。

  • playbooks/openshift-glusterfs/uninstall.yml 可用于删除与清单主机文件中配置匹配的现有集群。这在因为配置错误而部署失败时清理 OpenShift Container Platform 环境会很有用。

    注意

    GlusterFS playbook 无法保证具有幂等性。

    注意

    目前,不支持在不删除整个 GlusterFS 安装(包括磁盘数据)并启动整个 GlusterFS 安装的情况下,多次运行 playbook。