Commit Graph

33 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov a78b40a491 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: I7e4e8b3be33536545b5b4bcfb4855e8c160bb152
2023-10-25 10:32:46 +00:00
Dmitriy Rabotyagov 94e5817391 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: I68a3041edf0b0eb891fbe1e40081f779fc40c21d
2023-07-14 15:21:35 +02:00
Dmitriy Rabotyagov 5061ec247c 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-plugins/+/880028
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/880031
Change-Id: Id9540fe5f7577ebbc222a1ae303b16338a1f071b
2023-04-11 11:11:24 +00:00
Dmitriy Rabotyagov 74cf65fd75 Install git into placement containers
If venv_wheel_build_enable is defined to False, placement will fail to
clone and install repositories due to missing git binary.

Change-Id: If1e3eec0c558d1472da7bc3a4e87825e36ba4fdc
Related-Bug: #1989506
Closes-Bug: #1995536
2022-11-15 13:00:34 +00:00
Jonathan Rosser 2dc4709537 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I70349036d45f44b7d951224fa2d27fe417301d87
2021-03-16 08:04:15 +00:00
Jonathan Rosser 22b5051802 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: I1a9fd61f8690621144fc26eec762527d6ffcc33c
2021-03-10 12:16:38 +00:00
Dmitriy Rabotyagov b11f705ea3 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: Iea777412d3bf7dc76b8073c51b4cdcb029573f66
2020-09-16 11:53:56 +00:00
root 08d2b28bd2 Add Centos-8 support
Change-Id: Id844f584b22e35ac154b1727a42522d73bf97670
2020-06-24 17:44:53 +01:00
Dmitriy Rabotyagov 83d643947f 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: If539762d5de0730ce97d8f8aaefb4c096d850902
2019-09-04 19:41:09 +03:00
Dmitriy Rabotyagov cd66c12e7f 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.

Also heat_init_systemd is finally dropped, as it is not used anymore.

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

Change-Id: I321979a96acc04a25b5287fb2f61fa03cda66e81
2019-08-01 14:09:45 +03:00
Dmitriy Rabotyagov 88c29bb665 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: I9f8a7f92d644775bd673dbade73fbaa1268712d5
2019-07-17 00:23:33 +03:00
Dirk Mueller 3bb50ce07d Tidy distro package lists for openSUSE Leap 15.1
Change-Id: Ia4527b79a6d652cbc8907b961daf4e58665e1a2e
2019-06-28 14:20:14 +02:00
Jimmy McCrory 8a91e7d479 Fix distro installs on Ubuntu
Beginning in the Stein release, Ubuntu distro packages are now using
Python3. This requires additionally installing and using the uwsgi
python3 plugin.

Install the 'python3-heat' package instead of individual service
packages since they provide service config files that conflict
with the ones OSA provides.

Change-Id: I8283fbacd4d014fb6652146f6b7750df750e6e76
2019-06-06 11:47:07 -07:00
Guilherme Steinmüller 8420298481 debian: add suport
This patch adds the Debian jobs for this role to make sure
it's always passing as well as updates the meta to reflect
it's support of Debian accordingly.

Depends-On: I9a92b73c419a0dc1cca40dacfef75de61a61db94
Change-Id: I8e3b4d7386575906f2b4713623c89a8b7c30faac
2019-04-09 17:00:41 +00:00
Jonathan Rosser fcaf47c3ad Do not install heat service distro packages for source installs
Change-Id: I4ee6522fe0526db162d38a4ea1b7f60976460be1
2019-02-21 21:10:16 +00:00
Chandan Kumar 0acb9001bf Fixed the egg name of heat to openstack_heat
https://review.openstack.org/606160 changes the change the dist name
to 'openstack-heat' and it needs to be fixed in the os_heat role
otherwise it will fails while installing it.

Added openmpi-devel distro packages as it is need for building mpi4py.

Depends-On: https://review.openstack.org/636297
Change-Id: I2fbb2465f9b4765a87011dfb2c2f65bd27e7b2c9
2019-02-12 10:24:36 +00:00
Kevin Carter 36a5e628e0
Cleanup files and templates using smart sources
The files and templates we carry are almost always in a state of
maintenance. The upstream services are maintaining these files and
there's really no reason we need to carry duplicate copies of them. This
change removes all of the files we expect to get from the upstream
service. while the focus of this change is to remove configuration file
maintenance burdens it also allows the role to execute faster.

  * Source installs have the configuration files within the venv at
    "<<VENV_PATH>>/etc/<<SERVICE_NAME>>". The role will now link the
    default configuration path to this directory. When the service is
    upgraded the link will move to the new venv path.
  * Distro installs package all of the required configuration files.

To maintain our current capabilities to override configuration the
role will fetch files from the disk whenever an override is provided and
then push the fetched file back to the target using `config_template`.

