Commit Graph

50 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov c6b7df85a8 Add quorum support for service
This change implements and enables by default quorum support
for rabbitmq as well as providing default variables to globally tune
it's behaviour.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I02d380104ffc9507fdbf660db2627b0b1930f9ec
2023-10-20 11:54:38 +00:00
Dmitriy Rabotyagov 3e94523ec7 Support service tokens
Implement support for service_tokens. For that we convert
role_name to be a list along with renaming corresponding variable.

Additionally service_type is defined now for keystone_authtoken which
enables to validate tokens with restricted access rules

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_gnocchi/+/846347
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/845690
Change-Id: I883d84859811714362c5b58f33dfae808317bfdc
2022-06-17 13:40:57 +00:00
Damian Dabrowski b6307058ec Database connection pooling improvements
- Implemented new variable ``connection_recycle_time`` responsible for SQLAlchemy's connection recycling
- Set new default values for db pooling variables which are inherited from the global ones.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819424
Change-Id: Id7b0c26409a0d1b33a679201655a4dd08bacc57a
2021-12-03 11:50:01 +01:00
Zuul f37a734ebb Merge "Add variables for rabbitmq ssl configuration" 2021-05-18 17:10:23 +00:00
Jonathan Rosser 9337c335c0 Add variables for rabbitmq ssl configuration
Change-Id: I88124396aba6d2b2432df7ca5c1a6e2d187b0fbd
2021-05-17 07:54:33 +00:00
Dmitriy Rabotyagov 705b782589 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to replace policy.json to
policy.yaml and remove deprecated policy.json.

We make a separate task not to restart service when it's not needed.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_gnocchi/+/781513
Change-Id: Ifd1190981a2c50b54efa129f60b0d4a0f448bb60
2021-05-05 19:15:53 +00:00
Dmitriy Rabotyagov cf5a896fa7 Refactor memcached_servers
This patch aims to add a prefix for memcached_server
on each role to give the ability for deployers to
override the location of memcached cluster. I.e users
wants to create a single memcached cluster with k8s
for each service.

We also add pymemcache based on [1]

[1] https://review.opendev.org/711429

Change-Id: I2d0b500f002e457abcb1d5fe96bf554f96e5700e
2020-03-25 18:38:09 +02:00
Dmitriy Rabotyagov 91b2196646 Migrate aodh to use uWSGI role
This patch moves aodh-api from usage of apache with mod_wsgi
to uWSGI role, which means unification across another roles and
reduced maintenance costs

During migration period tasks that ensures apache won't listen
on panko_service_port are present, but they are supposed to be removed
after train release.

Depends-On: https://review.opendev.org/678025/
Change-Id: I9377d46b4b79f79dbf448b23c67ff21b80714b6c
2019-09-04 15:36:21 +03:00
Kevin Carter a99723f335
Add systemd journal logging to the service config
The systemd journal would normally be populated with the standard out of
a service however with the use of uwsgi this is not actually happening
resulting in us only capturing the logs from the uwsgi process instead
of the service itself. This change implements journal logging in the
service config, which is part of OSLO logging.

OSLO logging docs found here: <https://docs.openstack.org/oslo.log/3.28.1/journal.html>

Change-Id: I7bd5419e7f02593a16614746a974b5f8ab3aa504
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-31 14:44:42 -05:00
Andrew Smith 1f4a1e71a1 Update to use oslo.messaging services for RPC and Notify
This introduces oslo.messaging variables that define the RPC and
Notify transports for the OpenStack services. These parameters
replace the rabbitmq values and are used to generate the messaging
transport_url for the service. The association of the messaging
backend server to the oslo.messaging services will then be
transparent to the aodh service.

This patch:
* Add oslo.messaging variables for RPC and Notify to defaults
* Update transport_url generation (add for notifications)
* Add oslo.messaging to tests inventory
* Update tests
* Add release note
* Update README and example

