Commit Graph

29 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov ea5e1adf63 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.

Change-Id: Ia51971c077cef647c3d4e07d6cbc14b7bac70788
2023-09-28 14:25:08 +00:00
Dmitriy Rabotyagov 1f95cd900e 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.

Change-Id: I4585a4aad7acf48080e6b2d73bf3e0c2e0dfbff7
2023-07-14 05:49:48 +00:00
Dmitriy Rabotyagov f1e6a2448d 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: Id81230eb8b26f7c666d053d70230149fa93c7822
2023-04-10 15:40:16 +02:00
Dmitriy Rabotyagov cb6c38ab92 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-plugins/+/845690
Change-Id: I6a5e16a4fc2a81dedc4bc459f13ac7781292f5a8
2022-06-15 17:40:02 +02:00
Jonathan Rosser 7fc659b0dd Do not install python development packages
The python_venv_build role is responsible for setting up the build
environment for python wheels so this role should not install
python development packages

Change-Id: Ice9f3b1484323b611bb12eb6cdc6a6f1f1dfee95
2022-01-11 11:36:21 -05:00
Jonathan Rosser cbb08b0125 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: Ibf3f1c2670288aa00469126d2ce74ac00954094a
2021-03-10 18:38:06 +00:00
Dmitriy Rabotyagov a5e2a7e27b 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: Ib50c2628d93fa3f5a707fa346c0270ec568f3306
2020-09-16 11:51:10 +00:00
Dmitriy Rabotyagov 00d3bee584 Remove py2 packages
Ubuntu Focal do not even have py2 packages, so we need to drop them,
as anyway we use py3 everywhere.

Change-Id: Icb253467cd4f1304c7a9290ea8dc6677fd18af59
2020-08-15 01:33:10 +03:00
root d61db1e68b Add Centos-8 support
Change-Id: Ic01d966160b2a95fc4047ead5a9c3e50f68ae1d1
2020-06-25 14:12:39 +00:00
Dmitriy Rabotyagov 51c0311478 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: I8492d52d8155e1bd75f99deb4fd19d445a831816
2019-09-04 16:39:05 +03:00
Dmitriy Rabotyagov 17a7543c60 service_setup: refactor service setup to a single file
This patch refactors the openstack user/service/endpoints creation to
service_setup.yml which will eventually be managed by
openstack-ansible-tests.

Depends-On: https://review.opendev.org/675353
Change-Id: I50fab53db1e2f7b6093333475c672928301e8a30
2019-08-08 17:17:28 +00:00
Dmitriy Rabotyagov 2a433b2fa0 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: I6d906c095b3c039fc3789e37dca03f4b734aab46
2019-07-17 07:44:47 +00:00
Jimmy McCrory 2c85a1f624 Fix distro installs on Ubuntu
Beginning in the Stein release, Ubuntu distro packages are now using
Python3. This requires additionally installing and using the uwsgi
python3 plugin.

Install the 'python3-barbican' package instead of 'barbican-api'.
barbican-api installs apache which conflicts with the OSA provided
service config.

The 'barbican-keystone-listener' and 'barbican-worker' packages have
been removed. They provide service configs for each of those services,
but neither are implemented in the role yet and, if they are at some
point, service configs would be provided by the role.

Change-Id: I96cce9426946c3c888bb46900906317e134dd23d
2019-06-06 08:43:51 -07:00
Mohammed Naser 249e1ee6a4 cleanup: stop installing git for barbican run-time
We need git to build Barbican but we certainly don't need it in
order to run it.

Change-Id: If6dd415b229aa99f326af4de873a7f9da79865e6
2019-03-27 18:27:16 -04:00
Jesse Pretorius 155120ab0f Define cache_timeout variable
Much like the 'debug' variable, the 'cache_timeout' variable
is an expected variable, but is currently not defined in the
role. This causes the role to fail when the galera_client
meta-dep is removed (because that role defined it, this role
inherited it).

Change-Id: Ib32063e85199d57213fdd976be984f3c147dc6ce
2018-09-15 23:07:38 -06:00
Andy Smith de2cbdccdb Add install packages for optional oslo.messaging amqp1 driver
Change-Id: I12f4de8325a525da614f6678f22ee950d4fe54bd
2018-09-11 10:02:16 -04:00
Zuul 985cdcce74 Merge "Trivial: Fix the pep8 warning" 2018-08-17 05:27:56 +00:00
wangqi 2c319c8593 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: Ifd6df78a76ed1f90e1523345b775b830b61a003c
2018-08-06 07:16:25 +00:00
Kevin Carter 005e5b61ca
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.

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: Ic5b57a650bd9f5c385ed0a0a3efd1d530a2d7e81
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-31 14:43:44 -05:00
Markos Chandras 0558e02e06 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: If06f702ee881480b78f9a406fe626d9020837fd3
Implements: blueprint openstack-distribution-packages
2018-06-04 08:51:35 +01:00
Markos Chandras c9135f8b34 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: I1c2b4ad14fb40ce3958ed197115ccf45468544c6
Implements: blueprint openstack-distribution-packages
2018-05-15 11:42:58 +01:00
Markos Chandras 8df6d45a57 Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. Nothing special is
required for this except for adding the appropriate distro variables
file and also update the zypper cache before package installation.

Change-Id: If07ef32f9e39272b4c7fadb438df33f188b186cd
2017-12-08 11:34:30 +00:00
Markos Chandras c43e5a435c tasks: Remove unused apache configuration
The barbican role is using uwsgi instead of Apache so remove
the playbooks related to Apache and SSL configuration.

Change-Id: I58a2f3ecbcd6de0cc0d345e9f6f1bb1027c22c92
2017-11-23 10:25:34 +00:00
Aaron Mehar 4bfcb2c662 Add CentOS 7 deployment support
Remove python from path first to avoid circular issues

Change-Id: I5cf629f1c0e19c9359b7e29f3d65500f6fe87a77
2017-11-22 00:20:52 +00:00
Jesse Pretorius e87378f10c 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: I9f20c6c53709202fe09f38ffe20f96e860ba188a
2016-08-30 16:34:28 +01:00
Travis Truman 82b2173701 Implement Ubuntu 16.04 support with SystemD
This change updates the barbican role to support Ubuntu 14.04 with
upstart init and 16.04 with systemd init.

Change-Id: I6d1221481c6ad97b265eece2b23c3ab83ef49248
Implements: blueprint support-ubuntu-1604
2016-07-14 10:35:59 -04:00
Travis Truman 5113456a18 Remove duplicate apt package installation
Also removed an unused vars file.

Change-Id: I931d1b42d9817f69a4b8dfe5349e981214a83d40
2016-06-15 12:49:46 -04:00
Hector I Gonzalez e2e0d0d0c2 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: I5fa925c546affbd27f70f1d483ac78a23f2e6e62
2016-04-19 14:31:22 -05:00
Ian Cordasco 9126afc796 Initialize galaxy role 2016-02-23 15:30:30 -06:00