Change-Id: Ib26b25c1df483c2e31bccc91874a83292be6a3aa
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2019-01-09 21:15:48 -06:00
Jesse Pretorius cc63216583 Remove python-keystoneclient package install
Now that we no longer use our own keystone module, but
instead make use of the ansible runtime venv's shade
library and upstream ansible modules, we can eliminate
this package/library being installed on the host.

Change-Id: I91402e82c39363c1eb5a439781cc4328d028bbcb
2018-09-18 11:32:59 +00:00
Jesse Pretorius 8fcf0ff760 Rename SUSE vars file to cater for any version
To make the transition between versions easier,
we rename the vars file. This also resolves
issues when meta-dependent role inclusions do
not pick up the correct file when using the
include_vars task with multiple search paths.

Depends-On: https://review.openstack.org/602924
Change-Id: I0b4d0b270194fa3dd465e69d1528ba7a29b8ab4f
2018-09-16 01:57:24 +00:00
Andy Smith a59e71658b Setup oslo.messaging extra packages for optional drivers
Change-Id: I006e28c3828f5ed28b5c6e020a2ee22885a74d95
2018-09-11 10:21:11 -04:00
Jonathan Rosser 9fa5aba36f Use generic vars file for ubuntu
These vars work for both Xenial and Bionic

Change-Id: Ic80e766b45bc8a9136a6f5000f2495b807748f0a
2018-07-31 09:39:24 +01:00
Markos Chandras 3507c4e461 Do not pip install keystoneclient on the host
The keystoneclient package is being installed on the host by PIP but
that means that a whole bunch of required dependencies are being pulled
in as well.

This brings the host to a rather messed up state when installing
keystone from distro packages, since distribution and
PIP packages are being mixed together. We only need the client to
register the service with keystone so we can simply use the distro
package for that to avoid installing lots of PIP packages on the
host.

Implements: blueprint openstack-distribution-packages
Change-Id: I3759995cfb8192145d1b871158c95f594751a759
2018-05-31 08:48:31 +01:00
Jesse Pretorius 726ed21239 Fix heat_uwsgi_bin value for source-based builds
https://review.openstack.org/570166 included an error,
which this patch corrects.

Change-Id: Ic06d63c9870e82f0330903841030a057cccbc32d
2018-05-30 13:23:45 +01:00
Markos Chandras 3ac7ae6ea7 Add support for using distribution packages for OpenStack services
Distributions provide packages for the OpenStack services so we add
support for using these instead of the pip ones.

Change-Id: I2435793b73e0a30131b4710b6e7d29dacbb7e6fa
Implements: blueprint openstack-distribution-packages
2018-05-25 17:27:25 +01:00
Jenkins 20b96b6f6b Merge "Add support for the openSUSE Leap distributions" 2017-07-13 15:07:48 +00:00
Markos Chandras 1d0d71e5cc Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. Nothing special is
required for this except for adding the appropriate distro variables
file and also update the zypper cache before package installation.

Change-Id: Ibb3a6633724ce3555d5262fb44914d6cddfe1481
2017-07-11 14:01:01 +01:00
Jesse Pretorius f7de00cadd Optimise role execution
In order to optimise the role execution and
to improve consistency, the following is done:

1. The services dict is filtered per host to
   prevent skipped tasks from spamming the
   logs and wasting execution time.
2. The service restart is implemented in a
   specific order to improve consistency. The
   order implemented is a wild guess as there
   is no upstream documentation about the
   'correct' order.
3. The service enable/start is consolidated
   into the handler to be more efficient.
4. A dynamic include is used instead of nesting
   includes for the init prep.

Change-Id: I91d20b980f1b1a63ff2d6ef30bcec7ef58a5571a
2017-07-10 13:08:21 +01:00
Marc Gariepy c18f4f262e Add which in CentOS package list
which is needed by virtualenv-tools.

Change-Id: I2ac86374ae172043bc5a3bd917c2c5b86f977c90
2017-01-11 13:58:24 -05:00
Andy McCrae b77c406c69 Remove Trusty support from os_heat role
Change-Id: If665515b30bfbd6b618c70357963df28d3d7de54
Implements: blueprint trusty-removal
2016-12-15 13:17:58 +00:00
Marc Gariepy 39eeea8d77 Add CentOS support for os_heat role
- Heat is now installable on CentOS

Change-Id: Iddb589605246a9c376ec99be0769ab65d376cbba
2016-11-22 14:56:17 -05:00
Jesse Pretorius 8878e8c44d 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: Iae52d01acd33f6caa91a526f6c19c2ac19161702
2016-08-30 17:10:53 +01:00
Amy Marrich f659c8244c Implement Xenial Support
This implements support for Ubuntu 16.04.

Change-Id: I1c05af32bd85931d09aaf5227dbc9af1a2151ab4
Implements: blueprint support-ubuntu-1604
2016-06-14 13:21:42 -05:00
Travis Truman c05704194b Multi-distro pattern for os_heat role
This is an implementation of a pattern for multi-distro support

This allows for support of distros other than Ubuntu

Change-Id: I1b53521570bd71bdca3d482345403bbc8133df7b
2016-05-02 10:10:20 -04:00