Depends-On: If4326a6848d2d32af284fdbb94798eb0b03734d5
Depends-On: I2b09145b60116c029fc85477399c24f94974b61d
Change-Id: I356e7256f5e8090f35dce8a02fd633638fd659fa
2018-06-04 14:26:05 -04:00
Markos Chandras 7070497565 Add support for using distribution packages for OpenStack services
Distributions provide packages for the OpenStack services so we add
support for using these instead of the pip ones.

Change-Id: If6daa1bb784df46e83bbc118981240eb59a1409d
Implements: blueprint openstack-distribution-packages
2018-05-15 08:28:18 +01:00
ZhongShengping 2d37d17c09 Deprecate auth_uri option
Option auth_uri from group keystone_authtoken is deprecated[1].
Use option www_authenticate_uri from group keystone_authtoken.

[1]https://review.openstack.org/#/c/508522/

Change-Id: Ie37fb7df4837c53427975b1bb69769e6b87a1c20
Implements: blueprint deprecate-auth-uri-option
2018-04-03 14:17:11 +08:00
Kevin Carter b44d7ba5bf Convert role to use a common systemd service role
This removes the systemd service templates and tasks from this role and
leverages a common systemd service role instead. This change removes a
lot of code duplication across all roles all without sacrificing features
or functionality. The intention of this change is to ensure uniformity and
reduce the maintenance burden on the community when sweeping changes are
needed.

Change-Id: I47287ce0deb45538894bd99e57c291c3ae7fa084
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-29 10:33:40 +00:00
Andy McCrae 8dbed05af4 Standardize services list and package installation
This patch standardizes the package installation to pass a list rather
than "with_items".

Additionally, we can utilize a filtered_services list to ensure we only
attempt tasks against the relevant hosts rather than running through
tasks that would be skipped.

Change-Id: I2c5ad3c2773b890bf6689b8ff87871a4af2021a8
2018-02-20 20:04:17 +00:00
bhujay 8faad8cc58 Switch auth config to keystone v3
previous configuration was v2 api.
that no longer works.This patch will fix it.

Closes-Bug:#1724462

Change-Id: Ib9966a9a6875e2a8417342b387c573a7ec37942d
2017-10-18 03:53:25 -07:00
Markos Chandras 72d8f43e0a templates: aodh-httpd: Ensure proper user control in aodh root
We need to ensure that /var/www/cgi-bin/ has proper user control since
different distributions place cgi-bin in different directories and as
such the default ones may not apply for aodh. For example, openSUSE
places it in /srv/www/cgi-bin and as such accessing the aodh resources
results to 403 HTTP errors.

Change-Id: Ia3889d0e4e0220b481fa94c8b0b151b6d727e1b1
2017-07-10 22:42:10 +01:00
ZhongShengping c5766beb2b deprecate rabbit_use_ssl option
Option "rabbit_use_ssl" from group "oslo_messaging_rabbit" is deprecated.
Use option "ssl" from group "oslo_messaging_rabbit".

Change-Id: I8da2c349ec50584a05448bad8856b7a9ccc44014
Implements: blueprint deprecate-rabbit-use-ssl
2017-05-23 10:08:03 +08:00
Jesse Pretorius 8a07de2e68 Reduce init restart/kill times
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 *_init_config_overrides
variables which use the config_template task to change template
defaults.

Change-Id: I4faf2732affc47cac39a2c499f7c2ee207ec62aa
2017-04-26 13:02:49 +00:00
Kevin Carter 9dcacb8fd6 Ensure the components are isolated from the system
This creates a specific slice which all OpenStack services will operate
from. By creating an independent slice these components will be governed
away from the system slice allowing us to better optimise resource
consumption.

See the following for more information on slices:

* https://www.freedesktop.org/software/systemd/man/systemd.slice.html

See for following for more information on resource controls:

* https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html

Tools like ``systemd-cgtop`` and ``systemd-cgls`` will now give us
insight into specific processes, process groups, and resouce consumption
in ways that we've not had access to before. To enable some of this reporting
the accounting options have been added to the [Service] section of the unit
file.

