This commit registers all policies formally kept in policy.json as
defaults in code. This is an effort to make policy management easier
for operators. More information on this initiative can be found
below:
https://governance.openstack.org/tc/goals/queens/policy-in-code.html
bp policy-and-docs-in-code
Change-Id: Ibab08f8e1c95b86e08737c67a39c293566dbabc7
This patch adds support to run watcher-api
with mod-wsgi. It provides
1. wsgi app script files, to run watcher-api under apache.
2. updated devstack plugin to run watcher-api default with
mod-wsgi.
3. Document to deploy watcher-api behind wsgi.
Change-Id: I8f1026f0b09fd774376220c2d117ee66f72421b8
Closes-Bug: #1675376
This patch set adds supervisor mechanism for Watcher services
to get ability to track states.
Partially-Implements: blueprint watcher-service-list
Change-Id: Iab1cefb971c79ed27b22b6a5d1bed8698e35f9a4
A Scoring Module needs to expose a list of available
scoring engines through API and Watcher CLI. This list
is stored in database and synchronized by Decision Engine.
Partially-Implements: blueprint scoring-module
Change-Id: I32168adeaf34fd12a731204c5b58fe68434ad087
APIImpact
In this changeset, I added the missing entries for the configuration
sample file generation:
- oslo.reports
- oslo.cache
- oslo.concurrency
- oslo.policy
- oslo.service.periodic_task
- oslo.service.service
- oslo.service.wsgi
Change-Id: I826f5cc1185d75f545c96242022a07089cf3042e
Watcher sample configuration file groups parameters from
various projects and the watcher project ones. This makes it
tricky to review updates on configuration parameters.
It is inconvenient for developer if the add/remove/change some
configuration options cause they need to take care about the
config.sample file.
The sample configuration file should be available into HTML doc.
This patchset:
. removes the file /etc/watcher/watcher.conf.sample
. adds an admin script tool to be able to built it, by using tox
. includes a new section 'Watcher sample configuration files' into
the doc source files
. uses sphinx extension oslo_config.sphinxgenconfig
Change-Id: If2180de3614663f9cbc5396961a8d2175e28e315
Closes-Bug: #1541734
In order to accept the requirements contract defined in
openstack/requirements, we need to sync with the master branch of that
project's global-requirements.txt and test-requirements.txt files.
Most of the changes are just version changes and nothing major. The
only major change is:
1) The twine dependency is removed, and therefore the pypi tox
environment was also removed.
Change-Id: Idbe9e73ddc5a34ac49aa6f6eff0779d46a75f583
Closes-Bug: #1533282
The OpenStackClients class provides a convenient way to create and
cache client instances. The idea behind this code comes from Magnum
[0].
The OpenStackClients class will act as the manager of other project's
clients, providing an easy way to fetch instances of said clients. This
will allow the clients to be cached.
An instance of OpenStackClients is created for every call that comes
into the decision engine and the applier, using the request context to
pass needed (domain id) parameters to get a Keystone session. This
instance should be shared as much as possible to avoid additional
unneccessary connections to the other services.
This class will also allow for the version of each client to be
configurable via the watcher.conf file.
The method by which a Keystone session is also changed to use the
keystoneauth1.loading library. In order to avoid DuplicateOptErrors
with the keystone_authtoken group used for the keystonemiddleware in the
API code, a new conf group named "watcher_clients_auth" is created. A
typical configuration using a password authentication scheme will look
like:
[watcher_clients_auth]
auth_type = password
auth_url = http://<server-ip>:<port>
username = <username>
password = <password>
project_domain_id = default
user_domain_id = default
[0]: https://github.com/openstack/magnum/blob/master/magnum/common/clients.py
DocImpact
Change-Id: Iab9d0b304099686da2e9e2b19e8b1de4332ff378
Implements: blueprint external-api-versioning
Closes-Bug: #1530790
Closes-Bug: #1539670
Closes-Bug: #1522774
The aim of this patchset is to integrate taskflow in
the Watcher Applier. Taskflow will help us a lot to make
Action Plan execution easy, consistent, scalable and reliable.
DocImpact
Partially implements: blueprint use-taskflow
Change-Id: I903d6509d74a61ad64e1506b8a7156e6e91abcfb
Closes-Bug: #1535326
Closes-Bug: #1531912
In watcher, an audit generates a set of actions which
aims at achieving a given goal (lower energy consumption, ...).
It is possible to configure different strategies in order to achieve
each goal. Each strategy is written as a Python class which produces
a set of actions. Today, the set of possible actions is fixed for a
given version of Watcher and enables optimization algorithms to
include actions such as instance migration, changing hypervisor state,
changing power state (ACPI level, ...).
The objective of this patchset is to give the ability to extend the
default set of planner algorithms currently available in Watcher
using Stevedore.
The doc need to explain how create a new planner.
DocImpact
Partially implements: blueprint watcher-add-actions-via-conf
Change-Id: I2fd73f8c4a457ee391d764a7a3f494deecd2634f
This patchset aim to remove useless code in StrategyContext
and AuditEndPoint.
This patchset also add a parameter for strategy context to define the
numbers of thread of execute the strategies.
DocImpact
Change-Id: I83e87165b03b42fe6b863921502a300bd94d2982
Although the refactoring of the applier got merged we have an issue
to generate the config. This pathset fix that
Change-Id: Iafce7d0136b2ad813102c3e3caeebafa215363c8
Closes-Bug: 1526851
The old 'watcher_messaging' section of the Watcher configuration file
has now been replaced by the more standard oslo.configuration one.
DocImpact
Change-Id: Ie027df023e6133f3188e57b42846083f28c282bd
This should make our 'dummy' strategy available for use.
I also removed all previously defined default goals, which means
that they will have to define it themselves from now on.
This can also be useful for future integration tests.
Change-Id: I6c43eba941022a88851a199b56a6c20f017b9e71
DocImpact
Closes-Bug: #1520178
Following the update of the project requirements, we should now
use the oslo.config namespace of oslo.log when generating ou
Watcher config sample file.
Change-Id: I7a1f3d555534b40c041b7f042f19fae231b7e80c
Closes-Bug: #1518297
In current implementation is not easy to use ceilometer.
Watcher must query metrics from the Telemetry v2 API to allow an easiest integration with OpenStack components (especially devstack).
blueprint telemetry-integration
Change-Id: Ide515472f1d160925d9f4aabf48c96dea4f6bc05