From a73df5a05fbebe94e9551499bbc24a83632216e1 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 10 Apr 2020 11:10:40 +0200 Subject: [PATCH] Cleanup py27 support Make a few cleanups: - Remove python 2.7 stanza from setup.py - Remove obsolete sections from setup.cfg - Switch to using sphinx-build, fix doc warnings - Cleanup doc/source/conf.py to remove now obsolete content. - Use newer openstackdocstheme version - Remove install_command from tox.ini, the default is fine Change-Id: I23a2d62a8853f01e8574ef37b5ee1ac2ee09acd0 --- doc/source/conf.py | 19 +-------------- requirements.txt | 2 +- setup.cfg | 11 --------- setup.py | 9 -------- specs/queens/docs-improvements.rst | 1 + specs/queens/elk-stack.rst | 23 ++++++++++--------- .../python-build-install-simplification.rst | 22 +++++++++--------- specs/rocky/masakari.rst | 2 +- specs/rocky/refactor-inventory.rst | 1 + tox.ini | 5 ++-- 10 files changed, 30 insertions(+), 65 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index af9b901..d8295ec 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,8 +22,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import pbr.version - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -39,7 +37,6 @@ import pbr.version # ones. extensions = [ 'openstackdocstheme', - 'sphinx.ext.autodoc', ] # Add any paths that contain templates here, relative to this directory. @@ -66,16 +63,6 @@ role_name = 'specs' target_name = 'openstack-ansible-' + role_name title = 'OpenStack-Ansible ' + role_name + ' Documentation' -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version_info = pbr.version.VersionInfo(target_name) -# The full version, including alpha/beta/rc tags. -release = version_info.version_string_with_vcs() -# The short X.Y version. -version = version_info.canonical_version_string() # openstackdocstheme options repository_name = 'openstack/' + target_name @@ -160,17 +147,13 @@ 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'] +# html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True diff --git a/requirements.txt b/requirements.txt index e2a915d..26b08c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,5 @@ # this is required for the docs build jobs sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.20.0 # Apache-2.0 +openstackdocstheme>=1.32.1 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 0ea7741..00c3436 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,14 +10,3 @@ 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 - -[pbr] -warnerrors = True - -[wheel] -universal = 1 diff --git a/setup.py b/setup.py index 566d844..cd35c3c 100644 --- a/setup.py +++ b/setup.py @@ -13,17 +13,8 @@ # 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 -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) diff --git a/specs/queens/docs-improvements.rst b/specs/queens/docs-improvements.rst index 1ff4b62..3524a2a 100644 --- a/specs/queens/docs-improvements.rst +++ b/specs/queens/docs-improvements.rst @@ -95,6 +95,7 @@ the priorities change. For improving the reading experience, ensure that each page has a proper structure: + - Only content should appear in the content part of the page - The chapters should only be in the upper-left section of the page ToC, and pointing to this guide chapters, not the whole diff --git a/specs/queens/elk-stack.rst b/specs/queens/elk-stack.rst index 44409d0..b8aa6a3 100644 --- a/specs/queens/elk-stack.rst +++ b/specs/queens/elk-stack.rst @@ -11,7 +11,7 @@ Log file analysis is an important part of maintaining and troubleshooting OpenStack clouds, but using traditional single server methodology to analyze the logs on clouds with tens, hundreds or thousands of servers can become problematic and unwieldy. By leveraging the search, collation and analysis -features of the ELK (Elasticsearch`[1]`_, Logstash`[2]`_ and Kibana`[3]`_) stack +features of the ELK (Elasticsearch [1]_, Logstash [2]_ and Kibana [3]_) stack we can provide a cloud level view of all of the log files. The ELK stack also provides the ability to correlate log messages across various services, perform detailed log analysis and do trending based on metrics derived from log @@ -61,7 +61,7 @@ Playbook/Role impact The changes required are located in stand alone playbooks. Additional roles will need to be created for Logstash, Kibana and Filebeat, the -`ansible-elasticsearch``[4]`_ maintained by elastic.co provides Elasticsearch. +`ansible-elasticsearch`` [4]_ maintained by elastic.co provides Elasticsearch. Configuration can be stand-alone or integrated into the `user-variables.yml` and `user-secrets.yml` files. @@ -181,20 +181,21 @@ Documentation impact Along with the general installation procedures and configuration the key points of documentation will be: - * Filebeats parsing rules - * Logstash parsing rules - * Kibana dashboard configuration - * The default Kibana dashboard - * Performance impact and tuning of the ELK stack + +* Filebeats parsing rules +* Logstash parsing rules +* Kibana dashboard configuration +* The default Kibana dashboard +* Performance impact and tuning of the ELK stack References ========== -[1] https://elastic.co/products/elasticearch +.. [1] https://elastic.co/products/elasticearch -[2] https://elastic.co/products/logstash +.. [2] https://elastic.co/products/logstash -[3] https://elastic.co/products/kibana +.. [3] https://elastic.co/products/kibana -[4] https://github.com/elastic/ansible-elasticsearch +.. [4] https://github.com/elastic/ansible-elasticsearch diff --git a/specs/queens/python-build-install-simplification.rst b/specs/queens/python-build-install-simplification.rst index 8bff4d8..a02e29b 100644 --- a/specs/queens/python-build-install-simplification.rst +++ b/specs/queens/python-build-install-simplification.rst @@ -235,7 +235,7 @@ Proposed change .. _pypiserver: https://pypiserver.readthedocs.io Alternatives ------------- +~~~~~~~~~~~~ * The build process can remain as-is, continuing to confuse deployers and difficult to maintain. @@ -245,7 +245,7 @@ Alternatives venvs for distribution. Playbook/Role impact --------------------- +~~~~~~~~~~~~~~~~~~~~ Playbooks will be added to cater for the build process and the staging process. The roles will be adjusted to properly separate out the build @@ -253,32 +253,32 @@ tasks and the distro packages to install for the build (versus those required when using pre-built wheels). Upgrade impact --------------- +~~~~~~~~~~~~~~ Care will be taken to ensure that upgrades happen as they do today. Security impact ---------------- +~~~~~~~~~~~~~~~ The security posture should be improved by the reduction of packages installed onto hosts and containers when a full set of artifacts are built. Performance impact ------------------- +~~~~~~~~~~~~~~~~~~ The performance of the deployment should be improved due to the reduction in time taken to deploy with pre-built packages if a full set of artifacts are built. End user impact ---------------- +~~~~~~~~~~~~~~~ There is no end-user impact for consumers of an OpenStack cloud, except perhaps that upgrades will be quicker to execute, thus resulting in reduced maintenance slot requirements. Deployer impact ---------------- +~~~~~~~~~~~~~~~ * As deployments and upgrades will be quicker to execute, deployers will be able to execute them in shorter maintenance slots. @@ -287,13 +287,13 @@ Deployer impact prepare the required artifacts to speed up deployments. Developer impact ----------------- +~~~~~~~~~~~~~~~~ As the build process will be integrated into the roles, it will be easier to understand how it works and what it does. Dependencies ------------- +~~~~~~~~~~~~ This spec will be implemented in partnership with https://blueprints.launchpad.net/openstack-ansible/+spec/deployment-stages @@ -302,13 +302,13 @@ Implementation ============== Assignee(s) ------------ +~~~~~~~~~~~ Primary assignee: jesse-pretorius (odyssey4me) Work items ----------- +~~~~~~~~~~ Each of the roles implemented in the default AIO will be worked through in sequence to re-arrange and optimise based on this workflow. The work items diff --git a/specs/rocky/masakari.rst b/specs/rocky/masakari.rst index a7922e2..914a76e 100644 --- a/specs/rocky/masakari.rst +++ b/specs/rocky/masakari.rst @@ -1,5 +1,5 @@ Integration of Masakari with OpenStack-Ansible -################################# +############################################## :date: 2018-03-22 14:00 :tags: openstack, masakari, masakari-monitors diff --git a/specs/rocky/refactor-inventory.rst b/specs/rocky/refactor-inventory.rst index 81a67c2..c0d2e23 100644 --- a/specs/rocky/refactor-inventory.rst +++ b/specs/rocky/refactor-inventory.rst @@ -270,6 +270,7 @@ So I propose the following path: group vars Drawbacks: + * More static files to maintain by the deployer. If we change a host var, we could change the inventory and it was applied everywhere. diff --git a/tox.ini b/tox.ini index cc6c7f5..52a5b2d 100644 --- a/tox.ini +++ b/tox.ini @@ -7,9 +7,8 @@ ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True -install_command = - pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt commands = /usr/bin/find . -type f -name "*.pyc" -delete @@ -32,7 +31,7 @@ setenv = commands= bash -c "rm -rf doc/build" doc8 doc - python setup.py build_sphinx + sphinx-build -W -b html doc/source doc/build/html [doc8] # Settings for doc8: