Retire openstack-ansible-os_monasca
Change-Id: Ie8da46562c150885010b47980a1ee26bff4d3bc5
This commit is contained in:
parent
754c6ab1c2
commit
9e3bd3f320
|
@ -1,75 +0,0 @@
|
|||
# Compiled source #
|
||||
###################
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.so
|
||||
*.pyc
|
||||
build/
|
||||
dist/
|
||||
doc/build/
|
||||
|
||||
# Packages #
|
||||
############
|
||||
# it's better to unpack these files and commit the raw source
|
||||
# git has its own built in compression methods
|
||||
*.7z
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
|
||||
# Logs and databases #
|
||||
######################
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
logs/*
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
.idea
|
||||
.tox
|
||||
*.sublime*
|
||||
*.egg-info
|
||||
Icon?
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
.eggs
|
||||
|
||||
# User driven backup files #
|
||||
############################
|
||||
*.bak
|
||||
*.swp
|
||||
|
||||
# Generated by pbr while building docs
|
||||
######################################
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
|
||||
# Files created by releasenotes build
|
||||
releasenotes/build
|
||||
|
||||
# Test temp files
|
||||
tests/common
|
||||
tests/*.retry
|
||||
|
||||
# Vagrant artifacts
|
||||
.vagrant
|
||||
|
||||
# Git clones
|
||||
openstack-ansible-ops
|
||||
previous
|
||||
|
||||
# Editor files
|
||||
.vscode
|
118
CONTRIBUTING.rst
118
CONTRIBUTING.rst
|
@ -1,118 +0,0 @@
|
|||
OpenStack-Ansible Monasca
|
||||
#########################
|
||||
|
||||
Contributor Guidelines
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Filing Bugs
|
||||
-----------
|
||||
|
||||
Bugs should be filed on Launchpad, not GitHub:
|
||||
"https://bugs.launchpad.net/openstack-ansible"
|
||||
|
||||
|
||||
When submitting a bug, or working on a bug, please ensure the following
|
||||
criteria are met:
|
||||
* The description clearly states or describes the original problem or root
|
||||
cause of the problem.
|
||||
* Include historical information on how the problem was identified.
|
||||
* Any relevant logs are included.
|
||||
* The provided information should be totally self-contained. External
|
||||
access to web services/sites should not be needed.
|
||||
* Steps to reproduce the problem if possible.
|
||||
|
||||
|
||||
Submitting Code
|
||||
---------------
|
||||
|
||||
Changes to the project should be submitted for review via the Gerrit tool,
|
||||
following the workflow documented at:
|
||||
"https://docs.openstack.org/infra/manual/developers.html#development-workflow"
|
||||
|
||||
Pull requests submitted through GitHub will be ignored and closed without
|
||||
regard.
|
||||
|
||||
If you wish to test your changes locally prior to submitting them for review
|
||||
you can use the ``Vagrantfile`` included in the root of this repository. It
|
||||
aims to replicate the gate check testing that will be done by OpenStack CI
|
||||
once your review has been submitted.
|
||||
|
||||
To run tests:
|
||||
|
||||
.. code-block:: shell-session
|
||||
|
||||
# vagrant up
|
||||
|
||||
The Vagrant box will run all tests and report status in the output. If you
|
||||
need to iterate through a fix/test cycle, tests can be re-run in a running
|
||||
Vagrant box with:
|
||||
|
||||
.. code-block:: shell-session
|
||||
|
||||
# vagrant provision
|
||||
|
||||
|
||||
Extra
|
||||
-----
|
||||
|
||||
Tags:
|
||||
If it's a bug that needs fixing in a branch in addition to Master, add a
|
||||
'\<release\>-backport-potential' tag (eg ``juno-backport-potential``).
|
||||
There are predefined tags that will autocomplete.
|
||||
|
||||
Status:
|
||||
Please leave this alone, it should be New till someone triages the issue.
|
||||
|
||||
Importance:
|
||||
Should only be touched if it is a Blocker/Gating issue. If it is, please
|
||||
set to High, and only use Critical if you have found a bug that can take
|
||||
down whole infrastructures.
|
||||
|
||||
|
||||
Style guide
|
||||
-----------
|
||||
|
||||
When creating tasks and other roles for use in Ansible please create them
|
||||
using the YAML dictionary format.
|
||||
|
||||
Example YAML dictionary format:
|
||||
.. code-block:: yaml
|
||||
|
||||
- name: The name of the tasks
|
||||
module_name:
|
||||
thing1: "some-stuff"
|
||||
thing2: "some-other-stuff"
|
||||
tags:
|
||||
- some-tag
|
||||
- some-other-tag
|
||||
|
||||
|
||||
Example **NOT** in YAML dictionary format:
|
||||
.. code-block:: yaml
|
||||
|
||||
- name: The name of the tasks
|
||||
module_name: thing1="some-stuff" thing2="some-other-stuff"
|
||||
tags:
|
||||
- some-tag
|
||||
- some-other-tag
|
||||
|
||||
|
||||
Usage of the ">" and "|" operators should be limited to Ansible conditionals
|
||||
and command modules such as the ansible ``shell`` module.
|
||||
|
||||
|
||||
Issues
|
||||
------
|
||||
|
||||
When submitting an issue, or working on an issue please ensure the following
|
||||
criteria are met:
|
||||
* The description clearly states or describes the original problem or root
|
||||
cause of the problem.
|
||||
* Include historical information on how the problem was identified.
|
||||
* Any relevant logs are included.
|
||||
* If the issue is a bug that needs fixing in a branch other than Master,
|
||||
add the 'backport potential' tag TO THE ISSUE (not the PR).
|
||||
* The provided information should be totally self-contained. External
|
||||
access to web services/sites should not be needed.
|
||||
* If the issue is needed for a hotfix release, add the 'expedite' label.
|
||||
* Steps to reproduce the problem if possible.
|
201
LICENSE
201
LICENSE
|
@ -1,201 +0,0 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
|
||||
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.
|
35
README.rst
35
README.rst
|
@ -1,29 +1,10 @@
|
|||
========================
|
||||
Team and repository tags
|
||||
========================
|
||||
This project is no longer maintained.
|
||||
|
||||
.. image:: https://governance.openstack.org/tc/badges/openstack-ansible-os_monasca.svg
|
||||
:target: https://governance.openstack.org/tc/reference/tags/index.html
|
||||
The contents of this repository are still available in the Git
|
||||
source code management system. To see the contents of this
|
||||
repository before it reached its end of life, please check out the
|
||||
previous commit with "git checkout HEAD^1".
|
||||
|
||||
.. Change things from this point on
|
||||
|
||||
=========================
|
||||
OpenStack-Ansible Monasca
|
||||
=========================
|
||||
|
||||
Ansible role for deploying Monasca Monitoring-as-a-Service.
|
||||
|
||||
Documentation for this project can be found at:
|
||||
https://docs.openstack.org/openstack-ansible-os_monasca/latest/
|
||||
|
||||
Release notes for the project can be found at:
|
||||
https://docs.openstack.org/releasenotes/openstack-ansible-os_monasca/
|
||||
|
||||
The project source code repository is located at:
|
||||
https://opendev.org/openstack/openstack-ansible-os_monasca
|
||||
|
||||
The project home is at:
|
||||
https://launchpad.net/openstack-ansible
|
||||
|
||||
The project bug tracker is located at:
|
||||
https://bugs.launchpad.net/openstack-ansible
|
||||
For any further questions, please email
|
||||
openstack-discuss@lists.openstack.org or join #openstack-dev on
|
||||
Freenode.
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
# Note:
|
||||
# This file is maintained in the openstack-ansible-tests repository.
|
||||
# https://opendev.org/openstack/openstack-ansible-tests/src/Vagrantfile
|
||||
#
|
||||
# If you need to perform any change on it, you should modify the central file,
|
||||
# then, an OpenStack CI job will propagate your changes to every OSA repository
|
||||
# since every repo uses the same Vagrantfile
|
||||
|
||||
# Verify whether required plugins are installed.
|
||||
required_plugins = [ "vagrant-disksize" ]
|
||||
required_plugins.each do |plugin|
|
||||
if not Vagrant.has_plugin?(plugin)
|
||||
raise "The vagrant plugin #{plugin} is required. Please run `vagrant plugin install #{plugin}`"
|
||||
end
|
||||
end
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
v.memory = 6144
|
||||
v.cpus = 2
|
||||
# https://github.com/hashicorp/vagrant/issues/9524
|
||||
v.customize ["modifyvm", :id, "--audio", "none"]
|
||||
end
|
||||
|
||||
config.vm.synced_folder ".", "/vagrant", type: "rsync"
|
||||
|
||||
config.vm.provision "shell",
|
||||
privileged: false,
|
||||
inline: <<-SHELL
|
||||
cd /vagrant
|
||||
./run_tests.sh
|
||||
SHELL
|
||||
|
||||
config.vm.define "ubuntu1604" do |xenial|
|
||||
xenial.disksize.size = "40GB"
|
||||
xenial.vm.box = "ubuntu/xenial64"
|
||||
end
|
||||
|
||||
config.vm.define "ubuntu1804" do |bionic|
|
||||
bionic.disksize.size = "40GB"
|
||||
bionic.vm.box = "ubuntu/bionic64"
|
||||
end
|
||||
|
||||
config.vm.define "opensuse423" do |leap423|
|
||||
leap423.vm.box = "opensuse/openSUSE-42.3-x86_64"
|
||||
end
|
||||
|
||||
config.vm.define "opensuse150" do |leap150|
|
||||
leap150.vm.box = "opensuse/openSUSE-15.0-x86_64"
|
||||
end
|
||||
|
||||
config.vm.define "centos7" do |centos7|
|
||||
centos7.vm.box = "centos/7"
|
||||
end
|
||||
|
||||
end
|
55
bindep.txt
55
bindep.txt
|
@ -1,55 +0,0 @@
|
|||
# This file facilitates OpenStack-CI package installation
|
||||
# before the execution of any tests.
|
||||
#
|
||||
# See the following for details:
|
||||
# - https://docs.openstack.org/infra/bindep/
|
||||
# - https://opendev.org/openstack-infra/bindep
|
||||
#
|
||||
# Even if the role does not make use of this facility, it
|
||||
# is better to have this file empty, otherwise OpenStack-CI
|
||||
# will fall back to installing its default packages which
|
||||
# will potentially be detrimental to the tests executed.
|
||||
#
|
||||
# Note:
|
||||
# This file is maintained in the openstack-ansible-tests repository.
|
||||
# https://opendev.org/openstack/openstack-ansible-tests/src/bindep.txt
|
||||
# If you need to remove or add extra dependencies, you should modify
|
||||
# the central file instead and once your change is accepted then update
|
||||
# this file as well. The purpose of this file is to ensure that Python and
|
||||
# Ansible have all their necessary binary requirements on the test host before
|
||||
# tox executes. Any binary requirements needed by services/roles should be
|
||||
# installed by those roles in their applicable package install tasks, not through
|
||||
# using this file.
|
||||
#
|
||||
|
||||
# The gcc compiler
|
||||
gcc
|
||||
|
||||
# Base requirements for Ubuntu
|
||||
git-core [platform:dpkg platform:suse]
|
||||
libssl-dev [platform:dpkg]
|
||||
libffi-dev [platform:dpkg]
|
||||
python2.7 [platform:dpkg]
|
||||
python-apt [platform:dpkg]
|
||||
python-dev [platform:dpkg]
|
||||
python3 [platform:dpkg]
|
||||
python3-apt [platform:dpkg]
|
||||
python3-dev [platform:dpkg]
|
||||
|
||||
# Base requirements for RPM distros
|
||||
gcc-c++ [platform:rpm]
|
||||
git [platform:rpm !platform:suse]
|
||||
libffi-devel [platform:rpm]
|
||||
openssl-devel [platform:rpm]
|
||||
python-devel [platform:rpm]
|
||||
python2-dnf [platform:fedora]
|
||||
|
||||
# Base requirements for Gentoo
|
||||
git [platform:gentoo]
|
||||
|
||||
# For SELinux
|
||||
libselinux-python [platform:redhat]
|
||||
libsemanage-python [platform:redhat]
|
||||
|
||||
# Required for compressing collected log files in CI
|
||||
gzip
|
|
@ -1,335 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
## Verbosity Options
|
||||
debug: False
|
||||
|
||||
# Set the host which will execute the shade modules
|
||||
# for the service setup. The host must already have
|
||||
# clouds.yaml properly configured.
|
||||
monasca_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||
|
||||
# Set the package/pattern install state for distribution and pip packages
|
||||
# Options are 'present' and 'latest'
|
||||
monasca_package_state: "latest"
|
||||
monasca_pattern_state: "latest"
|
||||
monasca_pip_package_state: "latest"
|
||||
|
||||
monasca_developer_mode: false
|
||||
monasca_api_git_repo: "https://git.openstack.org/openstack/monasca-api"
|
||||
monasca_api_git_install_branch: master
|
||||
monasca_common_git_repo: "https://git.openstack.org/openstack/monasca-common"
|
||||
monasca_common_git_install_branch: master
|
||||
monasca_thresh_git_repo: "https://git.openstack.org/openstack/monasca-thresh"
|
||||
monasca_thresh_git_install_branch: master
|
||||
monasca_notification_git_repo: "https://git.openstack.org/openstack/monasca-notification"
|
||||
monasca_notification_git_install_branch: master
|
||||
monasca_persister_git_repo: "https://git.openstack.org/openstack/monasca-persister"
|
||||
monasca_persister_git_install_branch: master
|
||||
monasca_python_client_git_repo: "https://git.openstack.org/openstack/python-monascaclient"
|
||||
monasca_python_client_git_install_branch: master
|
||||
monasca_statsd_git_repo: "https://git.openstack.org/openstack/monasca-statsd"
|
||||
monasca_statsd_git_install_branch: master
|
||||
|
||||
monasca_developer_constraints:
|
||||
- "git+{{ monasca_api_git_repo }}@{{ monasca_api_git_install_branch }}#egg=monasca-api"
|
||||
- "git+{{ monasca_common_git_repo }}@{{ monasca_common_git_install_branch }}#egg=monasca-common"
|
||||
- "git+{{ monasca_thresh_git_repo }}@{{ monasca_thresh_git_install_branch }}#egg=monasca-thresh"
|
||||
- "git+{{ monasca_notification_git_repo }}@{{ monasca_notification_git_install_branch }}#egg=monasca-notification"
|
||||
- "git+{{ monasca_persister_git_repo }}@{{ monasca_persister_git_install_branch }}#egg=monasca-persister"
|
||||
- "git+{{ monasca_python_client_git_repo }}@{{ monasca_python_client_git_install_branch }}#egg=python-monascaclient"
|
||||
|
||||
# TODO(odyssey4me):
|
||||
# This can be simplified once all the roles are using
|
||||
# python_venv_build. We can then switch to using a
|
||||
# set of constraints in pip.conf inside the venv,
|
||||
# perhaps prepared by giving a giving a list of
|
||||
# constraints to the role.
|
||||
monasca_pip_install_args: >-
|
||||
{{ monasca_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('') }}
|
||||
|
||||
# Name of the virtual env to deploy into
|
||||
monasca_venv_tag: "{{ venv_tag | default('untagged') }}"
|
||||
monasca_bin: "/openstack/venvs/monasca-{{ monasca_venv_tag }}/bin"
|
||||
monasca_etc_dir: "{{ monasca_bin | dirname }}/etc/monasca"
|
||||
|
||||
# venv_download, even when true, will use the fallback method of building the
|
||||
# venv from scratch if the venv download fails.
|
||||
monasca_venv_download: "{{ not monasca_developer_mode | bool }}"
|
||||
monasca_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/monasca.tgz
|
||||
|
||||
## System info
|
||||
monasca_system_user_name: monasca
|
||||
monasca_system_group_name: monasca
|
||||
monasca_system_shell: /bin/false
|
||||
monasca_system_comment: monasca system user
|
||||
monasca_system_user_home: "/var/lib/{{ monasca_system_user_name }}"
|
||||
|
||||
## Database info
|
||||
monasca_db_setup_host: "{{ ('galera_all' in groups) | ternary(groups['galera_all'][0], 'localhost') }}"
|
||||
monasca_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||
monasca_galera_database: monasca
|
||||
monasca_galera_user: monasca
|
||||
|
||||
## InfluxDB info
|
||||
monasca_influxdb_database: monasca
|
||||
monasca_api_influxdb_user: monasca_api
|
||||
#monasca_api_influxdb_password: password
|
||||
monasca_persister_influxdb_user: monasca_persister
|
||||
#monasca_persister_influxdb_password: password
|
||||
monasca_influxdb_host: "{{ influxdb_host }}"
|
||||
monasca_influxdb_port: "{{ influxdb_port }}"
|
||||
monasca_influxdb_admin: root
|
||||
monasca_influxdb_admin_password: root
|
||||
monasca_influxdb_replication_factor: 1
|
||||
monasca_influxdb_retention_policy: "90d"
|
||||
monasca_influxdb_shard_duration: "7d"
|
||||
monasca_influxdb_users:
|
||||
- username: "{{ monasca_api_influxdb_user }}"
|
||||
password: "{{ monasca_api_influxdb_password }}"
|
||||
- username: "{{ monasca_persister_influxdb_user }}"
|
||||
password: "{{ monasca_persister_influxdb_password }}"
|
||||
|
||||
# Keystone AuthToken/Middleware
|
||||
monasca_keystone_auth_plugin: password
|
||||
monasca_service_project_domain_name: Default
|
||||
monasca_service_user_domain_name: default
|
||||
|
||||
monasca_role_name: admin
|
||||
monasca_api_bind_address: 0.0.0.0
|
||||
|
||||
## Service Type and Data
|
||||
monasca_service_region: RegionOne
|
||||
monasca_service_name: monasca
|
||||
monasca_service_port: 8070
|
||||
monasca_service_proto: http
|
||||
monasca_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(monasca_service_proto) }}"
|
||||
monasca_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(monasca_service_proto) }}"
|
||||
monasca_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(monasca_service_proto) }}"
|
||||
monasca_service_type: monitoring
|
||||
monasca_service_description: "OpenStack Monitoring Service"
|
||||
monasca_service_user_name: monasca
|
||||
monasca_service_project_name: service
|
||||
monasca_service_project_domain_id: default
|
||||
monasca_service_user_domain_id: default
|
||||
monasca_service_publicuri: "{{ monasca_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ monasca_service_port }}"
|
||||
monasca_service_publicurl: "{{ monasca_service_publicuri }}/v2.0"
|
||||
monasca_service_internaluri: "{{ monasca_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ monasca_service_port }}"
|
||||
monasca_service_internalurl: "{{ monasca_service_internaluri }}/v2.0"
|
||||
monasca_service_adminuri: "{{ monasca_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ monasca_service_port }}"
|
||||
monasca_service_adminurl: "{{ monasca_service_adminuri }}/v2.0"
|
||||
|
||||
## Monasca configuration
|
||||
monasca_log_level: INFO
|
||||
monasca_user_roles:
|
||||
- monasca-user
|
||||
monasca_agent_roles:
|
||||
- monasca-agent
|
||||
monasca_read_only_user_roles:
|
||||
- monasca-read-only-user
|
||||
|
||||
monasca_agent_user_name: monasca-agent
|
||||
monasca_agent_project_name: admin
|
||||
monasca_partition_interval_recheck_seconds: 15
|
||||
|
||||
## Kafka configuration
|
||||
kafka_events_partitions: 12
|
||||
kafka_metrics_partitions: 64
|
||||
# This should be the number of systems running the Notification Engine
|
||||
kafka_retry_notifications_partitions: "{{ groups['monasca_notification'] | length }}"
|
||||
kafka_replicas: "{{ groups['monasca_kafka'] | length }}"
|
||||
|
||||
kafka_topics:
|
||||
metrics:
|
||||
replicas: "{{ kafka_replicas }}"
|
||||
partitions: "{{ kafka_metrics_partitions }}"
|
||||
events:
|
||||
replicas: "{{ kafka_replicas }}"
|
||||
partitions: "{{ kafka_events_partitions }}"
|
||||
alarm-state-transitions:
|
||||
replicas: "{{ kafka_replicas }}"
|
||||
partitions: "{{ kafka_events_partitions }}"
|
||||
alarm-notifications:
|
||||
replicas: "{{ kafka_replicas }}"
|
||||
partitions: "{{ kafka_events_partitions }}"
|
||||
retry-notifications:
|
||||
replicas: "{{ kafka_replicas }}"
|
||||
partitions: "{{ kafka_retry_notifications_partitions }}"
|
||||
60-seconds-notifications:
|
||||
replicas: "{{ kafka_replicas }}"
|
||||
partitions: "{{ kafka_retry_notifications_partitions }}"
|
||||
|
||||
monasca_notification_address: root@localhost
|
||||
monasca_notification_name: 'Default Email'
|
||||
monasca_notification_type: EMAIL
|
||||
|
||||
monasca_default_alarms:
|
||||
- name: "Host Status"
|
||||
description: "Alarms when the specified host is down or not reachable"
|
||||
severity: "HIGH"
|
||||
expression: "host_alive_status > 0"
|
||||
- name: "HTTP Status"
|
||||
description: "Alarms when the specified HTTP endpoint is down or not reachable"
|
||||
severity: "HIGH"
|
||||
expression: "http_status > 0"
|
||||
match_by: ["service", "component", "hostname", "url"]
|
||||
- name: "CPU Usage"
|
||||
description: "Alarms when CPU usage is high"
|
||||
expression: "avg(cpu.idle_perc) < 10 times 3"
|
||||
- name: "Disk Inode Usage"
|
||||
description: "Alarms when disk inode usage is high"
|
||||
expression: "disk.inode_used_perc > 90"
|
||||
match_by: ["hostname", "device"]
|
||||
- name: "Disk Usage"
|
||||
description: "Alarms when disk usage is high"
|
||||
expression: "disk.space_used_perc > 90"
|
||||
match_by: ["hostname", "device"]
|
||||
- name: "Memory Usage"
|
||||
description: "Alarms when memory usage is high"
|
||||
severity: "MEDIUM"
|
||||
expression: "avg(mem.usable_perc) < 10 times 3"
|
||||
- name: "Kernel Crash Dumps"
|
||||
description: "Kernel crash dumps are available on disk"
|
||||
expression: "crash.dump_count > 1"
|
||||
- name: "Network Errors"
|
||||
description: "Alarms when either incoming or outgoing network errors are high"
|
||||
severity: "MEDIUM"
|
||||
expression: "net.in_errors_sec > 5 or net.out_errors_sec > 5"
|
||||
- name: "Process Check"
|
||||
description: "Alarms when the specified process is not running"
|
||||
severity: "HIGH"
|
||||
expression: "process.pid_count < 1"
|
||||
match_by: ["process_name", "hostname"]
|
||||
- name: "Instance CPU Usage"
|
||||
description: "Alarms when the CPU usage of the specified instance is high"
|
||||
expression: "avg(cpu.utilization_norm_perc) > 90 times 3"
|
||||
match_by: ["resource_id"]
|
||||
- name: "RabbitMQ Queue Depth"
|
||||
description: "Alarms when the depth of the message queue is high"
|
||||
expression: "avg(rabbitmq.queue.messages) > 10 times 3"
|
||||
severity: "MEDIUM"
|
||||
match_by: ["queue", "hostname"]
|
||||
- name: "MySQL Slow Query Rate"
|
||||
description: "Alarms when the slow query rate is high"
|
||||
expression: "avg(mysql.performance.slow_queries) > 10 times 3"
|
||||
- name: "Apache Status"
|
||||
description: "Alarms on failure to reach the Apache status endpoint"
|
||||
expression: "apache.status > 0"
|
||||
severity: "HIGH"
|
||||
- name: "Apache Idle Worker Count"
|
||||
description: "Alarms when there are no idle workers in the Apache server"
|
||||
expression: "avg(apache.performance.idle_worker_count) < 1 times 3"
|
||||
severity: "MEDIUM"
|
||||
- name: "NTP Time Sync"
|
||||
description: "Alarms when the NTP time offset is high"
|
||||
expression: "ntp.offset > 5 or ntp.offset < -5"
|
||||
- name: "Kafka Consumer Lag"
|
||||
description: "Alarms when the specified consumer_group is not keeping up with the incoming messages"
|
||||
severity: "MEDIUM"
|
||||
expression: "avg(kafka.consumer_lag) > 1000 times 3"
|
||||
match_by: ["consumer_group", "hostname"]
|
||||
- name: "Monasca Agent Collection Time"
|
||||
description: "Alarms when the elapsed time the Monasca Agent takes to collect metrics is high"
|
||||
expression: "avg(monasca.collection_time_sec) > 5 times 3"
|
||||
- name: "Monasca Notification DB Query Time"
|
||||
description: "Alarms when the elapsed time for queries to the Configuration DB by the Monasca Notification Engine is high"
|
||||
expression: "avg(monasca.config_db_time) > 5 times 3"
|
||||
- name: "Monasca Notification Email Time"
|
||||
description: "Alarms when the elapsed time to send emails by the Monasca Notification Engine is high"
|
||||
expression: "avg(monasca.email_time) > 2 times 3"
|
||||
- name: "ZooKeeper Latency"
|
||||
description: "Alarms when the ZooKeeper latency is high"
|
||||
expression: "avg(zookeeper.avg_latency_sec) > 1 times 3"
|
||||
- name: "HAProxy Backend Status"
|
||||
description: "Alarms when the backend status is unavailable"
|
||||
expression: "last(haproxy.count_per_status{status=unavailable})>0"
|
||||
severity: "CRITICAL"
|
||||
match_by: ["component"]
|
||||
|
||||
|
||||
## Cap the maximum number of threads / workers when a user value is unspecified.
|
||||
monasca_api_workers_max: 16
|
||||
monasca_api_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, monasca_api_workers_max] | min }}"
|
||||
monasca_persister_workers_max: 16
|
||||
monasca_persister_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, monasca_persister_workers_max] | min }}"
|
||||
|
||||
monasca_service_in_ldap: False
|
||||
|
||||
monasca_pip_packages:
|
||||
- cryptography
|
||||
- gunicorn
|
||||
- influxdb
|
||||
- keystoneauth1
|
||||
- monasca-api
|
||||
- monasca-common
|
||||
- monasca-persister
|
||||
- monasca-notification
|
||||
- monasca-statsd
|
||||
- osprofiler
|
||||
- PyOpenSSL
|
||||
- python-monascaclient
|
||||
- python-memcached
|
||||
- future
|
||||
|
||||
## Service Names
|
||||
monasca_services:
|
||||
monasca-api:
|
||||
group: monasca_api
|
||||
service_name: monasca-api
|
||||
service_init_bin: "{{ monasca_bin }}/gunicorn"
|
||||
service_init_options: "-n monasca-api -k eventlet --worker-connections=2000 --backlog=1000 --paste /etc/monasca/api-config.ini -w {{ monasca_api_workers }}"
|
||||
init_config_overrides: "{{ monasca_api_init_overrides }}"
|
||||
monasca-persister:
|
||||
group: monasca_persister
|
||||
service_name: monasca-persister
|
||||
service_init_bin: "{{ monasca_bin }}/python {{ monasca_bin }}/../lib/python2.7/site-packages/monasca_persister/persister.py"
|
||||
service_init_options: "--config-file /etc/monasca/persister.conf"
|
||||
init_config_overrides: "{{ monasca_persister_init_overrides }}"
|
||||
monasca-thresh:
|
||||
group: monasca_thresh
|
||||
service_name: monasca-thresh
|
||||
service_init_bin: "/opt/storm/current/bin/storm jar /usr/share/monasca-thresh/thresh/target/monasca-thresh-{{ _monasca_thresh_version.stdout | default('2.1.1') }}-shaded.jar"
|
||||
service_init_options: "monasca.thresh.ThresholdingEngine /etc/monasca/thresh-config.yml thresh-cluster"
|
||||
init_config_overrides: "{{ monasca_thresh_init_overrides }}"
|
||||
monasca-notification:
|
||||
group: monasca_notification
|
||||
service_name: monasca-notification
|
||||
init_config_overrides: "{{ monasca_notification_init_overrides }}"
|
||||
|
||||
monasca_api_init_overrides: {}
|
||||
monasca_persister_init_overrides: {}
|
||||
monasca_thresh_init_overrides: {}
|
||||
monasca_notification_init_overrides: {}
|
||||
|
||||
# This variable is used by the repo_build process to determine
|
||||
# which host group to check for members of before building the
|
||||
# pip packages required by this role. The value is picked up
|
||||
# by the py_pkgs lookup.
|
||||
monasca_role_project_group: monasca_all
|
||||
|
||||
monasca_api_config_overrides: {}
|
||||
monasca_api_config_ini_overrides: {}
|
||||
monasca_api_logging_config_overrides: {}
|
||||
monasca_persister_config_overrides: {}
|
||||
monasca_persister_logging_config_overrides: {}
|
||||
monasca_thresh_config_overrides: {}
|
||||
monasca_notification_config_overrides: {}
|
||||
|
||||
monasca_opensuse_mirror_url: "http://download.opensuse.org"
|
195
doc/Makefile
195
doc/Makefile
|
@ -1,195 +0,0 @@
|
|||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = build
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " applehelp to make an Apple Help Book"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " xml to make Docutils-native XML files"
|
||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
@echo " coverage to run coverage check of the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openstack-ansible-os_monasca.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openstack-ansible-os_monasca.qhc"
|
||||
|
||||
applehelp:
|
||||
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
||||
@echo
|
||||
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
|
||||
@echo "N.B. You won't be able to view it unless you put it in" \
|
||||
"~/Library/Documentation/Help or install it in your application" \
|
||||
"bundle."
|
||||
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/openstack-ansible-os_monasca"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openstack-ansible-os_monasca"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
latexpdfja:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
coverage:
|
||||
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
|
||||
@echo "Testing of coverage in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/coverage/python.txt."
|
||||
|
||||
xml:
|
||||
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||
@echo
|
||||
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||
|
||||
pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
||||
|
||||
livehtml: html
|
||||
sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
|
@ -1,9 +0,0 @@
|
|||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
# this is required for the docs build jobs
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
doc8>=0.6.0 # Apache-2.0
|
|
@ -1,312 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# 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
|
||||
|
||||
# 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',
|
||||
]
|
||||
|
||||
# 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 = '2014-2016, OpenStack-Ansible Contributors'
|
||||
description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
|
||||
project = 'OpenStack-Ansible'
|
||||
role_name = 'os_monasca'
|
||||
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
|
|
@ -1,96 +0,0 @@
|
|||
=======================================================
|
||||
Configuring the Monitoring (monasca) service (optional)
|
||||
=======================================================
|
||||
|
||||
.. note::
|
||||
|
||||
This feature is experimental at this time and it has not been fully
|
||||
production tested yet.
|
||||
|
||||
Monasca is an open-source multi-tenant, highly scalable, performant,
|
||||
fault-tolerant monitoring-as-a-service solution that integrates with
|
||||
OpenStack. It uses a REST API for high-speed metrics processing and
|
||||
querying and has a streaming alarm engine and notification engine.
|
||||
|
||||
Monasca is configured using the ``/etc/openstack_deploy/conf.d/monasca.yml``
|
||||
file and the ``/etc/openstack_deploy/user_variables.yml`` file.
|
||||
|
||||
Configuring target hosts
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Modify ``/etc/openstack_deploy/conf.d/monasca.yml`` by adding a list
|
||||
containing the infrastructure target hosts for the ``monasca-infra_hosts``
|
||||
and its required services:
|
||||
|
||||
In ``monasca.yml``:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
monasca-infra_hosts:
|
||||
infra01:
|
||||
ip: INFRA01_IP_ADDRESS
|
||||
infra02:
|
||||
ip: INFRA02_IP_ADDRESS
|
||||
infra03:
|
||||
ip: INFRA03_IP_ADDRESS
|
||||
|
||||
monasca-zookeeper_hosts:
|
||||
infra01:
|
||||
ip: INFRA01_IP_ADDRESS
|
||||
infra02:
|
||||
ip: INFRA02_IP_ADDRESS
|
||||
infra03:
|
||||
ip: INFRA03_IP_ADDRESS
|
||||
|
||||
monasca-kafka_hosts:
|
||||
infra01:
|
||||
ip: INFRA01_IP_ADDRESS
|
||||
infra02:
|
||||
ip: INFRA02_IP_ADDRESS
|
||||
infra03:
|
||||
ip: INFRA03_IP_ADDRESS
|
||||
|
||||
monasca-influxdb_hosts:
|
||||
infra01:
|
||||
ip: INFRA01_IP_ADDRESS
|
||||
infra02:
|
||||
ip: INFRA02_IP_ADDRESS
|
||||
infra03:
|
||||
ip: INFRA03_IP_ADDRESS
|
||||
|
||||
|
||||
Replace ``*_IP_ADDRESS`` with the IP address of the br-mgmt container
|
||||
management bridge on each target host.
|
||||
|
||||
This hosts will be used to deploy the containers where monasca and its
|
||||
required services will be installed.
|
||||
|
||||
Setting up Monasca
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Run the setup-hosts playbook, to create the monasca containers, and the
|
||||
repo-build playbook to update the repository with the monasca packages:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# cd /opt/openstack-ansible/playbooks
|
||||
# openstack-ansible setup-hosts.yml
|
||||
# openstack-ansible repo-build.yml
|
||||
|
||||
Run the monasca and horizon playbooks to install monasca and enable the
|
||||
Monitoring panel in horizon:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# cd /opt/openstack-ansible/playbooks
|
||||
# openstack-ansible os-monasca-install.yml
|
||||
# openstack-ansible os-horizon-install.yml
|
||||
|
||||
Monitoring Hosts
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
To start monitoring, monasca requires the monasca-agent to be deployed on
|
||||
the hosts which will be monitored. The monasca-agent deployment and
|
||||
configuration is covered by the `monasca-agent role`_.
|
||||
|
||||
.. _monasca-agent role: https://github.com/openstack/openstack-ansible-os_monasca-agent
|
|
@ -1,46 +0,0 @@
|
|||
=========================
|
||||
OpenStack-Ansible Monasca
|
||||
=========================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
configure-monasca.rst
|
||||
|
||||
Ansible role for deploying Monasca Monitoring-as-a-Service.
|
||||
|
||||
This role installs the following Systemd services:
|
||||
|
||||
* monasca-api
|
||||
* monasca-notification
|
||||
* monasca-persister
|
||||
* monasca-thresh
|
||||
|
||||
To clone or view the source code for this repository, visit the role repository
|
||||
for `os_monasca <https://github.com/openstack/openstack-ansible-os_monasca>`_.
|
||||
|
||||
Default variables
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. literalinclude:: ../../defaults/main.yml
|
||||
:language: yaml
|
||||
:start-after: under the License.
|
||||
|
||||
Dependencies
|
||||
~~~~~~~~~~~~
|
||||
|
||||
This role needs pip >= 7.1 installed on the target host.
|
||||
|
||||
Example playbook
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
.. literalinclude:: ../../examples/playbook.yml
|
||||
:language: yaml
|
||||
|
||||
Tags
|
||||
~~~~
|
||||
|
||||
This role supports the following tags:
|
||||
|
||||
* ``monasca-install``: used to install and upgrade;
|
||||
* ``monasca-config``: used to manage configuration;
|
|
@ -1,71 +0,0 @@
|
|||
---
|
||||
# Copyright 2018, SUSE LINUX GmbH.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2018 Jean-Philippe Evrard <jean-philippe@evrard.me>
|
||||
|
||||
- name: Install ansible-zookeeper
|
||||
hosts: monasca_zookeeper
|
||||
roles:
|
||||
- ansible-zookeeper
|
||||
tags:
|
||||
- zookeeper
|
||||
- skip_ansible_lint
|
||||
- monasca-install
|
||||
|
||||
- name: Install ansible-kafka
|
||||
hosts: monasca_kafka
|
||||
roles:
|
||||
- ansible-kafka
|
||||
vars:
|
||||
kafka_listen_address: "{{ ansible_host }}"
|
||||
tags:
|
||||
- kafka
|
||||
- skip_ansible_lint
|
||||
- monasca-install
|
||||
|
||||
- name: Install ansible-storm
|
||||
hosts: monasca_api
|
||||
roles:
|
||||
- ansible-storm
|
||||
vars:
|
||||
storm_nimbus_enabled: True
|
||||
storm_supervisor_enabled: True
|
||||
nimbus_host: "{{ ansible_ssh_host }}"
|
||||
tags:
|
||||
- storm
|
||||
- skip_ansible_lint
|
||||
- monasca-install
|
||||
|
||||
- name: Install ansible-influxdb
|
||||
hosts: monasca_influxdb
|
||||
roles:
|
||||
- ansible-influxdb
|
||||
tags:
|
||||
- influxdb
|
||||
- skip_ansible_lint
|
||||
- monasca-install
|
||||
|
||||
- name: Install ansible-grafana
|
||||
hosts: monasca_grafana
|
||||
roles:
|
||||
- ansible-grafana
|
||||
vars:
|
||||
grafana_security:
|
||||
admin_user: admin
|
||||
admin_password: "{{ monasca_grafana_password | default('password') }}" #TODO(evrardjp) remove this when ready
|
||||
tags:
|
||||
- grafana
|
||||
- skip_ansible_lint
|
||||
- monasca-install
|
|
@ -1,38 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Please check your inventory to install the appropriate
|
||||
# dependencies for your monasca install
|
||||
|
||||
# Please also make sure the appropriate roles are installed.
|
||||
- name: Install monasca dependencies
|
||||
include: monasca-dependencies.yml
|
||||
|
||||
- name: Install monasca server
|
||||
hosts: monasca_all
|
||||
user: root
|
||||
roles:
|
||||
- { role: "os_monasca", tags: [ "os-monasca" ] }
|
||||
vars:
|
||||
external_lb_vip_address: 172.16.24.1
|
||||
internal_lb_vip_address: 192.168.0.1
|
||||
monasca_galera_address: "{{ internal_lb_vip_address }}"
|
||||
monasca_container_mysql_password: "SuperSecretePassword1"
|
||||
monasca_service_password: "SuperSecretePassword2"
|
||||
monasca_influxdb_admin_password: "secrete"
|
||||
monasca_api_influxdb_password: "secrete"
|
||||
monasca_persister_influxdb_password: "secrete"
|
||||
monasca_agent_password: "secrete"
|
||||
grafana_mysql_host: "{{ monasca_galera_address }}"
|
||||
grafana_admin_password: "secrete"
|
||||
grafana_galera_password: "secrete"
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
# The infra nodes that will be running the monasca services
|
||||
monasca-infra_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
||||
|
||||
monasca-zookeeper_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
||||
|
||||
monasca-kafka_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
||||
|
||||
monasca-storm_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
||||
|
||||
monasca-influxdb_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
|
@ -1,113 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
component_skel:
|
||||
monasca_api:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
monasca_persister:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
monasca_thresh:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
monasca_notification:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
monasca_zookeeper:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
monasca_kafka:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
monasca_storm:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
monasca_influxdb:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
monasca_grafana:
|
||||
belongs_to:
|
||||
- monasca_all
|
||||
|
||||
container_skel:
|
||||
monasca_container:
|
||||
belongs_to:
|
||||
- monasca-infra_containers
|
||||
contains:
|
||||
- monasca_api
|
||||
- monasca_persister
|
||||
- monasca_thresh
|
||||
- monasca_notification
|
||||
- monasca_storm
|
||||
properties:
|
||||
service_name: monasca
|
||||
monasca_zookeeper_container:
|
||||
belongs_to:
|
||||
- monasca-zookeeper_containers
|
||||
contains:
|
||||
- monasca_zookeeper
|
||||
properties:
|
||||
service_name: zookeeper
|
||||
monasca_kafka_container:
|
||||
belongs_to:
|
||||
- monasca-kafka_containers
|
||||
contains:
|
||||
- monasca_kafka
|
||||
properties:
|
||||
service_name: kafka
|
||||
monasca_influxdb_container:
|
||||
belongs_to:
|
||||
- monasca-influxdb_containers
|
||||
contains:
|
||||
- monasca_influxdb
|
||||
properties:
|
||||
service_name: influxdb
|
||||
monasca_grafana_container:
|
||||
belongs_to:
|
||||
- monasca-infra_containers
|
||||
contains:
|
||||
- monasca_grafana
|
||||
properties:
|
||||
service_name: grafana
|
||||
|
||||
physical_skel:
|
||||
monasca-zookeeper_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
monasca-kafka_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
monasca-influxdb_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
monasca-infra_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
monasca-infra_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
monasca-zookeeper_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
monasca-kafka_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
monasca-influxdb_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
|
@ -1,22 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
monasca_venv_tag: "{{ venv_tag }}"
|
||||
monasca_venv_download_url: "{{ venv_base_download_url }}/monasca-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
|
||||
|
||||
influxdb_host: "{{ internal_lb_vip_address }}"
|
||||
influxdb_port: 8086
|
||||
|
||||
zookeeper_hosts: "{% for host in groups['monasca_zookeeper'] %}{{ hostvars[host]['ansible_host'] }}:{{ zookeeper_client_port }}{% if not loop.last %},{% endif %}{% endfor %}"
|
||||
|
||||
kafka_hosts: "{% for host in groups['monasca_kafka'] %}{{ hostvars[host]['ansible_host'] }}:{{ kafka_port }}{% if not loop.last %},{% endif %}{% endfor %}"
|
|
@ -1,55 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
- name: Install monasca server
|
||||
hosts: monasca_all
|
||||
gather_facts: "{{ gather_facts | default(True) }}"
|
||||
user: root
|
||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||
tags:
|
||||
- monasca
|
||||
pre_tasks:
|
||||
- include_tasks: common-tasks/os-lxc-container-setup.yml
|
||||
|
||||
- include_tasks: common-tasks/os-log-dir-setup.yml
|
||||
vars:
|
||||
log_dirs:
|
||||
- src: "/openstack/log/{{ inventory_hostname }}-monasca"
|
||||
dest: "/var/log/monasca"
|
||||
|
||||
roles:
|
||||
- role: "os_monasca"
|
||||
monasca_thresh_git_repo: "{{ openstack_repo_git_url }}/monasca-thresh"
|
||||
monasca_common_git_repo: "{{ openstack_repo_git_url }}/monasca-common"
|
||||
|
||||
- role: "openstack_openrc"
|
||||
tags:
|
||||
- openrc
|
||||
|
||||
- role: "rsyslog_client"
|
||||
rsyslog_client_log_rotate_file: monasca_log_rotate
|
||||
rsyslog_client_log_dir: "/var/log/monasca"
|
||||
rsyslog_client_config_name: "99-monasca-rsyslog-client.conf"
|
||||
tags:
|
||||
- rsyslog
|
||||
|
||||
- role: "system_crontab_coordination"
|
||||
tags:
|
||||
- crontab
|
||||
tags:
|
||||
- monasca
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
horizon_enable_monasca_ui: True
|
||||
horizon_grafana_url: "https://{{ external_lb_vip_address }}:3000"
|
||||
horizon_pip_packages:
|
||||
- monasca-ui
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
- name: Enable the monasca-ui-dashboard Horizon panel
|
||||
file:
|
||||
src: "{{ horizon_lib_dir }}/monitoring/enabled/_50_admin_add_monitoring_panel.py"
|
||||
dest: "{{ horizon_lib_dir }}/openstack_dashboard/local/enabled/_50_admin_add_monitoring_panel.py"
|
||||
state: "{{ horizon_enable_monasca_ui | ternary('link', 'absent') }}"
|
||||
notify: Restart apache2
|
||||
|
||||
- name: Drop monasca-ui Config(s)
|
||||
template:
|
||||
src: "monasca-ui/local_settings.py.j2"
|
||||
dest: "{{ horizon_lib_dir }}/monitoring/config/local_settings.py"
|
||||
notify: Restart apache2
|
|
@ -1,86 +0,0 @@
|
|||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
# Service group names (global across all projects):
|
||||
MONITORING_SERVICES_GROUPS = [
|
||||
{'name': _('OpenStack Services'), 'groupBy': 'service'},
|
||||
{'name': _('Servers'), 'groupBy': 'hostname'}
|
||||
]
|
||||
|
||||
# Services being monitored
|
||||
MONITORING_SERVICES = getattr(
|
||||
settings,
|
||||
'MONITORING_SERVICES_GROUPS',
|
||||
MONITORING_SERVICES_GROUPS
|
||||
)
|
||||
|
||||
#
|
||||
# Per project service groups. If in this form,
|
||||
# '*' will be applied to all projects not explicitly listed.
|
||||
#
|
||||
# Note the above form (flat) is supported for backward compatibility.
|
||||
#
|
||||
# MONITORING_SERVICES_GROUPS = [
|
||||
# {'admin': [
|
||||
# {'name': _('OpenStack Services'), 'groupBy': 'service'},
|
||||
# {'name': _('Servers'), 'groupBy': 'hostname'}]},
|
||||
# {'*': [
|
||||
# {'name': _('Services'), 'groupBy': 'service'},
|
||||
# {'name': _('Instances'), 'groupBy': 'hostname'}]},
|
||||
# ]
|
||||
|
||||
MONITORING_SERVICE_TYPE = getattr(
|
||||
settings, 'MONITORING_SERVICE_TYPE', 'monitoring'
|
||||
)
|
||||
|
||||
# Grafana button titles/file names (global across all projects):
|
||||
GRAFANA_LINKS = [
|
||||
|
||||
{% if (groups['ceph_all'] is defined) and (groups['ceph_all'] | length > 0) %}
|
||||
{'title': 'Ceph Dashboard', 'path': 'ceph-dashboard'},
|
||||
{'title': 'Ceph OSDs Dashboard', 'path': 'ceph-osds-dashboard'},
|
||||
{'title': 'Ceph Pools Dashboard', 'path': 'ceph-pools-dashboard'},
|
||||
{% endif %}
|
||||
{'title': 'Containers Dashboard', 'path': 'containers-dashboard'},
|
||||
{'title': 'Hosts Dashboard', 'path': 'hosts-dashboard'},
|
||||
{'title': 'Infra Dashboard', 'path': 'infra-dashboard'},
|
||||
{'title': 'Instances Dashboard', 'path': 'instances-dashboard'}
|
||||
]
|
||||
DASHBOARDS = getattr(settings, 'GRAFANA_LINKS', GRAFANA_LINKS)
|
||||
|
||||
#
|
||||
# Horizon will link to the grafana home page when using Grafana2.
|
||||
# For any Grafana version additional links to specific dashboards can be
|
||||
# created in two formats.
|
||||
# Flat:
|
||||
# GRAFANA_LINKS = [ {'title': _('Dashboard'), 'path': 'openstack'} ]
|
||||
#
|
||||
# Per project: '*' will be applied to all projects not explicitly listed.
|
||||
# GRAFANA_LINKS = [
|
||||
# {'admin': [
|
||||
# {'title': _('Dashboard'), 'path': 'openstack'}]},
|
||||
# {'*': [
|
||||
# {'title': _('OpenStack Dashboard'), 'path': 'project'}]}
|
||||
# ]
|
||||
|
||||
GRAFANA_URL = { '{{ horizon_service_region }}': '{{ horizon_grafana_url }}', }
|
||||
|
||||
ENABLE_KIBANA_BUTTON = getattr(settings, 'ENABLE_KIBANA_BUTTON', False)
|
||||
KIBANA_POLICY_RULE = getattr(settings, 'KIBANA_POLICY_RULE', 'admin_required')
|
||||
KIBANA_POLICY_SCOPE = getattr(settings, 'KIBANA_POLICY_SCOPE', 'identity')
|
||||
KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.4:5601/')
|
||||
|
||||
OPENSTACK_SSL_NO_VERIFY = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||
OPENSTACK_SSL_CACERT = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
|
@ -1,49 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
monasca_api_git_repo: "https://git.openstack.org/openstack/monasca-api"
|
||||
monasca_api_git_install_branch: master
|
||||
monasca_api_git_dest: "/opt/monasca_{{ monasca_api_git_install_branch | replace('/', '_') }}"
|
||||
|
||||
monasca_agent_git_repo: "https://git.openstack.org/openstack/monasca-agent"
|
||||
monasca_agent_git_install_branch: master
|
||||
monasca_agent_git_dest: "/opt/monasca_{{ monasca_log_api_git_install_branch | replace('/', '_') }}"
|
||||
|
||||
monasca_common_git_repo: "https://git.openstack.org/openstack/monasca-common"
|
||||
monasca_common_git_install_branch: master
|
||||
monasca_common_git_dest: "/opt/monasca_{{ monasca_api_git_install_branch | replace('/', '_') }}"
|
||||
|
||||
monasca_thresh_git_repo: "https://git.openstack.org/openstack/monasca-thresh"
|
||||
monasca_thresh_git_install_branch: master
|
||||
monasca_thresh_git_dest: "/opt/monasca_{{ monasca_thresh_git_install_branch | replace('/', '_') }}"
|
||||
|
||||
monasca_notification_git_repo: "https://git.openstack.org/openstack/monasca-notification"
|
||||
monasca_notification_git_install_branch: master
|
||||
monasca_notification_git_dest: "/opt/monasca_{{ monasca_notification_git_install_branch | replace('/', '_') }}"
|
||||
|
||||
monasca_persister_git_repo: "https://git.openstack.org/openstack/monasca-persister"
|
||||
monasca_persister_git_install_branch: master
|
||||
monasca_persister_git_dest: "/opt/monasca_{{ monasca_persister_git_install_branch | replace('/', '_') }}"
|
||||
|
||||
monasca_python_client_git_repo: "https://git.openstack.org/openstack/python-monascaclient"
|
||||
monasca_python_client_git_install_branch: master
|
||||
monasca_python_client_git_dest: "/opt/monasca_{{ monasca_python_client_git_install_branch | replace('/', '_') }}"
|
||||
|
||||
monasca_ui_git_repo: "https://git.openstack.org/openstack/monasca-ui"
|
||||
monasca_ui_git_install_branch: master
|
||||
monasca_ui_git_dest: "/opt/monasca_{{ monasca_ui_git_install_branch | replace('/', '_') }}"
|
|
@ -1,78 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
haproxy_extra_services:
|
||||
- service:
|
||||
haproxy_service_name: influxdb_admin
|
||||
haproxy_backend_nodes: "{{ groups['monasca_influxdb'] | default([]) }}"
|
||||
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||
haproxy_port: 8083
|
||||
haproxy_balance_type: tcp
|
||||
haproxy_backend_options:
|
||||
- tcp-check
|
||||
haproxy_whitelist_networks:
|
||||
- 192.168.0.0/16
|
||||
- 172.16.0.0/12
|
||||
- 10.0.0.0/8
|
||||
- service:
|
||||
haproxy_service_name: influxdb
|
||||
haproxy_backend_nodes: "{{ groups['monasca_influxdb'] | default([]) }}"
|
||||
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||
haproxy_port: 8086
|
||||
haproxy_backend_port: 8086
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- "httpchk HEAD /ping"
|
||||
haproxy_whitelist_networks:
|
||||
- 192.168.0.0/16
|
||||
- 172.16.0.0/12
|
||||
- 10.0.0.0/8
|
||||
haproxy_acls:
|
||||
read_queries:
|
||||
rule: "path_sub -i query"
|
||||
write_queries:
|
||||
rule: "path_sub -i write"
|
||||
backend_name: "influxdb_relay"
|
||||
- service:
|
||||
haproxy_service_name: influxdb_relay
|
||||
haproxy_backend_nodes: "{{ groups['monasca_influxdb'] | default([]) }}"
|
||||
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||
haproxy_port: 9096
|
||||
haproxy_backend_port: 9096
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- tcp-check
|
||||
haproxy_whitelist_networks:
|
||||
- 192.168.0.0/16
|
||||
- 172.16.0.0/12
|
||||
- 10.0.0.0/8
|
||||
haproxy_acls:
|
||||
write_queries:
|
||||
rule: "path_sub -i write"
|
||||
read_queries:
|
||||
rule: "path_sub -i query"
|
||||
backend_name: "influxdb"
|
||||
- service:
|
||||
haproxy_service_name: grafana
|
||||
haproxy_backend_nodes: "{{ groups['monasca_grafana'] | default([]) }}"
|
||||
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||
haproxy_port: 3000
|
||||
haproxy_balance_type: http
|
||||
- service:
|
||||
haproxy_service_name: monasca_api
|
||||
haproxy_backend_nodes: "{{ groups['monasca_api'] | default([]) }}"
|
||||
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||
haproxy_port: 8070
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- "httpchk /healthcheck"
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
grafana_admin_password:
|
||||
grafana_galera_password:
|
||||
monasca_grafana_password:
|
||||
monasca_container_mysql_password:
|
||||
monasca_influxdb_admin_password:
|
||||
monasca_api_influxdb_password:
|
||||
monasca_persister_influxdb_password:
|
||||
monasca_service_password:
|
||||
monasca_agent_password:
|
|
@ -1,49 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
- name: Setup monasca-thresh
|
||||
command: "mvn clean {{ item.action }} -DskipTests"
|
||||
args:
|
||||
chdir: "/usr/share/{{ item.dir }}"
|
||||
with_items:
|
||||
- dir: "monasca-common"
|
||||
action: "install"
|
||||
- dir: "monasca-thresh/thresh"
|
||||
action: "package"
|
||||
|
||||
- name: Create monasca database schema
|
||||
mysql_db:
|
||||
login_host: "{{ monasca_galera_address }}"
|
||||
login_user: "{{ monasca_galera_user }}"
|
||||
login_password: "{{ monasca_container_mysql_password }}"
|
||||
name: "{{ monasca_galera_database }}"
|
||||
state: import
|
||||
target: "/opt/mon_mysql.sql"
|
||||
delegate_to: "{{ monasca_db_setup_host }}"
|
||||
no_log: True
|
||||
|
||||
- name: Restart monasca services
|
||||
service:
|
||||
name: "{{ item.value.service_name }}"
|
||||
enabled: yes
|
||||
state: "restarted"
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
with_dict: "{{ monasca_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
listen:
|
||||
- "venv changed"
|
|
@ -1,220 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# (c) 2016, Adam Hamsik <haaaad () gmail.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.urls import *
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: influxdb_user
|
||||
short_description: Manage InfluxDB users
|
||||
description:
|
||||
- Manage InfluxDB users
|
||||
version_added: 2.2
|
||||
author: "Adam Hamsik (@haad)"
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "influxdb >= 0.9"
|
||||
options:
|
||||
hostname:
|
||||
description:
|
||||
- The hostname or IP address on which InfluxDB server is listening.
|
||||
required: true
|
||||
username:
|
||||
description:
|
||||
- Username used to authenticate against InfluxDB server.
|
||||
default: root
|
||||
required: false
|
||||
password:
|
||||
description:
|
||||
- Password used to authenticate against InfluxDB server.
|
||||
default: root
|
||||
required: false
|
||||
port:
|
||||
description:
|
||||
- The port on which InfluxDB server is listening.
|
||||
default: 8086
|
||||
required: false
|
||||
database_name:
|
||||
description:
|
||||
- Database name to work with.
|
||||
required: true
|
||||
user_name:
|
||||
description:
|
||||
- Name of the user that will be created/destroyed.
|
||||
required: true
|
||||
user_pass:
|
||||
description:
|
||||
- User password to create.
|
||||
required: true
|
||||
user_admin:
|
||||
description:
|
||||
- Determine if created user will be admin or not.
|
||||
required: false
|
||||
state:
|
||||
description:
|
||||
- Determines if the user should be created or destroyed.
|
||||
choices: ['present', 'absent']
|
||||
default: present
|
||||
required: false
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Example influxdb_user command from Ansible Playbooks
|
||||
- name: Create user
|
||||
influxdb_user:
|
||||
database_name: influx
|
||||
hostname: "{{ influxdb_ip_address }}"
|
||||
user_name: "{{ influxdb_user_name }}"
|
||||
user_pass: "{{ influxdb_user_pass }}"
|
||||
user_admin: no
|
||||
state: present
|
||||
|
||||
- name: Destroy user
|
||||
influxdb_user:
|
||||
database_name: influx
|
||||
hostname: "{{ influxdb_ip_address }}"
|
||||
user_name: "{{ influxdb_user_name }}"
|
||||
state: absent
|
||||
|
||||
- name: Create admin user
|
||||
influxdb_user:
|
||||
database_name: influx
|
||||
hostname: "{{ influxdb_ip_address }}"
|
||||
username: "{{ influxdb_username }}"
|
||||
password: "{{ influxdb_password }}"
|
||||
user_name: "{{ influxdb_user_name }}"
|
||||
user_pass: "{{ influxdb_user_pass }}"
|
||||
user_admin: yes
|
||||
state: present
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
#only defaults
|
||||
'''
|
||||
|
||||
try:
|
||||
from influxdb import InfluxDBClient
|
||||
from influxdb import exceptions
|
||||
HAS_INFLUXDB = True
|
||||
except ImportError:
|
||||
HAS_INFLUXDB = False
|
||||
|
||||
|
||||
def influxdb_argument_spec():
|
||||
return dict(
|
||||
hostname=dict(required=True, type='str'),
|
||||
port=dict(default=8086, type='int'),
|
||||
database_name=dict(required=True, type='str'),
|
||||
username=dict(default='root', type='str'),
|
||||
password=dict(default='root', type='str', no_log=True),
|
||||
user_name=dict(required=True, type='str'),
|
||||
user_pass=dict(required=True, type='str', no_log=True),
|
||||
user_admin=dict(required=False, default=False, type='bool')
|
||||
)
|
||||
|
||||
|
||||
def connect_to_influxdb(module):
|
||||
hostname = module.params['hostname']
|
||||
port = module.params['port']
|
||||
username = module.params['username']
|
||||
password = module.params['password']
|
||||
database_name = module.params['database_name']
|
||||
|
||||
client = InfluxDBClient(
|
||||
host=hostname,
|
||||
port=port,
|
||||
username=username,
|
||||
password=password,
|
||||
database=database_name
|
||||
)
|
||||
return client
|
||||
|
||||
|
||||
def find_user(module, client, user_name):
|
||||
u = None
|
||||
|
||||
try:
|
||||
users = client.get_list_users()
|
||||
for user in users:
|
||||
if user['user'] == user_name:
|
||||
u = user
|
||||
break
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
module.fail_json(msg=str(e))
|
||||
return u
|
||||
|
||||
|
||||
def create_user(module, client, user_name, user_pass, user_admin):
|
||||
if not module.check_mode:
|
||||
try:
|
||||
client.create_user(user_name, user_pass, user_admin)
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
module.exit_json(changed=True)
|
||||
|
||||
|
||||
def drop_user(module, client, user_name):
|
||||
if not module.check_mode:
|
||||
try:
|
||||
client.drop_user(user_name)
|
||||
except exceptions.InfluxDBClientError as e:
|
||||
module.fail_json(msg=e.content)
|
||||
|
||||
module.exit_json(changed=True)
|
||||
|
||||
|
||||
def main():
|
||||
argument_spec = influxdb_argument_spec()
|
||||
argument_spec.update(state=dict(default='present', type='str',
|
||||
choices=['present', 'absent']))
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
supports_check_mode=True)
|
||||
|
||||
if not HAS_INFLUXDB:
|
||||
module.fail_json(msg='influxdb python package \
|
||||
is required for this module')
|
||||
|
||||
state = module.params['state']
|
||||
user_name = module.params['user_name']
|
||||
user_pass = module.params['user_pass']
|
||||
user_admin = module.params['user_admin']
|
||||
|
||||
try:
|
||||
client = connect_to_influxdb(module)
|
||||
user = find_user(module, client, user_name)
|
||||
|
||||
if state == 'present':
|
||||
if user:
|
||||
module.exit_json(changed=False)
|
||||
else:
|
||||
create_user(module, client, user_name, user_pass, user_admin)
|
||||
|
||||
if state == 'absent':
|
||||
if user:
|
||||
drop_user(module, client, user_name)
|
||||
else:
|
||||
module.exit_json(changed=False)
|
||||
except Exception as e:
|
||||
module.fail_json(msg="{}: {}".format(e.__class__.__name__, str(e)))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,306 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: monasca_alarm_definition
|
||||
short_description: crud operations on Monasca alarm definitions
|
||||
description:
|
||||
- Performs crud operations (create/update/delete) on monasca alarm
|
||||
definitions
|
||||
- Monasca project homepage - https://wiki.openstack.org/wiki/Monasca
|
||||
- When relevant the alarm_definition_id is in the output and can be used
|
||||
with the register action
|
||||
author: Tim Kuhlman <tim@backgroundprocess.com>
|
||||
requirements: [ python-monascaclient ]
|
||||
options:
|
||||
alarm_actions:
|
||||
required: false
|
||||
description:
|
||||
- Array of notification method IDs that are invoked for the
|
||||
transition to the ALARM state.
|
||||
api_version:
|
||||
required: false
|
||||
default: '2_0'
|
||||
description:
|
||||
- The monasca api version.
|
||||
description:
|
||||
required: false
|
||||
description:
|
||||
- The description associated with the alarm
|
||||
expression:
|
||||
required: false
|
||||
description:
|
||||
- The alarm expression, required for create/update operations.
|
||||
keystone_password:
|
||||
required: false
|
||||
description:
|
||||
- Keystone password to use for authentication, required unless a
|
||||
keystone_token is specified.
|
||||
keystone_auth_url:
|
||||
required: false
|
||||
description:
|
||||
- Keystone url to authenticate against, required unless
|
||||
keystone_token isdefined.
|
||||
Example http://192.168.10.5:5000/v3
|
||||
keystone_insecure:
|
||||
required: false
|
||||
default: false
|
||||
description:
|
||||
- Specifies if insecure TLS (https) requests. If True,
|
||||
the servers certificate will not be validated.
|
||||
keystone_token:
|
||||
required: false
|
||||
description:
|
||||
- Keystone token to use with the monasca api. If this is specified
|
||||
the monasca_api_url is required but
|
||||
the keystone_user and keystone_password aren't.
|
||||
keystone_username:
|
||||
required: false
|
||||
description:
|
||||
- Keystone user to log in as, required unless a keystone_token
|
||||
is specified.
|
||||
keystone_user_domain_name:
|
||||
required: false
|
||||
default: 'Default'
|
||||
description:
|
||||
- Keystone user domain name used for authentication.
|
||||
keystone_project_name:
|
||||
required: false
|
||||
description:
|
||||
- Keystone project name to obtain a token for, defaults to the
|
||||
user's default project
|
||||
keystone_project_domain_name:
|
||||
required: false
|
||||
default: 'Default'
|
||||
description:
|
||||
- Keystone project domain name used for authentication.
|
||||
match_by:
|
||||
required: false
|
||||
default: "[hostname]"
|
||||
description:
|
||||
- Alarm definition match by, see the monasca api documentation for
|
||||
more detail.
|
||||
monasca_api_url:
|
||||
required: false
|
||||
description:
|
||||
- If unset the service endpoing registered with keystone will
|
||||
be used.
|
||||
name:
|
||||
required: true
|
||||
description:
|
||||
- The alarm definition name
|
||||
ok_actions:
|
||||
required: false
|
||||
description:
|
||||
- Array of notification method IDs that are invoked for the
|
||||
transition to the OK state.
|
||||
severity:
|
||||
required: false
|
||||
default: "LOW"
|
||||
description:
|
||||
- The severity set for the alarm must be LOW, MEDIUM, HIGH or
|
||||
CRITICAL
|
||||
state:
|
||||
required: false
|
||||
default: "present"
|
||||
choices: [ present, absent ]
|
||||
description:
|
||||
- Whether the account should exist. When C(absent), removes the
|
||||
user account.
|
||||
undetermined_actions:
|
||||
required: false
|
||||
description:
|
||||
- Array of notification method IDs that are invoked for the
|
||||
transition to the UNDETERMINED state.
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Host Alive Alarm
|
||||
monasca_alarm_definition:
|
||||
name: "Host Alive Alarm"
|
||||
expression: "host_alive_status > 0"
|
||||
keystone_url: "{{keystone_url}}"
|
||||
keystone_user: "{{keystone_user}}"
|
||||
keystone_password: "{{keystone_password}}"
|
||||
tags:
|
||||
- alarms
|
||||
- system_alarms
|
||||
register: out
|
||||
- name: Create System Alarm Definitions
|
||||
monasca_alarm_definition:
|
||||
name: "{{item.name}}"
|
||||
expression: "{{item.expression}}"
|
||||
keystone_token: "{{out.keystone_token}}"
|
||||
monasca_api_url: "{{out.monasca_api_url}}"
|
||||
with_items:
|
||||
- { name: "High CPU usage", expression: "avg(cpu.idle_perc) < 10 times 3" }
|
||||
- { name: "Disk Inode Usage", expression: "disk.inode_used_perc > 90" }
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import * # NOQA
|
||||
import os # NOQA
|
||||
|
||||
try:
|
||||
from monascaclient import client
|
||||
except ImportError:
|
||||
monascaclient_found = False
|
||||
else:
|
||||
monascaclient_found = True
|
||||
|
||||
|
||||
# With Ansible modules including other files presents difficulties
|
||||
# otherwise this would be in its own module
|
||||
class MonascaAnsible(object):
|
||||
""" A base class used to build Monasca Client based Ansible Modules
|
||||
As input an ansible.module_utils.basic.AnsibleModule object is
|
||||
expected. It should have at least these params defined:
|
||||
- api_version
|
||||
- keystone_token and monasca_api_url or keystone_url, keystone_user
|
||||
and keystone_password and optionally
|
||||
monasca_api_url
|
||||
"""
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
self.auth_kwargs = self._get_auth_credentials()
|
||||
self.monasca = client.Client(
|
||||
self.module.params['api_version'],
|
||||
**self.auth_kwargs
|
||||
)
|
||||
|
||||
def _exit_json(self, **kwargs):
|
||||
""" Exit with supplied kwargs
|
||||
"""
|
||||
self.module.exit_json(**kwargs)
|
||||
|
||||
def _get_auth_credentials(self):
|
||||
""" Build kwargs for authentication
|
||||
"""
|
||||
kwargs = {
|
||||
'auth_url': self.module.params['keystone_auth_url'],
|
||||
'insecure': self.module.params['keystone_insecure'],
|
||||
'endpoint': self.module.params['monasca_api_url'],
|
||||
'project_name': self.module.params['keystone_project_name'],
|
||||
'project_domain_name': self.module.params[
|
||||
'keystone_project_domain_name']
|
||||
}
|
||||
if self.module.params['keystone_token'] is None:
|
||||
kwargs.update({
|
||||
'username': self.module.params['keystone_username'],
|
||||
'password': self.module.params['keystone_password'],
|
||||
'user_domain_name': self.module.params[
|
||||
'keystone_user_domain_name']
|
||||
})
|
||||
else:
|
||||
kwargs.update({
|
||||
'token': self.module.params['keystone_token']
|
||||
})
|
||||
return kwargs
|
||||
|
||||
|
||||
class MonascaDefinition(MonascaAnsible):
|
||||
def run(self):
|
||||
name = self.module.params['name']
|
||||
expression = self.module.params['expression']
|
||||
|
||||
# Find existing definitions
|
||||
definitions = {
|
||||
definition['name']: definition for definition in
|
||||
self.monasca.alarm_definitions.list()
|
||||
}
|
||||
|
||||
if self.module.params['state'] == 'absent':
|
||||
if name not in definitions.keys():
|
||||
self._exit_json(changed=False)
|
||||
|
||||
if self.module.check_mode:
|
||||
self._exit_json(changed=True)
|
||||
resp = self.monasca.alarm_definitions.delete(
|
||||
alarm_id=definitions[name]['id'])
|
||||
if resp.status_code == 204:
|
||||
self._exit_json(changed=True)
|
||||
else:
|
||||
self.module.fail_json(msg=str(resp.status_code) + resp.text)
|
||||
else: # Only other option is state=present
|
||||
def_kwargs = {
|
||||
"name": name,
|
||||
"description": self.module.params['description'],
|
||||
"expression": expression,
|
||||
"match_by": self.module.params['match_by'],
|
||||
"severity": self.module.params['severity'],
|
||||
"alarm_actions": self.module.params['alarm_actions'],
|
||||
"ok_actions": self.module.params['ok_actions'],
|
||||
"undetermined_actions": self.module.params[
|
||||
'undetermined_actions']}
|
||||
|
||||
if name in definitions.keys():
|
||||
if definitions[name]['expression'] == expression and \
|
||||
definitions[name]['alarm_actions'] == self.module.params[
|
||||
'alarm_actions'] and \
|
||||
definitions[name]['ok_actions'] == self.module.params[
|
||||
'ok_actions'] and \
|
||||
definitions[name][
|
||||
'undetermined_actions'] == self.module.params[
|
||||
'undetermined_actions']:
|
||||
self._exit_json(
|
||||
changed=False,
|
||||
alarm_definition_id=definitions[name]['id']
|
||||
)
|
||||
def_kwargs['alarm_id'] = definitions[name]['id']
|
||||
|
||||
if self.module.check_mode:
|
||||
self._exit_json(
|
||||
changed=True,
|
||||
alarm_definition_id=definitions[name]['id']
|
||||
)
|
||||
body = self.monasca.alarm_definitions.patch(**def_kwargs)
|
||||
else:
|
||||
if self.module.check_mode:
|
||||
self._exit_json(changed=True)
|
||||
body = self.monasca.alarm_definitions.create(**def_kwargs)
|
||||
|
||||
if 'id' in body:
|
||||
self._exit_json(changed=True, alarm_definition_id=body['id'])
|
||||
else:
|
||||
self.module.fail_json(msg=body)
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
alarm_actions=dict(required=False, default=[], type='list'),
|
||||
api_version=dict(required=False, default='2_0', type='str'),
|
||||
description=dict(required=False, type='str'),
|
||||
expression=dict(required=False, type='str'),
|
||||
keystone_auth_url=dict(required=False, type='str'),
|
||||
keystone_insecure=dict(required=False, default=False, type='bool'),
|
||||
keystone_password=dict(required=False, type='str', no_log=True),
|
||||
keystone_project_name=dict(required=False, type='str'),
|
||||
keystone_project_domain_name=dict(required=False,
|
||||
default='Default', type='str'),
|
||||
keystone_token=dict(required=False, type='str'),
|
||||
keystone_username=dict(required=False, type='str'),
|
||||
keystone_user_domain_name=dict(required=False, default='Default',
|
||||
type='str'),
|
||||
match_by=dict(default=['hostname'], type='list'),
|
||||
monasca_api_url=dict(required=False, type='str'),
|
||||
name=dict(required=True, type='str'),
|
||||
ok_actions=dict(required=False, default=[], type='list'),
|
||||
severity=dict(default='LOW', type='str'),
|
||||
state=dict(default='present', choices=['present', 'absent'],
|
||||
type='str'),
|
||||
undetermined_actions=dict(required=False, default=[], type='list')
|
||||
),
|
||||
supports_check_mode=True
|
||||
)
|
||||
|
||||
if not monascaclient_found:
|
||||
module.fail_json(msg="python-monascaclient is required")
|
||||
|
||||
definition = MonascaDefinition(module)
|
||||
definition.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -1,251 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: monasca_notification_method
|
||||
short_description: crud operations for Monasca notifications methods
|
||||
description:
|
||||
- Performs crud operations (create/update/delete) on monasca notification
|
||||
methods
|
||||
- Monasca project homepage - https://wiki.openstack.org/wiki/Monasca
|
||||
- When relevant the notification_id is in the output and can be used with
|
||||
the register action
|
||||
author: Tim Kuhlman <tim@backgroundprocess.com>
|
||||
requirements: [ python-monascaclient ]
|
||||
options:
|
||||
address:
|
||||
required: true
|
||||
description:
|
||||
- The notification method address corresponding to the type.
|
||||
api_version:
|
||||
required: false
|
||||
default: '2_0'
|
||||
description:
|
||||
- The monasca api version.
|
||||
keystone_password:
|
||||
required: false
|
||||
description:
|
||||
- Keystone password to use for authentication, required unless a
|
||||
keystone_token is specified.
|
||||
keystone_auth_url:
|
||||
required: true
|
||||
description:
|
||||
- Keystone url to authenticate against, required unless
|
||||
keystone_token isdefined.
|
||||
Example http://192.168.10.5:5000/v3
|
||||
keystone_insecure:
|
||||
required: false
|
||||
default: false
|
||||
description:
|
||||
- Specifies if insecure TLS (https) requests. If True,
|
||||
the servers certificate will not be validated.
|
||||
keystone_token:
|
||||
required: false
|
||||
description:
|
||||
- Keystone token to use with the monasca api. If this is specified
|
||||
the monasca_api_url is required but the keystone_user and
|
||||
keystone_password aren't.
|
||||
keystone_username:
|
||||
required: false
|
||||
description:
|
||||
- Keystone user to log in as, required unless a keystone_token is
|
||||
keystone_user_domain_name:
|
||||
required: false
|
||||
default: 'Default'
|
||||
description:
|
||||
- Keystone user domain name used for authentication.
|
||||
specified.
|
||||
keystone_project_name:
|
||||
required: false
|
||||
description:
|
||||
- Keystone project name to obtain a token for, defaults to the
|
||||
user's default project
|
||||
keystone_project_domain_name:
|
||||
required: false
|
||||
default: 'Default'
|
||||
description:
|
||||
- Keystone project domain name used for authentication.
|
||||
monasca_api_url:
|
||||
required: false
|
||||
description:
|
||||
- If unset the service endpoing registered with keystone will be
|
||||
used.
|
||||
name:
|
||||
required: true
|
||||
description:
|
||||
- The notification method name
|
||||
state:
|
||||
required: false
|
||||
default: "present"
|
||||
choices: [ present, absent ]
|
||||
description:
|
||||
- Whether the account should exist. When C(absent), removes the
|
||||
user account.
|
||||
type:
|
||||
required: true
|
||||
description:
|
||||
- The notification type. This must be one of the types supported
|
||||
by the Monasca API.
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Setup root email notification method
|
||||
monasca_notification_method:
|
||||
name: "Email Root"
|
||||
type: 'EMAIL'
|
||||
address: 'root@localhost'
|
||||
keystone_url: "{{keystone_url}}"
|
||||
keystone_user: "{{keystone_user}}"
|
||||
keystone_password: "{{keystone_password}}"
|
||||
register: out
|
||||
- name: Create System Alarm Definitions
|
||||
monasca_alarm_definition:
|
||||
name: "Host Alive Alarm"
|
||||
expression: "host_alive_status > 0"
|
||||
keystone_token: "{{out.keystone_token}}"
|
||||
monasca_api_url: "{{out.monasca_api_url}}"
|
||||
alarm_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
ok_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
undetermined_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
'''
|
||||
|
||||
|
||||
from ansible.module_utils.basic import * # NOQA
|
||||
import os # NOQA
|
||||
|
||||
try:
|
||||
from monascaclient import client
|
||||
except ImportError:
|
||||
monascaclient_found = False
|
||||
else:
|
||||
monascaclient_found = True
|
||||
|
||||
|
||||
# With Ansible modules including other files presents difficulties
|
||||
# otherwise this would be in its own module
|
||||
class MonascaAnsible(object):
|
||||
""" A base class used to build Monasca Client based Ansible Modules
|
||||
As input an ansible.module_utils.basic.AnsibleModule object is
|
||||
expected. It should have at least these params defined:
|
||||
- api_version
|
||||
- keystone_token and monasca_api_url or keystone_url, keystone_user
|
||||
and keystone_password and optionally monasca_api_url
|
||||
"""
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
self.auth_kwargs = self._get_auth_credentials()
|
||||
self.monasca = client.Client(
|
||||
self.module.params['api_version'],
|
||||
**self.auth_kwargs
|
||||
)
|
||||
|
||||
def _exit_json(self, **kwargs):
|
||||
""" Exit with supplied kwargs
|
||||
"""
|
||||
self.module.exit_json(**kwargs)
|
||||
|
||||
def _get_auth_credentials(self):
|
||||
""" Build kwargs for authentication
|
||||
"""
|
||||
kwargs = {
|
||||
'auth_url': self.module.params['keystone_auth_url'],
|
||||
'insecure': self.module.params['keystone_insecure'],
|
||||
'endpoint': self.module.params['monasca_api_url'],
|
||||
'project_name': self.module.params['keystone_project_name'],
|
||||
'project_domain_name': self.module.params[
|
||||
'keystone_project_domain_name']
|
||||
}
|
||||
if self.module.params['keystone_token'] is None:
|
||||
kwargs.update({
|
||||
'username': self.module.params['keystone_username'],
|
||||
'password': self.module.params['keystone_password'],
|
||||
'user_domain_name': self.module.params[
|
||||
'keystone_user_domain_name']
|
||||
})
|
||||
else:
|
||||
kwargs.update({
|
||||
'token': self.module.params['keystone_token']
|
||||
})
|
||||
return kwargs
|
||||
|
||||
|
||||
class MonascaNotification(MonascaAnsible):
|
||||
def run(self):
|
||||
name = self.module.params['name']
|
||||
type = self.module.params['type']
|
||||
address = self.module.params['address']
|
||||
|
||||
notifications = {
|
||||
notif['name']: notif for notif in
|
||||
self.monasca.notifications.list()
|
||||
}
|
||||
if name in notifications.keys():
|
||||
notification = notifications[name]
|
||||
else:
|
||||
notification = None
|
||||
|
||||
if self.module.params['state'] == 'absent':
|
||||
if notification is None:
|
||||
self._exit_json(changed=False)
|
||||
else:
|
||||
self.monasca.notifications.delete(
|
||||
notification_id=notification['id'])
|
||||
self._exit_json(changed=True)
|
||||
else: # Only other option is present
|
||||
if notification is None:
|
||||
body = self.monasca.notifications.create(
|
||||
name=name, type=type, address=address)
|
||||
self._exit_json(
|
||||
changed=True,
|
||||
notification_method_id=body['id'])
|
||||
else:
|
||||
if (notification['type'] == type and
|
||||
notification['address'] == address):
|
||||
self._exit_json(changed=False,
|
||||
notification_method_id=notification['id'])
|
||||
else:
|
||||
self.monasca.notifications.update(
|
||||
notification_id=notification['id'], name=name,
|
||||
type=type, address=address)
|
||||
self._exit_json(changed=True,
|
||||
notification_method_id=notification['id'])
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
address=dict(required=True, type='str'),
|
||||
api_version=dict(required=False, default='2_0', type='str'),
|
||||
keystone_auth_url=dict(required=True, type='str'),
|
||||
keystone_insecure=dict(required=False, default=False, type='bool'),
|
||||
keystone_password=dict(required=False, type='str', no_log=True),
|
||||
keystone_project_name=dict(required=True, type='str'),
|
||||
keystone_project_domain_name=dict(required=False,
|
||||
default='Default', type='str'),
|
||||
keystone_token=dict(required=False, type='str'),
|
||||
keystone_username=dict(required=False, type='str'),
|
||||
keystone_user_domain_name=dict(required=False, default='Default',
|
||||
type='str'),
|
||||
monasca_api_url=dict(required=False, type='str'),
|
||||
name=dict(required=True, type='str'),
|
||||
state=dict(default='present', choices=['present', 'absent'],
|
||||
type='str'),
|
||||
type=dict(required=True, type='str')
|
||||
),
|
||||
supports_check_mode=True
|
||||
)
|
||||
|
||||
if not monascaclient_found:
|
||||
module.fail_json(msg="python-monascaclient is required")
|
||||
|
||||
notification = MonascaNotification(module)
|
||||
notification.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -1,45 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
allow_duplicates: yes
|
||||
|
||||
galaxy_info:
|
||||
author: "Donovan Francesco, Paul Stevens"
|
||||
description: "Openstack Monasca"
|
||||
company: "Internet Solutions"
|
||||
license: "license (Apache)"
|
||||
min_ansible_install: 2.2
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- xenial
|
||||
- bionic
|
||||
- name: opensuse
|
||||
versions:
|
||||
- all
|
||||
categories:
|
||||
- cloud
|
||||
- python
|
||||
- monasca
|
||||
- development
|
||||
- openstack
|
||||
|
||||
dependencies:
|
||||
- role: apt_package_pinning
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
# Copyright 2017, 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.
|
||||
#
|
||||
# (c) 2017, Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
|
||||
|
||||
maturity_info:
|
||||
status: unmaintained
|
||||
created_during: ocata
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
features:
|
||||
- New variables have been added to allow a deployer to customize
|
||||
a monasca systemd unit file to their liking.
|
||||
- The task dropping the monasca systemd unit files now uses the
|
||||
``config_template`` action plugin allowing deployers access to
|
||||
customize the unit files as they see fit without having to
|
||||
load extra options into the defaults and polute the generic
|
||||
systemd unit file with jinja2 variables and conditionals.
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The service setup in keystone for monasca will now be executed
|
||||
through delegation to the ``monasca_service_setup_host`` which,
|
||||
by default, is ``localhost`` (the deploy host). Deployers can
|
||||
opt to rather change this to the utility container by implementing
|
||||
the following override in ``user_variables.yml``.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
monasca_service_setup_host: "{{ groups['utility_all'][0] }}"
|
||||
|
||||
deprecations:
|
||||
- |
|
||||
The variable ``monasca_requires_pip_packages`` is no longer required
|
||||
and has therefore been removed.
|
|
@ -1,23 +0,0 @@
|
|||
---
|
||||
features:
|
||||
- For the ``os_monasca`` role, the systemd unit ``TimeoutSec`` value which
|
||||
controls the time between sending a SIGTERM signal and a SIGKILL signal
|
||||
when stopping or restarting the service has been reduced from 300 seconds
|
||||
to 120 seconds. This provides 2 minutes for long-lived sessions to drain
|
||||
while preventing new ones from starting before a restart or a stop. The
|
||||
``RestartSec`` value which controls the time between the service stop and
|
||||
start when restarting has been reduced from 150 seconds to 2 seconds to
|
||||
make the restart happen faster. These values can be adjusted by using the
|
||||
``monasca_*_init_config_overrides`` variables which use the
|
||||
``config_template`` task to change template defaults.
|
||||
upgrade:
|
||||
- For the ``os_monasca`` role, the systemd unit ``TimeoutSec`` value which
|
||||
controls the time between sending a SIGTERM signal and a SIGKILL signal
|
||||
when stopping or restarting the service has been reduced from 300 seconds
|
||||
to 120 seconds. This provides 2 minutes for long-lived sessions to drain
|
||||
while preventing new ones from starting before a restart or a stop. The
|
||||
``RestartSec`` value which controls the time between the service stop and
|
||||
start when restarting has been reduced from 150 seconds to 2 seconds to
|
||||
make the restart happen faster. These values can be adjusted by using the
|
||||
``monasca_*_init_config_overrides`` variables which use the
|
||||
``config_template`` task to change template defaults.
|
|
@ -1,285 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# 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.
|
||||
|
||||
# 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',
|
||||
'reno.sphinxext',
|
||||
]
|
||||
|
||||
# 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.
|
||||
author = 'OpenStack-Ansible Contributors'
|
||||
category = 'Miscellaneous'
|
||||
copyright = '2014-2016, OpenStack-Ansible Contributors'
|
||||
description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
|
||||
project = 'OpenStack-Ansible'
|
||||
role_name = 'os_monasca'
|
||||
target_name = 'openstack-ansible-' + role_name
|
||||
title = 'OpenStack-Ansible Release Notes: ' + 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)
|
||||
)
|
||||
|
||||
# Release notes do not need a version number in the title, they
|
||||
# cover multiple releases.
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = ''
|
||||
# The short X.Y version.
|
||||
version = ''
|
||||
|
||||
# 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.
|
||||
# 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
|
||||
|
||||
|
||||
# -- 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
|
||||
|
||||
# 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': '',
|
||||
}
|
||||
|
||||
# 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
|
||||
|
||||
# -- Options for Internationalization output ------------------------------
|
||||
locale_dirs = ['locale/']
|
|
@ -1,10 +0,0 @@
|
|||
================================
|
||||
OpenStack-Ansible Release Notes
|
||||
================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
unreleased
|
||||
stein
|
||||
rocky
|
|
@ -1,6 +0,0 @@
|
|||
===================================
|
||||
Rocky Series Release Notes
|
||||
===================================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/rocky
|
|
@ -1,6 +0,0 @@
|
|||
===================================
|
||||
Stein Series Release Notes
|
||||
===================================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/stein
|
|
@ -1,5 +0,0 @@
|
|||
==============================
|
||||
Current Series Release Notes
|
||||
==============================
|
||||
|
||||
.. release-notes::
|
95
run_tests.sh
95
run_tests.sh
|
@ -1,95 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2015, 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.
|
||||
|
||||
# PURPOSE:
|
||||
# This script clones the openstack-ansible-tests repository to the
|
||||
# tests/common folder in order to be able to re-use test components
|
||||
# for role testing. This is intended to be the thinnest possible
|
||||
# shim for test execution outside of OpenStack CI.
|
||||
|
||||
# WARNING:
|
||||
# This file is maintained in the openstack-ansible-tests repository.
|
||||
# https://opendev.org/openstack/openstack-ansible-tests/src/run_tests.sh
|
||||
# If you need to modify this file, update the one in the openstack-ansible-tests
|
||||
# repository and then update this file as well. The purpose of this file is to
|
||||
# prepare the host and then execute all the tox tests.
|
||||
#
|
||||
|
||||
## Shell Opts ----------------------------------------------------------------
|
||||
set -xeu
|
||||
|
||||
## Vars ----------------------------------------------------------------------
|
||||
|
||||
WORKING_DIR="$(readlink -f $(dirname $0))"
|
||||
OSA_PROJECT_NAME="$(sed -n 's|^project=openstack/\(.*\).git$|\1|p' $(pwd)/.gitreview)"
|
||||
|
||||
COMMON_TESTS_PATH="${WORKING_DIR}/tests/common"
|
||||
TESTING_HOME=${TESTING_HOME:-$HOME}
|
||||
ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/opendev.org/openstack/openstack-ansible-tests"
|
||||
|
||||
# Use .gitreview as the key to determine the appropriate
|
||||
# branch to clone for tests.
|
||||
TESTING_BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' "${WORKING_DIR}/.gitreview")
|
||||
if [[ "${TESTING_BRANCH}" == "" ]]; then
|
||||
TESTING_BRANCH="master"
|
||||
fi
|
||||
|
||||
## Main ----------------------------------------------------------------------
|
||||
|
||||
# Source distribution information
|
||||
source /etc/os-release || source /usr/lib/os-release
|
||||
|
||||
# Prefer dnf over yum for CentOS.
|
||||
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
|
||||
|
||||
# Figure out the appropriate package install command
|
||||
case ${ID,,} in
|
||||
*suse*) pkg_mgr_cmd="zypper -n in" ;;
|
||||
centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;;
|
||||
ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
|
||||
# Gentoo needs to have version set since it's rolling
|
||||
gentoo) pkg_mgr_cmd="emerge --jobs=4"; VERSION="rolling" ;;
|
||||
*) echo "unsupported distribution: ${ID,,}"; exit 1 ;;
|
||||
esac
|
||||
|
||||
# Install git so that we can clone the tests repo if git is not available
|
||||
which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" git
|
||||
|
||||
# Clone the tests repo for access to the common test script
|
||||
if [[ ! -d "${COMMON_TESTS_PATH}" ]]; then
|
||||
# The tests repo doesn't need a clone, we can just
|
||||
# symlink it.
|
||||
if [[ "${OSA_PROJECT_NAME}" == "openstack-ansible-tests" ]]; then
|
||||
ln -s "${WORKING_DIR}" "${COMMON_TESTS_PATH}"
|
||||
|
||||
# In zuul v3 any dependent repository is placed into
|
||||
# /home/zuul/src/opendev.org, so we check to see
|
||||
# if there is a tests checkout there already. If so, we
|
||||
# symlink that and use it.
|
||||
elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then
|
||||
ln -s "${ZUUL_TESTS_CLONE_LOCATION}" "${COMMON_TESTS_PATH}"
|
||||
|
||||
# Otherwise we're clearly not in zuul or using a previously setup
|
||||
# repo in some way, so just clone it from upstream.
|
||||
else
|
||||
git clone -b "${TESTING_BRANCH}" \
|
||||
https://opendev.org/openstack/openstack-ansible-tests \
|
||||
"${COMMON_TESTS_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Execute the common test script
|
||||
source tests/common/run_tests_common.sh
|
||||
|
24
setup.cfg
24
setup.cfg
|
@ -1,24 +0,0 @@
|
|||
[metadata]
|
||||
name = openstack-ansible-os_monasca
|
||||
summary = os_monasca for OpenStack Ansible
|
||||
description-file =
|
||||
README.rst
|
||||
author = IS Open Cloud
|
||||
author-email = openstack-discuss@lists.openstack.org
|
||||
home-page = https://docs.openstack.org/openstack-ansible-os_monasca/latest
|
||||
classifier =
|
||||
Intended Audience :: Developers
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
build-dir = doc/build
|
||||
source-dir = doc/source
|
||||
|
||||
[pbr]
|
||||
warnerrors = True
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
29
setup.py
29
setup.py
|
@ -1,29 +0,0 @@
|
|||
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
||||
import setuptools
|
||||
|
||||
# In python < 2.7.4, a lazy loading of package `pbr` will break
|
||||
# setuptools if some other modules registered functions in `atexit`.
|
||||
# solution from: http://bugs.python.org/issue15881#msg170215
|
||||
try:
|
||||
import multiprocessing # noqa
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr>=2.0.0'],
|
||||
pbr=True)
|
|
@ -1,71 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
- 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_tasks: monasca_pre_install.yml
|
||||
when: inventory_hostname in groups['monasca_api']
|
||||
tags:
|
||||
- monasca-install
|
||||
|
||||
- include_tasks: monasca_install.yml
|
||||
when: inventory_hostname in groups['monasca_api']
|
||||
tags:
|
||||
- monasca-install
|
||||
|
||||
- include_tasks: monasca_thresh_install.yml
|
||||
when: inventory_hostname in groups['monasca_api']
|
||||
tags:
|
||||
- monasca-install
|
||||
|
||||
- include_tasks: monasca_post_install.yml
|
||||
when: inventory_hostname in groups['monasca_api']
|
||||
tags:
|
||||
- monasca-config
|
||||
|
||||
- include_tasks: monasca_init_{{ ansible_service_mgr }}.yml
|
||||
when: inventory_hostname in groups['monasca_api']
|
||||
tags:
|
||||
- monasca-config
|
||||
|
||||
- include_tasks: monasca_db_setup.yml
|
||||
tags:
|
||||
- monasca-config
|
||||
|
||||
- include_tasks: monasca_service_setup.yml
|
||||
when: inventory_hostname == groups['monasca_api'][0]
|
||||
tags:
|
||||
- monasca-config
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
||||
- include_tasks: monasca_alarms_setup.yml
|
||||
when: inventory_hostname == groups['monasca_api'][0]
|
||||
tags:
|
||||
- monasca-alarms
|
|
@ -1,71 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Wait for monasca-api to come up
|
||||
uri:
|
||||
url: "{{ monasca_service_internalurl }}"
|
||||
status_code: 401
|
||||
register: result
|
||||
until: result is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: Setup default notification method
|
||||
monasca_notification_method:
|
||||
name: "{{ monasca_notification_name }}"
|
||||
type: "{{ monasca_notification_type }}"
|
||||
address: "{{ monasca_notification_address }}"
|
||||
keystone_auth_url: "{{ keystone_service_adminurl }}"
|
||||
keystone_username: "{{ keystone_admin_user_name }}"
|
||||
keystone_password: "{{ keystone_auth_admin_password }}"
|
||||
keystone_project_name: "{{ keystone_admin_tenant_name }}"
|
||||
monasca_api_url: "{{ monasca_service_internalurl }}"
|
||||
register: default_notification
|
||||
no_log: True
|
||||
# TODO(evrardjp): Add conditional for deploy from
|
||||
# packages to set the python_interpreter to the
|
||||
# system's one.
|
||||
# Make sure the module doesn't load the code on the
|
||||
# target node, but inside target node's venv when
|
||||
# deploying from source
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ monasca_bin }}/python"
|
||||
|
||||
- name: Create default alarm definitions
|
||||
monasca_alarm_definition:
|
||||
name: "{{ item.name }}"
|
||||
description: "{{ item.description | default('') }}"
|
||||
expression: "{{ item.expression }}"
|
||||
match_by: "{{ item.match_by | default(['hostname']) }}"
|
||||
severity: "{{ item.severity | default('LOW') }}"
|
||||
alarm_actions:
|
||||
- "{{ default_notification.notification_method_id }}"
|
||||
ok_actions:
|
||||
- "{{ default_notification.notification_method_id }}"
|
||||
undetermined_actions:
|
||||
- "{{ default_notification.notification_method_id }}"
|
||||
keystone_auth_url: "{{ keystone_service_adminurl }}"
|
||||
keystone_username: "{{ keystone_admin_user_name }}"
|
||||
keystone_password: "{{ keystone_auth_admin_password }}"
|
||||
keystone_project_name: "{{ keystone_admin_tenant_name }}"
|
||||
monasca_api_url: "{{ monasca_service_internalurl }}"
|
||||
with_items: "{{ monasca_default_alarms }}"
|
||||
no_log: True
|
||||
# TODO(evrardjp): Add conditional for deploy from
|
||||
# packages to set the python_interpreter to the
|
||||
# system's one.
|
||||
# Make sure the module doesn't load the code on the
|
||||
# target node, but inside target node's venv when
|
||||
# deploying from source
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ monasca_bin }}/python"
|
|
@ -1,23 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include_tasks: monasca_influxdb_setup.yml
|
||||
when: inventory_hostname in groups['monasca_api']
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ monasca_bin }}/python"
|
||||
|
||||
- include_tasks: monasca_mysql_setup.yml
|
||||
when: inventory_hostname in groups['monasca_api']
|
||||
|
||||
- include_tasks: monasca_kafka_setup.yml
|
||||
when: inventory_hostname in groups['monasca_kafka']
|
|
@ -1,47 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create influxdb database
|
||||
influxdb_database:
|
||||
hostname: "{{ monasca_influxdb_host }}"
|
||||
port: "{{ monasca_influxdb_port }}"
|
||||
username: "{{ monasca_influxdb_admin }}"
|
||||
password: "{{ monasca_influxdb_admin_password }}"
|
||||
database_name: "{{ monasca_influxdb_database }}"
|
||||
state: present
|
||||
no_log: True
|
||||
|
||||
- name: Create influxdb retention policy for database
|
||||
influxdb_retention_policy:
|
||||
hostname: "{{ monasca_influxdb_host }}"
|
||||
port: "{{ monasca_influxdb_port }}"
|
||||
database_name: "{{ monasca_influxdb_database }}"
|
||||
username: "{{ monasca_influxdb_admin }}"
|
||||
password: "{{ monasca_influxdb_admin_password }}"
|
||||
policy_name: persister_all
|
||||
duration: "{{ monasca_influxdb_retention_policy }}"
|
||||
replication: "{{ monasca_influxdb_replication_factor }}"
|
||||
no_log: True
|
||||
|
||||
- name: Create influxdb users
|
||||
influxdb_user:
|
||||
hostname: "{{ monasca_influxdb_host }}"
|
||||
port: "{{ monasca_influxdb_port }}"
|
||||
username: "{{ monasca_influxdb_admin }}"
|
||||
password: "{{ monasca_influxdb_admin_password }}"
|
||||
user_name: "{{ item.username }}"
|
||||
user_password: "{{ item.password }}"
|
||||
with_items:
|
||||
- "{{ monasca_influxdb_users }}"
|
||||
no_log: True
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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 TEMP run dir
|
||||
file:
|
||||
path: "/var/run/{{ item.value.service_name }}"
|
||||
state: directory
|
||||
owner: "{{ monasca_system_user_name }}"
|
||||
group: "{{ monasca_system_group_name }}"
|
||||
mode: "02755"
|
||||
with_dict: "{{ monasca_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
|
||||
- name: Create TEMP lock dir
|
||||
file:
|
||||
path: "/var/lock/{{ item.value.service_name }}"
|
||||
state: directory
|
||||
owner: "{{ monasca_system_user_name }}"
|
||||
group: "{{ monasca_system_group_name }}"
|
||||
mode: "02755"
|
||||
with_dict: "{{ monasca_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
|
||||
# TODO:
|
||||
# Remove this in Pike as it only needed to handle upgrades
|
||||
# from Newton->Newton and Newton->Ocata
|
||||
- name: Cleanup old tmpfiles.d entry
|
||||
file:
|
||||
path: "/etc/tmpfiles.d/{{ item.value.service_name }}.conf"
|
||||
state: absent
|
||||
with_dict: "{{ monasca_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
|
||||
- name: Create tmpfiles.d entry
|
||||
template:
|
||||
src: "monasca-systemd-tmpfiles.j2"
|
||||
dest: "/etc/tmpfiles.d/openstack-{{ item.value.service_name }}.conf"
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
with_dict: "{{ monasca_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
notify:
|
||||
- Restart monasca services
|
||||
|
||||
- name: Place the systemd init script
|
||||
config_template:
|
||||
src: "monasca-systemd-init.j2"
|
||||
dest: "/etc/systemd/system/{{ item.value.service_name }}.service"
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
config_overrides: "{{ item.value.init_config_overrides }}"
|
||||
config_type: "ini"
|
||||
with_dict: "{{ monasca_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
notify:
|
||||
- Restart monasca services
|
|
@ -1,66 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
# TODO(odyssey4me):
|
||||
# This can be simplified once all the roles are using
|
||||
# python_venv_build. We can then switch to using a
|
||||
# set of constraints in pip.conf inside the venv,
|
||||
# perhaps prepared by giving a giving a list of
|
||||
# constraints to the role.
|
||||
- name: Create developer mode constraint file
|
||||
copy:
|
||||
dest: "/opt/developer-pip-constraints.txt"
|
||||
content: |
|
||||
{% for item in monasca_developer_constraints %}
|
||||
{{ item }}
|
||||
{% endfor %}
|
||||
when:
|
||||
- monasca_developer_mode | bool
|
||||
|
||||
# TODO(kaiokmo):
|
||||
# Simplify the install of distro patterns for openSUSE
|
||||
# using python_venv_build approach.
|
||||
- name: Install distro patterns (openSUSE)
|
||||
zypper:
|
||||
name: "{{ monasca_distro_patterns }}"
|
||||
state: "{{ monasca_pattern_state }}"
|
||||
type: pattern
|
||||
register: install_patterns
|
||||
until: install_patterns is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
when: ansible_pkg_mgr == 'zypper'
|
||||
|
||||
- name: Ensure remote wheel building is disabled in developer mode
|
||||
set_fact:
|
||||
venv_build_host: "{{ ansible_hostname }}"
|
||||
when:
|
||||
- monasca_developer_mode | bool
|
||||
|
||||
- name: Install the python venv
|
||||
include_role:
|
||||
name: "python_venv_build"
|
||||
vars:
|
||||
venv_install_destination_path: "{{ monasca_bin | dirname }}"
|
||||
venv_install_distro_package_list: "{{ monasca_distro_packages }}"
|
||||
venv_pip_install_args: "{{ monasca_pip_install_args }}"
|
||||
venv_pip_packages: "{{ monasca_pip_packages }}"
|
||||
venv_facts_when_changed:
|
||||
- section: "monasca"
|
||||
option: "venv_tag"
|
||||
value: "{{ monasca_venv_tag }}"
|
|
@ -1,33 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create kafka topics logs dir
|
||||
file:
|
||||
path: "/opt/kafka/logs"
|
||||
state: directory
|
||||
owner: "kafka"
|
||||
group: "kafka"
|
||||
mode: "0766"
|
||||
|
||||
- name: Check kafka topics
|
||||
shell: "/opt/kafka/bin/kafka-topics.sh --list --zookeeper {{ zookeeper_hosts }} --topic {{ item.key }} | grep {{ item.key }}"
|
||||
with_dict: "{{ kafka_topics }}"
|
||||
ignore_errors: yes
|
||||
register: check_result
|
||||
changed_when: False
|
||||
|
||||
- name: create topics
|
||||
command: "/opt/kafka/bin/kafka-topics.sh --create --zookeeper {{ zookeeper_hosts }} --replication-factor {{ item.value.replicas }} --partitions {{ item.value.partitions }} --topic {{ item.key }}"
|
||||
with_dict: "{{ kafka_topics }}"
|
||||
when:
|
||||
- check_result is failed
|
|
@ -1,48 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create DB for service
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ monasca_galera_address }}"
|
||||
name: "{{ monasca_galera_database }}"
|
||||
state: "present"
|
||||
delegate_to: "{{ monasca_db_setup_host }}"
|
||||
no_log: True
|
||||
|
||||
- name: Grant access to the DB for the service
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ monasca_galera_address }}"
|
||||
name: "{{ monasca_galera_user }}"
|
||||
password: "{{ monasca_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
state: "present"
|
||||
priv: "{{ monasca_galera_database }}.*:ALL"
|
||||
delegate_to: "{{ monasca_db_setup_host }}"
|
||||
with_items:
|
||||
- "localhost"
|
||||
- "%"
|
||||
no_log: True
|
||||
|
||||
- name: Copy mysql schema script to host
|
||||
template:
|
||||
dest: "/opt/mon_mysql.sql"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0640
|
||||
src: mon_mysql.sql.j2
|
||||
delegate_to: "{{ monasca_db_setup_host }}"
|
||||
notify: Create monasca database schema
|
|
@ -1,53 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Drop Monasca Config(s)
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ monasca_system_user_name }}"
|
||||
group: "{{ monasca_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- src: "monasca-api/api-config.conf.j2"
|
||||
dest: "/etc/monasca/api-config.conf"
|
||||
config_overrides: "{{ monasca_api_config_overrides }}"
|
||||
config_type: "ini"
|
||||
- src: "monasca-api/api-config.ini.j2"
|
||||
dest: "/etc/monasca/api-config.ini"
|
||||
config_overrides: "{{ monasca_api_config_ini_overrides }}"
|
||||
config_type: "ini"
|
||||
- src: "monasca-api/api-logging.conf.j2"
|
||||
dest: "/etc/monasca/api-logging.conf"
|
||||
config_overrides: "{{ monasca_api_logging_config_overrides }}"
|
||||
config_type: "ini"
|
||||
- src: "monasca-persister/persister.conf.j2"
|
||||
dest: "/etc/monasca/persister.conf"
|
||||
config_overrides: "{{ monasca_persister_config_overrides }}"
|
||||
config_type: "ini"
|
||||
- src: "monasca-persister/persister-logging.conf.j2"
|
||||
dest: "/etc/monasca/persister-logging.conf"
|
||||
config_overrides: "{{ monasca_persister_logging_config_overrides }}"
|
||||
config_type: "ini"
|
||||
- src: "monasca-thresh/thresh-config.yml.j2"
|
||||
dest: "/etc/monasca/thresh-config.yml"
|
||||
config_overrides: "{{ monasca_thresh_config_overrides }}"
|
||||
config_type: "yaml"
|
||||
- src: "monasca-notification/notification.yaml.j2"
|
||||
dest: "/etc/monasca/notification.yaml"
|
||||
config_overrides: "{{ monasca_notification_config_overrides }}"
|
||||
config_type: "yaml"
|
||||
notify:
|
||||
- Restart monasca services
|
|
@ -1,72 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create the system group
|
||||
group:
|
||||
name: "{{ monasca_system_group_name }}"
|
||||
state: "present"
|
||||
system: "yes"
|
||||
|
||||
- name: Create the monasca system user
|
||||
user:
|
||||
name: "{{ monasca_system_user_name }}"
|
||||
group: "{{ monasca_system_group_name }}"
|
||||
comment: "{{ monasca_system_comment }}"
|
||||
shell: "{{ monasca_system_shell }}"
|
||||
system: "yes"
|
||||
createhome: "yes"
|
||||
home: "{{ monasca_system_user_home }}"
|
||||
|
||||
- name: Create monasca dir
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ item.owner|default(monasca_system_user_name) }}"
|
||||
group: "{{ item.group|default(monasca_system_group_name) }}"
|
||||
mode: "{{ item.mode|default('0755') }}"
|
||||
with_items:
|
||||
- { path: "/openstack/venvs", mode: "0755", owner: "root", group: "root" }
|
||||
- { path: "/etc/monasca" }
|
||||
- { path: "/var/cache/monasca" }
|
||||
- { path: "{{ monasca_system_user_home }}" }
|
||||
|
||||
- name: Test for log directory or link
|
||||
shell: |
|
||||
if [ -h "/var/log/monasca" ]; then
|
||||
chown -h {{ monasca_system_user_name }}:{{ monasca_system_group_name }} "/var/log/monasca"
|
||||
chown -R {{ monasca_system_user_name }}:{{ monasca_system_group_name }} "$(readlink /var/log/monasca)"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
register: log_dir
|
||||
failed_when: false
|
||||
changed_when: log_dir.rc != 0
|
||||
|
||||
- name: Create monasca log dir
|
||||
file:
|
||||
path: "/var/log/monasca"
|
||||
state: directory
|
||||
owner: "{{ monasca_system_user_name }}"
|
||||
group: "{{ monasca_system_group_name }}"
|
||||
mode: "0755"
|
||||
when: log_dir.rc != 0
|
||||
|
||||
- name: Add zypper maven repository
|
||||
zypper_repository:
|
||||
auto_import_keys: yes
|
||||
autorefresh: yes
|
||||
name: "{{ item.name }}"
|
||||
repo: "{{ item.uri }}"
|
||||
runrefresh: yes
|
||||
when: ansible_pkg_mgr == 'zypper'
|
||||
with_items: "{{ monasca_external_repo }}"
|
|
@ -1,154 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
# We set the python interpreter to the ansible runtime venv if
|
||||
# the delegation is to localhost so that we get access to the
|
||||
# appropriate python libraries in that venv. If the delegation
|
||||
# is to another host, we assume that it is accessible by the
|
||||
# system python instead.
|
||||
- name: Setup the service
|
||||
delegate_to: "{{ monasca_service_setup_host }}"
|
||||
vars:
|
||||
ansible_python_interpreter: >-
|
||||
{{ (monasca_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
|
||||
block:
|
||||
- name: Add service to the keystone service catalog
|
||||
os_keystone_service:
|
||||
cloud: default
|
||||
state: present
|
||||
name: "{{ monasca_service_name }}"
|
||||
service_type: "{{ monasca_service_type }}"
|
||||
description: "{{ monasca_service_description }}"
|
||||
endpoint_type: admin
|
||||
verify: "{{ not keystone_service_adminuri_insecure }}"
|
||||
register: add_service
|
||||
until: add_service is success
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
||||
- name: Add service users
|
||||
os_user:
|
||||
cloud: default
|
||||
state: present
|
||||
name: "{{ item.name }}"
|
||||
password: "{{ item.password }}"
|
||||
domain: default
|
||||
default_project: "{{ item.default_project }}"
|
||||
endpoint_type: admin
|
||||
verify: "{{ not keystone_service_adminuri_insecure }}"
|
||||
register: add_service
|
||||
when: not monasca_service_in_ldap | bool
|
||||
until: add_service is success
|
||||
retries: 5
|
||||
delay: 10
|
||||
no_log: True
|
||||
with_items:
|
||||
- name: "{{ monasca_service_user_name }}"
|
||||
password: "{{ monasca_service_password }}"
|
||||
default_project: "{{ monasca_service_project_name }}"
|
||||
- name: "{{ monasca_agent_user_name }}"
|
||||
password: "{{ monasca_agent_password }}"
|
||||
default_project: "{{ monasca_agent_project_name }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
|
||||
- name: Add monasca user, agent and read only roles
|
||||
os_keystone_role:
|
||||
cloud: default
|
||||
state: present
|
||||
name: "{{ item }}"
|
||||
endpoint_type: admin
|
||||
verify: "{{ not keystone_service_adminuri_insecure }}"
|
||||
register: add_service
|
||||
when: not monasca_service_in_ldap | bool
|
||||
until: add_service is success
|
||||
retries: 5
|
||||
delay: 10
|
||||
with_flattened:
|
||||
- "{{ monasca_user_roles }}"
|
||||
- "{{ monasca_agent_roles }}"
|
||||
- "{{ monasca_read_only_user_roles }}"
|
||||
|
||||
- name: Add service user to admin role
|
||||
os_user_role:
|
||||
cloud: default
|
||||
state: present
|
||||
user: "{{ monasca_service_user_name }}"
|
||||
role: "{{ monasca_role_name }}"
|
||||
project: "{{ monasca_service_project_name }}"
|
||||
endpoint_type: admin
|
||||
verify: "{{ not keystone_service_adminuri_insecure }}"
|
||||
register: add_service
|
||||
when: not monasca_service_in_ldap | bool
|
||||
until: add_service is success
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
||||
- name: Add agent user to agent roles
|
||||
os_user_role:
|
||||
cloud: default
|
||||
state: present
|
||||
user: "{{ monasca_agent_user_name }}"
|
||||
role: "{{ item }}"
|
||||
project: "{{ monasca_agent_project_name }}"
|
||||
endpoint_type: admin
|
||||
verify: "{{ not keystone_service_adminuri_insecure }}"
|
||||
register: add_service
|
||||
when: not monasca_service_in_ldap | bool
|
||||
until: add_service is success
|
||||
retries: 5
|
||||
delay: 10
|
||||
with_items: "{{ monasca_agent_roles }}"
|
||||
|
||||
- name: Add admin user to user roles
|
||||
os_user_role:
|
||||
cloud: default
|
||||
state: present
|
||||
user: "{{ keystone_admin_user_name }}"
|
||||
role: "{{ item }}"
|
||||
project: "{{ keystone_admin_tenant_name }}"
|
||||
endpoint_type: admin
|
||||
verify: "{{ not keystone_service_adminuri_insecure }}"
|
||||
register: add_service
|
||||
when: not monasca_service_in_ldap | bool
|
||||
until: add_service is success
|
||||
retries: 5
|
||||
delay: 10
|
||||
with_items: "{{ monasca_user_roles }}"
|
||||
|
||||
- name: Add endpoints to keystone endpoint catalog
|
||||
os_keystone_endpoint:
|
||||
cloud: default
|
||||
state: present
|
||||
service: "{{ monasca_service_name }}"
|
||||
endpoint_interface: "{{ item.interface }}"
|
||||
url: "{{ item.url }}"
|
||||
region: "{{ monasca_service_region }}"
|
||||
endpoint_type: admin
|
||||
verify: "{{ not keystone_service_adminuri_insecure }}"
|
||||
register: add_service
|
||||
until: add_service is success
|
||||
retries: 5
|
||||
delay: 10
|
||||
with_items:
|
||||
- interface: "public"
|
||||
url: "{{ monasca_service_publicurl }}"
|
||||
- interface: "internal"
|
||||
url: "{{ monasca_service_internalurl }}"
|
||||
- interface: "admin"
|
||||
url: "{{ monasca_service_adminurl }}"
|
|
@ -1,39 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Get package from git
|
||||
git:
|
||||
repo: "{{ item.repo }}"
|
||||
dest: "/usr/share/{{ item.dest }}"
|
||||
clone: "yes"
|
||||
update: "yes"
|
||||
version: "{{ item.version }}"
|
||||
force: yes
|
||||
accept_hostkey: yes
|
||||
register: git_clone
|
||||
until: git_clone is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items:
|
||||
- repo: "{{ monasca_common_git_repo }}"
|
||||
version: "{{ monasca_common_git_install_branch }}"
|
||||
dest: "monasca-common"
|
||||
- repo: "{{ monasca_thresh_git_repo }}"
|
||||
version: "{{ monasca_thresh_git_install_branch }}"
|
||||
dest: "monasca-thresh"
|
||||
notify: Setup monasca-thresh
|
||||
|
||||
- name: Get monasca-thresh version
|
||||
shell: "grep -m 1 version /usr/share/monasca-thresh/thresh/pom.xml | awk -F '[<>]' '{print $3}'"
|
||||
register: _monasca_thresh_version
|
||||
changed_when: false
|
|
@ -1,214 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015,2016 Hewlett Packard Enterprise Development LP
|
||||
* Copyright 2016 FUJITSU LIMITED
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
DROP DATABASE IF EXISTS `{{ monasca_galera_database }}`;
|
||||
|
||||
CREATE DATABASE IF NOT EXISTS `{{ monasca_galera_database }}` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
USE `{{ monasca_galera_database }}`;
|
||||
|
||||
SET foreign_key_checks = 0;
|
||||
|
||||
/*
|
||||
* Enum tables
|
||||
*/
|
||||
CREATE TABLE `alarm_state` (
|
||||
`name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `alarm_definition_severity` (
|
||||
`name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `notification_method_type` (
|
||||
`name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `alarm` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`alarm_definition_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`state` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`lifecycle_state` varchar(50) DEFAULT NULL,
|
||||
`link` varchar(512) DEFAULT NULL,
|
||||
`inhibited` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`silenced` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` datetime NOT NULL,
|
||||
`state_updated_at` datetime,
|
||||
`updated_at` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `alarm_definition_id` (`alarm_definition_id`),
|
||||
CONSTRAINT `fk_alarm_definition_id` FOREIGN KEY (`alarm_definition_id`) REFERENCES `alarm_definition` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_alarm_alarm_state` FOREIGN KEY (`state`) REFERENCES `alarm_state` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `alarm_action` (
|
||||
`alarm_definition_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`alarm_state` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`action_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`alarm_definition_id`,`alarm_state`,`action_id`),
|
||||
CONSTRAINT `fk_alarm_action_alarm_definition_id` FOREIGN KEY (`alarm_definition_id`) REFERENCES `alarm_definition` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_alarm_action_notification_method_id` FOREIGN KEY (`action_id`) REFERENCES `notification_method` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_alarm_action_alarm_state` FOREIGN KEY (`alarm_state`) REFERENCES `alarm_state` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `alarm_definition` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`tenant_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`expression` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`severity` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`match_by` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
|
||||
`actions_enabled` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`created_at` datetime NOT NULL,
|
||||
`updated_at` datetime NOT NULL,
|
||||
`deleted_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `tenant_id` (`tenant_id`),
|
||||
KEY `deleted_at` (`deleted_at`),
|
||||
CONSTRAINT `fk_alarm_definition_severity` FOREIGN KEY (`severity`) REFERENCES `alarm_definition_severity` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `alarm_metric` (
|
||||
`alarm_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`metric_definition_dimensions_id` binary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
PRIMARY KEY (`alarm_id`,`metric_definition_dimensions_id`),
|
||||
KEY `alarm_id` (`alarm_id`),
|
||||
KEY `metric_definition_dimensions_id` (`metric_definition_dimensions_id`),
|
||||
CONSTRAINT `fk_alarm_id` FOREIGN KEY (`alarm_id`) REFERENCES `alarm` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `metric_definition` (
|
||||
`id` binary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`tenant_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`region` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `metric_definition_dimensions` (
|
||||
`id` binary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
`metric_definition_id` binary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
`metric_dimension_set_id` binary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
KEY `metric_definition_id` (`metric_definition_id`),
|
||||
KEY `metric_dimension_set_id` (`metric_dimension_set_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
/*
|
||||
* mysql limits the size of a unique key to 767 bytes. The utf8mb4 charset requires
|
||||
* 4 bytes to be allocated for each character while the utf8 charset requires 3 bytes.
|
||||
* The utf8 charset should be sufficient for any reasonable characters, see the definition
|
||||
* of supplementary characters for what it doesn't support.
|
||||
* Even with utf8, the unique key length would be 785 bytes so only a subset of the
|
||||
* name is used. Potentially the size of the name should be limited to 250 characters
|
||||
* which would resolve this issue.
|
||||
*
|
||||
* The unique key is required to allow high performance inserts without doing a select by using
|
||||
* the "insert into metric_dimension ... on duplicate key update dimension_set_id=dimension_set_id
|
||||
* syntax
|
||||
*/
|
||||
CREATE TABLE `metric_dimension` (
|
||||
`dimension_set_id` binary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||
`value` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||
UNIQUE KEY `metric_dimension_key` (`dimension_set_id`,`name`(252)),
|
||||
KEY `dimension_set_id` (`dimension_set_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='PRIMARY KEY (`id`)';
|
||||
|
||||
CREATE TABLE `notification_method` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`tenant_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`name` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`address` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`period` int NOT NULL DEFAULT 0,
|
||||
`created_at` datetime NOT NULL,
|
||||
`updated_at` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_alarm_noticication_method_type` FOREIGN KEY (`type`) REFERENCES `notification_method_type` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `sub_alarm_definition` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`alarm_definition_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`function` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`metric_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`operator` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`threshold` double NOT NULL,
|
||||
`period` int(11) NOT NULL,
|
||||
`periods` int(11) NOT NULL,
|
||||
`is_deterministic` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` datetime NOT NULL,
|
||||
`updated_at` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_sub_alarm_definition` (`alarm_definition_id`),
|
||||
CONSTRAINT `fk_sub_alarm_definition` FOREIGN KEY (`alarm_definition_id`) REFERENCES `alarm_definition` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `sub_alarm_definition_dimension` (
|
||||
`sub_alarm_definition_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`dimension_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`value` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
CONSTRAINT `fk_sub_alarm_definition_dimension` FOREIGN KEY (`sub_alarm_definition_id`) REFERENCES `sub_alarm_definition` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `sub_alarm` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`alarm_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`sub_expression_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`expression` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` datetime NOT NULL,
|
||||
`updated_at` datetime NOT NULL,
|
||||
`state` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'OK',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_sub_alarm` (`alarm_id`),
|
||||
KEY `fk_sub_alarm_expr` (`sub_expression_id`),
|
||||
CONSTRAINT `fk_sub_alarm` FOREIGN KEY (`alarm_id`) REFERENCES `alarm` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_sub_alarm_state` FOREIGN KEY (`state`) REFERENCES `alarm_state` (`name`),
|
||||
CONSTRAINT `fk_sub_alarm_expr` FOREIGN KEY (`sub_expression_id`) REFERENCES `sub_alarm_definition` (`id`)
|
||||
);
|
||||
|
||||
/*
|
||||
* To require ssl connections add 'REQUIRE SSL' to the end of all grant statements
|
||||
*/
|
||||
{% if mysql_users is defined %}
|
||||
{% for user in mysql_users %}
|
||||
GRANT ALL ON {{ monasca_mysql_db }} .* TO '{{ user.name }}'@'%' IDENTIFIED BY '{{ user.pass }}';
|
||||
GRANT ALL ON {{ monasca_mysql_db }} .* TO '{{ user.name }}'@'localhost' IDENTIFIED BY '{{ user.pass }}';
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
SET foreign_key_checks = 1;
|
||||
|
||||
/* provide data for enum tables */
|
||||
insert into `alarm_state` values ('UNDETERMINED');
|
||||
insert into `alarm_state` values ('OK');
|
||||
insert into `alarm_state` values ('ALARM');
|
||||
|
||||
insert into `alarm_definition_severity` values ('LOW');
|
||||
insert into `alarm_definition_severity` values ('MEDIUM');
|
||||
insert into `alarm_definition_severity` values ('HIGH');
|
||||
insert into `alarm_definition_severity` values ('CRITICAL');
|
||||
|
||||
insert into `notification_method_type` values ('EMAIL');
|
||||
insert into `notification_method_type` values ('WEBHOOK');
|
||||
insert into `notification_method_type` values ('PAGERDUTY');
|
||||
/* provide data for enum tables */
|
|
@ -1,139 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[DEFAULT]
|
||||
log_config_append = /etc/monasca/api-logging.conf
|
||||
|
||||
# Identifies the region that the Monasca API is running in.
|
||||
region = {{ keystone_service_region }}
|
||||
|
||||
# Dispatchers to be loaded to serve restful APIs
|
||||
[dispatcher]
|
||||
versions = monasca_api.v2.reference.versions:Versions
|
||||
version_2_0 = monasca_api.v2.reference.version_2_0:Version2
|
||||
metrics = monasca_api.v2.reference.metrics:Metrics
|
||||
metrics_measurements = monasca_api.v2.reference.metrics:MetricsMeasurements
|
||||
metrics_statistics = monasca_api.v2.reference.metrics:MetricsStatistics
|
||||
metrics_names = monasca_api.v2.reference.metrics:MetricsNames
|
||||
alarm_definitions = monasca_api.v2.reference.alarm_definitions:AlarmDefinitions
|
||||
alarms = monasca_api.v2.reference.alarms:Alarms
|
||||
alarms_count = monasca_api.v2.reference.alarms:AlarmsCount
|
||||
alarms_state_history = monasca_api.v2.reference.alarms:AlarmsStateHistory
|
||||
notification_methods = monasca_api.v2.reference.notifications:Notifications
|
||||
dimension_values = monasca_api.v2.reference.metrics:DimensionValues
|
||||
dimension_names = monasca_api.v2.reference.metrics:DimensionNames
|
||||
notification_method_types = monasca_api.v2.reference.notificationstype:NotificationsType
|
||||
healthchecks = monasca_api.healthchecks:HealthChecks
|
||||
|
||||
[security]
|
||||
# The roles that are allowed full access to the API.
|
||||
default_authorized_roles = {{ monasca_user_roles | join(', ') }}
|
||||
|
||||
# The roles that are allowed to only POST metrics to the API. This role would be used by the Monasca Agent.
|
||||
agent_authorized_roles = {{ monasca_agent_roles | join(', ') }}
|
||||
|
||||
# The roles that are allowed to only GET metrics from the API.
|
||||
read_only_authorized_roles = {{ monasca_read_only_user_roles | join(', ') }}
|
||||
|
||||
# The roles that are allowed to access the API on behalf of another tenant.
|
||||
# For example, a service can POST metrics to another tenant if they are a member of the "delegate" role.
|
||||
delegate_authorized_roles = admin
|
||||
|
||||
[messaging]
|
||||
# The message queue driver to use
|
||||
driver = monasca_api.common.messaging.kafka_publisher:KafkaPublisher
|
||||
|
||||
[repositories]
|
||||
# The driver to use for the metrics repository
|
||||
metrics_driver = monasca_api.common.repositories.influxdb.metrics_repository:MetricsRepository
|
||||
|
||||
# The driver to use for the alarm definitions repository
|
||||
alarm_definitions_driver = monasca_api.common.repositories.sqla.alarm_definitions_repository:AlarmDefinitionsRepository
|
||||
|
||||
# The driver to use for the alarms repository
|
||||
alarms_driver = monasca_api.common.repositories.sqla.alarms_repository:AlarmsRepository
|
||||
|
||||
# The driver to use for the notifications repository
|
||||
notifications_driver = monasca_api.common.repositories.sqla.notifications_repository:NotificationsRepository
|
||||
|
||||
# The driver to use for the notification method type repository
|
||||
notification_method_type_driver = monasca_api.common.repositories.sqla.notification_method_type_repository:NotificationMethodTypeRepository
|
||||
|
||||
[dispatcher]
|
||||
driver = v2_reference
|
||||
|
||||
[kafka]
|
||||
# The endpoint to the kafka server
|
||||
uri = {{ kafka_hosts }}
|
||||
|
||||
# The topic that metrics will be published too
|
||||
metrics_topic = metrics
|
||||
|
||||
# The topic that events will be published too
|
||||
events_topic = events
|
||||
|
||||
# The topic that alarm state will be published too
|
||||
alarm_state_transitions_topic = alarm-state-transitions
|
||||
|
||||
# consumer group name
|
||||
group = api
|
||||
|
||||
# how many times to try when error occurs
|
||||
max_retry = 3
|
||||
|
||||
# wait time between tries when kafka goes down
|
||||
wait_time = 1
|
||||
|
||||
# use synchronous or asynchronous connection to kafka
|
||||
async = False
|
||||
|
||||
# send messages in bulk or send messages one by one.
|
||||
compact = False
|
||||
|
||||
# How many partitions this connection should listen messages on, this
|
||||
# parameter is for reading from kafka. If listens on multiple partitions,
|
||||
# For example, if the client should listen on partitions 1 and 3, then the
|
||||
# configuration should look like the following:
|
||||
# partitions = 1
|
||||
# partitions = 3
|
||||
# default to listen on partition 0.
|
||||
partitions = 0
|
||||
|
||||
[influxdb]
|
||||
# The IP address of the InfluxDB service.
|
||||
ip_address = {{ monasca_influxdb_host }}
|
||||
|
||||
# The port number that the InfluxDB service is listening on.
|
||||
port = {{ monasca_influxdb_port }}
|
||||
|
||||
# The username to authenticate with.
|
||||
user = {{ monasca_api_influxdb_user }}
|
||||
|
||||
# The password to authenticate with.
|
||||
password = {{ monasca_api_influxdb_password }}
|
||||
|
||||
# The name of the InfluxDB database to use.
|
||||
database_name = {{ monasca_influxdb_database }}
|
||||
|
||||
[database]
|
||||
connection = "mysql+pymysql://{{ monasca_galera_user }}:{{ monasca_container_mysql_password }}@{{ monasca_galera_address }}/{{ monasca_galera_database }}?charset=utf8mb4"
|
||||
|
||||
[keystone_authtoken]
|
||||
insecure = {{ keystone_service_internaluri_insecure | bool }}
|
||||
auth_type = {{ monasca_keystone_auth_plugin }}
|
||||
auth_url = {{ keystone_service_adminuri }}
|
||||
www_authenticate_uri = {{ keystone_service_internaluri }}
|
||||
project_domain_id = {{ monasca_service_project_domain_id }}
|
||||
user_domain_id = {{ monasca_service_user_domain_id }}
|
||||
project_name = {{ monasca_service_project_name }}
|
||||
username = {{ monasca_service_user_name }}
|
||||
password = {{ monasca_service_password }}
|
||||
region_name = {{ keystone_service_region }}
|
||||
service_token_roles_required = True
|
||||
|
||||
memcached_servers = {{ memcached_servers }}
|
||||
|
||||
token_cache_time = 300
|
||||
|
||||
# if your memcached server is shared, use these settings to avoid cache poisoning
|
||||
memcache_security_strategy = ENCRYPT
|
||||
memcache_secret_key = {{ memcached_encryption_key }}
|
|
@ -1,29 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[DEFAULT]
|
||||
name = monasca_api
|
||||
|
||||
[pipeline:main]
|
||||
pipeline = request_id auth api
|
||||
|
||||
[app:api]
|
||||
paste.app_factory = monasca_api.api.server:launch
|
||||
|
||||
[filter:auth]
|
||||
paste.filter_factory = monasca_api.healthcheck.keystone_protocol:filter_factory
|
||||
|
||||
[filter:request_id]
|
||||
paste.filter_factory = oslo_middleware.request_id:RequestId.factory
|
||||
|
||||
[server:main]
|
||||
use = egg:gunicorn#main
|
||||
host = 0.0.0.0
|
||||
port = {{ monasca_service_port }}
|
||||
workers = {{ monasca_api_workers }}
|
||||
worker-connections = 2000
|
||||
backlog = 1000
|
||||
proc_name = monasca-api
|
||||
worker-class = eventlet
|
||||
timeout = 30
|
||||
backlog = 2048
|
||||
keepalive = 2
|
|
@ -1,45 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[loggers]
|
||||
keys = root, sqlalchemy, kafka
|
||||
|
||||
[handlers]
|
||||
keys = console, file
|
||||
|
||||
[formatters]
|
||||
keys = context
|
||||
|
||||
[logger_root]
|
||||
level = {{ monasca_log_level }}
|
||||
handlers = console, file
|
||||
|
||||
[logger_sqlalchemy]
|
||||
qualname = sqlalchemy.engine
|
||||
# "level = INFO" logs SQL queries.
|
||||
# "level = DEBUG" logs SQL queries and results.
|
||||
# "level = WARN" logs neither. (Recommended for production systems.)
|
||||
level = {{ monasca_log_level }}
|
||||
handlers = console, file
|
||||
propagate = 0
|
||||
|
||||
[logger_kafka]
|
||||
qualname = kafka
|
||||
level = {{ monasca_log_level }}
|
||||
handlers = console, file
|
||||
propagate = 0
|
||||
|
||||
[handler_console]
|
||||
class = logging.StreamHandler
|
||||
args = (sys.stderr,)
|
||||
level = {{ monasca_log_level }}
|
||||
formatter = context
|
||||
|
||||
[handler_file]
|
||||
class = logging.handlers.RotatingFileHandler
|
||||
level = {{ monasca_log_level }}
|
||||
formatter = context
|
||||
# store up to 5*100MB of logs
|
||||
args = ('/var/log/{{ monasca_service_name }}/api.log', 'a', 104857600, 5)
|
||||
|
||||
[formatter_context]
|
||||
class = oslo_log.formatters.ContextFormatter
|
|
@ -1,120 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
#
|
||||
# (C) Copyright 2015,2016 Hewlett Packard Enterprise Development Company LP
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
kafka:
|
||||
url: "{{ kafka_hosts }}"
|
||||
group: "monasca-notification"
|
||||
alarm_topic: "alarm-state-transitions"
|
||||
notification_topic: "alarm-notifications"
|
||||
notification_retry_topic: "retry-notifications"
|
||||
periodic:
|
||||
60: 60-seconds-notifications
|
||||
max_offset_lag: 600 # In seconds, undefined for none
|
||||
|
||||
database:
|
||||
repo_driver: "monasca_notification.common.repositories.mysql.mysql_repo:MysqlRepo"
|
||||
|
||||
mysql:
|
||||
host: "{{ monasca_galera_address }}"
|
||||
user: "{{ monasca_galera_user }}"
|
||||
passwd: "{{ monasca_container_mysql_password }}"
|
||||
db: "{{ monasca_galera_database }}"
|
||||
|
||||
notification_types:
|
||||
|
||||
email:
|
||||
server: "localhost"
|
||||
port: 25
|
||||
user: ""
|
||||
password: ""
|
||||
timeout: 15
|
||||
from_addr: "monasca-notification@{{ ansible_hostname }}"
|
||||
|
||||
webhook:
|
||||
timeout: 5
|
||||
|
||||
pagerduty:
|
||||
timeout: 5
|
||||
url: "https://events.pagerduty.com/generic/2010-04-15/create_event.json"
|
||||
|
||||
hipchat:
|
||||
timeout: 5
|
||||
insecure: False
|
||||
ca_certs: "/etc/ssl/certs/ca-certificates.crt"
|
||||
|
||||
slack:
|
||||
timeout: 5
|
||||
insecure: False
|
||||
ca_certs: "/etc/ssl/certs/ca-certificates.crt"
|
||||
|
||||
processors:
|
||||
alarm:
|
||||
number: 2
|
||||
ttl: 14400 # In seconds, undefined for none. Alarms older than this are not processed
|
||||
notification:
|
||||
number: 4
|
||||
|
||||
retry:
|
||||
interval: 30
|
||||
max_attempts: 5
|
||||
|
||||
queues:
|
||||
alarms_size: 256
|
||||
finished_size: 256
|
||||
notifications_size: 256
|
||||
sent_notifications_size: 50 # limiting this size reduces potential # of re-sent notifications after a failure
|
||||
|
||||
zookeeper:
|
||||
url: "{{ zookeeper_hosts }}"
|
||||
notification_path: "/notification/alarms"
|
||||
notification_retry_path: "/notification/retry"
|
||||
periodic_path:
|
||||
60: /notification/60_seconds
|
||||
|
||||
logging: # Used in logging.dictConfig
|
||||
version: 1
|
||||
disable_existing_loggers: False
|
||||
formatters:
|
||||
default:
|
||||
format: "%(asctime)s %(levelname)s %(name)s %(message)s"
|
||||
handlers:
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: default
|
||||
file:
|
||||
class: logging.handlers.RotatingFileHandler
|
||||
filename: "/var/log/monasca/notification.log"
|
||||
formatter: default
|
||||
maxBytes: 10485760 # Rotate at file size ~10MB
|
||||
backupCount: 5 # Keep 5 older logs around
|
||||
loggers:
|
||||
kazoo:
|
||||
level: {{ monasca_log_level }}
|
||||
kafka:
|
||||
level: {{ monasca_log_level }}
|
||||
statsd:
|
||||
level: {{ monasca_log_level }}
|
||||
root:
|
||||
handlers:
|
||||
- file
|
||||
level: {{ monasca_log_level }}
|
||||
|
||||
statsd:
|
||||
host: 'localhost'
|
||||
port: 8125
|
|
@ -1,45 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[loggers]
|
||||
keys = root, kafka, influxdb
|
||||
|
||||
[handlers]
|
||||
keys = console, file
|
||||
|
||||
[formatters]
|
||||
keys = generic
|
||||
|
||||
[logger_root]
|
||||
level = {{ monasca_log_level }}
|
||||
formatter = default
|
||||
handlers = console, file
|
||||
|
||||
[logger_kafka]
|
||||
qualname = kafka
|
||||
level = {{ monasca_log_level }}
|
||||
formatter = default
|
||||
handlers = console, file
|
||||
propagate = 0
|
||||
|
||||
[logger_influxdb]
|
||||
qualname = influxdb
|
||||
level = {{ monasca_log_level }}
|
||||
formatter = default
|
||||
handlers = console, file
|
||||
propagate = 0
|
||||
|
||||
[handler_console]
|
||||
class = logging.StreamHandler
|
||||
args = (sys.stderr,)
|
||||
level = {{ monasca_log_level }}
|
||||
formatter = generic
|
||||
|
||||
[handler_file]
|
||||
class = logging.handlers.RotatingFileHandler
|
||||
level = {{ monasca_log_level }}
|
||||
formatter = generic
|
||||
# store up to 5*100MB of logs
|
||||
args = ('/var/log/monasca/persister.log', 'a', 104857600, 5)
|
||||
|
||||
[formatter_generic]
|
||||
format = %(asctime)s %(levelname)s [%(name)s][%(threadName)s] %(message)s
|
|
@ -1,63 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[DEFAULT]
|
||||
log_config_append=/etc/monasca/persister-logging.conf
|
||||
|
||||
# Default log level is WARNING
|
||||
# Show debugging output in logs (sets DEBUG log level output)
|
||||
debug = {{ debug }}
|
||||
|
||||
[repositories]
|
||||
# The driver to use for the metrics repository
|
||||
metrics_driver = monasca_persister.repositories.influxdb.metrics_repository:MetricInfluxdbRepository
|
||||
|
||||
# The driver to use for the alarm state history repository
|
||||
alarm_state_history_driver = monasca_persister.repositories.influxdb.alarm_state_history_repository:AlarmStateHistInfluxdbRepository
|
||||
|
||||
[zookeeper]
|
||||
# Comma separated list of host:port
|
||||
uri = {{ zookeeper_hosts }}
|
||||
partition_interval_recheck_seconds = {{ monasca_partition_interval_recheck_seconds }}
|
||||
|
||||
[kafka_alarm_history]
|
||||
# Comma separated list of Kafka broker host:port.
|
||||
uri = {{ kafka_hosts }}
|
||||
group_id = 1_alarm-state-transitions
|
||||
topic = alarm-state-transitions
|
||||
consumer_id = 1
|
||||
client_id = 1
|
||||
database_batch_size = 3000
|
||||
max_wait_time_seconds = 15
|
||||
# The following 3 values are set to the kakfa-python defaults
|
||||
fetch_size_bytes = 4096
|
||||
buffer_size = 4096
|
||||
# 8 times buffer size
|
||||
max_buffer_size = 32768
|
||||
# Path in zookeeper for kafka consumer group partitioning algo
|
||||
zookeeper_path = /persister_partitions/alarm-state-transitions
|
||||
num_processors = {{ monasca_persister_workers|int // 2 }}
|
||||
|
||||
[kafka_metrics]
|
||||
# Comma separated list of Kafka broker host:port
|
||||
uri = {{ kafka_hosts }}
|
||||
group_id = 1_metrics
|
||||
topic = metrics
|
||||
consumer_id = 1
|
||||
client_id = 1
|
||||
database_batch_size = 3000
|
||||
max_wait_time_seconds = 15
|
||||
# The following 3 values are set to the kakfa-python defaults
|
||||
fetch_size_bytes = 4096
|
||||
buffer_size = 4096
|
||||
# 8 times buffer size
|
||||
max_buffer_size = 32768
|
||||
# Path in zookeeper for kafka consumer group partitioning algo
|
||||
zookeeper_path = /persister_partitions/metrics
|
||||
num_processors = {{ monasca_persister_workers|int // 2 }}
|
||||
|
||||
[influxdb]
|
||||
database_name = {{ monasca_influxdb_database }}
|
||||
ip_address = {{ monasca_influxdb_host }}
|
||||
port = {{ monasca_influxdb_port }}
|
||||
user = {{ monasca_persister_influxdb_user }}
|
||||
password = {{ monasca_persister_influxdb_password }}
|
|
@ -1,34 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[Unit]
|
||||
Description=monasca openstack service
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ monasca_system_user_name }}
|
||||
Group={{ monasca_system_group_name }}
|
||||
|
||||
{% if item.value.service_init_bin is defined %}
|
||||
ExecStart={{ item.value.service_init_bin }} {{ item.value.service_init_options |default('') }}
|
||||
{% else %}
|
||||
ExecStart={{ monasca_bin }}/{{ item.value.service_name }} {{ program_config_options|default('') }}
|
||||
{% endif %}
|
||||
|
||||
# Give a reasonable amount of time for the server to start up/shut down
|
||||
TimeoutSec=120
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
|
||||
# This creates a specific slice which all services will operate from
|
||||
# The accounting options give us the ability to see resource usage through
|
||||
# the `systemd-cgtop` command.
|
||||
Slice=monasca.slice
|
||||
CPUAccounting=true
|
||||
BlockIOAccounting=true
|
||||
MemoryAccounting=false
|
||||
TasksAccounting=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,4 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
D /var/lock/{{ item.value.service_name }} 2755 {{ monasca_system_user_name }} {{ monasca_system_group_name }}
|
||||
D /var/run/{{ item.value.service_name }} 2755 {{ monasca_system_user_name }} {{ monasca_system_group_name }}
|
|
@ -1,146 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
#
|
||||
# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
metricSpoutThreads: 2
|
||||
metricSpoutTasks: 2
|
||||
|
||||
statsdConfig:
|
||||
host: 0.0.0.0
|
||||
port: 8125
|
||||
prefix: monasca.storm.
|
||||
dimensions: !!map
|
||||
service : monitoring
|
||||
component : storm
|
||||
|
||||
|
||||
metricSpoutConfig:
|
||||
kafkaConsumerConfiguration:
|
||||
# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
|
||||
topic: "metrics"
|
||||
numThreads: 1
|
||||
groupId: "thresh-metric"
|
||||
zookeeperConnect: "{{ zookeeper_hosts }}"
|
||||
consumerId: 1
|
||||
socketTimeoutMs: 30000
|
||||
socketReceiveBufferBytes : 65536
|
||||
fetchMessageMaxBytes: 1048576
|
||||
autoCommitEnable: true
|
||||
autoCommitIntervalMs: 60000
|
||||
queuedMaxMessageChunks: 10
|
||||
rebalanceMaxRetries: 4
|
||||
fetchMinBytes: 1
|
||||
fetchWaitMaxMs: 100
|
||||
rebalanceBackoffMs: 2000
|
||||
refreshLeaderBackoffMs: 200
|
||||
autoOffsetReset: largest
|
||||
consumerTimeoutMs: -1
|
||||
clientId : 1
|
||||
zookeeperSessionTimeoutMs : 60000
|
||||
zookeeperConnectionTimeoutMs : 60000
|
||||
zookeeperSyncTimeMs: 2000
|
||||
|
||||
|
||||
eventSpoutConfig:
|
||||
kafkaConsumerConfiguration:
|
||||
# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
|
||||
topic: "events"
|
||||
numThreads: 1
|
||||
groupId: "thresh-event"
|
||||
zookeeperConnect: "{{ zookeeper_hosts }}"
|
||||
consumerId: 1
|
||||
socketTimeoutMs: 30000
|
||||
socketReceiveBufferBytes : 65536
|
||||
fetchMessageMaxBytes: 1048576
|
||||
autoCommitEnable: true
|
||||
autoCommitIntervalMs: 60000
|
||||
queuedMaxMessageChunks: 10
|
||||
rebalanceMaxRetries: 4
|
||||
fetchMinBytes: 1
|
||||
fetchWaitMaxMs: 100
|
||||
rebalanceBackoffMs: 2000
|
||||
refreshLeaderBackoffMs: 200
|
||||
autoOffsetReset: largest
|
||||
consumerTimeoutMs: -1
|
||||
clientId : 1
|
||||
zookeeperSessionTimeoutMs : 60000
|
||||
zookeeperConnectionTimeoutMs : 60000
|
||||
zookeeperSyncTimeMs: 2000
|
||||
|
||||
|
||||
kafkaProducerConfig:
|
||||
# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
|
||||
topic: "alarm-state-transitions"
|
||||
metadataBrokerList: "{{ kafka_hosts }}"
|
||||
serializerClass: kafka.serializer.StringEncoder
|
||||
partitionerClass:
|
||||
requestRequiredAcks: 1
|
||||
requestTimeoutMs: 10000
|
||||
producerType: sync
|
||||
keySerializerClass:
|
||||
compressionCodec: none
|
||||
compressedTopics:
|
||||
messageSendMaxRetries: 3
|
||||
retryBackoffMs: 100
|
||||
topicMetadataRefreshIntervalMs: 600000
|
||||
queueBufferingMaxMs: 5000
|
||||
queueBufferingMaxMessages: 10000
|
||||
queueEnqueueTimeoutMs: -1
|
||||
batchNumMessages: 200
|
||||
sendBufferBytes: 102400
|
||||
clientId : Threshold_Engine
|
||||
|
||||
|
||||
sporadicMetricNamespaces:
|
||||
- foo
|
||||
|
||||
database:
|
||||
driverClass: "org.drizzle.jdbc.DrizzleDriver"
|
||||
url: "jdbc:drizzle://{{ monasca_galera_address }}:3306/{{ monasca_galera_database }}"
|
||||
user: "{{ monasca_galera_user }}"
|
||||
password: "{{ monasca_container_mysql_password }}"
|
||||
properties:
|
||||
ssl: false
|
||||
# the maximum amount of time to wait on an empty pool before throwing an exception
|
||||
maxWaitForConnection: 1s
|
||||
|
||||
# the SQL query to run when validating a connection's liveness
|
||||
validationQuery: "/* mysql Health Check */ SELECT 1"
|
||||
|
||||
# the minimum number of connections to keep open
|
||||
minSize: 8
|
||||
|
||||
# the maximum number of connections to keep open
|
||||
maxSize: 41
|
||||
|
||||
# flag indicates if Hibernate support enabled
|
||||
hibernateSupport: false
|
||||
|
||||
# hibernate provider class
|
||||
providerClass: com.zaxxer.hikari.hibernate.HikariConnectionProvider
|
||||
|
||||
# database name
|
||||
databaseName: {{ monasca_galera_database }}
|
||||
|
||||
# server name/address
|
||||
serverName: {{ monasca_galera_address }}
|
||||
|
||||
# server port number
|
||||
portNumber: 3306
|
||||
|
||||
# hibernate auto configuretion parameter
|
||||
autoConfig: validate
|
|
@ -1,26 +0,0 @@
|
|||
---
|
||||
# Copyright 2016, 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.
|
||||
|
||||
container_name: "{{ inventory_hostname }}"
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
physical_host: localhost
|
||||
properties:
|
||||
service_name: "{{ inventory_hostname }}"
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
influxdb_host: "{{ internal_lb_vip_address }}"
|
||||
influxdb_port: 8086
|
||||
|
||||
zookeeper_client_port: 2181
|
||||
zookeeper_hosts: "{% for host in groups['monasca_zookeeper'] %}{{ hostvars[host]['ansible_host'] }}:{{ zookeeper_client_port }}{% if not loop.last %},{% endif %}{% endfor %}"
|
||||
|
||||
kafka_port: 9092
|
||||
kafka_hosts: "{% for host in groups['monasca_kafka'] %}{{ hostvars[host]['ansible_host'] }}:{{ kafka_port }}{% if not loop.last %},{% endif %}{% endfor %}"
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
# Copyright 2016, 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.
|
||||
|
||||
ansible_host: 10.1.1.101
|
||||
ansible_become: True
|
||||
ansible_user: root
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
# Copyright 2016, 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.
|
||||
|
||||
ansible_host: 127.0.0.1
|
||||
bridges:
|
||||
- name: "br-mgmt"
|
||||
ip_addr: "10.1.1.1"
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
# Copyright 2016, 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.
|
||||
|
||||
ansible_host: 10.1.1.103
|
||||
ansible_become: True
|
||||
ansible_user: root
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
# Copyright 2016, 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.
|
||||
|
||||
ansible_host: 10.1.1.102
|
||||
ansible_become: True
|
||||
ansible_user: root
|
|
@ -1,72 +0,0 @@
|
|||
[all]
|
||||
localhost
|
||||
infra1
|
||||
openstack1
|
||||
monasca1
|
||||
|
||||
[all_containers]
|
||||
infra1
|
||||
openstack1
|
||||
monasca1
|
||||
|
||||
[rabbitmq_all]
|
||||
infra1
|
||||
|
||||
[galera_all]
|
||||
infra1
|
||||
|
||||
[memcached_all]
|
||||
infra1
|
||||
|
||||
[utility_all]
|
||||
infra1
|
||||
|
||||
[service_all:children]
|
||||
rabbitmq_all
|
||||
galera_all
|
||||
memcached_all
|
||||
|
||||
[keystone_all]
|
||||
openstack1
|
||||
|
||||
[monasca_api]
|
||||
monasca1
|
||||
|
||||
[monasca_persister]
|
||||
monasca1
|
||||
|
||||
[monasca_thresh]
|
||||
monasca1
|
||||
|
||||
[monasca_notification]
|
||||
monasca1
|
||||
|
||||
[monasca_agent]
|
||||
monasca1
|
||||
|
||||
[monasca_zookeeper]
|
||||
monasca1
|
||||
|
||||
[monasca_kafka]
|
||||
monasca1
|
||||
|
||||
[monasca_storm]
|
||||
monasca1
|
||||
|
||||
[monasca_influxdb]
|
||||
monasca1
|
||||
|
||||
[monasca_grafana]
|
||||
monasca1
|
||||
|
||||
[monasca_all:children]
|
||||
monasca_api
|
||||
monasca_persister
|
||||
monasca_thresh
|
||||
monasca_notification
|
||||
monasca_agent
|
||||
monasca_zookeeper
|
||||
monasca_kafka
|
||||
monasca_storm
|
||||
monasca_influxdb
|
||||
monasca_grafana
|
|
@ -1,55 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
# Monasca vars
|
||||
test_monasca_group: "{{ ((groups['monasca_all'] is defined) and (groups['monasca_all'] | length > 0)) | ternary('monasca_all', 'all_containers') }}"
|
||||
test_monasca_host: "{{ hostvars[groups[test_monasca_group][0]]['ansible_host'] }}"
|
||||
monasca_venv_tag: "testing"
|
||||
monasca_developer_mode: true
|
||||
monasca_service_password: "secrete"
|
||||
monasca_galera_address: "{{ test_galera_host }}"
|
||||
monasca_service_port: 8070
|
||||
monasca_service_publicuri: "http://{{ test_monasca_host }}:{{ monasca_service_port }}"
|
||||
monasca_service_publicurl: "{{ monasca_service_publicuri }}/v2.0"
|
||||
monasca_service_internaluri: "http://{{ test_monasca_host }}:{{ monasca_service_port }}"
|
||||
monasca_service_internalurl: "{{ monasca_service_internaluri }}/v2.0"
|
||||
monasca_service_adminuri: "http://{{ test_monasca_host }}:{{ monasca_service_port }}"
|
||||
monasca_service_adminurl: "{{ monasca_service_adminuri }}/v2.0"
|
||||
monasca_container_mysql_password: "SuperSecrete"
|
||||
monasca_bin: "/openstack/venvs/monasca-{{ monasca_venv_tag }}/bin"
|
||||
|
||||
grafana_mysql_host: "{{ monasca_galera_address }}"
|
||||
grafana_admin_password: "secrete"
|
||||
grafana_galera_password: "secrete"
|
||||
monasca_influxdb_admin_password: "secrete"
|
||||
monasca_api_influxdb_password: "secrete"
|
||||
monasca_persister_influxdb_password: "secrete"
|
||||
monasca_agent_password: "secrete"
|
||||
monasca_agent_roles:
|
||||
- monasca-agent
|
||||
- anotherrole
|
||||
|
||||
tempest_run: yes
|
||||
|
||||
tempest_plugins:
|
||||
- name: monasca-tempest-plugins
|
||||
repo: https://git.openstack.org/openstack/monasca-tempest-plugin
|
||||
branch: master
|
||||
|
||||
tempest_test_whitelist:
|
||||
- monasca_tempest_tests.tests.api.*
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
- import_playbook: "{{ playbook_dir }}/../examples/monasca-dependencies.yml"
|
||||
|
||||
- name: Install monasca server
|
||||
hosts: monasca_all
|
||||
remote_user: root
|
||||
gather_facts: true
|
||||
roles:
|
||||
- role: "os_monasca"
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
|
||||
# Setup the host
|
||||
- import_playbook: common/test-setup-host.yml
|
||||
|
||||
# Install RabbitMQ/MariaDB
|
||||
- import_playbook: common/test-install-infra.yml
|
||||
|
||||
# Install keystone
|
||||
- import_playbook: common/test-install-keystone.yml
|
||||
|
||||
# Install monasca
|
||||
- import_playbook: test-install-monasca.yml
|
||||
|
||||
# Install tempest
|
||||
- import_playbook: common/test-install-tempest.yml
|
|
@ -1,31 +0,0 @@
|
|||
---
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Note (kaiokmo):
|
||||
# Maven is needed by monasca to build and run. This external repo includes maven,
|
||||
# since it's not included by default in any openSUSE repos.
|
||||
# Refer to https://software.opensuse.org/package/maven
|
||||
monasca_external_repo:
|
||||
- name: "devel-tools-building"
|
||||
uri: "{{ monasca_opensuse_mirror_url }}/repositories/devel:/tools:/building/openSUSE_Leap_{{ ansible_distribution_version }}/"
|
||||
|
||||
monasca_distro_packages:
|
||||
- git-core
|
||||
- mailx
|
||||
- maven
|
||||
- python-devel
|
||||
- python-MySQL-python
|
||||
- python-pip
|
||||
|
||||
monasca_distro_patterns:
|
||||
- devel_basis
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||
#
|
||||
|
||||
## APT Cache options
|
||||
cache_timeout: 600
|
||||
|
||||
## Common apt packages
|
||||
monasca_distro_packages:
|
||||
- build-essential
|
||||
- git
|
||||
- mailutils
|
||||
- maven
|
||||
- openjdk-8-jdk
|
||||
- python-software-properties
|
||||
- python-dev
|
||||
- python-mysqldb
|
|
@ -1,20 +0,0 @@
|
|||
# Copyright 2017, 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:
|
||||
templates:
|
||||
- check-requirements
|
||||
- openstack-ansible-linters
|
||||
- publish-openstack-docs-pti
|
||||
- release-notes-jobs-python3
|
Loading…
Reference in New Issue