Change-Id: I2b5c6189a6eabbdb7854dcee97edf47ef03f8757
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-28 23:41:28 -05:00
ZhongShengping 393cfa9ad5 Deprecate auth_plugin option
Option "auth_plugin" is deprecated, use option "auth_type" instead.

Change-Id: I064af1954ec621cfa3103ce7d7692860c08fdb42
Implements: blueprint deprecate-auth-plugin
2017-03-22 10:54:10 +08:00
Andy McCrae 2974155dba Update paste, policy and rootwrap configurations 2017-01-19
Change-Id: I2baefd376da0e42e5e5427fe0f11151ddae2de37
2017-01-19 14:40:22 +00:00
ZhongShengping d1cea2d4e9 Remove pki support
Change-Id: Ib5fc27da9f047c38d0aa6709fb716ebcf3506d98
Implements: blueprint remove-pki
2016-12-29 09:04:10 +08:00
Andy McCrae 857b45ea97 Remove Trusty support from os_aodh role
Change-Id: Ia96cc93af5536ec5eb1810c020af769189ea63c4
Implements: blueprint trusty-removal
2016-12-15 13:15:24 +00:00
Marc Gariepy c57b7ae0f1 Fix tmpfiles.d when multiple service are running
This fix tmpfile when multiple services runs in the same host with systemd.

Change-Id: Ia81011f2a7099162b181003fd4521003c40bb317
2016-11-04 14:58:15 -04:00
Jesse Pretorius 9de1eaef01 Update paste, policy and rootwrap configurations 2016-10-12
Change-Id: Id40e5e5c073e37ca78abd31b6dc05248760cf15d
2016-10-12 17:14:34 +01:00
Jesse Pretorius 3b13d93a8b Use dictionary for service group mappings
Change the 'aodh_service_names' from a list to a dictionary mapping
of services, groups that install those services. This brings the
method into line with that used in the os_neutron role in order to
implement a more standardised method.

The init tasks have been updated to run once and loop through this
mapping rather than being included multiple times and re-run against
each host. This may potentially reduce role run times.

Currently the reload of upstart/systemd scripts may not happen if
only one script changes as the task uses a loop with only one result
register. This patch implements handlers to reload upstart/systemd
scripts to ensure that this happens when any one of the scripts
change.

The handler to reload the services now only tries to restart the
service if the host is in the group for the service according to the
service group mapping. This allows us to ensure that handler
failures are no longer ignored and that no execution time is wasted
trying to restart services which do not exist on the host.

Finally:
- Common variables shared by each service's template files have
  been updated to use the service namespaced variables.
- Unused handlers have been removed.
- Unused variables have been removed.

Change-Id: I729ae43faba2ebb04d8fda85c3f51b2136853ef9
2016-09-28 15:27:55 +00:00
Kevin Carter b54031a43c Disable stderr logging
OSLO logging currently defaults the 'use_stderr' option to True
which results duplicate logs in service daemon logs for both
upstart and systemd. To correct this issue the use_stderr
option has been set to false.

Change-Id: I24995cfe7359345468f86d00e1c188f78508a4e2
Closes-Bug: 1588051
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-04 17:41:07 +00:00
Travis Truman 212ced7509 Fix runlevel typo in upstart template
Change-Id: I2438bd376d592a525571c8f124ddc6fca45015c5
2016-08-02 13:43:56 -04:00
Travis Truman 87cde1d9ed Fix bug in RPC config that broke Rabbit SSL support
The use_rabbit_ssl query parameter is not respected by
oslo.messaging's rabbit driver, only the pika driver
supports configuration using query parameters at present.

Change-Id: Ib23c8829468bbb4ddae67e08a092240f54a6c729
Implements: blueprint multi-rabbitmq-clusters
2016-07-29 15:20:23 -04:00
Jenkins 3b127dad09 Merge "Define keystone region name." 2016-07-26 19:21:38 +00:00
Travis Truman 267081c6b5 Update aodh.conf template to account for deprecations
Addresses the following deprecation warnings:

 * Option "rpc_backend" from group "DEFAULT" is deprecated for removal

 * Option "os_endpoint_type" from group "service_credentials" is deprecated.
   Use option "interface" from group "service_credentials".

 * Option "os_region_name" from group "service_credentials" is deprecated.
   Use option "region-name" from group "service_credentials".

