Commit Graph

127 Commits

Author SHA1 Message Date
Nizamudeen A
a916feeee7 admin/doc-requirements: bump Sphinx to 5.0.2
```
Running Sphinx v4.5.0

Sphinx version error:
The sphinxcontrib.applehelp extension used by this project needs at least Sphinx v5.0; it therefore cannot be built with this version.
```

Signed-off-by: Nizamudeen A <nia@redhat.com>
2024-01-16 14:17:25 +05:30
Patrick Donnelly
d882255dd1
doc: remove rtd main checkout
This is partial revert of 055fe1f825.

We don't need to checkout main anymore. A followup commit will make HTTP
redirects possible via ReadTheDocs.

This commit does not exist in main. It will be forward ported once the
release branches appropriately redirect /en/$release/releases to
/en/latest/releases.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 1f056ea5d4)
2022-11-28 08:37:24 -05:00
David Galloway
f92133ca52 admin: Fix check if PR or release branch docs build
Uses built-in RTD vars.  https://docs.readthedocs.io/en/stable/environment-variables.html.

Follow up to https://github.com/ceph/ceph/pull/46917#discussion_r942359130.

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-08-22 16:40:09 -04:00
David Galloway
055fe1f825 .readthedocs.yml: Always build latest doc/releases pages
We don't backport PRs merged into doc/releases.  Therefore, when one browses to an older Ceph release version on docs.ceph.com (e.g., https://docs.ceph.com/en/pacific/), the information is out of date at best.

The doc/releases page is only accurate if browsing https://docs.ceph.com/en/latest/, for example.

So this post_checkout command will make sure we've checked out doc/releases from main before building and publishing.

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-07-20 12:14:32 -04:00
Kefu Chai
f481f86aa3 doc: render release with mermaid gantt
for better readability

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-06-15 00:38:22 -04:00
Kefu Chai
d61bd5af65 admin/doc-requirements: bump sphinx to 4.5.0
also pin sphinx-autodoc-typehints to 1.18.3

to address following error:

ERROR: sphinx-autodoc-typehints 1.18.3 has requirement Sphinx>=4.5, but you'll have sphinx 4.4.0 which is incompatible.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-06-15 00:38:22 -04:00
Zac Dover
6a1dd3a8a2 ceph/admin: s/master/main
This PR changes the name "master" to "main" so
that builds (and, I assume, a great many other
things) will not fail.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-03-18 09:05:45 +10:00
Kefu Chai
0a5fab53b3 admin/doc-requirements: bump sphinx to 4.4.0
bump sphinx to latest stable. to address following build failure

ERROR: sphinx-autodoc-typehints 1.17.0 has requirement Sphinx>=4, but you'll have sphinx 3.5.4 which is incompatible.
ERROR: sphinx-substitution-extensions 2022.2.16 has requirement sphinx>=4.0.0, but you'll have sphinx 3.5.4 which is incompatible.

also bump bump sphinx-rtd-theme, otherwise we'd have following
build failure:

ERROR: sphinx-rtd-theme 0.5.2 has requirement docutils<0.17, but you'll have docutils 0.17.1 which is incompatible.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-03-06 02:32:57 +08:00
Redouane Kachach
7e646d9958
mgr/cephadm: Adding python natsort module
Needed by: https://tracker.ceph.com/issues/54026

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2022-02-23 11:39:40 +01:00
David Galloway
df2d7b29ec admin/doc-requirements.txt: Not breathe=4.33
See https://github.com/michaeljones/breathe/issues/803

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-02-14 15:11:58 -05:00
David Galloway
f459ada4be Revert "admin/doc-requirements: pin breathe to 4.32.0"
This reverts commit d020d07be9.

Fixed upstream https://github.com/michaeljones/breathe/issues/803#issuecomment-1039341857

Signed-off-by: David Galloway <dgalloway@redhat.com>
2022-02-14 14:38:26 -05:00
Kefu Chai
d020d07be9 admin/doc-requirements: pin breathe to 4.32.0
in breathe v4.33, it includes following commit

2498a43723

which specfies the app config value of "graphviz_dot". this annoys
sphinx:

