注意

本文档适用于 Ceph 的开发版本。

Hello World Module

这是一个用于文档编写目的的简单模块骨架。

启用

运行以下命令启用 hello 模块

ceph mgr module enable hello

运行以下命令确保 hello 模块已启用

ceph mgr module ls

编辑模块文件(位于 src/pybind/mgr/hello/module.py)后,运行以下命令重新加载模块以应用更改

ceph mgr module disable hello
ceph mgr module enable hello

或者,运行以下命令重新加载 hello 模块并应用其设置更改

init-ceph restart mgr

运行以下命令运行模块

ceph hello

日志文件位于以下位置

build/out/mgr.x.log

文档编写

添加新的 mgr 模块后,请务必将其文档添加到 doc/mgr/module_name.rst。同时,将新模块的链接添加到 doc/mgr/index.rst

由 Ceph 基金会为您呈现

Ceph 文档是由非营利性 Ceph 基金会 资助和托管的社区资源。如果您希望支持这项工作和我们的其他努力,请考虑 立即加入