Change-Id: I772209ed71bacd45e89e8bab623207e9db22e6e8
2016-07-23 15:42:52 +00:00
Jimmy McCrory ac2ee2983d Re-add oslo_messaging_rabbit configuration
Update the configured transport_urls to only include a comma
between urls and re-add rabbit configuration information to the
oslo_messaging_rabbit block.

Change-Id: Ie0765e04e3d4d6d89d5d32c1b2a3b5ed28539c57
2016-07-22 15:50:56 -07:00
Tim Laszlo 442fcb0645 Define keystone region name.
If multiple regions exist, keystone_authtoken should contain region_name.
This prevents the service from authenticating across regions.

Change-Id: I35771c73954fb8962bbcc7ae8963900b68ea5e5c
2016-07-22 10:26:03 +00:00
Travis Truman e25e51169a Support service-specific rabbitmq clusters
All rabbitmq connection vars are now namespaced. Namespace support
was previously inconsistent which limited deployer override options.

Deprecated configuration using oslo_messaging_rabbit has been replaced
with transport_url based configuration

Change-Id: Ic1eb3bb6346ebdaa0d3bc19a879946c527239dfb
Implements: blueprint multi-rabbitmq-clusters
2016-07-21 20:37:07 +00:00
Travis Truman dd4a64226e Serve the aodh-api using mod_wsgi
aodh upstream change Iefd6f4d9f76c69ed9b49483e1feda0b7dbe2cb81
moves from Werkzeug to WSGI so we should follow suit

Without this change, the aodh-api service fails to start at all.

Apache vhost config based on https://github.com/openstack/aodh/blob/master/etc/apache2/aodh

Change-Id: I2fb1eb984949a4457ae313cffec872a0bb425eab
2016-07-19 09:16:44 -04:00
Travis Truman 30da818256 Only install to virtual environment
Remove all tasks and variables related to toggling between installation
of aodh inside or outside of a Python virtual environment.
Installing within a venv is now the only supported deployment.

Additionally, a few changes have been made to make the creation of the
venv more resistant to interruptions during a run of the role.
* unarchiving a pre-built venv will now also occur when the venv
  directory is created, not only after being downloaded
* virtualenv-tools is run against both pre-built and non pre-built venvs
  to account for interruptions during or prior to unarchiving

Change-Id: Icf788b07738bf03708c05929bb82c7b51605ccca
Implements: blueprint only-install-venvs
2016-07-07 11:28:55 -04:00
Steve Lewis be906077f9 Implement Ubuntu 16.04 support with SystemD
This change updates the aodh role to support Ubuntu 14.04 with
upstart init and 16.04 with a systemd init.

Some tags for tasks are updated to conform to convention as well.

Change-Id: Ice81e049475b31559c861c0d20bcd26867da321c
Implements: blueprint support-ubuntu-1604
2016-06-18 12:18:03 +00:00
Travis Truman c3a216ca81 Verbose option has been deprecated from oslo.log
See http://lists.openstack.org/pipermail/openstack-dev/2016-May/095166.html
for additional details.

Change-Id: I139226289a8209ecaba1036b84c7690516aa3a80
2016-05-17 11:05:19 -04:00
Jesse Pretorius ada59eb488 Update role for stable/mitaka testing
This updates the repository SHA's to use stable/mitaka where
available and updated SHA's where not.

It also updates all paste, policy and rootwrap configurations
to match the current contents found in stable/mitaka.

Change-Id: If8ad940eb23a08b5c29bed7e15d792c529d55189
2016-03-23 21:48:24 +00:00
Jenkins 1f545a9aeb Merge "Revert "Account for oslo_config deprecations in aodh.conf template"" 2016-03-10 14:57:53 +00:00
Hugh Saunders 0b23a1c3b8 Revert "Account for oslo_config deprecations in aodh.conf template"
user-name is not valid

