Commit Graph

37 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 6a25236b25 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: I9110294e492a501204c8e92448a2f2929781a509
2023-07-14 18:49:03 +02:00
Damian Dabrowski 0b6f8da608 Add TLS support to manila backends
By overriding the variable `manila_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the manila 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: I38b95b73301d2210f64105c20f389c74498a5345
2023-04-29 18:47:26 +02:00
Jonathan Rosser 543e317014 Remove unused variable
This was introduced when the role was created using os_cinder as
a starting point [1], as has never been used in the manila role.

[1] f9bfb7f0bc

Change-Id: I57df438cd25efd30e0e437470fc34df8fea1317c
2023-04-11 09:04:14 +01:00
Dmitriy Rabotyagov f728ca5707 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: Ie5ebb4d68ed06cff26462dc55092fda8a9ad2f44
2022-06-15 19:11:22 +02:00
Dmitriy Rabotyagov 0db9f1f959 Delegate share type creation to setup host
Instead of running manilaclient on manila host, we're delegating
execution to service_setup_host. This reduce
complexity and remove some requirements for manila hosts.

With that we also replace usage of manilaclient
with openstackclient.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/845998
Change-Id: Ie04d9e1690e0f053e86e28e0bf1d6c3aa43774b0
2022-06-15 14:32:02 +00:00
Dmitriy Rabotyagov a422c42665 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: I94b3f8ba5116cdfb94e9d0dc575bd7edb1d27b3c
2021-12-06 20:52:14 +02:00
Zuul 82bbca6961 Merge "Refactor definition of lock path" 2021-12-06 18:41:05 +00:00
Damian Dabrowski 48a8c0627a 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: If245cd3f12a919933d912205dd60f1e02f555f7c
2021-12-06 09:00:04 +00:00
Dmitriy Rabotyagov 58c289d7cb Refactor definition of lock path
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819300
Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/819298
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/820008
Change-Id: I495f99d1378233d1b5d6ebc8ef101f683129a84f
2021-12-06 08:59:58 +00:00
Dmitriy Rabotyagov 286414c2a6 Set manila_backends to empty dict by default
This simplifies logic across the role and not verify if variable is
defined each time we're attempting to use it.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/787341
Change-Id: I6db4ad6e6389b1ff63dc52a1e48c477a97905d17
2021-05-20 18:52:19 +00:00
Zuul 8c893d6da5 Merge "Add variables for rabbitmq ssl configuration" 2021-05-19 15:04:01 +00:00
Zuul 019e08ef48 Merge "Use ansible_facts[] instead of fact variables" 2021-05-19 11:38:31 +00:00
Jonathan Rosser 590e0235ab Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I175072167602b6ec400d21b9350533a58901f890
2021-05-18 16:32:14 +00:00
Jonathan Rosser bb870ea34e Add variables for rabbitmq ssl configuration
Change-Id: I419cc8f2920bb2a5108cacb95e41a9965b3dd659
2021-05-18 16:31:24 +00:00
Jonathan Rosser f15d62e61e Switch default virtualenv to python3
Change-Id: I9eb6fcd712a868e28735d38261c21582d8751209
2021-05-18 16:30:47 +00:00
Jonathan Rosser f404eb46c4 Move manila pip packages from constraints to requirements
This is necessary to use the new pip resolver

Change-Id: I78f7cb313da7835d96be95436ae69c0a6d8cfa25
2021-01-25 10:09:11 +00:00
Dmitriy Rabotyagov b5aed5c130 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: Ie2c30dcc3640361b91e602125e98996c897f0f06
2021-01-18 11:36:42 +02:00
Mohammed Naser a045397c57 Add Manila key generation and distribution
Change-Id: I2515dc4abf93f2d30157a376c8a9a497c865aaf5
2020-11-17 11:13:01 +02:00
Zuul ba9e807828 Merge "Start using uWSGI role" 2020-11-09 19:31:39 +00:00
Mohammed Naser abbfec221b 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: I946adf21b58e117508dcc470c0fb3e9c2565c26d
2020-11-06 12:59:12 +00:00
melissaml d65a19064a Cleanup after repo_build and pip_install retirement
Change-Id: Ief0adafb6ccb03b274cde1905a97e396d126291a
2020-11-06 12:56:27 +00:00
Dmitriy Rabotyagov bfda45cc16 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: I40c292b7ba2f48a02ffe4c45d984ea7af6460f62
2020-10-30 18:36:48 +02:00
Dmitriy Rabotyagov 98738c9c6f 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: I51f7612381c6b7180cc1af1f564196aa08b2ed15
2020-08-20 19:00:34 +03:00
Zuul c2b44a9c0b Merge "Refactor memcached_servers" 2020-03-17 17:10:33 +00:00
Guilherme Steinmüller fcf3781459 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: I06993827240135365c83bbfd4a75712598a2310a
2020-03-16 14:05:59 +00:00
Kourosh Vivan 6170d71caa Fix python path when deploy host is not localhost
When we don't use localhost as deploy host, we need to use
manila_service_setup_host_python_interpreter variable.

This variable give the correct python path (in a venv for example when
we use a utility container as a setup host)

Change-Id: I34070aad44cfcbb59773196b0f74c10225bc9124
2020-02-25 11:17:41 +01:00
Zuul 037b5821f7 Merge "cleanup: config values" 2020-02-10 16:03:08 +00:00
Mohammed Naser 0f369f4ae2 cleanup: config values
There are certain configuration values which are defaults and have
no purpose in being overwritten, users can use the overrides.

Also, some have been removed because they don't exist inside manila
anymore.

Change-Id: I1fada7b36fc0aae81f6adf5bc28035777e255eef
2020-02-10 09:03:11 +00:00
Mohammed Naser 67c4bc8316 refactor: service group names
The uwsgi role assumes that the keys used match the service names
and all of our other services follow this pattern so let's keep
it the same for this.

Change-Id: Id740ff6704bddad306f7470665717dd5c8674e82
2020-01-30 19:06:29 +02:00
Dmitriy Rabotyagov 8836cac7e0 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: If100cd2ba80a274375e015cd4b7f5c7e130fd26c
2019-11-14 17:05:21 +02:00
Zuul 4b0d0f3a70 Merge "Replace deprecated "lvm_share_export_ip" opt" 2019-10-25 12:50:49 +00:00
Jonathan Rosser acc94725e3 Add global override for service bind address
Change-Id: Icad6256c8a5b3c19b113f7f87ead04d6e71169f6
2019-09-19 13:45:48 +01:00
Jonathan Rosser 43038143e6 Allow venv python interpreter to be overridden
Change-Id: I8a9e586fb2e48eb13b7477e3ead6858cac902688
2019-09-11 21:02:25 +01:00
Goutham Pacha Ravi e8945f3cd5 Replace deprecated "lvm_share_export_ip" opt
The config opt for manila's LVM driver:
"lvm_share_export_ip" has been deprecated in
favor of "lvm_share_export_ips" [1].

[1] Ib3594aa5d7751c829820fce830d87f6ceea6b049

Change-Id: I4e41279cd42a254fda3a200591bea2c44fecfb70
2019-07-30 13:55:38 -07:00
Mohammed Naser d37116a602 developer_mode: drop vars
The developer mode no longer exists, therefore, we should remove
all references and we're already installing the distro devel
packages inside python_venv_build.

We were also referencing the wrong constraint variable, so this
fixes that as well.

Change-Id: Iaf2e848b80923718741c148f2a76d5a3efca53b1
2019-03-28 22:11:11 -04:00
Kevin Carter b9809ef89d Update manila so that it works with cephfs
This change updates manila so that it can function with cephfs.
While cephfs was assumed to work these changes solidify support
and tune up the role.

Change-Id: I4d95bfc15d09b7b7c0b997d7eab91509b0c63885
Signed-off-by: cloudnull <kevin@cloudnull.com>
2019-03-27 22:39:33 +00:00
Michael Vollman f9bfb7f0bc Basic working os_manila role
Starting this new role as a copy of the os_cinder role due to the
similarities between the two openstack projects.  This role will
deploy manila api, scheduler and share services on ubuntu with the
default local LVM backed NFS scenario.

Change-Id: Ibda073e5aaa6df3b254961d4aed3a8d5961f3432
2019-03-08 19:41:48 +00:00