Commit Graph

29 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 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
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
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
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
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 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
Zuul 797835ffa6 Merge "Use ansible_facts[] instead of fact variables" 2021-06-12 12:52:54 +00:00
Jonathan Rosser 9edf8bf43c Add variables for rabbitmq ssl configuration
Change-Id: I613d2d310ad4fbce4d017533c4739243f586a2c5
2021-05-17 11:28:33 +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 c090e774f7 Switch default virtualenv to python3
Change-Id: I54431e16051227f075a501f597d8fed9f84480bc
2021-03-10 08:56:14 +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 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
Dmitriy Rabotyagov 086ad74db3 Use the utility host for db setup tasks
Move it to the service setup host (defaults to utility[0]) instead
of the galera[0] host, and use galera_address (defaults to internal VIP)
as the endpoint instead of a local connection on the db host.

Change-Id: I133eee39903fd469ded423775af330f0eece9e43
2020-08-20 18:45:28 +03:00
Zuul 91ed6d5224 Merge "Cleanup after repo_build and pip_install retirement" 2020-05-13 17:58:00 +00:00
Dmitriy Rabotyagov bd2139a7fd Cleanup after repo_build and pip_install retirement
Change-Id: Ie21ff7efd3d24a0092014bcc7249ea9d2d95019f
2020-05-12 22:25:46 +03:00
Dmitriy Rabotyagov 189ef72694 Refactor memcached_servers
This patch aims to add a prefix for memcached_server
on each role to give the ability for deployers to
override the location of memcached cluster. I.e users
wants to create a single memcached cluster with k8s
for each service.

We also add pymemcache based on [1]

[1] https://review.opendev.org/711429

Change-Id: Ieca2e8cd7959005f354412eb5a9f17b4363a5853
2020-03-25 18:52:04 +02:00
Dmitriy Rabotyagov 47330c9593 Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.
Also we change upper constraints url due to [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I37cc2ee6c2a10c5ac26fd0fe845a1006395423e0
2019-11-14 17:00:00 +02:00
Zuul 1db76e0d82 Merge "Add global override for service bind address" 2019-10-08 14:28:55 +00:00
Jonathan Rosser f4cd5bbf58 Add global override for service bind address
Change-Id: I7b3976d8d32a0844ce2849d3b65f503a346a0d63
2019-09-19 13:49:08 +01:00
Jonathan Rosser 498ce9f3d6 Allow venv python interpreter to be overridden
Change-Id: I15825709d5b740617c093649752aefaab638aaaa
2019-09-11 21:10:28 +01:00
Dmitriy Rabotyagov ac93b1f46f 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: Ia1788a7a9ce80349440bedbb2a0fdeb2a7f9934a
2019-09-05 14:46:14 +03:00
Dmitriy Rabotyagov c9e5f629b4 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: I61605b7820bb518fb809b01781f6d83f89487be8
2019-07-17 16:14:34 +00:00
Guilherme Steinmüller a3770b9d39 Update role for new source build process
The variable mistral_developer_mode and mistral_venv_download
no longer carry any meaning. This review changes mistral to
do the equivalent of what developer_mode was all the time,
meaning that it always builds the venv and never requires
the repo server, but it will use a repo server when available.

As part of this, we move the source build out of its own file
because it's now a single task to include the venv build role.
This is just to make it easier to follow the code.

Change-Id: Ibb0a20eeec763f2051c8577da5a91ddc5b9a9e62
2019-03-26 20:17:55 +00:00
Guilherme Steinmüller f11e56abea Add mistral_role_project_group
We need this var to determine which host group
to check for members of before building the
pip packages required by this role.

Change-Id: I46b9836b2c97db2306060e0e7b665c9564907633
2019-03-07 20:24:23 +00:00
Mohammed Naser b6f83caabf Add initial Mistral role
This role allows the installation of Mistral alongside running
all of the API tests.

Depends-On: I2e19efd5fdcb0bdbb3d1cd5ee44f20e4807ea537
Depends-On: Ie3d8fb921dfedff0852b630a0a0af17b97c1bffa
Change-Id: I2390533690cd2c4511a272cc0834e240bb554696
2019-02-06 15:42:34 -05:00