This reverts commit 2c850708ef.

Change-Id: I6224bb8495da7a7a5bf10a7ea90ac47aebb8d861
2016-03-10 13:59:23 +00:00
Jenkins 552e861d87 Merge "Account for oslo_config deprecations in aodh.conf template" 2016-03-09 20:18:52 +00:00
Travis Truman 2c850708ef Account for oslo_config deprecations in aodh.conf template
Specific changes are based on the aodh-api log noting:
 * Option "auth_plugin" from group "keystone_authtoken" is deprecated. Use
   option "auth_type" from group "keystone_authtoken".
 * Option "username" from group "keystone_authtoken" is deprecated. Use option
   "user-name" from group "keystone_authtoken".

Change-Id: I295ed77d88daa1b4844eb8efde628fecdad94c03
2016-03-09 14:34:34 -05:00
Bjoern Teipel 935029bb63 Fix auth_url for aodh configuration
This fix configures the auth_url parameter to use keystone_service_adminurl
over the existing keystone_service_adminuri parameter which actually leads
to a incomplete URL lacking the API version like /v3/tokens

Change-Id: If40962423f72259b8d7a6203890d6923be02c273
Related-Bug: #1552394
2016-03-04 13:17:29 -06:00
Kevin Carter a4fe3d0496 Update Master SHAs - 17 Jan 2016
This patch does the following:
- updates the Master SHAs for new development work.
- includes updates to policy, paste and rootwrap files as required
- moves the Aodh repository to openstack_services as it now has
  implemented a stable branch
- Updated the keystone-wsgi file as it was still running the code from
  liberty
- add 2 package requirements to keystone which must be present for the
  new wsgi file.
- updates tempest.conf.j2 to replace ssh_auth_method with auth_method,
  and change auth_method to 'keypair' (configured is no longer an
  a valid option)

Change-Id: I933c24c03518865d9d40519dafb2ba46769a5453
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-01-18 23:58:48 +00:00
You Wei Wang df6ab969b3 Trivial: Remove vim header from source files
Change-Id: I68a7d910d45ef5bbbc8b59d9bc363fa68c6a8663
2016-01-14 10:52:17 +00:00
Jesse Pretorius fd4532ba40 Include extra conf file updates when updating SHA's
This patch updates the sources-branch-updater convenience script to
make it also check for additional updates relating to policy.json,
paste.ini, rootwrap.conf, rootwrap filters, etc.

This ensures that the SHA updates are more complete and the updates
require less effort to do.

In addition to the script update there are some changes to other
file names and locations in order to facilitate the file's ability
to do everything correctly. The changes enforce a specific convention
for the names and locations of files it manages.

Change-Id: I99899e61e0527639abc8b3bae0296a891607a31d
2016-01-08 15:25:26 +00:00
Major Hayden 54af3a2a59 Enable encryption for all RabbitMQ connections
This change enables encryption between OpenStack services and RabbitMQ by
default.

Closes-bug: 1509086

Change-Id: Ic95a556e001f66df935ea7db613b497b47062851
2015-10-27 14:42:59 +00:00
Kevin Carter 8cce711990 Implement aodh venv support
This commit conditionally allows the os_aodh role to
install build and deploy within a venv. This is the new
default behavior of the role however the functionality
can be disabled.

Change-Id: I9f9e09b2a68e843da1d92a782cd29fc563379a6d
Implements: blueprint enable-venv-support-within-the-roles
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-10-15 08:22:53 -05:00
Miguel Alex Cantu 639c11f38b Seperated out Telemetry Alarming (Aodh)
The alarming function of Telemetry has been seperated out
by design. This patchset creates new containers for these
alarming services and deploys them accordingly.

See:
http://lists.openstack.org/pipermail/openstack-dev/2015-September/073897.html

DocImpact
UpgradeImpact
Implements: blueprint liberty-release
Change-Id: I25294a25afa76d4d8bddad0a51c48485f33a6d20
2015-10-15 11:20:53 +01:00