Commit Graph

32 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 6b298913bc 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: Ib1a93dce0f64b6261af06956e3e1ee5472bede9c
2023-08-22 17:31:25 +00:00
Dmitriy Rabotyagov 8e875ef8ee 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: I0265fc94d795360f6dfbddee5398ee067ea0422b
2023-04-10 16:00:41 +02:00
Zuul 68ff6a169a Merge "Add availability to define gnocchi_incoming_driver" 2022-03-16 15:22:53 +00:00
Jonathan Rosser 24356495c3 Remove apache to uwsgi migration tasks and variables
Change-Id: Idaec9f48bb1c7aff926071979773bca97f9ef2b3
2022-02-02 07:14:12 -05:00
Jonathan Rosser 08712239a8 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: I6f3713135e3b937768d799c6e2c141427c498a16
2022-01-11 11:34:35 -05:00
Dmitriy Rabotyagov 84150e8fb1 Add availability to define gnocchi_incoming_driver
Gnocchi supports having different storage and incoming drivers [1] which
has been never implemented in role.

We add `gnocchi_incoming_driver` variable and do incoming configuration only
when it's not same as gnocchi_storage_driver.

[1] https://gnocchi.osci.io/install.html#configuration-file

Depends-On: https://review.opendev.org/c/openstack/ansible-role-python_venv_build/+/822901
Change-Id: If1442abd7978d44def2a4386f9d159b42c4939e3
Related-Bug: #1955676
2021-12-24 13:39:33 +02:00
Dmitriy Rabotyagov 2938fadcf3 Do not provide ceph_alternative extra for ceph
When adding ceph_alternative in pip extras, pip tries to install
python-rados which is not available from pypi and this fails installation
We symlink all required packages inside venv with ceph_client role so
providing ceph_alternative as extras makes no sense.

Change-Id: If4103a28235b0127b5e2220577a7cd2451154c1d
2021-11-11 10:36:13 +02:00
Dmitriy Rabotyagov 01f88ffaa3 Fix gnocchi installation for new pip resolver
Change-Id: I93c48cd15443f5959224d7560077b52263a5ea38
2021-04-20 07:42:38 +00:00
Jonathan Rosser ee09a2ab62 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: Ie0dbc0c142bfedabb1027e3809463d78e861b625
2021-03-10 12:16:38 +00:00
Jonathan Rosser ce0fd21213 Provide different package lists for install and wheel build
Also install libxml2 into the target host.

Change-Id: Ie7eeb360c44d1d496bacb6e7f393ac4a90c0236b
Closes-Bug: 1857899
Related-Bug: 1915617
2021-03-03 10:09:57 +00:00
Dmitriy Rabotyagov acce40d693 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: I69c08fd522c1c80356000b1cf2a48a9b63327b3c
2020-09-16 11:55:55 +00:00
root 99b671d984 Add centos-8 support
renaming redhat-7.yml to redhat.yml to support centos-8. (setting non-voting to break telemetry dependency)

Change-Id: I95c2c7c158cfcad6746188b24a0e06ffd2564244
2020-07-22 12:58:43 -04:00
Dmitriy Rabotyagov b7a76fb341 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: Iec03bd79279e694678336880460bcb83f68d9780
2019-09-04 17:36:30 +03:00
Dmitriy Rabotyagov 57b88ebc65 Migrate gnocchi to use uWSGI
This patch moves gnocchi-api from usage of apache with mod_wsgi
to uWSGI, which means unification across another roles and
reduced maintenance costs

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

Depends-On: https://review.opendev.org/671988
Change-Id: I06bbcb2f15108fc517742208ac5291719627ffe2
2019-07-25 22:47:29 +03:00
Dmitriy Rabotyagov eb083ecf9f 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: I3f6a1cee0e98372881b015ebf06e405c79495fe1
2019-07-17 00:26:00 +03:00
Guilherme Steinmüller 03b7b41439 debian: add support
This patch updates the meta to reflect it's support
of Debian accordingly as well as rename ubuntu vars
file to debian.

Depends-On: Icf91eee6e369d9a6a95dd0c8772c2760eaff5bd2

