Commit Graph

361 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 6e94d28222 Enable CloudKitty APIv2
Cloudkitty has released it's v2 API couple of cycles ago with [1]. High time to
enable it as well.

[1] https://review.opendev.org/c/openstack/cloudkitty/+/832923

Change-Id: I11838780e84d6e721033b5c7aa77c8a0ca8ea121
2024-03-08 17:58:58 +01:00
Dmitriy Rabotyagov 10164be39e 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.

Change-Id: I722aefb5290a68311faf1d44c279151e8492466a
2023-10-20 11:53:46 +00:00
Dmitriy Rabotyagov d4ea1e6b52 Fix example playbook linters
Change-Id: I64c16cfa138b6ef4a20fdfa16ca0c6bb73d345fb
2023-10-20 10:49:13 +02:00
Dmitriy Rabotyagov c7b2ad25c9 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: Ib51c7ec8d83ffe82c98d1c8d3200ce4510775895
2023-07-14 17:11:05 +00:00
Damian Dabrowski ba2e621a93 Add TLS support to cloudkitty backends
By overriding the variable `cloudkitty_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the cloudkitty 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: I0566028b4737306954b544d040b52cee1fddaa1f
2023-04-29 18:36:21 +02:00
Dmitriy Rabotyagov 893db780b4 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: I5d491104173dc0217fac62618c13e8ac5a57233b
2023-04-10 15:52:49 +02:00
OpenStack Release Bot 092ea71088 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: Ie13e1d8fee402e06ee57311c1e360324db7ea38f
2022-12-13 13:13:19 +00:00
Dmitriy Rabotyagov 6568e8bf99 Replace git-core with git for debian
With ansible-core 2.13 it tries to substitude package resolution in apt
module.
However git-core is used in Debian as transitional name, but ansible
tries to select it and provide version, which is not correct behaviour.
But since git-core is not really valid anyway, we just replace it
to workaround ansible's imperfectness.

Change-Id: Ie4b8ce21c101551505eec1529235a57e9176d3c9
2022-10-05 11:02:23 +02:00
Erik Berg 6b36ba7a80 Remove redundant vars line
This line snuck in with I81413b5ff415ee3d0b5a33189335591146e8f698
probably to bring it in line with other OSA roles, but should already
be covered by the distribution_major_version line above.

Change-Id: I8ec073f36556c5d7da2be7aae23a192266d39a5d
2022-09-14 13:52:20 +02:00
Dmitriy Rabotyagov b6d15a95cb 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: Icb1de8c7e0a5196a4df457a5d4a3ca524d4622d0
2022-06-15 19:17:22 +00:00
Dmitriy Rabotyagov 2d98ac9ec7 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: I92ad4a90f367fe95899973912edb222e84903adc
2022-05-30 16:01:23 +02:00
Zuul 3258ce923f Merge "Use common service setup tasks from a collection rather than in-role" 2022-05-05 14:03:43 +00:00
Zuul 06ef0f6c00 Merge "Refactor use of include_vars" 2022-05-05 13:42:56 +00:00
Zuul 0f1613106b Merge "Remove legacy policy.json cleanup handler" 2022-05-05 13:42:18 +00:00
Jonathan Rosser cbe22b73a2 Use common service setup tasks from a collection rather than in-role
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/839989

Change-Id: I19d8215e653d42698806c645ac4ae7747c4ea35e
2022-04-29 18:49:35 +00:00
Jonathan Rosser 8d64d4d593 Remove legacy policy.json cleanup handler
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/839989
Change-Id: I7e79f669d4b65ce067c57bda06e1887c1125ee4e
2022-04-29 18:48:56 +00:00
OpenStack Proposal Bot 4df7fd65ff Updated from OpenStack Ansible Tests
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/839989

Change-Id: Ie0e94e91fb0547b3d5d90e405956cb0ef59312e3
2022-04-29 18:35:09 +00:00
Jonathan Rosser 0b92ee6f7d 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.

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

Change-Id: I81413b5ff415ee3d0b5a33189335591146e8f698
2022-04-29 18:25:45 +00:00
Jonathan Rosser 9e9a85c964 Cleanup setup.py config
Change-Id: I6c3de8e6b9ac1ef9a7deaabd0fa4decb085738d1
2022-04-04 10:35:13 +01:00
OpenStack Proposal Bot 9c16a6fe29 Updated from OpenStack Ansible Tests
Change-Id: I258b21915478d4148a3db92c77a483d87a70c6a6
2021-12-17 16:45:44 +00:00
OpenStack Proposal Bot e03028246d Updated from OpenStack Ansible Tests
Change-Id: I90d66d04f1b91755b4e042bd0bbb999b2ef658ed
2021-12-04 17:39:47 +00:00
Damian Dabrowski 40d38d0000 Database connection pooling improvements
- Implemented new variable ``connection_recycle_time`` responsible for SQLAlchemy's connection recycling
- Set new default values for db pooling variables which are inherited from the global ones.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819424
Change-Id: I4ae28b356a404c1e76e5cff986d4fe0172b564f2
2021-12-03 11:51:23 +01:00
Dmitriy Rabotyagov 23a330ef26 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: I895d7342cea3c7c74732138a87d0b1aee61c2345
2021-11-30 15:17:14 +02:00
Dmitriy Rabotyagov 319dadd643 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: I756a6cdaa4b619671da73c65761c796a0b2ade81
2021-09-21 14:23:55 +03:00
likui 8445103c60 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: I5b4df1b67d4adab6c3cfcb1eb148c19b5abe251a
2021-07-03 21:15:53 +08:00
Jonathan Herlin b67bd60df3 Cloudkitty role cleanup and config updates
The Cloudkitty role has been lacking some attention for a while
causing some of the configuration and examples outdated.

Now that Cloudkitty playbook and dashboard can be installed using
OSA without running any additional playbooks from this repository
i have removed those from here.

Change-Id: I0fe96c318273f0016d93cf043bda74feb11c63f8
2021-06-09 10:03:21 +02:00
Zuul 90360f2a8d Merge "Add cloudkitty example playbook" 2021-05-26 11:17:19 +00:00
Zuul c22d20475d Merge "setup.cfg: Replace dashes with underscores" 2021-05-21 14:51:34 +00:00
Dmitriy Rabotyagov 3b76182426 Add cloudkitty example playbook
This playbook is also used by integrated ansible-lint check to verify
role syntax.

Change-Id: Ia53b316f9449af44d9218526c8f61af7d83775c7
2021-05-21 17:45:57 +03:00
Zuul 39feacfa43 Merge "Add variables for rabbitmq ssl configuration" 2021-05-18 16:18:06 +00:00
Jonathan Rosser 68e8d15cd5 Add variables for rabbitmq ssl configuration
Change-Id: If8362185261aefa741f9c21c57b3dfe258d8543d
2021-05-17 09:24:44 +00:00
yangyawei 45bb67e61c setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I002be9d2c1f5dbf8d3be07850f8e01e69888236a
2021-05-16 11:35:26 +08:00
Dmitriy Rabotyagov a1f9c741c6 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to replace policy.json to
policy.yaml and remove deprecated policy.json.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I5714f88ab0df41adbac52ff65f16f37e69bafb79
2021-05-03 15:36:11 +00:00
Zuul b54aca7561 Merge "Test using integrated build" 2021-04-22 21:12:46 +00:00
Zuul a8c6762876 Merge "Fix wsgi_venv path for cloudkitty-api" 2021-04-20 00:44:26 +00:00
OpenStack Proposal Bot 60a670842c Updated from OpenStack Ansible Tests
Change-Id: I57d383d1d0ea1dc9fcc73ec3f8c41725fb24814b
2021-04-19 09:57:23 +00:00
Jonathan Herlin e2aa965ff3 Test using integrated build
In order to do a more complete verification of any patches,
we add a full uncontainerised OpenStack deployment to the
functional testing using the integrated repo.
This replaces the previous role functional test mechanism.

Depends-On: Id191e07eab2bef84dad30e55f59fd914b0358bfe
Change-Id: Iec5c24d38f492af064968b2b621bba8b507d56f5
2021-03-27 11:37:56 +00:00
Jonathan Herlin c35565f419 Fix wsgi_venv path for cloudkitty-api
Previous to this change the uwsgi config had virtualenv include /bin, leading to $venv/bin/bin in execution

Change-Id: I4d2b60b655e5688359ed7b65569ec5500c542c0f
2021-03-24 19:14:11 +01:00
OpenStack Proposal Bot cd5d16d715 Updated from OpenStack Ansible Tests
Change-Id: I2459bbefed75133e3acfff62efb1174903e7c42e
2021-03-22 08:46:34 +00:00
Jonathan Rosser 2b54345586 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: Ia088d1b4074e3bbcd3054f5be00b39429437750d
2021-03-16 08:01:56 +00:00
OpenStack Proposal Bot 0e29f8545a Updated from OpenStack Ansible Tests
Change-Id: I77f84cb7ba7e8f201aba37ca0e01e098731c2228
2021-03-12 22:18:23 +00:00
Zuul 61621205ab Merge "Remove references to unsupported operating systems" 2021-03-11 09:07:10 +00:00
Jonathan Rosser 8b53883914 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: Ifd45cedcf98487b1a8b5531962529f0784f3065e
2021-03-10 16:31:37 +00:00
Jonathan Rosser f0f23521bc Switch default virtualenv to python3
Change-Id: I0290f78f2eaf763238abdffacea6fd34c75afea8
2021-03-10 08:48:36 +00:00
Zuul 264f97d87c Merge "[reno] Stop publishing release notes" 2021-01-26 17:09:50 +00:00
Jonathan Rosser e0b8bd00a1 Move cloudkitty pip packages from constraints to requirements
This is necessary for the new pip resolver

Change-Id: I8d70caf213e3f4533fc7490451e95a85ff191ad8
2021-01-25 09:48:54 +00:00
dmitriy e0116f1b7f [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: I24c0eb9f4de8833d17dd728660c2a732884506b0
2021-01-22 18:24:58 +02:00
zhoulinhui 26f5180a9a Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: Ie31a1ef88a8ec144f6b01de845461874ecccbc12
2020-11-10 13:11:38 +08:00
Dmitriy Rabotyagov e84e327c2d 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: Ifa09cdddcb4a3875f064ff773bbe2281f964fb1d
2020-10-30 18:05:33 +02:00
OpenStack Proposal Bot 7ac496f43e Updated from OpenStack Ansible Tests
Change-Id: I6a73c0631aaf46835c3d0fce0bf810509a30bb17
2020-10-19 09:19:47 +00:00