WARNING: while setting up extension breathe: node class 'graphviz' is already registered, its visitors will be overridden

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/44951/lib/python3.8/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/44951/lib/python3.8/site-packages/sphinx/application.py", line 245, in __init__
    self.setup_extension(extension)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/44951/lib/python3.8/site-packages/sphinx/application.py", line 402, in setup_extension
    self.registry.load_extension(self, extname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/44951/lib/python3.8/site-packages/sphinx/registry.py", line 430, in load_extension
    metadata = setup(app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/44951/lib/python3.8/site-packages/breathe/__init__.py", line 14, in setup
    renderer_setup(app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/44951/lib/python3.8/site-packages/breathe/renderer/sphinxrenderer.py", line 2613, in setup
    app.add_config_value("graphviz_dot", "dot", "html")
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/44951/lib/python3.8/site-packages/sphinx/application.py", line 535, in add_config_value
    self.config.add(name, default, rebuild, types)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/44951/lib/python3.8/site-packages/sphinx/config.py", line 282, in add
    raise ExtensionError(__('Config value %r already present') % name)
sphinx.errors.ExtensionError: Config value 'graphviz_dot' already present

Extension error:
Config value 'graphviz_dot' already present

this issue has been reported to upstream, see
https://github.com/michaeljones/breathe/issues/803

before it is fixed upstream, let's stick with 4.32.0
which is known to work.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-02-14 18:31:39 +08:00
David Galloway
ed2ad24a4b doc: Use older mistune
https://github.com/miyakogi/m2r/issues/66

Signed-off-by: David Galloway <dgallowa@redhat.com>
2021-12-06 10:32:56 -05:00
Adam King
d0900bf0c0 mgr/cephadm: make agent certs compatible with OpenSSL hostname and ip checks
Signed-off-by: Adam King <adking@redhat.com>
2021-09-24 07:23:51 -04:00
Kefu Chai
dde92124b5 admin/doc-requirements: use funcparserlib from github
funcparserlib is pulled in as a dependency by blockdiag. the latest version of
funcparserlib available on pypi is v0.3.6 which is not compatible with
Python3.8.

in this change, funcparserlib is installed from github instead to
address the build failure like:

  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/sphinxcontrib/seqdiag.py", line 26, in <module>
    import seqdiag.utils.rst.nodes
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/seqdiag/utils/rst/nodes.py", line 16, in <module>
    from blockdiag.utils.rst import nodes
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/blockdiag/utils/rst/nodes.py", line 21, in <module>
    import blockdiag.builder
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/blockdiag/builder.py", line 16, in <module>
    from blockdiag import parser
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/blockdiag/parser.py", line 43, in <module>
    from funcparserlib.parser import (a, finished, forward_decl, many, maybe, skip,
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/funcparserlib/parser.py", line 123
    except NoParseError, e:
                       ^
SyntaxError: invalid syntax

once https://github.com/vlasovskikh/funcparserlib/issues/65 is
addressed, we should drop this change.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2021-09-06 22:30:03 +08:00
Ken Dreyer
9b539494e6 admin/build-doc: use venv module again
Commit 690ca1c562 accidentally
re-introduced virtualenv. Switch back to the venv module in stdlib.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2021-09-01 17:40:35 -04:00
Kefu Chai
690ca1c562 admin/build-doc: rebuild venv if md5 does not match
we should rebuild the venv if any of the requirements change.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-08-05 09:08:56 +08:00
Kefu Chai
a17ebc0406
Merge pull request #42575 from tchaikov/wip-venv
*: s/virtualenv/python -m venv/

Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
2021-08-04 18:37:45 +08:00
Kefu Chai
1a36bf82fc admin, doc: introduce sphinxcontrib.seqdiag
for rendering sequence-diagram. unlike ditaa, seqdiag allows us to
create sequence-diagram without worrying about the layout. and the
syntax is quite like that of dot.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-08-02 19:02:56 +08:00
Kefu Chai
90c4995c99 admin/build-doc: s/virtualenv/python3 -m venv/
so we don't need to use virtualenv python package for creating a
virtualenv, the "venv" module in Python3 would suffice.

see also https://docs.python.org/3/library/venv.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-31 22:34:05 +08:00
Kefu Chai
4968baa252 admin/doc-requirements.txt: pin sphinx and sphinx_rtd_theme to a certain version
to ensure that we can have reproducible builds

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-14 23:24:38 +08:00
Kefu Chai
f4b0742a35 admin/build-doc: use htmldir builder for livehtml
otherwise livehtml uses the default html builder. so we can copy and
paste the partial URL to cross check the rendering result.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-14 18:41:38 +08:00
Kefu Chai
6dea67ac2d admin: require sphinx>=3.2.1
loosen the required sphinx version.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-14 09:03:03 +08:00
Sage Weil
144bf1a73c admin/build-doc: do not rebuild venv every time
Downside is you have to delete and re-run if the deps change.  The venv
install is suuuuper slow for me, though, so this is a win.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-03-31 13:58:16 -05:00
Kefu Chai
35413b8ae2 admin/build-doc: build man page in proper directory
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-25 01:03:34 +08:00
Kefu Chai
275c6bd1b7 doc: switch to sphinx_rtd_theme
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-04 19:00:47 +08:00
Kefu Chai
202b805aaf doc: build mon_command_api.rst using a homebrew extension
so we can build the command doc using ReadTheDoc infra, without adding
the generated rst file to the source repo.

before this change, all the commands are ordered alphabetically. after
this change, command docs are generated by two directives, and are
ordered separately. we could restructure the directives and merge them.

but let's leave it for a future change if this is important.

for more details on writing sphinx directives, see
https://www.sphinx-doc.org/en/master/extdev/markupapi.html and
https://docutils.sourceforge.io/docs/howto/rst-directives.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-08 11:35:42 +08:00
Kefu Chai
2f1f16ed86 admin/doc-requirements.txt: require breathe >= 4.20
to be compatible with Sphinx 3.2
see https://github.com/michaeljones/breathe/tree/v4.20.0#change-log

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-14 16:26:49 +08:00
Kefu Chai
140f6c5c28 admin/build-doc: drop comments for building dummy C bindings
we don't build dummy C bindings since
2235c2db0e

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-12 16:49:21 +08:00
Kefu Chai
703ba9e7cb admin/build-doc: revert "upgrade pip setuptools first"
per Radoslow Zarzynski, the build failure was due to missing Python.h
for the python version he was using on the system.

This reverts commit bc73204812.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-12 16:29:20 +08:00
Kefu Chai
5cb9d54587 admin/build-doc: stop passing --use-feature=2020-resolver to pip
to silence the warning of

WARNING: --use-feature=2020-resolver no longer has any effect, since it is now the default dependency resolver in pip. This will become an error in pip 21.0.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-12 16:28:56 +08:00
Kefu Chai
6fb4aff5ad admin/build-doc: consolidate the build deps into admin/doc-pybind.txt
since all the python bindings are required for building the doc, extract
them into admin/doc-pybind.txt.

because the pybind python extensions require Cython python module to build,
we have to move them  into another requirement file, and install them after
Cython is installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-12 16:27:20 +08:00
Kefu Chai
bc73204812 admin/build-doc: upgrade pip setuptools first
on certain distros, buggy pip and setuptools are used, so we need to
upgrade them first.

see also: googleapis/google-cloud-python#2990 and pypa/setuptools#885

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-12 00:23:32 +08:00
Kefu Chai
34f74e8a37 admin/build-doc: add livehtml target
it is time-consuming to rebuild the python bindings every time we
rebuild the document, it'd be ideal if we could just build document.

in this change, in addition to "html" and "doc", "livehtml" argument is
now supported by build-doc script, so one can just use

./build-doc livehtml

to build and start a web server. whenever a change in doc/ is detected,
the document is rebuilt. for more details, see
https://pypi.org/project/sphinx-autobuild/

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-11 22:30:56 +08:00
Kefu Chai
670efdd3c7 doc: build api docs with Read the Docs
since we are able to build the python bindings using the stub
implementation of C binding, let's enable the API docs build.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-05 22:09:22 +08:00
Kefu Chai
2235c2db0e admin/build-doc: do not build stub C binding anymore
since the python binding is able to build the stub by themselves, there
is no need to do this manually.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-05 22:09:22 +08:00
Kefu Chai
b1c4a821b6 doc/conf: generate releases.json in conf.py
pave the road to build all the ingredients of the document using RTD
facility.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-20 12:59:22 +08:00
Kefu Chai
23626401e9 doc: write releases.json to _static
this follows the convention of sphinx, so we can also customise this
path in future using "html_static_path". see also
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_static_path

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-20 12:59:22 +08:00
Kefu Chai
3c0bc49875 doc: pass graphviz options in conf.py
easier to maintain the options of sphinx extensions in a single place.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-19 17:00:29 +08:00
Kefu Chai
cc5864234e doc: generate peering graph in conf.py
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-19 17:00:29 +08:00
Kefu Chai
70caf0dfe8 admin: be compatible with pip shipped by distro older than v20.2
pip v20.2 introduced a new option named --use-feature, which is not
available with <20.2. so we need to check for it before using it. see
also
https://pip.pypa.io/en/stable/user_guide/#changes-to-the-pip-dependency-resolver-in-20-2-2020

Fixes: https://tracker.ceph.com/issues/47636
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-10-03 00:45:39 +08:00
Kefu Chai
60949c9b1a
Merge pull request #37392 from tchaikov/wip-doc-pip
admin: pass --use-feature=2020-resolver to pip

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-10-02 01:54:07 +08:00
Courtney Caldwell
ca2261781e
mgr/dashboard/api: generate offline API docs
Generate Sphinx documentation from OpenAPI YAML spec:
- Fixed Docs controller doc generation
- Now dashboard Python doesn't fails if dashboard/frontend/dist doesn't exist
- OpenAPI added to @ceph/api CODEOWNERS
- Renamed Ceph-Dashboard API to Ceph REST or RESTful API.
- OpenAPI Docs: fixed decorators and docstrings.
- Sphinx Docs: updated dashboard and dev ones.

Co-authored-by: Ernesto Puerta <epuertat@redhat.com>
Fixes: https://tracker.ceph.com/issues/45863
Signed-off-by: Courtney Caldwell <ccaldwel@redhat.com>
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-09-28 12:03:03 +02:00
Kefu Chai
bc00a8feb0 admin: pass --use-feature=2020-resolver to pip
to silence the warning like

follow the suggestion from pip

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

Fixes: https://tracker.ceph.com/issues/47636
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-24 19:59:58 +08:00
Kefu Chai
7ca85e77d0 doc: replace luminous with |stable-release|
"luminous" is a magic number in these contexts, and we should use a
constant for representing it.

the "sphinx_substitution_extensions" sphinx extension is introduced for
performing the global subsitution.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-01 09:53:17 +08:00
Kefu Chai
fce56ad60c admin/doc-requirements: bump up sphinx to 3.2.1
* use the latest stable sphinx
* unpin breathe, sphinx-autodoc-typehints, so pip can choose the
  compatible versions without worrying about the compile failures.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-28 20:35:21 +08:00
Kefu Chai
b83be6f33b admin: move python-common deps out of doc-requirements.txt
to address the build failure of

python -m pip install --exists-action=w --no-cache-dir -r admin/doc-requirements.txt
ERROR: ../src/python-common is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-06 19:19:22 +08:00
Kefu Chai
83d03234ef admin/doc-requirements: pin sphinx-autodoc-typehints to 1.10.3
to silence following error:

ERROR: sphinx-autodoc-typehints 1.11.0 has requirement Sphinx>=3.0, but you'll have sphinx 2.4.3 which is incompatible.

* update breathe to the latest release, 4.14.2, which supports sphinx <
  3.0
* pin sphinx to 2.4.4 the last sphinx before 3.0.0. as if sphinx >= 3.0
is used, we have errors like:

Invalid C declaration: Expected identifier in nested name, got keyword: int [error at 18]
  CEPH_RADOS_API int rados_aio_append (rados_ioctx_t io, const char *oid, rados_completion_t completion, const char *buf, size_t len)
  ------------------^

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-22 10:37:57 +08:00
Sebastian Wagner
47330807dc doc/api: Add a generated reference of all mon commands.
Generate a ReST document which contains all mon commands.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-05-05 12:51:50 +02:00
Kefu Chai
8bd8a8badb doc: add in-doc search from read the docs
readthedocs-sphinx-search features better user experience than the
builtin search offered by sphinx

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-10 08:38:06 +08:00