From 54005e50da77551085663c4f7916bc9e0bdc1043 Mon Sep 17 00:00:00 2001 From: Saad Zaher Date: Wed, 13 Sep 2017 15:03:19 -0600 Subject: [PATCH] Migrating documentation to the new style Change-Id: I4a398b2ea3023250905208f35996015f5a5d5e84 --- doc/source/_static/freezer.conf.sample | 144 ++++++++ doc/source/conf.py | 317 +++++------------- doc/source/contributor/index.rst | 4 + doc/source/dev/index.rst | 2 - doc/source/index.rst | 53 +-- .../source => doc/source/install}/actions.rst | 2 +- .../source/install}/api_documents.rst | 2 +- .../source/install}/api_routes.rst | 2 +- .../source/install}/client_structure.rst | 2 +- .../source/install}/common_configure.rst | 0 .../source/install}/common_prerequisites.rst | 0 .../source/install}/db-install.rst | 2 +- .../source/install}/devstack_plugin.rst | 2 +- .../source/install}/get_started.rst | 1 - .../source => doc/source/install}/index.rst | 1 - .../source/install}/install-obs.rst | 2 +- .../source/install}/install-rdo.rst | 2 +- .../source/install}/install-ubuntu.rst | 2 +- .../source => doc/source/install}/install.rst | 2 +- .../source/install}/install_agent.rst | 2 +- .../source => doc/source/install}/jobs.rst | 2 +- .../source/install}/known_issues.rst | 2 +- .../source/install}/metadata_structure.rst | 2 +- .../source/install}/next-steps.rst | 2 +- .../source/install}/sessions.rst | 2 +- .../source => doc/source/install}/verify.rst | 2 +- etc/scheduler.conf.sample | 55 +-- freezer/__init__.py | 1 + install-guide/source/conf.py | 301 ----------------- tox.ini | 10 +- 30 files changed, 322 insertions(+), 601 deletions(-) create mode 100644 doc/source/_static/freezer.conf.sample create mode 100644 doc/source/contributor/index.rst delete mode 100644 doc/source/dev/index.rst rename {install-guide/source => doc/source/install}/actions.rst (95%) rename {install-guide/source => doc/source/install}/api_documents.rst (86%) rename {install-guide/source => doc/source/install}/api_routes.rst (99%) rename {install-guide/source => doc/source/install}/client_structure.rst (96%) rename {install-guide/source => doc/source/install}/common_configure.rst (100%) rename {install-guide/source => doc/source/install}/common_prerequisites.rst (100%) rename {install-guide/source => doc/source/install}/db-install.rst (98%) rename {install-guide/source => doc/source/install}/devstack_plugin.rst (98%) rename {install-guide/source => doc/source/install}/get_started.rst (94%) rename {install-guide/source => doc/source/install}/index.rst (78%) rename {install-guide/source => doc/source/install}/install-obs.rst (97%) rename {install-guide/source => doc/source/install}/install-rdo.rst (97%) rename {install-guide/source => doc/source/install}/install-ubuntu.rst (96%) rename {install-guide/source => doc/source/install}/install.rst (93%) rename {install-guide/source => doc/source/install}/install_agent.rst (98%) rename {install-guide/source => doc/source/install}/jobs.rst (99%) rename {install-guide/source => doc/source/install}/known_issues.rst (94%) rename {install-guide/source => doc/source/install}/metadata_structure.rst (98%) rename {install-guide/source => doc/source/install}/next-steps.rst (88%) rename {install-guide/source => doc/source/install}/sessions.rst (99%) rename {install-guide/source => doc/source/install}/verify.rst (91%) delete mode 100644 install-guide/source/conf.py diff --git a/doc/source/_static/freezer.conf.sample b/doc/source/_static/freezer.conf.sample new file mode 100644 index 00000000..d6ad0392 --- /dev/null +++ b/doc/source/_static/freezer.conf.sample @@ -0,0 +1,144 @@ +[DEFAULT] + +# +# From oslo.log +# + +# If set to true, the logging level will be set to DEBUG instead of the default +# INFO level. (boolean value) +# Note: This option can be changed without restarting. +#debug = false + +# The name of a logging configuration file. This file is appended to any +# existing logging configuration files. For details about logging configuration +# files, see the Python logging module documentation. Note that when logging +# configuration files are used then all logging configuration is set in the +# configuration file and other logging configuration options are ignored (for +# example, logging_context_format_string). (string value) +# Note: This option can be changed without restarting. +# Deprecated group/name - [DEFAULT]/log_config +#log_config_append = + +# Defines the format string for %%(asctime)s in log records. Default: +# %(default)s . This option is ignored if log_config_append is set. (string +# value) +#log_date_format = %Y-%m-%d %H:%M:%S + +# (Optional) Name of log file to send logging output to. If no default is set, +# logging will go to stderr as defined by use_stderr. This option is ignored if +# log_config_append is set. (string value) +# Deprecated group/name - [DEFAULT]/logfile +#log_file = + +# (Optional) The base directory used for relative log_file paths. This option +# is ignored if log_config_append is set. (string value) +# Deprecated group/name - [DEFAULT]/logdir +#log_dir = + +# Uses logging handler designed to watch file system. When log file is moved or +# removed this handler will open a new log file with specified path +# instantaneously. It makes sense only if log_file option is specified and +# Linux platform is used. This option is ignored if log_config_append is set. +# (boolean value) +#watch_log_file = false + +# Use syslog for logging. Existing syslog format is DEPRECATED and will be +# changed later to honor RFC5424. This option is ignored if log_config_append +# is set. (boolean value) +#use_syslog = false + +# Enable journald for logging. If running in a systemd environment you may wish +# to enable journal support. Doing so will use the journal native protocol +# which includes structured metadata in addition to log messages.This option is +# ignored if log_config_append is set. (boolean value) +#use_journal = false + +# Syslog facility to receive log lines. This option is ignored if +# log_config_append is set. (string value) +#syslog_log_facility = LOG_USER + +# Log output to standard error. This option is ignored if log_config_append is +# set. (boolean value) +#use_stderr = false + +# Format string to use for log messages with context. (string value) +#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s + +# Format string to use for log messages when context is undefined. (string +# value) +#logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s + +# Additional data to append to log message when logging level for the message +# is DEBUG. (string value) +#logging_debug_format_suffix = %(funcName)s %(pathname)s:%(lineno)d + +# Prefix each line of exception output with this format. (string value) +#logging_exception_prefix = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s + +# Defines the format string for %(user_identity)s that is used in +# logging_context_format_string. (string value) +#logging_user_identity_format = %(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s + +# List of package logging levels in logger=LEVEL pairs. This option is ignored +# if log_config_append is set. (list value) +#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,oslo_messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN,oslo.cache=INFO,dogpile.core.dogpile=INFO + +# Enables or disables publication of error events. (boolean value) +#publish_errors = false + +# The format for an instance that is passed with the log message. (string +# value) +#instance_format = "[instance: %(uuid)s] " + +# The format for an instance UUID that is passed with the log message. (string +# value) +#instance_uuid_format = "[instance: %(uuid)s] " + +# Interval, number of seconds, of log rate limiting. (integer value) +#rate_limit_interval = 0 + +# Maximum number of logged messages per rate_limit_interval. (integer value) +#rate_limit_burst = 0 + +# Log level name used by rate limiting: CRITICAL, ERROR, INFO, WARNING, DEBUG +# or empty string. Logs with level greater or equal to rate_limit_except_level +# are not filtered. An empty string means that all levels are filtered. (string +# value) +#rate_limit_except_level = CRITICAL + +# Enables or disables fatal status of deprecations. (boolean value) +#fatal_deprecations = false + +# +# From scheduler +# + +# Specifies the client_id used when contacting the service. +# If not specified it will be automatically created +# using the tenant-id and the machine hostname. (string value) +#client_id = + +# Prevents the scheduler from using the api service (boolean value) +#no_api = false + +# Used to store/retrieve files on local storage, including those exchanged with +# the api service. Default value is /etc/freezer/scheduler/conf.d (Env: +# FREEZER_SCHEDULER_CONF_D) (string value) +#jobs_dir = /etc/freezer/scheduler/conf.d + +# Specifies the api-polling interval in seconds. Defaults to 60 seconds +# (integer value) +#interval = 60 + +# Prevents the scheduler from running in daemon mode (boolean value) +#no_daemon = false + +# Initialize freezer scheduler with insecure mode (boolean value) +#insecure = false + +# Allow Freezer Scheduler to deny jobs that execute commands for security +# reasons (boolean value) +#disable_exec = false + +# Number of jobs that can be executed at the same time (integer value) +#concurrent_jobs = 1 diff --git a/doc/source/conf.py b/doc/source/conf.py index 73676bbf..6cd53df9 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,21 +1,17 @@ -# 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 +# 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 +# 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. -# -# Freezer documentation build configuration file, created by -# sphinx-quickstart on Thu Feb 4 22:27:35 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. +# 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 execfile()d with the current directory set +# to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. @@ -23,261 +19,126 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os +import sys + +# NOTE(dims): monkey patch subprocess to prevent failures in latest eventlet +# See https://github.com/eventlet/eventlet/issues/398 + # 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. -#sys.path.insert(0, os.path.abspath('.')) +# sys.path.insert(0, os.path.abspath('../../')) +# sys.path.insert(0, os.path.abspath('../')) +# sys.path.insert(0, os.path.abspath('./')) -# -- General configuration ------------------------------------------------ +# -- General configuration ---------------------------------------------------- -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# Add any Sphinx extension module names here, as strings. +# They can be extensions coming with Sphinx (named 'sphinx.ext.*') +# or your custom ones. -# 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', - 'sphinx.ext.viewcode', - 'openstackdocstheme'] +extensions = ['openstackdocstheme', + 'oslo_config.sphinxconfiggen', + ] + +config_generator_config_file = ( + '../../config-generator/scheduler.conf') +sample_config_basename = '_static/freezer' + +# 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 +#if not os.getenv('SPHINX_DEBUG'): +# extensions += ['ext.freezer_autodoc'] + +todo_include_todos = True # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +# templates_path = [] # The suffix of source filenames. source_suffix = '.rst' -# openstackdocstheme options -repository_name = 'openstack/freezer' -bug_project = 'freezer' -bug_tag = '' - -# Must set this variable to include year, month, day, hours, and minutes. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8' # The master toctree document. master_doc = 'index' # General information about the project. -project = u'Freezer' -copyright = u'2016, OpenStack' +repository_name = 'openstack/freezer' +bug_project = 'freezer' +bug_tag = 'doc' +# project = u'Freezer' +# copyright = u'2010-present, OpenStack Foundation' # 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 = '2.0' -# The full version, including alpha/beta/rc tags. -release = '2.0.0' +# from freezer import version_info +# # The full version, including alpha/beta/rc tags. +# release = version_info.release_string() +# # The short X.Y version. +# version = version_info.version_string() # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = [] +# List of documents that shouldn't be included in the build. -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# 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 = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +# # List of directories, relative to source directory, that shouldn't be searched +# # for source files. +# exclude_trees = [] +# +# # The reST default role (used for this markup: `text`) to use +# # for all documents. +# # default_role = None +# +# # 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 = False +# +# # If true, sectionauthor and moduleauthor directives will be shown in the +# # output. They are ignored by default. +# show_authors = False +# +# # The name of the Pygments (syntax highlighting) style to use. +# pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +modindex_common_prefix = ['freezer.'] -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# -- Options for man page output ---------------------------------------------- +# Grouping the document tree for man pages. +# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' -# -- 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 = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# 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'] - -# 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 = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'Freezerdoc' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ('index', 'Freezer.tex', u'Freezer Documentation', - u'OpenStack', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'freezer', u'Freezer Documentation', + ('man/freezer-manage', 'freezer-manage', u'Cloud controller fabric', [u'OpenStack'], 1) ] -# If true, show URL addresses after external links. -#man_show_urls = False +# -- Options for HTML output -------------------------------------------------- +# 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 = 'openstackdocs' -# -- Options for Texinfo output ------------------------------------------- +# 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' -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'Freezer', u'Freezer Documentation', - u'OpenStack', 'Freezer', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False - - -# Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/source/contributor/index.rst b/doc/source/contributor/index.rst new file mode 100644 index 00000000..108eae82 --- /dev/null +++ b/doc/source/contributor/index.rst @@ -0,0 +1,4 @@ +Developer Guide +=============== + +TBD diff --git a/doc/source/dev/index.rst b/doc/source/dev/index.rst deleted file mode 100644 index 5e9de614..00000000 --- a/doc/source/dev/index.rst +++ /dev/null @@ -1,2 +0,0 @@ -Developer Guide -=============== \ No newline at end of file diff --git a/doc/source/index.rst b/doc/source/index.rst index fa526759..f40704c3 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -6,6 +6,36 @@ Welcome to Freezer's documentation! =================================== +Install Guides +----------- +.. toctree:: + :maxdepth: 2 + + install/index + + +User Guides +----------- +.. toctree:: + :maxdepth: 2 + + user/index + +Admin Guides +------------ +.. toctree:: + :maxdepth: 2 + + admin/index + +Dev Guides +---------- +.. toctree:: + :maxdepth: 2 + + contributor/index + + About Freezer ============= @@ -196,26 +226,3 @@ How to Scale .. image:: images/admin/freezer_scheduler_api_scale.png :width: 640 px -Documentation -============= - -User Guides ------------ -.. toctree:: - :maxdepth: 2 - - user/index - -Admin Guides ------------- -.. toctree:: - :maxdepth: 2 - - admin/index - -Dev Guides ----------- -.. toctree:: - :maxdepth: 2 - - dev/index diff --git a/install-guide/source/actions.rst b/doc/source/install/actions.rst similarity index 95% rename from install-guide/source/actions.rst rename to doc/source/install/actions.rst index e0033de7..e2ab1f4d 100644 --- a/install-guide/source/actions.rst +++ b/doc/source/install/actions.rst @@ -1,4 +1,4 @@ -.. _actions: +:ref:`/install/source` Actions ======= diff --git a/install-guide/source/api_documents.rst b/doc/source/install/api_documents.rst similarity index 86% rename from install-guide/source/api_documents.rst rename to doc/source/install/api_documents.rst index 38a23e71..3d893cf7 100644 --- a/install-guide/source/api_documents.rst +++ b/doc/source/install/api_documents.rst @@ -1,4 +1,4 @@ -.. _api_documents: +:ref:`/install/source` API Documents ============= diff --git a/install-guide/source/api_routes.rst b/doc/source/install/api_routes.rst similarity index 99% rename from install-guide/source/api_routes.rst rename to doc/source/install/api_routes.rst index 742c203c..62abaced 100644 --- a/install-guide/source/api_routes.rst +++ b/doc/source/install/api_routes.rst @@ -1,4 +1,4 @@ -.. _api_routes: +:ref:`/install/source` API routes ========== diff --git a/install-guide/source/client_structure.rst b/doc/source/install/client_structure.rst similarity index 96% rename from install-guide/source/client_structure.rst rename to doc/source/install/client_structure.rst index e8b74991..faac90a9 100644 --- a/install-guide/source/client_structure.rst +++ b/doc/source/install/client_structure.rst @@ -1,4 +1,4 @@ -.. _client_structure: +:ref:`/install/source` Freezer Client document structure ================================= diff --git a/install-guide/source/common_configure.rst b/doc/source/install/common_configure.rst similarity index 100% rename from install-guide/source/common_configure.rst rename to doc/source/install/common_configure.rst diff --git a/install-guide/source/common_prerequisites.rst b/doc/source/install/common_prerequisites.rst similarity index 100% rename from install-guide/source/common_prerequisites.rst rename to doc/source/install/common_prerequisites.rst diff --git a/install-guide/source/db-install.rst b/doc/source/install/db-install.rst similarity index 98% rename from install-guide/source/db-install.rst rename to doc/source/install/db-install.rst index ae6c97ee..7bc0c9e1 100644 --- a/install-guide/source/db-install.rst +++ b/doc/source/install/db-install.rst @@ -1,4 +1,4 @@ -.. _db-install: +:ref:`/install/source` Install and configure database ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/install-guide/source/devstack_plugin.rst b/doc/source/install/devstack_plugin.rst similarity index 98% rename from install-guide/source/devstack_plugin.rst rename to doc/source/install/devstack_plugin.rst index 869fe89c..1c44745e 100644 --- a/install-guide/source/devstack_plugin.rst +++ b/doc/source/install/devstack_plugin.rst @@ -1,4 +1,4 @@ -.. _devstack_plugin: +:ref:`/install/source` Devstack Plugin =============== diff --git a/install-guide/source/get_started.rst b/doc/source/install/get_started.rst similarity index 94% rename from install-guide/source/get_started.rst rename to doc/source/install/get_started.rst index 9b8eda95..f8f742f4 100644 --- a/install-guide/source/get_started.rst +++ b/doc/source/install/get_started.rst @@ -1,4 +1,3 @@ -====================================== Backup/Restore and DR service overview ====================================== The Backup/Restore and DR service provides an easy way to backup and restore diff --git a/install-guide/source/index.rst b/doc/source/install/index.rst similarity index 78% rename from install-guide/source/index.rst rename to doc/source/install/index.rst index 7de2b205..b1e42eed 100644 --- a/install-guide/source/index.rst +++ b/doc/source/install/index.rst @@ -1,4 +1,3 @@ -============================= Backup/Restore and DR service ============================= diff --git a/install-guide/source/install-obs.rst b/doc/source/install/install-obs.rst similarity index 97% rename from install-guide/source/install-obs.rst rename to doc/source/install/install-obs.rst index e5ab9035..4d9e3a4f 100644 --- a/install-guide/source/install-obs.rst +++ b/doc/source/install/install-obs.rst @@ -1,4 +1,4 @@ -.. _install-obs: +:ref:`/install/source` Install and configure for openSUSE and SUSE Linux Enterprise diff --git a/install-guide/source/install-rdo.rst b/doc/source/install/install-rdo.rst similarity index 97% rename from install-guide/source/install-rdo.rst rename to doc/source/install/install-rdo.rst index 0a3d1eee..5e5dbea4 100644 --- a/install-guide/source/install-rdo.rst +++ b/doc/source/install/install-rdo.rst @@ -1,4 +1,4 @@ -.. _install-rdo: +:ref:`/install/source` Install and configure for Red Hat Enterprise Linux and CentOS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/install-guide/source/install-ubuntu.rst b/doc/source/install/install-ubuntu.rst similarity index 96% rename from install-guide/source/install-ubuntu.rst rename to doc/source/install/install-ubuntu.rst index 39bfc128..63494856 100644 --- a/install-guide/source/install-ubuntu.rst +++ b/doc/source/install/install-ubuntu.rst @@ -1,4 +1,4 @@ -.. _install-ubuntu: +:ref:`/install/source` Install and configure for Ubuntu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/install-guide/source/install.rst b/doc/source/install/install.rst similarity index 93% rename from install-guide/source/install.rst rename to doc/source/install/install.rst index 5e5206fa..11ee9462 100644 --- a/install-guide/source/install.rst +++ b/doc/source/install/install.rst @@ -1,4 +1,4 @@ -.. _install: +:ref:`/install/source` Install and configure ~~~~~~~~~~~~~~~~~~~~~ diff --git a/install-guide/source/install_agent.rst b/doc/source/install/install_agent.rst similarity index 98% rename from install-guide/source/install_agent.rst rename to doc/source/install/install_agent.rst index b8d704e2..e526ed0c 100644 --- a/install-guide/source/install_agent.rst +++ b/doc/source/install/install_agent.rst @@ -1,4 +1,4 @@ -.. _install_agent: +:ref:`/install/source` This section describes how to install and configure freezer-scheduler and freezer-agent, on any node in the cloud or any vm inside the cloud. diff --git a/install-guide/source/jobs.rst b/doc/source/install/jobs.rst similarity index 99% rename from install-guide/source/jobs.rst rename to doc/source/install/jobs.rst index c057cea5..2997f485 100644 --- a/install-guide/source/jobs.rst +++ b/doc/source/install/jobs.rst @@ -1,4 +1,4 @@ -.. _jobs: +:ref:`/install/source` Jobs ==== diff --git a/install-guide/source/known_issues.rst b/doc/source/install/known_issues.rst similarity index 94% rename from install-guide/source/known_issues.rst rename to doc/source/install/known_issues.rst index 03cee098..cc910f8d 100644 --- a/install-guide/source/known_issues.rst +++ b/doc/source/install/known_issues.rst @@ -1,4 +1,4 @@ -.. _known_issues: +:ref:`/install/source` Known Issues ============ diff --git a/install-guide/source/metadata_structure.rst b/doc/source/install/metadata_structure.rst similarity index 98% rename from install-guide/source/metadata_structure.rst rename to doc/source/install/metadata_structure.rst index aab6dce0..d0b85bcb 100644 --- a/install-guide/source/metadata_structure.rst +++ b/doc/source/install/metadata_structure.rst @@ -1,4 +1,4 @@ -.. _metadata_structure: +:ref:`/install/source` Backup metadata structure ========================= diff --git a/install-guide/source/next-steps.rst b/doc/source/install/next-steps.rst similarity index 88% rename from install-guide/source/next-steps.rst rename to doc/source/install/next-steps.rst index ad1bdda7..d009508d 100644 --- a/install-guide/source/next-steps.rst +++ b/doc/source/install/next-steps.rst @@ -1,4 +1,4 @@ -.. _next-steps: +:ref:`/install/source` Next steps ~~~~~~~~~~ diff --git a/install-guide/source/sessions.rst b/doc/source/install/sessions.rst similarity index 99% rename from install-guide/source/sessions.rst rename to doc/source/install/sessions.rst index 42c69e59..9d5ad0c0 100644 --- a/install-guide/source/sessions.rst +++ b/doc/source/install/sessions.rst @@ -1,4 +1,4 @@ -.. _sessions: +:ref:`/install/source` Sessions ======== diff --git a/install-guide/source/verify.rst b/doc/source/install/verify.rst similarity index 91% rename from install-guide/source/verify.rst rename to doc/source/install/verify.rst index 02b88509..8d790713 100644 --- a/install-guide/source/verify.rst +++ b/doc/source/install/verify.rst @@ -1,4 +1,4 @@ -.. _verify: +:ref:`/install/source` Verify operation ~~~~~~~~~~~~~~~~ diff --git a/etc/scheduler.conf.sample b/etc/scheduler.conf.sample index 8ab357c1..d6ad0392 100644 --- a/etc/scheduler.conf.sample +++ b/etc/scheduler.conf.sample @@ -6,20 +6,16 @@ # If set to true, the logging level will be set to DEBUG instead of the default # INFO level. (boolean value) +# Note: This option can be changed without restarting. #debug = false -# If set to false, the logging level will be set to WARNING instead of the -# default INFO level. (boolean value) -# This option is deprecated for removal. -# Its value may be silently ignored in the future. -#verbose = true - # The name of a logging configuration file. This file is appended to any # existing logging configuration files. For details about logging configuration # files, see the Python logging module documentation. Note that when logging -# configuration files are used all logging configuration is defined in the -# configuration file and other logging configuration options are ignored. -# (string value) +# configuration files are used then all logging configuration is set in the +# configuration file and other logging configuration options are ignored (for +# example, logging_context_format_string). (string value) +# Note: This option can be changed without restarting. # Deprecated group/name - [DEFAULT]/log_config #log_config_append = @@ -46,18 +42,24 @@ # (boolean value) #watch_log_file = false -# Use syslog for logging. Previous syslog format (without APP-NAME being -# specified in log messages) is DEPRECATED and format will now honor RFC5424. -# This option is ignored if log_config_append is set. (boolean value) +# Use syslog for logging. Existing syslog format is DEPRECATED and will be +# changed later to honor RFC5424. This option is ignored if log_config_append +# is set. (boolean value) #use_syslog = false +# Enable journald for logging. If running in a systemd environment you may wish +# to enable journal support. Doing so will use the journal native protocol +# which includes structured metadata in addition to log messages.This option is +# ignored if log_config_append is set. (boolean value) +#use_journal = false + # Syslog facility to receive log lines. This option is ignored if # log_config_append is set. (string value) #syslog_log_facility = LOG_USER # Log output to standard error. This option is ignored if log_config_append is # set. (boolean value) -#use_stderr = true +#use_stderr = false # Format string to use for log messages with context. (string value) #logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s @@ -79,7 +81,7 @@ # List of package logging levels in logger=LEVEL pairs. This option is ignored # if log_config_append is set. (list value) -#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN,oslo.cache=INFO,dogpile.core.dogpile=INFO +#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,oslo_messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN,oslo.cache=INFO,dogpile.core.dogpile=INFO # Enables or disables publication of error events. (boolean value) #publish_errors = false @@ -92,6 +94,18 @@ # value) #instance_uuid_format = "[instance: %(uuid)s] " +# Interval, number of seconds, of log rate limiting. (integer value) +#rate_limit_interval = 0 + +# Maximum number of logged messages per rate_limit_interval. (integer value) +#rate_limit_burst = 0 + +# Log level name used by rate limiting: CRITICAL, ERROR, INFO, WARNING, DEBUG +# or empty string. Logs with level greater or equal to rate_limit_except_level +# are not filtered. An empty string means that all levels are filtered. (string +# value) +#rate_limit_except_level = CRITICAL + # Enables or disables fatal status of deprecations. (boolean value) #fatal_deprecations = false @@ -101,14 +115,14 @@ # Specifies the client_id used when contacting the service. # If not specified it will be automatically created -# using the tenant-id and the machine hostname. (string value) +# using the tenant-id and the machine hostname. (string value) #client_id = # Prevents the scheduler from using the api service (boolean value) #no_api = false # Used to store/retrieve files on local storage, including those exchanged with -# the api service.Default value is /etc/freezer/scheduler/conf.d (Env: +# the api service. Default value is /etc/freezer/scheduler/conf.d (Env: # FREEZER_SCHEDULER_CONF_D) (string value) #jobs_dir = /etc/freezer/scheduler/conf.d @@ -122,8 +136,9 @@ # Initialize freezer scheduler with insecure mode (boolean value) #insecure = false -# Number of jobs that can be executed at the same time. (integer value) -# By default only one job is allowed at a given time because there is no -# built-in protection to prevent backup and restore to be done at the same time -# on one resource. +# Allow Freezer Scheduler to deny jobs that execute commands for security +# reasons (boolean value) +#disable_exec = false + +# Number of jobs that can be executed at the same time (integer value) #concurrent_jobs = 1 diff --git a/freezer/__init__.py b/freezer/__init__.py index 2a6bbd8e..7b6f0ebf 100644 --- a/freezer/__init__.py +++ b/freezer/__init__.py @@ -18,3 +18,4 @@ import pbr.version __version__ = pbr.version.VersionInfo('freezer').version_string() +version_info = pbr.version.VersionInfo('freezer') diff --git a/install-guide/source/conf.py b/install-guide/source/conf.py deleted file mode 100644 index 4d37a554..00000000 --- a/install-guide/source/conf.py +++ /dev/null @@ -1,301 +0,0 @@ -# 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 execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import os -# import sys - - -import openstackdocstheme - -# 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. -# sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -# TODO(ajaeger): enable PDF building, for example add 'rst2pdf.pdfbuilder' -# extensions = - -# Add any paths that contain templates here, relative to this directory. -# templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'Installation Guide for Backup Service' -bug_tag = u'install-guide' -copyright = u'2016, OpenStack contributors' - -# 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 = '0.1' -# The full version, including alpha/beta/rc tags. -release = '0.1' - -# A few variables have to be set for the log-a-bug feature. -# giturl: The location of conf.py on Git. Must be set manually. -# gitsha: The SHA checksum of the bug description. Automatically extracted -# from git log. -# bug_tag: Tag for categorizing the bug. Must be set manually. -# These variables are passed to the logabug code via html_context. -giturl = u'http://git.openstack.org/cgit/openstack/freezer-api/tree/install-guide/source' # noqa -git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" -gitsha = os.popen(git_cmd).read().strip('\n') -html_context = {"gitsha": gitsha, "bug_tag": bug_tag, - "giturl": giturl, - "bug_project": "freezer-api"} - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ["common_prerequisites.rst", "common_configure.rst"] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# 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 = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - - -# -- 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' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [openstackdocstheme.get_html_theme_path()] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# 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 = [] - -# 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. -# So that we can enable "log-a-bug" links from each output HTML page, this -# variable must be set to a format that includes year, month, day, hours and -# minutes. -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 - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -html_use_index = False - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -html_show_sourcelink = False - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'install-guide' - -# If true, publish source files -html_copy_source = False - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # 'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ('index', 'InstallGuide.tex', u'Install Guide', - u'OpenStack contributors', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'installguide', u'Install Guide', - [u'OpenStack contributors'], 1) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'InstallGuide', u'Install Guide', - u'OpenStack contributors', 'InstallGuide', - 'This guide shows OpenStack end users how to install ' - 'an OpenStack cloud.', 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False - -# -- Options for Internationalization output ------------------------------ -locale_dirs = ['locale/'] - -# -- Options for PDF output -------------------------------------------------- - -pdf_documents = [ - ('index', u'InstallGuide', u'Install Guide', - u'OpenStack contributors') -] diff --git a/tox.ini b/tox.ini index c9f4a276..5b111ccc 100644 --- a/tox.ini +++ b/tox.ini @@ -61,8 +61,9 @@ commands = whitelist_externals = rm bash commands = + rm -rf doc/build/ python setup.py build_sphinx - sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html + [testenv:pep8] commands = flake8 freezer @@ -76,12 +77,5 @@ show-source = True enable-extensions = H203,H106 exclude = .venv,.tox,dist,doc,test,*egg,releasenotes -[testenv:install-guide] -whitelist_externals = rm - bash -commands = - rm -rf install-guide/build/ - sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html - [testenv:releasenotes] commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html