Commit Graph

29 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 bf019ab6d7 Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/888517
Change-Id: I53c0166beb446802641c701f6e43d5e317f9d54a
2023-08-23 09:31:20 +02:00
Dmitriy Rabotyagov ec2caff080 Ensure service is restarted on unit file changes
At the moment we don't restart services if systemd unit file is changed.

We knowingly prevent systemd_service role handlers to execute
by providing `state: started` as otherwise service will be restarted twice.
With that now  we ensure that role handlers will also listen for systemd
unit changes.

Change-Id: Ic56d5d1bd1ead8fd6bb642913370fa206799256f
2023-04-10 15:29:52 +02:00
Matthew Thode c87f251c5a Install git into aodh containers
If venv_wheel_build_enabled is default to False, aodh will fail to clone
and install repositories due to missing git binary.

Related-bug: #1995535

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_ceilometer/+/864962
Signed-off-by: Matthew Thode <mthode@mthode.org>
Change-Id: Ied5a4defa1351dced468a7215e5c84fe30a58c24
2022-11-24 17:23:05 +00:00
Jonathan Rosser 2e3e39ab6b Remove legacy apache variables
Change-Id: I3f63f7b01dfa99a90d69534dd2fea90bc2b1b422
2022-02-02 04:04:34 -05:00
Jonathan Rosser 0ffeff0ec1 Ensure libxml2 is installed on debian systems
Closes-Bug: 1958434
Change-Id: I8ad644ed723e05058be92e5f67a4d7b7542a7071
2022-01-25 10:23:57 -05:00
Jonathan Rosser c25a19af45 Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Depends-On: Ia88b8e606a19ad8ee20665e125df1079b0a771ff
Change-Id: I88c4317a711ec9c8e00b13a2f4deede1e53830b1
2021-03-11 14:37:27 +00:00
Dmitriy Rabotyagov 9d6c68acdd Define condition for the first play host one time
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.

Change-Id: Ia57c07c583be6e3fb9582b1d4a2da0deb4854154
2020-09-15 15:58:37 +00:00
Dmitriy Rabotyagov 70e6c6d3ec Revert CentOS 8 jobs to voting
This also fix ubuntu focal distro installation

Change-Id: Id178a814f0c54dc4d0a9041da0c191fbfa89b4ae
2020-07-29 13:29:45 +03:00
root daf883d317 Add centos-8 support
Change-Id: Ie16ad8e0cac74fe2d92663bc9ddb8d04c21c2878
2020-07-22 13:16:28 -04: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
Dmitriy Rabotyagov 480d74bb71 Convert dynamic includes to static imports
When task/role files are included using include_tasks, tags are not
passed to the included tasks. As a result, tags like neutron-config
do not have the intended effect. This patch changes include_tasks
to import_tasks for all cases where dynamic vars or loops are not used
so that tags are properly handled.

Reference -
https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse.html
https://bugs.launchpad.net/openstack-ansible/+bug/1815043

Change-Id: I2492ed205a94541160e72a9cb3631e0b255d5b53
2019-07-16 21:36:56 +03:00
Jimmy McCrory 297b4e4ecd Fix distro installs on Ubuntu
Beginning in the Stein release, Ubuntu distro packages are now using
Python3.

Install the 'python3-aodh' package instead of individual service
packages since they provide service config files that conflict
with the ones OSA provides.

Change-Id: I708dfd69dbb68240fc1205893fe8c4870476da60
2019-06-10 10:53:33 -07:00
Jesse Pretorius d2dfb8cdbd Remove unnecessary package install duplication
Currently the devel packages are installed everywhere,
but they only need to be where the wheels are built.

Also, there is already a task to install the packages
needed on the target hosts when installing - so we do
not need to give the same list to the venv install role
because they will already have been installed.

Change-Id: I59394c17c8a5475cc41b583268e45df1da561e7d
2018-10-30 19:16:06 +00:00
Jesse Pretorius 1468e266d2 Rename SUSE vars file to cater for any version
To make the transition between versions easier,
we rename the vars file. This also resolves
issues when meta-dependent role inclusions do
not pick up the correct file when using the
include_vars task with multiple search paths.

Depends-On: https://review.openstack.org/602924
Depends-On: https://review.openstack.org/602921
Change-Id: I7df36022bbfb8dc887b325f278de01d3b32a94fb
2018-09-16 03:07:41 +00:00
Andy Smith 8bbd59833d Add install packages for optional oslo.messaging amqp1 driver
Change-Id: I95ea3178e300acd956830bd62c7bec5421dccab4
2018-09-11 10:04:08 -04: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
Markos Chandras 4743c0c79a vars: Do not pull devel packages on distro installations
The devel packages are only needed to build the pip pacakges so we don't
need them when we install packages straight from the distro repos.

Change-Id: Ie598d5c4e9319867793ac34ef62f5d7c11d082fd
Implements: blueprint openstack-distribution-packages
2018-06-04 08:45:14 +01: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
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
Markos Chandras be3b221366 Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. Additionally,
for openSUSE, we need to load some extra apache2 modules which are
not there by default.

Change-Id: Ic6200e17b5e5b39c06166aae37bab4d31f2df817
2017-07-10 22:42:17 +01:00
Marc Gariepy 2894dad70f Add which in CentOS package list
which is needed by virtualenv-tools.

Change-Id: Ic3146bdff329b94fb514fa59f1358c1e521ea4de
2017-01-11 13:57:39 -05:00
Marc Gariepy 9dc5cfa004 Add CentOS support for os_aodh role
Change-Id: Ifd79bde9aca936e59f901f9a5ecc6c1d38979408
2016-12-06 08:54:51 -05:00
Jesse Pretorius 52b7dd42e8 Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: I0f6e177d080da10ba3e992f1c2f1e5cd7a4262ff
2016-08-30 16:32:36 +01:00
Steve Lewis 54919fe3e3 Update required system packages for Xenial
These system packages are required for service operation with Xenial.

Change-Id: I7136f6274a77ab83230066a69cf20c7056a490f3
2016-08-11 15:20:44 -05:00
Travis Truman d5eeadc454 Test aodh role using the aodh tempest plugin
Adding tempest testing for better test coverage
of the role.

Change-Id: I66e075a9191ea2d173b213522cfa0dd042cc4036
2016-07-28 14:13:36 -04:00
Jesse Pretorius 50b72243bd Ensure that Apache is installed
In order to use Apache, it must be installed. Somehow this got
missed in https://review.openstack.org/343918 - not sure how
it passed the tests either, but the Aodh role will not install
in the integrated build without this patch.

Change-Id: I197b3c842e1a828fd675bf42cfc14a8640529430
2016-07-22 11:35:38 +00: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
Kevin Carter ca5020c34f
Updated role using the Multi-Distro framework
* The default apt packages have been moved into a var file
  that is only loaded when the detected OS is matched.
* The Install task file has had the apt specific tasks moved
  into a named install task file.

Change-Id: I9bad054a3898a688bd372f91de468ad7d5fa41ec
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-04-11 17:15:59 -05:00