From e7d32fb51e1c064054e1714b0f15e8c94f276060 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 14 May 2018 13:48:00 -0500 Subject: [PATCH] Add docs to openstack-helm-infra This aims to introduce documentation to openstack-helm-infra, similar to what exists in openstack-helm Change-Id: If6a850d555c9bd4ddae36763733a47e795961a50 --- .zuul.yaml | 34 +++++- doc/requirements.txt | 7 ++ doc/source/_static/.placeholder | 0 doc/source/conf.py | 92 +++++++++++++++++ doc/source/index.rst | 17 +++ doc/source/install/developer.rst | 172 +++++++++++++++++++++++++++++++ doc/source/install/index.rst | 10 ++ doc/source/install/multinode.rst | 172 +++++++++++++++++++++++++++++++ setup.cfg | 21 ++++ setup.py | 20 ++++ tox.ini | 21 ++++ 11 files changed, 563 insertions(+), 3 deletions(-) create mode 100644 doc/requirements.txt create mode 100644 doc/source/_static/.placeholder create mode 100644 doc/source/conf.py create mode 100644 doc/source/index.rst create mode 100644 doc/source/install/developer.rst create mode 100644 doc/source/install/index.rst create mode 100644 doc/source/install/multinode.rst create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 tox.ini diff --git a/.zuul.yaml b/.zuul.yaml index 90f71a271..246696087 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -19,17 +19,45 @@ voting: true - openstack-helm-infra-ubuntu: voting: true + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ - openstack-helm-infra-centos: voting: true + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ - openstack-helm-infra-fedora: voting: false + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ - openstack-helm-infra-dev-deploy: voting: false + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ gate: jobs: - - openstack-helm-infra-linter - - openstack-helm-infra-ubuntu - - openstack-helm-infra-centos + - openstack-helm-infra-linter: + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + - openstack-helm-infra-ubuntu: + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + - openstack-helm-infra-centos: + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ - nodeset: name: openstack-helm-single-node diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 000000000..6354511f4 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,7 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +sphinx>=1.6.2 # BSD +sphinxcontrib-blockdiag>=1.1.0 +oslosphinx>=4.7.0 # Apache-2.0 +openstackdocstheme>=1.17.0 # Apache-2.0 diff --git a/doc/source/_static/.placeholder b/doc/source/_static/.placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 000000000..e22473782 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,92 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +import sys + +sys.path.insert(0, os.path.abspath('../..')) +# -- General configuration ---------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [ + 'sphinx.ext.autodoc', + 'openstackdocstheme', + 'oslosphinx', + 'sphinxcontrib.blockdiag' +] + +# 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 + +# The suffix of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'openstack-helm-infra' +copyright = u'2016, OpenStack Foundation' + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = True + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# -- Options for HTML output -------------------------------------------------- +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'openstackdocs' + +# 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'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' +html_last_updated_fmt = '%Y-%m-%d %H:%M' + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +# html_theme_path = ["."] +# html_theme = '_theme' +# html_static_path = ['static'] + +# Output file base name for HTML help builder. +htmlhelp_basename = '%sdoc' % project + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto/manual]). +latex_documents = [ + ('index', + '%s.tex' % project, + u'%s Documentation' % project, + u'OpenStack Foundation', 'manual'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +# intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 000000000..63d378d81 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,17 @@ +Welcome to OpenStack-Helm-Infra's documentation! +================================================ + +Contents: + +.. toctree:: + :maxdepth: 2 + + install/index + + +Indices and Tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/doc/source/install/developer.rst b/doc/source/install/developer.rst new file mode 100644 index 000000000..c230d9dfb --- /dev/null +++ b/doc/source/install/developer.rst @@ -0,0 +1,172 @@ +====================== +Development Deployment +====================== + +Deploy Local Docker Registry +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/010-deploy-docker-registry.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/010-deploy-docker-registry.sh + +Deploy NFS Provisioner for LMA Services +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/020-lma-nfs-provisioner.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/020-lma-nfs-provisioner.sh + +Deploy LDAP +^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/030-ldap.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/030-ldap.sh + +Deploy Prometheus +^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/040-prometheus.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/040-prometheus.sh + +Deploy Alertmanager +^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/050-alertmanager.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/050-alertmanager.sh + +Deploy Kube-State-Metrics +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/060-kube-state-metrics.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/060-kube-state-metrics.sh + +Deploy Node Exporter +^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/070-node-exporter.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/070-node-exporter.sh + +Deploy OpenStack Exporter +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/080-openstack-exporter.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/080-openstack-exporter.sh + +Deploy Grafana +^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/090-grafana.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/090-grafana.sh + +Deploy Nagios +^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/100-nagios.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/100-nagios.sh + +Deploy Elasticsearch +^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/110-elasticsearch.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/110-elasticsearch.sh + +Deploy Fluent-Logging +^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/120-fluent-logging.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/120-fluent-logging.sh + +Deploy Kibana +^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/developer/130-kibana.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/130-kibana.sh diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst new file mode 100644 index 000000000..919fe4aac --- /dev/null +++ b/doc/source/install/index.rst @@ -0,0 +1,10 @@ +Installation +============ + +Contents: + +.. toctree:: + :maxdepth: 2 + + developer + multinode diff --git a/doc/source/install/multinode.rst b/doc/source/install/multinode.rst new file mode 100644 index 000000000..c2eb2f44f --- /dev/null +++ b/doc/source/install/multinode.rst @@ -0,0 +1,172 @@ +==================== +Multinode Deployment +==================== + +Deploy Local Docker Registry +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/010-deploy-docker-registry.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/010-deploy-docker-registry.sh + +Deploy NFS Provisioner for LMA Services +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/020-lma-nfs-provisioner.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/020-lma-nfs-provisioner.sh + +Deploy LDAP +^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/030-ldap.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/030-ldap.sh + +Deploy Prometheus +^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/040-prometheus.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/040-prometheus.sh + +Deploy Alertmanager +^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/050-alertmanager.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/050-alertmanager.sh + +Deploy Kube-State-Metrics +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/060-kube-state-metrics.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/060-kube-state-metrics.sh + +Deploy Node Exporter +^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/070-node-exporter.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/070-node-exporter.sh + +Deploy OpenStack Exporter +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/080-openstack-exporter.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/080-openstack-exporter.sh + +Deploy Grafana +^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/090-grafana.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/090-grafana.sh + +Deploy Nagios +^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/100-nagios.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/100-nagios.sh + +Deploy Elasticsearch +^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/110-elasticsearch.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/110-elasticsearch.sh + +Deploy Fluent-Logging +^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/120-fluent-logging.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/120-fluent-logging.sh + +Deploy Kibana +^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/130-kibana.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/130-kibana.sh diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..c6b9930b1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,21 @@ +[metadata] +name = openstack-helm-infra +summary = Helm charts for OpenStack-Helm infrastructure services +description-file = + README.rst +author = OpenStack +author-email = openstack-dev@lists.openstack.org +home-page = https://docs.openstack.org/openstack-helm-infra/latest/ +classifier = + Intended Audience :: Developers + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + +[build_sphinx] +all_files = 1 +build-dir = doc/build +source-dir = doc/source +warning-is-error = True + +[wheel] +universal = 1 diff --git a/setup.py b/setup.py new file mode 100644 index 000000000..c6efeaa62 --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT +import setuptools + +setuptools.setup( + setup_requires=['pbr'], + pbr=True) diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..a738e3334 --- /dev/null +++ b/tox.ini @@ -0,0 +1,21 @@ +[tox] +minversion = 2.0 +envlist = docs +skipsdist = True + +[testenv] +install_command = pip install -U {opts} {packages} +setenv = VIRTUAL_ENV={envdir} +deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} +passenv = *_proxy *_PROXY + +[testenv:venv] +commands = {posargs} + +[testenv:docs] +deps = -r{toxinidir}/doc/requirements.txt +commands = + bash -c "rm -rf doc/build" + python setup.py build_sphinx +whitelist_externals = + bash