Commit Graph

135 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 8ac4957d11 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: I900f40d7db6c26356252a7be736c1b3bdc98cace
2023-10-30 18:01:42 +00:00
Dmitriy Rabotyagov a39be0602c Fix example playbook linters
Change-Id: I656ee1f696ab37cb94591f4c478bdd939e694e13
2023-10-30 18:01:32 +00:00
Dmitriy Rabotyagov 9917675a9f 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: I022c2ed5edb0acb80433a29172bd6617e994f30f
2023-08-22 12:45:59 +02:00
Dmitriy Rabotyagov 6474c35998 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.

Change-Id: Ib582426992abd919574579207d9740bc01fa9e76
2023-07-31 15:17:21 +02:00
Damian Dabrowski a240e24e54 Add TLS support to mistral backends
By overriding the variable `mistral_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the mistral 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: Id9248e1618b9f2ad39a698c2ecf9c04e64cd119a
2023-04-29 18:42:27 +02:00
Dmitriy Rabotyagov f991870918 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: I8703c4982a56bad5995119a1b05578f74a9eb2d7
2023-04-10 16:24:38 +02:00
OpenStack Release Bot 32fb1242d2 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: I57f7b8b4249fddbad61bc74e4cb4f39368f4120b
2022-12-13 13:17:18 +00:00
Dmitriy Rabotyagov e2ed22524c 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: I247aa7bebda37b6c8d9e83767e7b77d1cd30c575
2022-10-05 11:03:53 +02:00
Erik Berg 33e4fc3325 Remove redundant vars line
This line has been here since the initial commit
I2390533690cd2c4511a272cc0834e240bb554696, but should already
be covered by the distribution_major_version line above.

Change-Id: Ia98b2ae3bad719929b13294b4df2dec69875e655
2022-09-14 13:55:17 +02:00
Danila Balagansky cc9b8443a6 Add release notes for mistral_api_use_uwsgi
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_mistral/+/849716
Change-Id: Ic6829cf816a3924fbaaa5b86422bfbc3851afc95
2022-07-14 16:52:04 +03:00
Danila Balagansky 05b37e5542 Allow running Mistral API service without uWSGI
While running Mistral API service within uWSGI, Mistral's Cron
Triggers do not create Workflow Exectuions. This change would disable
Cron Triggers for all existing installations as running API service
within uWSGI stays enabled by default.

Change-Id: I25b622de40c02f3cc410070e04e2d5d0fd67abc9
2022-07-13 18:48:04 +03:00
Zuul fd223ea205 Merge "Add mistral-extra in the mistral venv" 2022-06-17 23:31:59 +00:00
Zuul 9f55f90b08 Merge "Support service tokens" 2022-06-17 10:21:04 +00:00
Marc Gariepy cb8e97fbf6 Add mistral-extra in the mistral venv
Mistral has split the openstack action from the main repo, this patch
install the extra actions into the venv so we can have openstack-action
in it.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/844048
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/846135
Change-Id: I03aaecd4286535ae80aca249778ea9b209b87129
2022-06-16 09:00:38 +00:00
Dmitriy Rabotyagov 2a8972b5e8 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: Ie34df51cc0284b23713a897c8bc9d4958a1fe385
2022-06-15 19:14:14 +02:00
Dmitriy Rabotyagov 7dd254b652 Remove mention of haproxy-endpoints role
Role was never migrated to usage of haproxy-endpoints role
and included task was used instead the whole time.
With that to reduce complexity and to have unified approach, all mention
of the role and handler are removed from the code.

Change-Id: I126a9180d37fe3242762776837e2b15abc9924e2
2022-06-14 18:01:48 +00:00
Dmitriy Rabotyagov f7fb516d55 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: Ifcc9212f51102970cea67fb59b037151c6cfda3a
2022-05-30 16:01:30 +02:00
Zuul 24edf0ce1b Merge "Use common service setup tasks from a collection rather than in-role" 2022-05-05 13:55:58 +00:00
Zuul fde27cc868 Merge "Refactor use of include_vars" 2022-05-05 13:39:37 +00:00
Zuul 52d872ec33 Merge "Remove legacy policy.json cleanup handler" 2022-05-05 13:33:50 +00:00
Jonathan Rosser 42e1f72e25 Remove legacy policy.json cleanup handler
Depends-On:  https://review.opendev.org/c/openstack/openstack-ansible/+/839988
Change-Id: Ibbb2a51e17a37e17469b1b4d4c1b8c0fc0450b35
2022-04-29 18:47:02 +00:00
Jonathan Rosser fba805f2ec Use common service setup tasks from a collection rather than in-role
Depends-On:  https://review.opendev.org/c/openstack/openstack-ansible/+/839988
Change-Id: Iae89fb17e42d1f95ba21dcaaa9a942429f958a3e
2022-04-29 18:46:36 +00:00
OpenStack Proposal Bot a74ff76007 Updated from OpenStack Ansible Tests
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/839988
Change-Id: I4f92f6d55bcda6f5fa57c5af9f560bac1f3a9c72
2022-04-29 18:45:39 +00:00
Jonathan Rosser 0139fe44b2 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/+/839988
Change-Id: I68f0921ea1441d552dfcbc6197327d3046991b36
2022-04-29 18:17:39 +00:00
Jonathan Rosser 28ed0ffbd1 Cleanup setup.py config
Change-Id: I7c750aac310b434c48466e02b79bcaffcc275b8a
2022-04-04 10:43:59 +01:00
OpenStack Proposal Bot 74fc74108e Updated from OpenStack Ansible Tests
Change-Id: I18d8d77ad108062e5cf6cfc9237c4d4b1c077627
2021-12-17 16:46:46 +00:00
OpenStack Proposal Bot dc98b6ee02 Updated from OpenStack Ansible Tests
Change-Id: Id34047927b5295af22218525efffa4053c2e3cf2
2021-12-04 17:40:30 +00:00
Zuul 1a22dc47de Merge "Database connection pooling improvements" 2021-12-03 20:25:40 +00:00
Damian Dabrowski fc7cc65df2 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: I6f71c588ccec56e37ec707fc7f9c29037fcd668f
2021-12-03 11:41:15 +01:00
Dmitriy Rabotyagov 929a8a6c36 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: Ib5f99c0189871d8a79000d014e3e4b49bd7fec02
2021-11-30 15:17:21 +02:00
Dmitriy Rabotyagov ce27e5ec39 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: Ic050f71a2e9a48e12e2549ffdf60223d2b0c601d
2021-09-21 16:20:03 +03:00
likui b351843e01 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: I8086a1952d553d066512322c9cb8fe506ff55ae1
2021-07-03 21:33:05 +08:00
Zuul 797835ffa6 Merge "Use ansible_facts[] instead of fact variables" 2021-06-12 12:52:54 +00:00
Dmitriy Rabotyagov efd06dfaad 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: Id2c4f09b15bfa184113a83f1eb3e825d7fe43129
2021-05-21 15:53:03 +03:00
Zuul 858375bd58 Merge "Add variables for rabbitmq ssl configuration" 2021-05-18 14:17:47 +00:00
Jonathan Rosser 9edf8bf43c Add variables for rabbitmq ssl configuration
Change-Id: I613d2d310ad4fbce4d017533c4739243f586a2c5
2021-05-17 11:28:33 +00:00
OpenStack Proposal Bot 7d9ffb9e2d Updated from OpenStack Ansible Tests
Change-Id: I8bc1ca077eb2646825cf89726292734598a875bd
2021-04-19 09:58:50 +00:00
Zuul 7fa4a4eb63 Merge "[goal] Deprecate the JSON formatted policy file" 2021-04-08 18:24:43 +00:00
Zuul a0c76b5702 Merge "Remove references to unsupported operating systems" 2021-04-08 12:29:23 +00:00
Dmitriy Rabotyagov f2cf31bf47 [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.

config_template has been choosen instead of the copy, since it can
properly handle content that has been lookuped.

We make a separate task not to restart service when it's not needed.

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

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/777384
Change-Id: I9c358f7d8bd655712748717b391cbf6a58b196c7
2021-03-24 12:05:19 +00:00
Jonathan Rosser 481d5e49d7 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: Iddd575ea7859e496a659a01a454e87d27e85fb1f
2021-03-16 08:12:48 +00:00
Jonathan Rosser 736f80885d 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: Id400c679e1ccc5cc10a92143321ec3e182f9ecdc
2021-03-10 12:16:39 +00:00
Jonathan Rosser c090e774f7 Switch default virtualenv to python3
Change-Id: I54431e16051227f075a501f597d8fed9f84480bc
2021-03-10 08:56:14 +00:00
Zuul 2ecd74897e Merge "Move mistral pip packages from constraints to requirements" 2021-01-26 18:51:51 +00:00
Jonathan Rosser 16539214fb Move mistral pip packages from constraints to requirements
This is necessary to use the new pip resolver

Change-Id: Iceaa51a6ce18d5c7e8d35de1135db10f3d235014
2021-01-25 10:13:54 +00:00
dmitriy a9aa094115 [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: I8783b13c19c876c31ece8038c8d4763d69efcc46
2021-01-22 18:26:38 +02:00
Dmitriy Rabotyagov 81fad9bd3d 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: I0b0fdd8f811af07f112d717879a77d05a36403ed
2021-01-08 17:41:15 +02:00
Dmitriy Rabotyagov fc31f37f69 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: Ifc6a975055559919f8e4234f315f1748ca4f5de0
2020-10-30 18:35:30 +02:00
OpenStack Proposal Bot 053982c22a Updated from OpenStack Ansible Tests
Change-Id: I8723995806e75dbd728ad36cc699b90b9e434f66
2020-10-19 09:20:23 +00:00
Jonathan Rosser bf7e4313c9 Remove support for lxc2 config keys
Change-Id: I5ab357db8b86bf28e51da9742db36c939ed995c3
2020-10-06 11:43:05 +01:00