Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

共享文件系统服务的 CephFS 后端指南

Red Hat OpenStack Platform 13

在 Red Hat OpenStack Platform Overcloud 中为共享文件系统服务部署 CephFS 后端

OpenStack Documentation Team

摘要

本文档论述了使用 CephFS 后端的 OpenStack 共享文件系统服务的测试部署。此部署使用的后端通过 manila.share.drivers.cephfs.cephfs_native 驱动程序启用。
红帽 CephFS 集成目前作为技术预览提供,因此不应在生产环境中使用此部署。有关技术预览的更多信息,请参阅:

使开源包含更多

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。我们从这四个术语开始:master、slave、黑名单和白名单。由于此项工作十分艰巨,这些更改将在即将推出的几个发行版本中逐步实施。有关更多详情,请参阅我们的首席技术官 Chris Wright 提供的消息

第 1 章 简介

重要

通过原生 CephFS 协议使用 Red Hat Ceph 文件系统(CephFS) 仅作为技术预览提供,因此红帽不支持。本文档中描述的部署场景应该只用于测试,不应在生产环境中使用。

有关技术预览功能的更多信息,请参阅覆盖范围详细信息

注意

红帽支持通过 NFS 使用 CephFS。如需更多信息,请参阅 共享文件系统服务的《通过 NFS 后端指南》中的 CephFS。

OpenStack 共享文件系统服务(manila)允许用户调配可由多个计算实例使用的共享文件系统。

此发行版本包括 Red Hat CephFS (名为 manila.share.drivers.cephfs.cephfs_native.CephFSNativeDriver)所需的驱动程序技术预览。此驱动程序允许共享文件系统服务使用 CephFS 作为后端。

配置共享文件系统服务后端的建议方法是通过 director。这样做涉及编写 自定义环境文件

在这个版本中,director 可以使用 overcloud 上的 CephFS 后端部署共享文件系统服务。本文档解释了如何完成此操作。

第 2 章 要求

前提条件

  • 具有集成 Ceph 后端的现有 Red Hat OpenStack Platform 环境。有关更多信息,请参阅使用容器化 Red Hat Ceph 部署 Overcloud 指南。
  • 在 Controller 节点上安装的共享文件系统服务,因为 是默认行为。
  • 您只使用一个 Ceph 文件系统的实例作为共享文件系统服务的唯一后端。

2.1. 限制和限制

鉴于相关组件的当前状态,本文档中的测试场景有以下限制和限制:

  • 不受信任的实例用户对 Ceph Storage 集群造成安全隐患,因为它们能够直接访问 Ceph Storage 集群的公共网络。确保您使用的集群由生产环境存在量化,并且只有可信用户有权访问测试环境。
  • 此发行版本仅允许 对共享的读写 访问。

第 3 章 编辑环境文件

环境文件包含您要定义的后端设置。它还包含与共享文件系统服务部署相关的其他设置。有关环境文件的更多信息, 请参阅高级 Overcloud 自定义指南中的 环境文件。

此发行版包含用于定义 CephFS 后端的集成式环境文件。此文件位于 undercloud 节点的以下路径中:

/usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsnative-config.yaml

此文件提供用于部署共享文件系统服务的默认设置。

创建一个环境文件,其中包含您的环境的将设置 though though: ~/templates/manila-cephfsnative-config.yaml。以下代码片段显示了部署共享文件系统服务时 director 使用的默认值:

/home/stack/templates/manila-cephfsnative-config.yaml

parameter_defaults: # 1
  ManilaCephFSNativeBackendName: cephfsnative
  ManilaCephFSNativeDriverHandlesShareServers: false # 2
  ManilaCephFSNativeCephFSConfPath: '/etc/ceph/ceph.conf' # 3
  ManilaCephFSNativeCephFSAuthId: 'manila' # 4
  ManilaCephFSNativeCephFSClusterName: 'ceph'
  ManilaCephFSNativeCephFSEnableSnapshots: true

1
parameter_defaults 标头表示您的开始配置。具体来说,它允许您覆盖 resource_registry 中设置的默认值。这包括 OS::Tripleo::Services::ManilaBackendCephFs 设置的值,后者为 CephFS 后端设置默认值。
2
如果将 ManilaCephFSNativeDriverHandlesShareServers 设置为 false,该驱动程序无法处理共享服务器的生命周期。
3
ManilaCephFSNativeCephFSConfPath: 设置 Ceph 集群配置文件的路径。
4
ManilaCephFSNativeCephFSAuthId: 是 director 将为共享访问而创建的 Ceph 身份验证 ID。

第 4 章 使用 CephFS 后端部署共享文件系统服务

创建 /home/stack/templates/manila-cephfsnative-config.yaml 后,以 stack 用户身份登录 undercloud。然后,通过包含以下环境文件,使用 CephFS 后端部署共享文件系统服务:

  • /usr/share/openstack-tripleo-heat-templates/environments/services/ceph-mds.yaml - 启用 Ceph MDS,在使用 CephFS 后端时共享文件系统服务是必需的。
  • /usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsnative-config.yaml - 部署 Ceph 集群。
  • /home/stack/templates/manila-cephfsnative-config.yaml - 前面创建,并包含任何在 /usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsnative-config.yaml 中设置的默认值。第 3 章 编辑环境文件

例如,如果您的 OpenStack 和 Ceph 设置在 /home/stack/templates/storage-environment.yaml 中定义,请运行:

$ openstack overcloud deploy --templates \
   -e /home/stack/templates/storage-environment.yaml \
   -e /usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsnative-config.yaml \
   -e /usr/share/openstack-tripleo-heat-templates/environments/services/ceph-mds.yaml \
   -e /home/stack/templates/manila-cephfsnative-config.yaml \
重要

如果您在创建 overcloud 时传递任何额外的环境文件,请使用 -e 选项再次传递它们,以避免对 overcloud 进行不必要的更改。有关更多信息,请参阅 Director 安装和使用 指南中的 修改 Overcloud 环境

法律通告

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.