diff --git a/.gitignore b/.gitignore index 27caa22e1..3198a8fe9 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ ChangeLog .coverage cover etc/vitrage/vitrage.conf +doc/source/_static/ #Python *.pyc diff --git a/doc/source/conf.py b/doc/source/conf.py index 89fb0141d..c7649bd85 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,7 +15,12 @@ import os import sys -sys.path.insert(0, os.path.abspath('../..')) +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) +ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) + +sys.path.insert(0, ROOT) +sys.path.insert(0, BASE_DIR) + # -- General configuration ---------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be @@ -23,9 +28,14 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', # 'sphinx.ext.intersphinx', - 'openstackdocstheme' + 'openstackdocstheme', + 'oslo_config.sphinxconfiggen', ] +config_generator_config_file = os.path.join(ROOT, + 'etc/vitrage/vitrage-config-generator.conf') +sample_config_basename = '_static/vitrage' + # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable @@ -56,7 +66,7 @@ pygments_style = 'sphinx' # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] # html_theme = '_theme' -# html_static_path = ['static'] +html_static_path = ['_static'] html_theme = 'openstackdocs' # openstackdocstheme options diff --git a/doc/source/configuration/index.rst b/doc/source/configuration/index.rst new file mode 100644 index 000000000..45bad5661 --- /dev/null +++ b/doc/source/configuration/index.rst @@ -0,0 +1,24 @@ +.. _configuring: + +============================= +Vitrage Configuration Options +============================= + +Vitrage Sample Configuration File +================================= + +Configure Vitrage by editing /etc/vitrage/vitrage.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/vitrage/vitrage-config-generator.conf \ + --output-file=/etc/vitrage/vitrage.conf + +The following is a sample Vitrage configuration for adaptation and use. It is +auto-generated from Vitrage when this documentation is built, and can also be +viewed in `file form <../_static/vitrage.conf.sample>`_. + +.. literalinclude:: ../_static/vitrage.conf.sample diff --git a/doc/source/contributor/configuration.rst b/doc/source/contributor/configuration.rst index 9d5aff4cb..118803085 100644 --- a/doc/source/contributor/configuration.rst +++ b/doc/source/contributor/configuration.rst @@ -13,6 +13,7 @@ General profiler-config keycloak-config + ../configuration/index Datasources -----------