Commit Graph

551 Commits

Author SHA1 Message Date
somayeh_hajiahmadi d44b25ebb8 use policy.yaml instead of policy.json due to latest change on gnocchi
check the config

Change-Id: Ie11f31e6e4a0ee64e6e191820ef9a00e72826a96
2023-11-28 09:08:32 +00:00
Zuul 069d0498f6 Merge "Fix linters and metadata" 2023-08-22 22:58:43 +00:00
Zuul 43885a6ca8 Merge "Use proper galera port in configuration" 2023-08-22 19:22:20 +00:00
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 815f957b1d Define constraints file for docs and renos
Right now we are not using any constraints for docs and releasenotes builds.
This has resulted in docs job failures once Sphinx 7.2.0 has been released.

The patch will ensure that constraints are used an we should not face
simmilar issue again.

TOX_CONSTRAINTS_FILE is updated by Release bot once new branch is created,
so it should always track relevant constraints.

Some extra syntax-related changes can apply, since patch is being passed
through ConfigParser, that does not preserve comments and align indenting.


Change-Id: Ib7d2fff82a0970424948c33628c388aeed1e08fe
2023-08-17 16:32:13 +02:00
Dmitriy Rabotyagov 2ec800116e Use proper galera port in configuration
While <service>_galera_port is defined and used for db_setup
role, it's not in fact used in a connection string for oslo.db.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/888517
Change-Id: Idbd2bef71983f6fb3cc402563a166349621bf03c
2023-08-16 13:33:42 +00:00
Damian Dabrowski e0e213efce Add TLS support to gnocchi backends
By overriding the variable `gnocchi_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the gnocchi backend api.

The ansible-role-pki is used to generate the required TLS
certificates if this functionality is enabled.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/879085
Change-Id: Ie2c824052b0024d440b20febb34b6bde22f4fac2
2023-04-29 18:36:58 +02: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
OpenStack Release Bot f8d185d58a Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: I524a83e7153aebb990f0621bc7ff54c04788bc69
2022-12-13 13:14:21 +00:00
Erik Berg dd0c296120 Remove redundant vars line
This line was introduced by Ic1d3fc7089e80767ab59304642c8809d8a4e707f
to bring it in line with other OSA roles, but should already be
covered by the distribution_major_version line above.

Change-Id: Icdac9fabefe047895d446b0498897a15e8028738
2022-09-15 10:53:47 +02:00
Dmitriy Rabotyagov 6f3bcbe892 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: Iaed7f2b4a724aed0f4165e32f3d40aac9d74edd7
2022-06-17 14:10:25 +00:00
Marc Gariepy af3c87535d Control amount of metricd workers
As of today we didn't manage amount of gnocchi-metricd that equal to
amount of CPU on host. So things can go off regarding CPU and memory
consumption. For better control of ressources we add a variable to
control the number of workers.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/846349

Change-Id: Idcaec649a4de03f5714c61fda694ada45da41dbc
2022-06-17 08:36:01 -04:00
Dmitriy Rabotyagov c845819cae Switch sphinx language to en
With sphinx release of 5.0.0, they changed default for language variable
to 'en' from None. With that current None valuable is not valid and should
not be used.


Change-Id: Ia9f50e5377bda2e141eafa5aa8150024455600e1
2022-05-30 16:01:25 +02:00
Dmitriy Rabotyagov 1483fcbc28 Add variables to manage redis url
To provide more convenience in configuring redis as Gnocchi driver,
we add 2 variables that can be used to control
URL to Redis when it's used for storage or incoming data.

Related-Bug: #1955676
Change-Id: Iba5186df3656c116cba48c3be0e39e87ddcb727f
2022-05-13 11:20:04 +02:00
Marc Gariepy 72091b236b Use common service setup tasks from a collection rather than in-role
Change-Id: I55a5cf3e8b704c21f8b68862df5e1fce656b4b71
2022-05-05 09:01:35 -04:00
OpenStack Proposal Bot f79ff20013 Updated from OpenStack Ansible Tests
Change-Id: I8d39cbc49910374aba0f699be36f42978c29c437
2022-03-31 20:15:42 +00:00
Marc Gariepy 49e3512a80 Cleanup setup.py config
Change-Id: I03e390a3ae34c26a5fe9fc677c05ee6b74107af8
2022-03-31 10:38:58 -04: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
Zuul 5d0c34eddf Merge "Refactor use of include_vars" 2022-01-12 15:56:24 +00:00
Jonathan Rosser 41efa83237 Refactor use of include_vars
Use a first_found lookup instead of a with_first_found loop so that
the 'paths' parameter can be used.

This ensures that only vars from the role are included, and not vars
from a parent calling role. This can happen when a parent role has
a higher priority vars file available for inclusion than the role
it calls.

Change-Id: Ia6f6e36fc34e382eb02ea59973ee0a6e8aec20b4
2022-01-12 08:34:38 +00: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
OpenStack Proposal Bot 60643fa21c Updated from OpenStack Ansible Tests
Change-Id: Ia1c15a20a6d415e621b3f22c4f7bb7f1c307ae3c
2021-12-17 16:46:00 +00:00
Dmitriy Rabotyagov 691921257f Use config_template as a collection
Since we still use ceph-ansible that has their own implementation of
config_template module it's worth to use mentioned module as a collection
explicitly.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819814



Change-Id: I5e9aac0216a7406fefe4bfe315bd914723c7e27c
2021-11-30 15:17:17 +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
Jonathan Herlin b9d2f805e3 Fix gnocchi multi-node when storage_driver is file
When gnocchi_storage_driver is file, run the db sync on all nodes.
But if gnocchi_storage_driver is other than file, run only on first node.

Closes-Bug: #1915618
Change-Id: I18a0ca9e32515194fbcf939bed53cdbef4de26f6
2021-11-10 17:44:55 +01:00
Dmitriy Rabotyagov 1274517f71 Refactor galera_use_ssl behaviour
With PKI role in place in most cases you don't need to explicitly
provide path to the CA file because PKI role ensures that CA is trusted
by the system overall. In the meanwhile in PyMySQL [1] you must either
provide CA file or cert/key or enable verify.

Since current behaviour is to provide path to the custom CA we expect
certificate being trusted overall. Thus we enable cert verification when
galera_use_ssl is True.

[1] 78f0cf99e5/pymysql/connections.py (L267)

Change-Id: Id986985e623896698d54496a8f0608e59516eec5
2021-09-21 14:33:30 +03:00
likui 7a66bd6b59 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: Ifcfc4d8ca048651feed2043de39c0dfbc8e8d2da
2021-07-03 21:40:56 +08:00
Dmitriy Rabotyagov c70c34b850 Replace linters test with integarted one
We've created integrated linters check job a while back and it's successfully
working for several releases. At the moment we experience difficulties
with future maintenance of the linters check from the openstack-ansible-tests
repo. So instead of fixing current one, we replace it with modern version of
the test.


Change-Id: I50f58cfb46f630a486ff673936fd3b1af38df2ca
2021-05-25 23:32:51 +00:00
Dmitriy Rabotyagov a6a25bf3cd Switch gnocchi service name to service
Previously we used different from other services project name to protect
swift from looping. However nowadays ceilometer middleware does
exclude service project by default. So no futher actions needed
unless deployer want to measure service project excluding gnocchi
In this scenario, deployer still can define custom
`gnocchi_service_project_name` in their user_variables.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-galera_server/+/791107
Change-Id: Ic0ffa6908bfc55ffdb41ea9b8e7435e4dc88ddca
Related-Bug: #1879192
2021-05-14 04:22:38 +00:00
Dmitriy Rabotyagov b5c233cdad Use ceph_client symlinking process
This moves ceph_client include from the playbook
into the role itself to leverage libraries symlinking
inside venv and to align with other roles

Change-Id: I9f1339b0b592e18a227b9a53cad9ef4af7fa82c0
Needed-By: https://review.opendev.org/c/openstack/openstack-ansible/+/769974
2021-04-22 08:04:26 +00:00
Dmitriy Rabotyagov 01f88ffaa3 Fix gnocchi installation for new pip resolver
Change-Id: I93c48cd15443f5959224d7560077b52263a5ea38
2021-04-20 07:42:38 +00:00
OpenStack Proposal Bot 36eeed7b2c Updated from OpenStack Ansible Tests
Change-Id: I9bce56699da8884ebe4429ec4a5219cd9cc0e2c5
2021-03-22 08:46:51 +00:00
Jonathan Rosser 1111c69813 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I1c82172d17fb2852c48453b77ffc59f7b9eca528
2021-03-16 08:03:50 +00:00
OpenStack Proposal Bot f732451506 Updated from OpenStack Ansible Tests
Change-Id: I6deb4fbbd0844c2258fdd58f6f233ed48f07297d
2021-03-12 22:18:48 +00:00
Zuul 8f017d6d62 Merge "Remove references to unsupported operating systems" 2021-03-10 17:49:21 +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 688f0173dc Switch default virtualenv to python3
Change-Id: I4f8a1b20fe58269ccc45044c1926755d853d7abe
2021-03-10 08:51:49 +00:00
Zuul 6407cec182 Merge "Move gnocchi pip packages from constraints to requirements" 2021-03-04 10:08:25 +00:00
Jonathan Rosser a51416662c Move gnocchi pip packages from constraints to requirements
This is necessary for the new pip resolver

Depends-On: Idfdb34e53d7e0a54dd35b95e7b9f51eece405238
Change-Id: I5282cc78db55dee5f43cc34486a71a69567f2a28
2021-03-03 10:10:20 +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 503b4d25cf Delete gnocchi_identity_setup
This file duplicates the purpose of the service_setup.yml
so we're running same set of tasks twice.

Change-Id: Ia0ee853b14cffd3082346e20bb021da24e3f2c40
2021-02-18 12:30:31 +00:00
Dmitriy Rabotyagov bf17cc3d69 Drop distro tests
Gnocchi does not have distro path so there's no sense in testing it.

Change-Id: Ibf24046371128a693de88c5dab78878aa78b044e
2021-02-18 14:30:07 +02:00
dmitriy ce339f4233 [reno] Stop publishing release notes
Since we copy all release notes to the integrated repo there is not need
in publishing release notes for each repository. We should only verify their
validity and linting.


Change-Id: I85b04dd07036d2a5e19021e30f2cce830f3d8f6d
2021-01-22 18:25:26 +02:00
Dmitriy Rabotyagov cfa854fd06 Use global service variables
Instead of overriding each service separatelly it might make
sense for deployers to define some higher level variable that
will be used first or fallback to default variable.

Change-Id: I022d52c39c706fd9f82b9efcdcdc589a2e971d24
2021-01-08 16:46:52 +02:00
Zuul b73d93efd0 Merge "Remove duplicated gnocchi_db_setup_host" 2020-11-11 17:05:24 +00:00
Dmitriy Rabotyagov 3e7c2b9d71 Remove duplicated gnocchi_db_setup_host
Change-Id: I230dab96169eeaa04575c794a24a22408c237593
2020-11-10 12:04:54 +00:00
zhoulinhui 95fb8b334a Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is deprecated and TOX_CONSTRAINTS_FILE is
the new environment variable name that replaces it [1].

This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
[2] https://review.opendev.org/#/c/722814/

Change-Id: If16179cfeb63c2facbabfb97c452a8c6ffff7530
2020-11-10 05:15:52 +00:00
Dmitriy Rabotyagov c598ccb8f6 Reduce number of processes on small systems
Even the most modest 4C/8T system would run with the maximum 16 processes
due to the calculation being VCPU*2.

We devide amount of CPUs to number of threads for hyperthreaded CPUs

Change-Id: I3145692351cadf5c1cd835fe87e1206ee5901164
2020-10-30 18:12:24 +02:00