Commit Graph

19 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 3f7085e58a Add quorum queues 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.

In order to ensure upgrade path and ability to switch back to HA queues
we change vhost names with removing leading `/`, as enabling quorum
requires to remove exchange which is tricky thing to do with running
services.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I947be8d94b3263ed69311667af693a481765b1c4
2023-10-25 10:25:16 +00:00
Dmitriy Rabotyagov 1c49c7d2c8 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
Change-Id: I30eff91392dcab1e76c4fee89ead7a6e03838b2d
2023-07-14 19:56:42 +02:00
Dmitriy Rabotyagov 5025cd3ea1 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.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_heat/+/879963
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/880470
Change-Id: I5561693e490700bc572e196e36e8ef0fa4df1ec5
2023-04-14 09:19:23 +00:00
Jonathan Rosser b94a60766e 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

Change-Id: I502b70c234ef22271c7d947b6c54b687ecd010d2
2021-03-10 12:16:40 +00:00
Dmitriy Rabotyagov 602e895307 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: I33362163d54a1b54ba4a0cd13764f28fe6485040
2020-09-25 18:16:07 +03:00
root e48f0bcb03 Add centos-8 support
Reverting systemd-devel

Change-Id: Ia5ad3a561615378d8de854ece5117ca7c8aca795
2020-07-07 00:51:38 -04:00
Dmitriy Rabotyagov dde6129387 Start using uWSGI role
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.

Change-Id: Iaca1e2f680d7281b4d8c0fd47907823a515f4240
2019-09-06 10:07:39 +03:00
Dmitriy Rabotyagov 4e78f8b6f8 Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files
to journald. We also disable uwsgi logging, since it dublicates
requests that are logged by service itself.

Change-Id: I0f9eeeb5db890ba2119f7e8a5e85b9f6923092d6
2019-07-18 13:06:00 +03:00
Guilherme Steinmüller cb497e8851 debian: add support
This patch adds the Debian jobs for this role to make sure
it's always passing as well as updates the meta to reflect
it's support of Debian accordingly.

Depends-On: I9a92b73c419a0dc1cca40dacfef75de61a61db94
Change-Id: I9f1d64c299e3dbe8c3f182f722b9d0a1aa705b80
2019-04-09 17:02:47 +00:00
Jesse Pretorius 5328303c8c 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
Change-Id: Ib7ea113bbc4495b8b3743e3528e1cafa023f50a3
2018-09-16 01:56:40 +00:00
wutao 7c1c49c7af Drop un-used packages from role
Change-Id: I85aa0f5a7a90648743973a38e5246ad802ebd746
2018-08-14 07:10:01 +00:00
Jonathan Rosser 4c3c81a458 Use generic vars file for ubuntu
These vars work for both Xenial and Bionic

Change-Id: I8b1d4eeeb127d7254afa5f11cbab18cc1be025cf
2018-07-31 10:15:28 +01:00
Markos Chandras abafaee5c1 Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. Nothing special is
required for this except adding the appropriate distro variables
file and also update the zypper cache before package installation. We
also had to apply the same virtualenv-tools fix similar to CentOS.

Change-Id: I8bbf0af1149e4c5ea39f82e4fa7be78578cf6a50
2017-08-16 06:14:31 +01:00
Andy McCrae 55f437b447 Implement uWSGI for sahara-api
As part of the Pike goals we are moving api services to run as WSGI
apps. sahara-api service is set up as a wsgi app, and this patch
moves it over.

Since this is just a drop in replacement for the existing eventlet
service, operators an deployers should notice no difference.

Change-Id: Ie4826358d5ee1686ad9ea7fa9eb0441acff565f2
Implements: blueprint goal-deploy-api-in-wsgi
2017-08-11 10:27:36 +01:00
Flávio Ramalho 95e4f4877b Role cleanup/update for ocata
- Use dictionary for service group mappings, bringing the
  role into line with the method used in other roles;

- Use systemd module instead of shell on the services
  restart handlers;

- Use ansible package module to install distro packages;

- Added variables for CentOS. The role should now support
  CentOS;

- Removed extras folder.

Change-Id: I5c8430804aacceca01c5821ca2528514033d15f4
2017-02-14 09:35:30 -03:00
Andy McCrae 0d3ca83ea0 Remove Trusty support from os_sahara role
Change-Id: I01d2fbf66a0e415ea8f5a7a9906d31707ea320fa
Implements: blueprint trusty-removal
2016-12-15 13:21:43 +00:00
Jesse Pretorius c3e9c5f47f 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: I1162765d88554e6858bd2aad6af1a390353a4440
2016-08-30 19:59:58 +01:00
Flávio Ramalho c5ecb56867 Implement Ubuntu 16.04 Xenial support
This change adds suport for Ubuntu 16.04 with SystemD
while keeping the support for Ubuntu 14.04 with upstart.

Implements: blueprint support-ubuntu-1604
Change-Id: Iffed984d6c2c881cbac31919dc805b6122dd4f3f
2016-06-16 08:48:07 -03:00
Flávio Ramalho 23f25f425e Initial import 2016-05-12 10:28:58 -03:00