Add Maskari base jobs

This introduces the most basic jobs for masakari.

Change-Id: Ie62ea7ec96b8963b5d3815a9241cce964e8fafc2
This commit is contained in:
Jean-Philippe Evrard 2018-05-07 11:59:11 +02:00 committed by nirajsingh
parent e86fe0c26b
commit ab6cfd1ef1
20 changed files with 1149 additions and 1121 deletions

View File

@ -2,5 +2,3 @@
host=review.openstack.org
port=29418
project=openstack/openstack-ansible-os_masakari.git

View File

@ -1,115 +1,115 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
## Verbosity Options
debug: False
masakari_role_project_group: masakari_all
# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
masakari_package_state: "latest"
masakari_pip_package_state: "latest"
masakari_git_repo: https://git.openstack.org/openstack/masakari
masakari_git_install_branch: master
masakari_developer_mode: false
masakari_developer_constraints:
- "git+{{ masakari_git_repo }}@{{ masakari_git_install_branch }}#egg=masakari"
## System info
masakari_system_user_name: masakari
masakari_system_group_name: masakari
masakari_system_shell: /bin/false
masakari_system_comment: masakari system user
masakari_system_user_home: "/var/lib/{{ masakari_system_user_name }}"
# masakari packages that must be installed before anything else
masakari_requires_pip_packages:
- virtualenv
- python-masakariclient
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
# venv_download, even when true, will use the fallback method of building the
# venv from scratch if the venv download fails.
masakari_venv_download: "{{ not masakari_developer_mode | bool }}"
# Name of the virtual env to deploy into
masakari_bin: "/openstack/venvs/masakari-{{ masakari_venv_tag }}/bin"
# Common pip packages
masakari_pip_packages:
- cryptography
- masakari
- keystonemiddleware
- PyMySQL
- python-masakariclient
- python-novaclient
- python-keystoneclient
- python-memcached
- python-swiftclient
- uwsgi
- keystoneauth1
## Tunable overrides
masakari_api_paste_ini_overrides: {}
masakari_masakari_conf_overrides: {}
masakari_policy_json_overrides: {}
masakari_api_init_overrides: {}
## Service Type and Data
masakari_service_region: RegionOne
masakari_service_name: masakari
masakari_service_port: 15868
masakari_service_proto: http
masakari_service_registry_proto: "{{ masakari_service_proto }}"
masakari_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(masakari_service_proto) }}"
masakari_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(masakari_service_proto) }}"
masakari_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(masakari_service_proto) }}"
masakari_service_type: ha
masakari_service_description: "Masakari ha Service"
masakari_service_user_name: masakari
masakari_service_project_name: service
masakari_service_project_domain_id: default
masakari_service_user_domain_id: default
masakari_service_publicuri: "{{ masakari_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ masakari_service_port }}"
masakari_service_publicurl: "{{ masakari_service_publicuri }}/v1/%(tenant_id)s"
masakari_service_internaluri: "{{ masakari_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ masakari_service_port }}"
masakari_service_internalurl: "{{ masakari_service_internaluri }}/v1/%(tenant_id)s"
masakari_service_adminuri: "{{ masakari_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ masakari_service_port }}"
masakari_service_adminurl: "{{ masakari_service_adminuri }}/v1/%(tenant_id)s"
masakari_service_in_ldap: false
masakari_role_name: admin
masakari_api_bind_address: 0.0.0.0
masakari_api_service_port: 15868
## API options
masakari_enable_v1_api: True
masakari_etc_dir: /etc/masakari
masakari_log_dir: /var/log/masakari
masakari_config_options: --config-file {{ masakari_etc_dir }}/masakari.conf
## Services
masakari_services:
masakari-api:
group: masakari_api
service_name: masakari-api
masakari-engine:
group: masakari_engine
service_name: masakari-engine
---
# Copyright (c) 2018 NTT DATA
#
# 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.
## Verbosity Options
debug: False
masakari_role_project_group: masakari_all
# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
masakari_package_state: "latest"
masakari_pip_package_state: "latest"
masakari_git_repo: https://git.openstack.org/openstack/masakari
masakari_git_install_branch: master
masakari_developer_mode: false
masakari_developer_constraints:
- "git+{{ masakari_git_repo }}@{{ masakari_git_install_branch }}#egg=masakari"
## System info
masakari_system_user_name: masakari
masakari_system_group_name: masakari
masakari_system_shell: /bin/false
masakari_system_comment: masakari system user
masakari_system_user_home: "/var/lib/{{ masakari_system_user_name }}"
# masakari packages that must be installed before anything else
masakari_requires_pip_packages:
- virtualenv
- python-masakariclient
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
# venv_download, even when true, will use the fallback method of building the
# venv from scratch if the venv download fails.
masakari_venv_download: "{{ not masakari_developer_mode | bool }}"
# Name of the virtual env to deploy into
masakari_bin: "/openstack/venvs/masakari-{{ masakari_venv_tag }}/bin"
# Common pip packages
masakari_pip_packages:
- cryptography
- masakari
- keystonemiddleware
- PyMySQL
- python-masakariclient
- python-novaclient
- python-keystoneclient
- python-memcached
- python-swiftclient
- uwsgi
- keystoneauth1
## Tunable overrides
masakari_api_paste_ini_overrides: {}
masakari_masakari_conf_overrides: {}
masakari_policy_json_overrides: {}
masakari_api_init_overrides: {}
## Service Type and Data
masakari_service_region: RegionOne
masakari_service_name: masakari
masakari_service_port: 15868
masakari_service_proto: http
masakari_service_registry_proto: "{{ masakari_service_proto }}"
masakari_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(masakari_service_proto) }}"
masakari_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(masakari_service_proto) }}"
masakari_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(masakari_service_proto) }}"
masakari_service_type: ha
masakari_service_description: "Masakari ha Service"
masakari_service_user_name: masakari
masakari_service_project_name: service
masakari_service_project_domain_id: default
masakari_service_user_domain_id: default
masakari_service_publicuri: "{{ masakari_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ masakari_service_port }}"
masakari_service_publicurl: "{{ masakari_service_publicuri }}/v1/%(tenant_id)s"
masakari_service_internaluri: "{{ masakari_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ masakari_service_port }}"
masakari_service_internalurl: "{{ masakari_service_internaluri }}/v1/%(tenant_id)s"
masakari_service_adminuri: "{{ masakari_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ masakari_service_port }}"
masakari_service_adminurl: "{{ masakari_service_adminuri }}/v1/%(tenant_id)s"
masakari_service_in_ldap: false
masakari_role_name: admin
masakari_api_bind_address: 0.0.0.0
masakari_api_service_port: 15868
## API options
masakari_enable_v1_api: True
masakari_etc_dir: /etc/masakari
masakari_log_dir: /var/log/masakari
masakari_config_options: --config-file {{ masakari_etc_dir }}/masakari.conf
## Services
masakari_services:
masakari-api:
group: masakari_api
service_name: masakari-api
masakari-engine:
group: masakari_engine
service_name: masakari-engine

