generate latest sample config file along with document

Currently, when users want to get the sample config file, they
need to install many development tools such as git, tox and etc,
then run `tox -egenconfig` to get it.

oslo_config provides a tool named sphinxconfiggen since version
2.3.0, which enables us generate the sample config file along with
document.

Also the OpenStack Manual Configuration Reference doesn't have
sample config file for master branch, the stable branches need to
be improved as well, so this paragraph is removed.

Change-Id: Ie61beef490618f18a711e789cb1ac006b85b8f0a
This commit is contained in:
ZhiQiang Fan 2016-05-09 23:40:35 +08:00
parent 229d35adbd
commit 821f0dd1c5
3 changed files with 32 additions and 18 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@ cover/*
dist/*
doc/build
doc/source/api/
doc/source/_static/
etc/aodh/aodh.conf
subunit.log

View File

@ -48,8 +48,12 @@ extensions = [
'sphinxcontrib.pecanwsme.rest',
'oslosphinx',
'stevedore.sphinxext',
'oslo_config.sphinxconfiggen',
]
config_generator_config_file = os.path.join(ROOT, 'etc/aodh/aodh-config-generator.conf')
sample_config_basename = '_static/aodh'
wsme_protocols = ['restjson', 'restxml']
todo_include_todos = True
@ -148,7 +152,7 @@ html_theme_options = {
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.

View File

@ -18,23 +18,6 @@
Configuration
=============
Configure Aodh by editing `/etc/aodh/aodh.conf`.
No config file is provided with the source code, but one can be easily created
by running:
::
tox -e genconfig
This command will create an `etc/aodh/aodh.conf` file which can be used as a
base for the default configuration file at `/etc/aodh/aodh.conf`.
For the list and description of configuration options that can be set for Aodh in
order to set up the services please see the
`Telemetry section <http://docs.openstack.org/trunk/config-reference/content/ch_configuring-openstack-telemetry.html>`_
in the OpenStack Manuals Configuration Reference.
HBase
===================
@ -74,3 +57,29 @@ To find out more about supported storage backends please take a look on the
services.
.. _Apache: https://hbase.apache.org/book/quickstart.html
Aodh Sample Configuration File
==============================
Configure Aodh by editing /etc/aodh/aodh.conf.
No config file is provided with the source code, it will be created during
the installation. In case where no configuration file was installed, one
can be easily created by running::
oslo-config-generator --config-file=/etc/aodh/aodh-config-generator.conf \
--output-file=/etc/aodh/aodh.conf
The following is a sample Aodh configuration for adaptation and use. It is
auto-generated from Aodh when this documentation is built, and can also be
viewed in `file form <_static/aodh.conf.sample>`_.
.. note::
As a developer, with full development tools, you can create a sample
configuration file from any branch or commit. Just checkout to that
branch or commit, run ``tox -e genconfig``, then `etc/aodh/aodh.conf`
will be generated.
.. literalinclude:: _static/aodh.conf.sample