Commit Graph

23 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov ceca11a27d Adopt for usage openstack_resources role
With efforts to create a resources in same, unified way,
we convert tempest role to use openstack_resources
for creating and managing openstack resources, like projects, flavors,
networks, images, etc. This should reduce maintenance costs
in case of futher collection updates and unify approach.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/911377
Change-Id: I658e6218cf59650d0abfa491ebaa6d3c37db2993
2024-03-05 20:40:12 +00:00
Andrew Bonney be34b1eea6 Add missing libxml2 distro packages
Change-Id: Iece3498eba9ee41f2008500e983cf3355bcd17fb
2023-11-30 10:23:01 +00:00
Dmitriy Rabotyagov 1b7360802f 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.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: Ic5b425564e494502722106f94e406dc2ed69dcde
2023-11-08 08:48:39 +00:00
Dmitriy Rabotyagov bfbf0db8fb 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: I68c3d98de3a0a4444c0c1ea0cc528901613a63bd
2023-07-14 18:02:08 +02:00
Dmitriy Rabotyagov 2b6859ee2a 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.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_heat/+/879963
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/880047
Change-Id: I2327ed957133ad0a918fb1d2e215952b4184c61f
2023-05-16 15:04:29 +00:00
Jonathan Rosser 847b0c2636 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: I13d8d4fa8f1de4822a671971232ac3960edc0759
2022-02-02 04:16:21 -05:00
Jonathan Rosser c0f9229980 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

Depends-On: Ic31fd78bb5ad9cd484f44e63ba02db7424a500d5
Change-Id: I7c6258673b7b13c15177873fb42080e452eba2d4
2021-03-11 22:30:12 +00:00
Zuul 8c51051b0f Merge "Define condition for the first play host one time" 2020-09-23 17:42:11 +00:00
Jonathan Rosser 1aa18f67e8 Only install devel packages during python_venv_build
These packages should not be directly installed onto the target host
as they are only required at wheel build time.

Change-Id: I2d6358bde5d00700e11ce7eb1fb1724e02f999e4
2020-09-21 11:25:14 +00:00
Dmitriy Rabotyagov cfd671ef5d Define condition for the first play host one time
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.

Change-Id: Idd1c6c9ad7f5165b8e12e156ab6398b28c5e799a
2020-09-16 10:22:47 +00:00
root 372069994d Add Centos-8 support
Change-Id: If5b234d43cf9519c523b2b4a1ed1e27978e03fa9
2020-06-19 01:53:44 -04:00
Jonathan Rosser 2e118940f1 Fix magnum-api wsgi name
This should not be a hardcoded path and certainly not to python2.7


Closes-Bug: 1858034
Change-Id: Id22502d0fbe33b3d07ad738f39aff8367ef52074
2020-01-03 11:48:55 +00:00
Dmitriy Rabotyagov 027224854d 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: I354ff3e81f4f4586aa2d52e1dcd8359c16a9e39a
2019-09-05 14:11:14 +03:00
Zuul 12cde7ae35 Merge "Use systemd-journald instead of log files" 2019-07-18 07:37:05 +00:00
Dmitriy Rabotyagov bef0ec0ce2 Convert dynamic includes to static imports
When task/role files are included using include_tasks, tags are not
passed to the included tasks. As a result, tags like neutron-config
do not have the intended effect. This patch changes include_tasks
to import_tasks for all cases where dynamic vars or loops are not used
so that tags are properly handled.

Reference -
https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse.html
https://bugs.launchpad.net/openstack-ansible/+bug/1815043

Change-Id: I3a1fe5e065b9dbb218acdab06c1d1dac38ea7e64
2019-07-17 16:19:27 +03:00
Dmitriy Rabotyagov 2fe6aaa322 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: I8be07495dd84f085de6d4409f2efd67a8359d82e
2019-07-17 16:12:34 +03:00
Mohammed Naser ad30f59319 Refactor services to magnum_services
This patch refactors the services into a dictionary
which should simply service management.

Change-Id: I3cd735209a0a40d7822377eeb1ca58c95bb51832
2018-02-18 12:58:54 -05:00
Markos Chandras f023b02b85 Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. Nothing special is
required for this except adding the appropriate distro variables
file and also update the zypper cache before package installation. We
also had to apply the same virtualenv-tools fix similar to CentOS.

Change-Id: I265f57141a1aa0c26857c05e38206b68fd2de1b0
2017-08-15 15:16:14 +01:00
Ricardo Carrillo Cruz 41f4020b39 Add RedHat derivatives support for OSA Magnum role
I got a failure when running OSA on Centos with Magnum,
this file adds the package names for RedHat derivatives.

Change-Id: Ia355f15b6c2c9d80447e227660f7037b3dfdc58e
2017-05-10 15:45:41 +02:00
Jesse Pretorius 2cf15a702f Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: Ic824dddafbcba73e3bccfd05da83485b94a9520d
2016-08-30 19:02:37 +01:00
Chris Hultin 67053d0b7f Resolving minor issues with Magnum role that prevented installation from
succeeding.

Adding missing 'MySQL-python' dependency to
magnum_pip_packages
Adding path to 'magnum-db-manage' call to resolve pathing
issue with virtual environment
Adding missing 'Restart magnum services' handler
Removing libmysqlclient-dev from magnum_apt_packages due to conflict
with Galera packages
Correcting '*_proto' to '*_protocol'

Change-Id: I746ecb21ebfda70e207f239306e1ec38785917cb
2016-06-08 11:02:44 -05:00
Jimmy McCrory bacac18263 Updated role using the Multi-Distro framework
* The default apt packages have been moved into a var file
  that is only loaded when the detected OS is matched.
* The Install task file has had the apt specific tasks moved
  into a named install task file.

Change-Id: Idbf1b737a11b0bb2460989b2881395ee87a90429
Implements: blueprint multi-platform-host
2016-05-26 18:36:42 -07:00
Ian Cordasco 10f217b316 Initialize galaxy role 2016-01-05 13:07:39 -06:00