Change-Id: I4eb6161d7092c922fe41aa27ff619d287353f575
2019-04-11 00:37:41 +00:00
Dmitriy Rabotjagov f3eddb3d51 Convert systemd services to common role(s)
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 exterior role is built to be OSA
compatible and may be pulled into tree should we deem it necessary.

Change-Id: I54e3063d6e641a785377f9039641072f8001cf24
2019-02-16 22:30:01 +02:00
Jesse Pretorius 7ed303cd6b 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: Ieb2bedd3a6ebd005f224a26010066c8d6f7928ef
2018-09-21 13:27:28 +01:00
Jesse Pretorius 1058064b64 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: I84e39b06e4a0b89665e62f79308505043ef7fa98
2018-09-16 01:56:05 +00:00
Jonathan Rosser 88ffeaea79 Use generic vars file for ubuntu
These vars work for both Xenial and Bionic

Change-Id: I9ea1808851c94f943d66ab6cc1a3f4b41fa3e425
2018-07-31 09:36:06 +01:00
Jimmy McCrory d5060e8bac Add librados2-dev to distro package list
librados2-dev is need to build 'cradox', from gnocchi's ceph
requirements.

The package lists have also been alphabetized.

A linting error in tests was corrected to unblock the gates.

Change-Id: I91b579ff478c02f40fb1573b433735a6a3794e2b
2017-12-14 14:04:55 -08:00
Markos Chandras d471354f1d 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: Ic2d99cd7639a5b442699fec971c9482a37bb862e
2017-07-11 17:47:41 +01:00
Jesse Pretorius ff82da926b Use uri module for git sourced configs
The current mechanism uses a lookup, causing the
fetch of the default templates to happen via curl
from the deployment node. This causes problems if
the deployment node does not have access to the
repo server web service, which may be the case in
high security environments.

This patch changes the mechanism to only use the
lookup module for the file content that is on the
deployment node, then falls back to using the uri
module to fetch the default content. This ensures
that the deployment node does not have to reach
into the environment for the content.

Change-Id: Ia067a7cd2bc4460462b55f4631eba6e8eb693b0f
2017-05-12 11:29:54 +01:00
Marc Gariepy 7cc163a5af Cleanup CentOS pkg
install postgresql-devel instead of lbpqxx-devel

Change-Id: I9393b5ce1ce36dd390a415af8851edafab737e14
2017-05-05 11:18:52 -04:00
Marc Gariepy d14424f64d Add which in CentOS package list
which is needed by virtualenv-tools.

Change-Id: I0c019537cd1338ce1864613f05a0ea137b4cac47
2017-01-11 13:58:16 -05:00
Andy McCrae 6a0c568967 Remove Trusty support from os_gnocchi role
Change-Id: I69dca19fa565bc92974f5dec132228f798d9ce13
Implements: blueprint trusty-removal
2016-12-15 13:17:31 +00:00
Marc Gariepy 259cf1e634 Add CentOS support for os_gnocchi role
Depends-on: Id31fb15b352a160c8f5139ae70966055d93f7ce6
Change-Id: I540e8f08f3a8935b6a5af5a73f0a896ec8ec7a98
2016-12-07 14:27:36 +00:00
Jesse Pretorius 6d63addcfb 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: Ib4e9ea67433a897ce7102a453ae5560a64c55c60
2016-08-30 17:07:07 +01:00
Steve Lewis 17b954d8e5 Implement Ubuntu 16.04 support with SystemD
This change updates the Gnocchi role to support Ubuntu 14.04 with
upstart init and 16.04 with a systemd init.

A change for the functional tests disables them. They will be
fixed properly in a following patch.

Change-Id: I6170a3bcc6ad61474a0a70c786b2607915868e17
Related: blueprint support-ubuntu-1604
2016-06-07 09:04:28 -07:00
Steve Lewis 52f0636589 Provide initial steps for Multi-Distro enablement
The role begins by determining which platform is in use, and system
packages are installed based on that platform using a conditional
include pattern introduced throughout OpenStack-Ansible roles.
2016-03-30 15:53:08 -07:00
Steve Lewis b7b4e8c95b Fix copyright messages again 2015-12-03 09:54:04 -08:00
Steve Lewis c2d25ad2aa Initial Commit 2015-11-20 15:37:39 -08:00