Add install-guide for aodh

This adds heat-specific contents of the OpenStack Installation Guide
in the aodh repo per [1]. A separate change will remove the aodh
contents from the OpenStack Installation Guide for Newton per [2].

The aodh install-guide structure is based on Install Guide
Cookiecutter [3].

Also adds tox.ini environment for install-guide.

[1] http://specs.openstack.org/openstack/docs-specs/specs/newton/project-specific-installguides.html
[2] http://specs.openstack.org/openstack/docs-specs/specs/newton/installguide.html
[3] https://review.openstack.org/#/c/314229/

Partially-Implements: blueprint projectspecificinstallguides
Change-Id: Ib72b57f9422564c49bf8f24f94f4b76f335e7495
This commit is contained in:
Ildiko Vancsa 2016-06-15 18:16:03 +02:00
parent e0dec8273e
commit 1c3e14665c
12 changed files with 744 additions and 1 deletions

View File

@ -0,0 +1,300 @@
# 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 Telemetry Alarming 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/aodh/tree/install-guide/source'
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": "aodh"}
# 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 = ["prereq-common.rst", "configure-common.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
# "<project> v<release> 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 <link> 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')
]

View File

@ -0,0 +1,86 @@
2. Edit the ``/etc/aodh/aodh.conf`` file and complete the following actions:
* In the ``[database]`` section, configure database access:
.. code-block:: ini
[database]
...
connection = mysql+pymysql://aodh:AODH_DBPASS@controller/aodh
Replace ``AODH_DBPASS`` with the password you chose for the
Telemetry Alarming module database. You must escape special characters
such as ':', '/', '+', and '@' in the connection string in accordance
with `RFC2396 <https://www.ietf.org/rfc/rfc2396.txt>`_.
* In the ``[DEFAULT]`` and ``[oslo_messaging_rabbit]`` sections,
configure ``RabbitMQ`` message queue access:
.. code-block:: ini
[DEFAULT]
...
rpc_backend = rabbit
[oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = RABBIT_PASS
Replace ``RABBIT_PASS`` with the password you chose for the
``openstack`` account in ``RabbitMQ``.
* In the ``[DEFAULT]`` and ``[keystone_authtoken]`` sections,
configure Identity service access:
.. code-block:: ini
[DEFAULT]
...
auth_strategy = keystone
[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = aodh
password = AODH_PASS
Replace ``AODH_PASS`` with the password you chose for
the ``aodh`` user in the Identity service.
* In the ``[service_credentials]`` section, configure service credentials:
.. code-block:: ini
[service_credentials]
...
auth_type = password
auth_url = http://controller:5000/v3
project_domain_name = default
user_domain_name = default
project_name = service
username = aodh
password = AODH_PASS
interface = internalURL
region_name = RegionOne
Replace ``AODH_PASS`` with the password you chose for
the ``aodh`` user in the Identity service.
.. todo:
Workaround for https://bugs.launchpad.net/ubuntu/+source/aodh/+bug/1513599.
3. In order to initialize the database please run the ``aodh-dbsync`` script.
.. note::
The ``aodh-dbsync`` script is only necessary if you are using an SQL
database.

View File

@ -0,0 +1,28 @@
===================================
Telemetry Alarming service overview
===================================
The Telemetry Alarming services trigger alarms when the collected metering
or event data break the defined rules.
The Telemetry Alarming service consists of the following components:
An API server (``aodh-api``)
Runs on one or more central management servers to provide access
to the alarm information stored in the data store.
An alarm evaluator (``aodh-evaluator``)
Runs on one or more central management servers to determine when
alarms fire due to the associated statistic trend crossing a
threshold over a sliding time window.
A notification listener (``aodh-listener``)
Runs on a central management server and determines when to fire alarms.
The alarms are generated based on defined rules against events, which are
captured by the Telemetry Data Collection service's notification agents.
An alarm notifier (``aodh-notifier``)
Runs on one or more central management servers to allow alarms to be
set based on the threshold evaluation for a collection of samples.
These services communicate by using the OpenStack messaging bus.

View File

@ -0,0 +1,15 @@
==========================
Telemetry Alarming service
==========================
.. toctree::
get_started.rst
install-obs.rst
install-rdo.rst
install-ubuntu.rst
verify.rst
next-steps.rst
This chapter assumes a working setup of OpenStack following the base
Installation Guide.

View File

@ -0,0 +1,51 @@
.. _install-obs:
Install and configure for openSUSE and SUSE Linux Enterprise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the
Telemetry Alarming service, code-named aodh, on the controller node.
This section assumes that you already have a working OpenStack
environment with at least the following components installed:
Compute, Image Service, Identity.
.. include:: prereq-common.rst
Install and configure components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
Default configuration files vary by distribution. You might need to add
these sections and options rather than modifying existing sections and
options. Also, an ellipsis (...) in the configuration snippets indicates
potential default configuration options that you should retain.
1. Install the packages:
.. code-block:: console
# zypper install openstack-aodh-api \
openstack-aodh-evaluator openstack-aodh-notifier \
openstack-aodh-listener openstack-aodh-expirer \
python-aodhclient
.. include:: configure-common.rst
Finalize installation
~~~~~~~~~~~~~~~~~~~~~
#. Start the Telemetry Alarming services and configure them to start
when the system boots:
.. code-block:: console
# systemctl enable openstack-aodh-api.service \
openstack-aodh-evaluator.service \
openstack-aodh-notifier.service \
openstack-aodh-listener.service
# systemctl start openstack-aodh-api.service \
openstack-aodh-evaluator.service \
openstack-aodh-notifier.service \
openstack-aodh-listener.service

View File

@ -0,0 +1,51 @@
.. _install-rdo:
Install and configure for Red Hat Enterprise Linux and CentOS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the
Telemetry Alarming service, code-named aodh, on the controller node.
This section assumes that you already have a working OpenStack
environment with at least the following components installed:
Compute, Image Service, Identity.
.. include:: prereq-common.rst
Install and configure components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
Default configuration files vary by distribution. You might need to add
these sections and options rather than modifying existing sections and
options. Also, an ellipsis (...) in the configuration snippets indicates
potential default configuration options that you should retain.
1. Install the packages:
.. code-block:: console
# yum install openstack-aodh-api \
openstack-aodh-evaluator openstack-aodh-notifier \
openstack-aodh-listener openstack-aodh-expirer \
python-aodhclient
.. include:: configure-common.rst
Finalize installation
~~~~~~~~~~~~~~~~~~~~~
#. Start the Telemetry Alarming services and configure them to start
when the system boots:
.. code-block:: console
# systemctl enable openstack-aodh-api.service \
openstack-aodh-evaluator.service \
openstack-aodh-notifier.service \
openstack-aodh-listener.service
# systemctl start openstack-aodh-api.service \
openstack-aodh-evaluator.service \
openstack-aodh-notifier.service \
openstack-aodh-listener.service

View File

@ -0,0 +1,53 @@
.. _install-ubuntu:
Install and configure for Ubuntu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the
Telemetry Alarming service, code-named aodh, on the controller node.
This section assumes that you already have a working OpenStack
environment with at least the following components installed:
Compute, Image Service, Identity.
.. include:: prereq-common.rst
Install and configure components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
Default configuration files vary by distribution. You might need to add
these sections and options rather than modifying existing sections and
options. Also, an ellipsis (...) in the configuration snippets indicates
potential default configuration options that you should retain.
1. Install the packages:
.. code-block:: console
# apt-get install aodh-api aodh-evaluator aodh-notifier \
aodh-listener aodh-expirer python-aodhclient
.. include:: configure-common.rst
3. Edit the ``/etc/aodh/api_paste.ini`` file and modify the
``[filter:authtoken]`` section as follows:
.. code-block:: ini
[filter:authtoken]
...
oslo_config_project = aodh
Finalize installation
~~~~~~~~~~~~~~~~~~~~~
#. Restart the Alarming services:
.. code-block:: console
# service aodh-api restart
# service aodh-evaluator restart
# service aodh-notifier restart
# service aodh-listener restart

View File

@ -0,0 +1,9 @@
.. _next-steps:
Next steps
~~~~~~~~~~
Your OpenStack environment now includes the aodh service.
To add additional services, see
docs.openstack.org/draft/install-guides/index.html .

View File

@ -0,0 +1,137 @@
Prerequisites
-------------
Before you install and configure the Telemetry service, you must create a
database, service credentials, and API endpoints.
#. To create the database, complete these steps:
* Use the database access client to connect to
the database server as the ``root`` user:
.. code-block:: console
$ mysql -u root -p
* Create the ``aodh`` database:
.. code-block:: console
CREATE DATABASE aodh;
* Grant proper access to the ``aodh`` database:
.. code-block:: console
GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'localhost' \
IDENTIFIED BY 'AODH_DBPASS';
GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' \
IDENTIFIED BY 'AODH_DBPASS';
Replace ``AODH_DBPASS`` with a suitable password.
* Exit the database access client.
#. Source the ``admin`` credentials to gain access to admin-only
CLI commands:
.. code-block:: console
$ . admin-openrc
#. To create the service credentials, complete these steps:
* Create the ``aodh`` user:
.. code-block:: console
$ openstack user create --domain default \
--password-prompt aodh
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | e0353a670a9e496da891347c589539e9 |
| enabled | True |
| id | b7657c9ea07a4556aef5d34cf70713a3 |
| name | aodh |
+-----------+----------------------------------+
* Add the ``admin`` role to the ``aodh`` user:
.. code-block:: console
$ openstack role add --project service --user aodh admin
.. note::
This command provides no output.
* Create the ``aodh`` service entity:
.. code-block:: console
$ openstack service create --name aodh \
--description "Telemetry" alarming
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Telemetry |
| enabled | True |
| id | 3405453b14da441ebb258edfeba96d83 |
| name | aodh |
| type | alarming |
+-------------+----------------------------------+
#. Create the Alarming service API endpoints:
.. code-block:: console
$ openstack endpoint create --region RegionOne \
alarming public http://controller:8042
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 340be3625e9b4239a6415d034e98aace |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
| service_name | aodh |
| service_type | alarming |
| url | http://controller:8042 |
+--------------+----------------------------------+
$ openstack endpoint create --region RegionOne \
alarming internal http://controller:8042
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 340be3625e9b4239a6415d034e98aace |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
| service_name | aodh |
| service_type | alarming |
| url | http://controller:8042 |
+--------------+----------------------------------+
$ openstack endpoint create --region RegionOne \
alarming admin http://controller:8042
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 340be3625e9b4239a6415d034e98aace |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
| service_name | aodh |
| service_type | alarming |
| url | http://controller:8042 |
+--------------+----------------------------------+

View File

@ -0,0 +1,8 @@
.. _verify:
Verify operation
~~~~~~~~~~~~~~~~
Verify operation of the Telemetry Alarming service.
TBD

View File

@ -56,6 +56,7 @@ doc =
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
sphinxcontrib-httpdomain
sphinxcontrib-pecanwsme>=0.8
openstackdocstheme>=1.0.3 # Apache-2.0
test =
pifpaf>=0.1.0

View File

@ -71,6 +71,10 @@ commands =
deps = .[doc]
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:install-guide]
deps = .[doc]
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/aodh/aodh-config-generator.conf
@ -104,7 +108,7 @@ commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {
[flake8]
ignore =
exclude=.venv,.git,.tox,dist,doc,./aodh/openstack/common,*lib/python*,*egg,build
exclude=.venv,.git,.tox,dist,doc,./aodh/openstack/common,*lib/python*,*egg,build,install-guide
show-source = True
[hacking]