View File

@ -1,329 +1,329 @@
#!/usr/bin/env python3
# Copyright (c) 2018 NTT DATA
#
# 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 pbr.version
import os
# 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.
extensions = [
'openstackdocstheme',
'sphinx.ext.autodoc',
'sphinxmark'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
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.
author = 'OpenStack-Ansible Contributors'
category = 'Miscellaneous'
copyright = '2016-2018, OpenStack-Ansible Contributors'
description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
project = 'OpenStack-Ansible'
role_name = 'os_masakari'
target_name = 'openstack-ansible-' + role_name
title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
# The link to the browsable source code (for the left hand menu)
oslosphinx_cgit_link = (
'https://git.openstack.org/cgit/openstack/{}'.format(target_name)
)
# 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
bug_project = project.lower()
bug_tag = ''
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
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 = []
# 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
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = 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 = []
# 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 = ['_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
# 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 <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
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = target_name + '-docs'
# -- 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': '',
# Latex figure (float) alignment
# 'figure_align': 'htbp',
}
# 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 = [
(master_doc, target_name + '.tex',
title, author, '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 = [
(master_doc, target_name,
title, [author], 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 = [
(master_doc, target_name,
title, author, project,
description, category),
]
# 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
watermark = os.popen("git branch --contains $(git rev-parse HEAD)\
| awk -F/ '/stable/ {print $2}'").read().strip(' \n\t').capitalize()
if watermark == "":
watermark = "Pre-release"
# -- Options for sphinxmark -----------------------------------------------
sphinxmark_enable = True
sphinxmark_div = 'docs-body'
sphinxmark_image = 'text'
sphinxmark_text = watermark
sphinxmark_text_color = (128, 128, 128)
sphinxmark_text_size = 70
#!/usr/bin/env python3
# Copyright (c) 2018 NTT DATA
#
# 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 pbr.version
import os
# 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.
extensions = [
'openstackdocstheme',
'sphinx.ext.autodoc',
'sphinxmark'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
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.
author = 'OpenStack-Ansible Contributors'
category = 'Miscellaneous'
copyright = '2016-2018, OpenStack-Ansible Contributors'
description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
project = 'OpenStack-Ansible'
role_name = 'os_masakari'
target_name = 'openstack-ansible-' + role_name
title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
# The link to the browsable source code (for the left hand menu)
oslosphinx_cgit_link = (
'https://git.openstack.org/cgit/openstack/{}'.format(target_name)
)
# 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
bug_project = project.lower()
bug_tag = ''
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
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 = []
# 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
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = 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 = []
# 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 = ['_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
# 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 <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
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = target_name + '-docs'
# -- 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': '',
# Latex figure (float) alignment
# 'figure_align': 'htbp',
}
# 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 = [
(master_doc, target_name + '.tex',
title, author, '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 = [
(master_doc, target_name,
title, [author], 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 = [
(master_doc, target_name,
title, author, project,
description, category),
]
# 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
watermark = os.popen("git branch --contains $(git rev-parse HEAD)\
| awk -F/ '/stable/ {print $2}'").read().strip(' \n\t').capitalize()
if watermark == "":
watermark = "Pre-release"
# -- Options for sphinxmark -----------------------------------------------
sphinxmark_enable = True
sphinxmark_div = 'docs-body'
sphinxmark_image = 'text'
sphinxmark_text = watermark
sphinxmark_text_color = (128, 128, 128)
sphinxmark_text_size = 70

View File

@ -1 +1,2 @@
<TODO>
<TODO>

View File

@ -1,32 +1,32 @@
==================================
Masakari role for OpenStack-Ansible
==================================
:tags: openstack, masakari, cloud, ansible
:category: \*nix
To clone or view the source code for this repository, visit the role repository
for `os_masakari <https://github.com/openstack/openstack-ansible-os_masakari>`_.
Default variables
~~~~~~~~~~~~~~~~~
.. literalinclude:: ../../defaults/main.yml
:language: yaml
:start-after: under the License.
Dependencies
~~~~~~~~~~~~
<TODO>
Example playbook
~~~~~~~~~~~~~~~~
.. literalinclude:: ../../examples/playbook.yml
:language: yaml
Tags
~~~~
<TODO>
====================================
Masakari role for OpenStack-Ansible
====================================
:tags: openstack, masakari, cloud, ansible
:category: \*nix
To clone or view the source code for this repository, visit the role repository
for `os_masakari <https://github.com/openstack/openstack-ansible-os_masakari>`_.
Default variables
~~~~~~~~~~~~~~~~~
.. literalinclude:: ../../defaults/main.yml
:language: yaml
:start-after: under the License.
Dependencies
~~~~~~~~~~~~
<TODO>
Example playbook
~~~~~~~~~~~~~~~~
.. literalinclude:: ../../examples/playbook.yml
:language: yaml
Tags
~~~~
<TODO>

View File

@ -1,23 +1,23 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Restart masakari services
service:
name: "{{ item.value.service_name }}"
state: restarted
daemon_reload: yes
with_dict: "{{ masakari-services }}"
when: inventory_hostname in groups[item.value.group]
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Restart masakari services
service:
name: "{{ item.value.service_name }}"
state: restarted
daemon_reload: yes
with_dict: "{{ masakari-services }}"
when: inventory_hostname in groups[item.value.group]

View File

@ -1,45 +1,45 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
galaxy_info:
author: niraj singh
description: Installation and setup of masakari
company: NTT DATA
license: Apache2
min_ansible_version: 2.2
platforms:
- name: Ubuntu
versions:
- xenial
- name: EL
versions:
- 7
- name: opensuse
versions:
- 42.1
- 42.2
- 42.3
categories:
- cloud
- python
- masakari
- development
- openstack
dependencies:
- role: apt_package_pinning
when:
- ansible_pkg_mgr == 'apt'
- galera_client
- openstack_openrc
---
# Copyright (c) 2018 NTT DATA
#
# 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.
galaxy_info:
author: niraj singh
description: Installation and setup of masakari
company: NTT DATA
license: Apache2
min_ansible_version: 2.2
platforms:
- name: Ubuntu
versions:
- xenial
- name: EL
versions:
- 7
- name: opensuse
versions:
- 42.1
- 42.2
- 42.3
categories:
- cloud
- python
- masakari
- development
- openstack
dependencies:
- role: apt_package_pinning
when:
- ansible_pkg_mgr == 'apt'
- galera_client
- openstack_openrc

View File

@ -1,19 +1,19 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
maturity_info:
status: incubated
created_during: rocky
---
# Copyright (c) 2018 NTT DATA
#
# 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.
maturity_info:
status: incubated
created_during: rocky

0
run_tests.sh Normal file → Executable file
View File

View File

@ -1,59 +1,59 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
- "{{ ansible_os_family | lower }}.yml"
tags:
- always
- include: masakari_pre_install.yml
tags:
- masakari-install
- include: masakari_install.yml
tags:
- masakari-install
- include: masakari_post_install.yml
tags:
- masakari-config
- include: masakari_init_common.yml
tags:
- masakari-config
- include: masakari_db_setup.yml
static: no
when:
inventory_hostname == groups['masakari_all'][0]
tags:
- masakari-config
- include: masakari_service_setup.yml
static: no
when:
inventory_hostname == groups['masakari_all'][0]
tags:
- masakari-config
- name: Flush handlers
meta: flush_handlers
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
- "{{ ansible_os_family | lower }}.yml"
tags:
- always
- include: masakari_pre_install.yml
tags:
- masakari-install
- include: masakari_install.yml
tags:
- masakari-install
- include: masakari_post_install.yml
tags:
- masakari-config
- include: masakari_init_common.yml
tags:
- masakari-config
- include: masakari_db_setup.yml
static: no
when:
inventory_hostname == groups['masakari_all'][0]
tags:
- masakari-config
- include: masakari_service_setup.yml
static: no
when:
inventory_hostname == groups['masakari_all'][0]
tags:
- masakari-config
- name: Flush handlers
meta: flush_handlers

View File

@ -1,20 +1,20 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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
- name: Perform a synchronization of the Masakari database
command: "{{ masakari_bin }}/masakari-manage db sync"
become: yes
become_user: "{{ masakari_system_user_name }}"
changed_when: false
---
# Copyright (c) 2018 NTT DATA
#
# 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
- name: Perform a synchronization of the Masakari database
command: "{{ masakari_bin }}/masakari-manage db sync"
become: yes
become_user: "{{ masakari_system_user_name }}"
changed_when: false

View File

@ -1,153 +1,153 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Install distro packages
package:
name: "{{ masakari_distro_packages }}"
state: "{{ masakari_package_state }}"
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
register: install_packages
until: install_packages|success
retries: 5
delay: 2
- name: Create developer mode constraint file
copy:
dest: "/opt/developer-pip-constraints.txt"
content: |
{% for item in masakari_developer_constraints %}
{{ item }}
{% endfor %}
when: masakari_developer_mode | bool
- name: Install requires pip packages
pip:
name: "{{ masakari_requires_pip_packages }}"
state: "{{ masakari_pip_package_state }}"
extra_args: >-
{{ masakari_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
{{ pip_install_options | default('') }}
register: install_packages
until: install_packages|success
retries: 5
delay: 2
- name: Retrieve checksum for venv download
uri:
url: "{{ masakari_venv_download_url | replace('tgz', 'checksum') }}"
return_content: yes
register: masakari_venv_checksum
when: masakari_venv_download | bool
- name: Attempt venv download
get_url:
url: "{{ masakari_venv_download_url }}"
dest: "/var/cache/{{ masakari_venv_download_url | basename }}"
checksum: "sha1:{{ masakari_venv_checksum.content | trim }}"
register: masakari_get_venv
when: masakari_venv_download | bool
- name: Remove existing venv
file:
path: "{{ masakari_bin | dirname }}"
state: absent
when: masakari_get_venv | changed
- name: Create masakari venv dir
file:
path: "{{ masakari_bin | dirname }}"
state: directory
register: masakari_venv_dir
when: masakari_get_venv | changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ masakari_venv_download_url | basename }}"
dest: "{{ masakari_bin | dirname }}"
copy: "no"
when: masakari_get_venv | changed
notify:
- Manage LB
- Restart masakari services
- name: Install pip packages
pip:
name: "{{ masakari_pip_packages }}"
state: "{{ masakari_pip_package_state }}"
virtualenv: "{{ masakari_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: >-
{{ masakari_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
{{ pip_install_options | default('') }}
register: install_packages
until: install_packages|success
retries: 5
delay: 2
when: masakari_get_venv | failed or masakari_get_venv | skipped
notify:
- Manage LB
- Restart masakari services
- name: Remove python from path first (CentOS, openSUSE)
file:
path: "{{ masakari_bin | dirname }}/bin/python2.7"
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
- masakari_get_venv | changed
# NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right
# version of python is in the venv, but we do not
# want virtualenv to also replace pip, setuptools
# and wheel so we tell it not to.
# We do not use --always-copy for CentOS/SuSE due
# to https://github.com/pypa/virtualenv/issues/565
- name: Update virtualenv path
shell: |
find {{ masakari_bin }} -name \*.pyc -delete
sed -si '1s/^.*python.*$/#!{{ masakari_bin | replace ('/','\/') }}\/python/' {{ masakari_bin }}/*
virtualenv {{ masakari_bin | dirname }} \
{{ (ansible_pkg_mgr == 'apt') | ternary('--always-copy', '') }} \
--no-pip \
--no-setuptools \
--no-wheel
when: masakari_get_venv | changed
tags:
- skip_ansible_lint
- name: Record the need for a service restart
ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: masakari
option: need_service_restart
value: True
when: (masakari_get_venv | changed) or
(masakari_venv_dir | changed) or
(install_packages | changed) or
(ansible_local is not defined) or
('openstack_ansible' not in ansible_local) or
('masakari' not in ansible_local['openstack_ansible']) or
('need_service_restart' not in ansible_local['openstack_ansible']['masakari'])
- name: Record the venv tag deployed
ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: masakari
option: venv_tag
value: "{{ masakari_venv_tag }}"
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Install distro packages
package:
name: "{{ masakari_distro_packages }}"
state: "{{ masakari_package_state }}"
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
register: install_packages
until: install_packages|success
retries: 5
delay: 2
- name: Create developer mode constraint file
copy:
dest: "/opt/developer-pip-constraints.txt"
content: |
{% for item in masakari_developer_constraints %}
{{ item }}
{% endfor %}
when: masakari_developer_mode | bool
- name: Install requires pip packages
pip:
name: "{{ masakari_requires_pip_packages }}"
state: "{{ masakari_pip_package_state }}"
extra_args: >-
{{ masakari_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
{{ pip_install_options | default('') }}
register: install_packages
until: install_packages|success
retries: 5
delay: 2
- name: Retrieve checksum for venv download
uri:
url: "{{ masakari_venv_download_url | replace('tgz', 'checksum') }}"
return_content: yes
register: masakari_venv_checksum
when: masakari_venv_download | bool
- name: Attempt venv download
get_url:
url: "{{ masakari_venv_download_url }}"
dest: "/var/cache/{{ masakari_venv_download_url | basename }}"
checksum: "sha1:{{ masakari_venv_checksum.content | trim }}"
register: masakari_get_venv
when: masakari_venv_download | bool
- name: Remove existing venv
file:
path: "{{ masakari_bin | dirname }}"
state: absent
when: masakari_get_venv | changed
- name: Create masakari venv dir
file:
path: "{{ masakari_bin | dirname }}"
state: directory
register: masakari_venv_dir
when: masakari_get_venv | changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ masakari_venv_download_url | basename }}"
dest: "{{ masakari_bin | dirname }}"
copy: "no"
when: masakari_get_venv | changed
notify:
- Manage LB
- Restart masakari services
- name: Install pip packages
pip:
name: "{{ masakari_pip_packages }}"
state: "{{ masakari_pip_package_state }}"
virtualenv: "{{ masakari_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: >-
{{ masakari_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
{{ pip_install_options | default('') }}
register: install_packages
until: install_packages|success
retries: 5
delay: 2
when: masakari_get_venv | failed or masakari_get_venv | skipped
notify:
- Manage LB
- Restart masakari services
- name: Remove python from path first (CentOS, openSUSE)
file:
path: "{{ masakari_bin | dirname }}/bin/python2.7"
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
- masakari_get_venv | changed
# NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right
# version of python is in the venv, but we do not
# want virtualenv to also replace pip, setuptools
# and wheel so we tell it not to.
# We do not use --always-copy for CentOS/SuSE due
# to https://github.com/pypa/virtualenv/issues/565
- name: Update virtualenv path
shell: |
find {{ masakari_bin }} -name \*.pyc -delete
sed -si '1s/^.*python.*$/#!{{ masakari_bin | replace ('/','\/') }}\/python/' {{ masakari_bin }}/*
virtualenv {{ masakari_bin | dirname }} \
{{ (ansible_pkg_mgr == 'apt') | ternary('--always-copy', '') }} \
--no-pip \
--no-setuptools \
--no-wheel
when: masakari_get_venv | changed
tags:
- skip_ansible_lint
- name: Record the need for a service restart
ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: masakari
option: need_service_restart
value: True
when: (masakari_get_venv | changed) or
(masakari_venv_dir | changed) or
(install_packages | changed) or
(ansible_local is not defined) or
('openstack_ansible' not in ansible_local) or
('masakari' not in ansible_local['openstack_ansible']) or
('need_service_restart' not in ansible_local['openstack_ansible']['masakari'])
- name: Record the venv tag deployed
ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: masakari
option: venv_tag
value: "{{ masakari_venv_tag }}"

View File

@ -1,40 +1,40 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Deploy masakari configuration files
config_template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "root"
group: "{{ masakari_system_group_name }}"
mode: "0640"
config_overrides: "{{ item.config_overrides }}"
config_type: "{{ item.config_type }}"
when: item.condition | default(True)
with_items:
- src: "api-paste.ini.j2"
dest: "/etc/masakari/api-paste.ini"
config_overrides: "{{ masakari_api_paste_ini_overrides }}"
config_type: "ini"
- src: "masakari.conf.j2"
dest: "/etc/masakari/masakari.conf"
config_overrides: "{{ masakari_masakari_conf_overrides }}"
config_type: "ini"
- src: "policy.json.j2"
dest: "/etc/masakari/policy.json"
config_overrides: "{{ masakari_policy_json_overrides }}"
config_type: "json"
notify:
- Restart masakari services
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Deploy masakari configuration files
config_template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "root"
group: "{{ masakari_system_group_name }}"
mode: "0640"
config_overrides: "{{ item.config_overrides }}"
config_type: "{{ item.config_type }}"
when: item.condition | default(True)
with_items:
- src: "api-paste.ini.j2"
dest: "/etc/masakari/api-paste.ini"
config_overrides: "{{ masakari_api_paste_ini_overrides }}"
config_type: "ini"
- src: "masakari.conf.j2"
dest: "/etc/masakari/masakari.conf"
config_overrides: "{{ masakari_masakari_conf_overrides }}"
config_type: "ini"
- src: "policy.json.j2"
dest: "/etc/masakari/policy.json"
config_overrides: "{{ masakari_policy_json_overrides }}"
config_type: "json"
notify:
- Restart masakari services

View File

@ -1,69 +1,69 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: create the system group
group:
name: "{{ masakari_system_group_name }}"
gid: "{{ masakari_system_group_gid | default(omit) }}"
state: "present"
system: "yes"
- name: Create the masakari system user
user:
name: "{{ masakari_system_user_name }}"
uid: "{{ masakari_system_user_uid | default(omit) }}"
group: "{{ masakari_system_group_name }}"
comment: "{{ masakari_system_comment }}"
shell: "{{ masakari_system_shell }}"
system: "yes"
createhome: "yes"
home: "{{ masakari_system_user_home }}"
- name: Create masakari dir
file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner|default(masakari_system_user_name) }}"
group: "{{ item.group|default(masakari_system_group_name) }}"
mode: "{{ item.mode|default(omit) }}"
with_items:
- { path: "/openstack", mode: "0755", owner: "root", group: "root" }
- { path: "/etc/masakari", mode: "0750" }
- { path: "/var/cache/masakari" }
- { path: "{{ masakari_system_user_home }}" }
- { path: "{{ masakari_system_user_home }}/cache/api", mode: "0700" }
- { path: "{{ masakari_system_user_home }}/cache/registry" }
- { path: "{{ masakari_system_user_home }}/scrubber" }
- name: Test for log directory or link
shell: |
if [ -h "/var/log/masakari" ]; then
chown -h {{ masakari_system_user_name }}:{{ masakari_system_group_name }} "/var/log/masakari"
chown -R {{ masakari_system_user_name }}:{{ masakari_system_group_name }} "$(readlink /var/log/masakari)"
else
exit 1
fi
register: log_dir
failed_when: false
changed_when: log_dir.rc != 0
- name: Create masakari log dir
file:
path: "/var/log/masakari"
state: directory
owner: "{{ masakari_system_user_name }}"
group: "{{ masakari_system_group_name }}"
mode: "0755"
when: log_dir.rc != 0
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: create the system group
group:
name: "{{ masakari_system_group_name }}"
gid: "{{ masakari_system_group_gid | default(omit) }}"
state: "present"
system: "yes"
- name: Create the masakari system user
user:
name: "{{ masakari_system_user_name }}"
uid: "{{ masakari_system_user_uid | default(omit) }}"
group: "{{ masakari_system_group_name }}"
comment: "{{ masakari_system_comment }}"
shell: "{{ masakari_system_shell }}"
system: "yes"
createhome: "yes"
home: "{{ masakari_system_user_home }}"
- name: Create masakari dir
file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner|default(masakari_system_user_name) }}"
group: "{{ item.group|default(masakari_system_group_name) }}"
mode: "{{ item.mode|default(omit) }}"
with_items:
- { path: "/openstack", mode: "0755", owner: "root", group: "root" }
- { path: "/etc/masakari", mode: "0750" }
- { path: "/var/cache/masakari" }
- { path: "{{ masakari_system_user_home }}" }
- { path: "{{ masakari_system_user_home }}/cache/api", mode: "0700" }
- { path: "{{ masakari_system_user_home }}/cache/registry" }
- { path: "{{ masakari_system_user_home }}/scrubber" }
- name: Test for log directory or link
shell: |
if [ -h "/var/log/masakari" ]; then
chown -h {{ masakari_system_user_name }}:{{ masakari_system_group_name }} "/var/log/masakari"
chown -R {{ masakari_system_user_name }}:{{ masakari_system_group_name }} "$(readlink /var/log/masakari)"
else
exit 1
fi
register: log_dir
failed_when: false
changed_when: log_dir.rc != 0
- name: Create masakari log dir
file:
path: "/var/log/masakari"
state: directory
owner: "{{ masakari_system_user_name }}"
group: "{{ masakari_system_group_name }}"
mode: "0755"
when: log_dir.rc != 0

View File

@ -1,91 +1,95 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
# Create a service
- name: Ensure masakari service
keystone:
command: "ensure_service"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
service_name: "{{ masakari_service_name }}"
service_type: "{{ masakari_service_type }}"
description: "{{ masakari_service_description }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
until: add_service|success
retries: 5
delay: 2
# Create an admin user
- name: Ensure masakari user
keystone:
command: "ensure_user"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
user_name: "{{ masakari_service_user_name }}"
tenant_name: "{{ masakari_service_project_name }}"
password: "{{ masakari_service_password }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
when: not masakari_service_in_ldap | bool
until: add_service|success
retries: 5
delay: 10
# Add a role to the user
- name: Ensure masakari user to admin role
keystone:
command: "ensure_user_role"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
user_name: "{{ masakari_service_user_name }}"
tenant_name: "{{ masakari_service_project_name }}"
role_name: "{{ masakari_role_name }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
when: not masakari_service_in_ldap | bool
until: add_service|success
retries: 5
delay: 10
# Create an endpoint
- name: Ensure masakari endpoint
keystone:
command: "ensure_endpoint"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
region_name: "{{ masakari_service_region }}"
service_name: "{{ masakari_service_name }}"
service_type: "{{ masakari_service_type }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
endpoint_list:
- url: "{{ masakari_service_publicurl }}"
interface: "public"
- url: "{{ masakari_service_internalurl }}"
interface: "internal"
- url: "{{ masakari_service_adminurl }}"
interface: "admin"
register: add_service
until: add_service|success
retries: 5
delay: 10
---
# Copyright (c) 2018 NTT DATA
#
# 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.
# Create a service
- name: Ensure masakari service
keystone:
command: "ensure_service"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
service_name: "{{ masakari_service_name }}"
service_type: "{{ masakari_service_type }}"
description: "{{ masakari_service_description }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
until: add_service|success
retries: 5
delay: 2
no_log: True
# Create an admin user
- name: Ensure masakari user
keystone:
command: "ensure_user"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
user_name: "{{ masakari_service_user_name }}"
tenant_name: "{{ masakari_service_project_name }}"
password: "{{ masakari_service_password }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
when: not masakari_service_in_ldap | bool
until: add_service|success
retries: 5
delay: 10
no_log: True
# Add a role to the user
- name: Ensure masakari user to admin role
keystone:
command: "ensure_user_role"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
user_name: "{{ masakari_service_user_name }}"
tenant_name: "{{ masakari_service_project_name }}"
role_name: "{{ masakari_role_name }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
when: not masakari_service_in_ldap | bool
until: add_service|success
retries: 5
delay: 10
no_log: True
# Create an endpoint
- name: Ensure masakari endpoint
keystone:
command: "ensure_endpoint"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
region_name: "{{ masakari_service_region }}"
service_name: "{{ masakari_service_name }}"
service_type: "{{ masakari_service_type }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
endpoint_list:
- url: "{{ masakari_service_publicurl }}"
interface: "public"
- url: "{{ masakari_service_internalurl }}"
interface: "internal"
- url: "{{ masakari_service_adminurl }}"
interface: "admin"
register: add_service
until: add_service|success
retries: 5
delay: 10
no_log: True

View File

@ -1,30 +1,30 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
masakari_service_tenant_name: service
masakari_rabbitmq_port: "{{ rabbitmq_port }}"
masakari_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
masakari_rabbitmq_servers: "{{ rabbitmq_servers }}"
masakari_rabbitmq_host_group: "{{ rabbitmq_host_group }}"
masakari_service_publicuri: "{{ masakari_service_proto }}://{{ hostvars[groups['masakari_all'][0]]['ansible_host'] }}:{{ masakari_service_port }}"
masakari_service_adminurl: "{{ masakari_service_proto }}://{{ hostvars[groups['masakari_all'][0]]['ansible_host'] }}:{{ masakari_service_port }}"
masakari_service_adminuri: "{{ masakari_service_proto }}://{{ hostvars[groups['masakari_all'][0]]['ansible_host'] }}:{{ masakari_service_port }}"
masakari_aodh_enabled: false
masakari_gnocchi_enabled: false
masakari_rabbitmq_password: "secrete"
masakari_service_password: "secrete"
masakari_container_mysql_password: "secrete"
masakari_developer_mode: true
masakari_galera_address: "{{ test_galera_host }}"
---
# Copyright (c) 2018 NTT DATA
#
# 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.
masakari_service_tenant_name: service
masakari_rabbitmq_port: "{{ rabbitmq_port }}"
masakari_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
masakari_rabbitmq_servers: "{{ rabbitmq_servers }}"
masakari_rabbitmq_host_group: "{{ rabbitmq_host_group }}"
masakari_service_publicuri: "{{ masakari_service_proto }}://{{ hostvars[groups['masakari_all'][0]]['ansible_host'] }}:{{ masakari_service_port }}"
masakari_service_adminurl: "{{ masakari_service_proto }}://{{ hostvars[groups['masakari_all'][0]]['ansible_host'] }}:{{ masakari_service_port }}"
masakari_service_adminuri: "{{ masakari_service_proto }}://{{ hostvars[groups['masakari_all'][0]]['ansible_host'] }}:{{ masakari_service_port }}"
masakari_aodh_enabled: false
masakari_gnocchi_enabled: false
masakari_rabbitmq_password: "secrete"
masakari_service_password: "secrete"
masakari_container_mysql_password: "secrete"
masakari_developer_mode: true
masakari_galera_address: "{{ test_galera_host }}"

View File

@ -1,34 +1,34 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Playbook for deploying masakari
hosts: masakari_all
user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: common/ensure-rabbitmq.yml
vhost_name: "{{ masakari_rabbitmq_vhost }}"
user_name: "{{ masakari_rabbitmq_userid }}"
user_password: "{{ masakari_rabbitmq_password }}"
when: groups['rabbitmq_all'] is defined
- include: common/create-grant-db.yml
db_name: "{{ masakari_galera_database }}"
db_password: "{{ masakari_container_mysql_password }}"
roles:
- role: os_masakari
vars_files:
- common/test-vars.yml
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Playbook for deploying masakari
hosts: masakari_all
user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: common/ensure-rabbitmq.yml
vhost_name: "{{ masakari_rabbitmq_vhost }}"
user_name: "{{ masakari_rabbitmq_userid }}"
user_password: "{{ masakari_rabbitmq_password }}"
when: groups['rabbitmq_all'] is defined
- include: common/create-grant-db.yml
db_name: "{{ masakari_galera_database }}"
db_password: "{{ masakari_container_mysql_password }}"
roles:
- role: os_masakari
vars_files:
- common/test-vars.yml

View File

@ -1,30 +1,30 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Ensure masakari APIs are reachable
hosts: masakari_api
user: root
gather_facts: false
tasks:
- name: check masakari api
uri:
url: "http://localhost:{{ item.value.service_name['masakari-api'] }}"
status_code: 200
register: result
until: result.status == 200
retries: 5
delay: 10
with_items:
- 15868
---
# Copyright (c) 2018 NTT DATA
#
# 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.
- name: Ensure masakari APIs are reachable
hosts: masakari_api
user: root
gather_facts: false
tasks:
- name: check masakari api
uri:
url: "http://localhost:{{ item.value.service_name['masakari-api'] }}"
status_code: 200
register: result
until: result.status == 200
retries: 5
delay: 10
with_items:
- 15868

View File

@ -1,29 +1,29 @@
---
# Copyright (c) 2018 NTT DATA
#
# 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.
# Setup the host
- include: common/test-setup-host.yml
# Install RabbitMQ/MariaDB
- include: common/test-install-infra.yml
# Install Keystone
- include: common/test-install-keystone.yml
# Install Masakari
- include: test-install-masakari.yml
# Test Masakari
- include: test-masakari-functional.yml
---
# Copyright (c) 2018 NTT DATA
#
# 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.
# Setup the host
- include: common/test-setup-host.yml
# Install RabbitMQ/MariaDB
- include: common/test-install-infra.yml
# Install Keystone
- include: common/test-install-keystone.yml
# Install Masakari
- include: test-install-masakari.yml
# Test Masakari
- include: test-masakari-functional.yml

25
zuul.d/project.yaml Normal file
View File

@ -0,0 +1,25 @@
---
# Copyright 2018, Rackspace US, Inc.
#
# 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.
- project:
check:
jobs:
- openstack-ansible-linters
- openstack-ansible-functional-centos-7-nv
- openstack-ansible-functional-opensuse-423-nv
- openstack-ansible-functional-ubuntu-xenial-nv
gate:
jobs:
- openstack-ansible-linters