Commit Graph

52 Commits

Author SHA1 Message Date
Zuul 2f0f0ff4b1 Merge "Add quorum support for service" 2023-11-14 20:30:42 +00:00
Dmitriy Rabotyagov 435a69ed31 Add quorum 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.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_keystone/+/900631
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_swift/+/900632

Change-Id: I3292a388766654b1a10434ee8ba060e28607e707
2023-11-13 12:14:57 +00:00
Danila Balagansky f9de8b2b78 Enable Ceilometer resource cache
This change should significantly reduce load on Gnocchi due to caching
`resource` objects in Memcached.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I72a0b1728e6f6e761bf75e7d57675434230475d4
2023-10-25 10:34:14 +00:00
Dmitriy Rabotyagov 17fc5d6465 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
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/888517
Change-Id: I32efef68c8ade24fb164f2cfcecd8e7147bf5f0e
2023-07-14 05:42:23 +00:00
Dmitriy Rabotyagov bfca55e20d Fix logic of defining polling_namespaces
Previous logic did excluded possibility for ceilometer-polling agent
to poll multiple namespaces at the same time. This resulted
in a wrong config for AIO metal scenario.

Change-Id: I2ad3f748d18bf571dc7b82422fbcd8269cbe168e
Closes-Bug: #2018619
2023-05-05 21:22:41 +00:00
Matthew Thode 19c0141676
remove loadbalancer from installed definitions
The example file was removed from ceilometer in
318c54648c2c85d4f4f5425c5ffc5e5f3dda86f2

Signed-off-by: Matthew Thode <mthode@mthode.org>
Change-Id: Ic23655e793aca9db344354ef95460858534c518c
2022-11-17 20:31:34 -06:00
Jonathan Rosser ff47557775 Remove py2/py3 compatibility notes
We only support python3 now.

Change-Id: Ie71d28d67e10df4923f057484216cf9010f2fd6b
2022-02-02 04:07:36 -05:00
Jonathan Rosser 769da7271d 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: Ia0b927fe775d5638cd09ecb91af550892764353d
2021-03-10 12:16:37 +00:00
Jonathan Rosser 434c249552 Remove centos-7 conditional configuration
We don't support centos-7 for Victoria so remove conditional code.

Change-Id: Ied8a54d3837c4447d612457eebb4fd7a8b9d342d
2021-01-04 14:04:39 +00:00
Dmitriy Rabotyagov be84a509c4 Unify deployment of ceilometer files
This aims to make possible to define ceilometer_pipeline_user_content
filepath instead of making huge overrides. In the meanwhile default
behaviour should be kept with minimal influence on the existing
deployments.

Change-Id: I0a0ac1b9bbdb8b6a68f870f0ae03edbee8c63d68
2020-11-20 08:05:17 +00:00
siavashsardari edb0d72ad8 Add event_pipeline support
Change-Id: Ica34b308378974a2b5501e85b2a8040ad457f4cb
Closes-Bug: 1903395
2020-11-10 20:44:32 +03:30
Dmitriy Rabotyagov 533c789316 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: I6247f86b26d1e0dac55fa863a19405ff171c82ff
2020-09-16 13:49:10 +00:00
root 9ae178f312 Add centos-8 and ubuntu focal support
we need separate redhat-8.yml file to handle libvirt libraries condition.
Also as we've fully migrated to py3, no need to install py2 libraries.

Change-Id: I2db9cdfa2500c9a4858fd4b43e636d728c8dec6d
2020-07-24 12:00:34 +00:00
Zuul 43f1bcea67 Merge "Get ceilometer_lib_dir in more reliable way" 2020-05-12 12:22:28 +00:00
Dmitriy Rabotyagov cb6bc308c0 Get ceilometer_lib_dir in more reliable way
Instead of bothering with definition of python lib dirs per distro,
we can just get ceilometer library directory with python command.

`ceilometer_lib_dir` variable is mainly used by post_install task.
This variable is not set correctly at the moment if role is ran with
ceilometer-config tag. So this patch also fix running role with that tag

Change-Id: Id4fe9a8eef27bdd1c71104007e6b493f3f5109d5
2020-05-11 19:39:29 +00:00
Dmitriy Rabotyagov f50ea4f5e1 Make user provided content deployable
When src is provided to config_template module, content is simply
ignored. So we should set tmp_f only when content is not provided.
This also means that we should use native file lookup instead of
pipe.
Additionally when statements shouldn't include Jinja2 delimiters.

Change-Id: I9ff2fdea02ca71068dab9cfcab10ca60785821de
2020-05-04 12:38:17 +03:00
Dmitriy Rabotyagov ab81ea24bb Use py3 for CentOS
Unfortunatelly CentOS 7 do not have libvirt libraries
for py3, so isntead of symlinking them, we have to install devel package
and build them inside venv.

Change-Id: Ibcfb82f2b34c0f9db299262ed3b200f87953e043
2020-03-12 10:24:37 +00:00
Jonathan Rosser d46837f31e Add python3 compatibility for source installs
Change-Id: Ic7dbf1edf12090b815207017bf514c47c50feeea
2019-09-11 20:23:02 +01:00
Dmitriy Rabotyagov fe1f87b387 Fix gnocchi db population
python3-gnocchiclient seems to be required for ceilometer to
correctly populate gnocchi db

Change-Id: I6c68e7d0710ea3fa3c45fa3aa27b40c9e3ca6f71
2019-07-26 05:09:56 +00:00
Jimmy McCrory 492d544de3 Fix distro installs on Ubuntu
Beginning in the Stein release, Ubuntu distro packages are now using
Python3.

Install the 'python3-ceilometer' package instead of individual service
packages since they provide service config files that conflict
with the ones OSA provides, and to avoid running ceilometer central
services across all compute hosts.

Change-Id: I8ded76de3c81d6995ed9b57bd21773433bead21b
2019-06-11 07:46:09 -07:00
Guilherme Steinmüller 400d926b2c debian: add support
This patch updates the meta to reflect it's support
of Debian accordingly as well as rename ubuntu vars
file to debian.

Depends-On: Icf91eee6e369d9a6a95dd0c8772c2760eaff5bd2

Change-Id: Ib5ae09823dccc4531557e3fbd1e55aa5fda7d244
2019-04-11 00:37:23 +00:00
Dmitriy Rabotjagov bbf9cacdfd Update role for new source build process
Packages from ceilometer_developer_mode_distro_packages were moved
to ceilometer_devel_distro_packages list.

Change-Id: Ia47c56d7fccb36d99a6368b836b48613500beea6
2019-03-27 21:06:22 +02:00
Dmitriy Rabotjagov ed4d7ed536 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: Ia467e20c32732152a03579216a0ced0dbb4038c4
2019-02-04 21:25:57 +02:00
Dmitriy Rabotjagov 508f077c61 Add ability to override meters.yaml and event_definitions.yaml
This change will allow deployer to override meters.yaml and
event_definitions.yaml files, if he would like to change layout/data,
which will be stored in gnocchi, and the way it will be
updated/stored.

Change-Id: I6bfe03dc1f5ad795d91534b1a51c4d8889bb3ed1
2018-12-12 19:46:39 +02:00
Dmitriy Rabotjagov 8ba1f3829b gnocchi_resources override fixed
gnocchi_resources.yaml has been defined in main.yml, had all required
variables, but user overrides were not actually deployed on containers
Also, it had an absolete path in GIT repo.

Change-Id: Id32789b59f913cfbb78c1cb4a73b18df85c36655
2018-12-11 16:29:52 +02:00
Jesse Pretorius 6d2ad6a004 Use the distro package for libvirt-python
The libvirt-python library has C bindings which are very particular
about the version of its companion package (libvirt). To ensure
things run smoothly for stable releases, we opt to use the distro
packages for these and symlink the appropriate library files and
binding into the venv.

This approach has been used successfully for the ceph and libvirt
python bindings in other roles.

Change-Id: I23bf430087af8b16a3d77d96f6ceb3d7f6d8a9d5
2018-12-10 11:50:47 +00:00
Jesse Pretorius eaf29823b4 Remove unnecessary package install duplication
Currently the devel packages are installed everywhere,
but they only need to be where the wheels are built.

Also, there is already a task to install the packages
needed on the target hosts when installing - so we do
not need to give the same list to the venv install role
because they will already have been installed.

Change-Id: I8d13d6c59cdce3f9ff7642a6b92444b473ccec6d
2018-10-30 19:19:08 +00:00
Dmitriy Rabotjagov 1128c21955 Fix of oslomsg undefined variables for services notifications
A buch of defaults oslomsg related variables were configured.
In case of enabling ceilometer for services, role failed unless
all required vars has been specified manually by deployer.

Also vars ceilometer_oslomsg_rpc_servers
and ceilometer_oslomsg_notify_servers were removed
They were not used anywhere except ceilometer.conf.j2
and might be easily replaced with host_group vars.
Their removal allowed to simplify macros.

Fixed distro_install functional test for ubuntu,
as ceilometer-agent-notification package was missing.

Change-Id: I148ccaff9576b09d33d889b79963e88ca84d2ffe
Closes-Bug: 1794688
2018-10-04 15:54:08 +03:00
Jesse Pretorius 38a64571d5 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
Depends-On: https://review.openstack.org/602920
Change-Id: I8d4fd6ee9c7df71fc2d79ac67fce494dc2c89b37
2018-09-19 15:16:24 +01:00
Andy Smith b68a3214aa Add install packages for optional oslo.messaging amqp1 driver
Change-Id: I7943cda717091ea4f383a4662c4ec52d77f37a79
2018-09-19 11:10:49 +00:00
Jesse Pretorius fb0da66a24 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: I016a22a8b827a247c3962007aabffe04868058ad
2018-08-10 14:53:22 +01:00
Mohammed Naser f803f159f3 Drop un-used packages from role
Change-Id: I5288b2585a6a3e77c83ec97cabaf0c6820c1490a
2018-08-04 19:30:21 -04:00
Kevin Carter 195aed6f51 Add systemd journal logging to the service config
The systemd journal would normally be populated with the standard out of
a service however with the use of uwsgi this is not actually happening
resulting in us only capturing the logs from the uwsgi process instead
of the service itself. This change implements journal logging in the
service config, which is part of OSLO logging.

OSLO logging docs found here: <https://docs.openstack.org/oslo.log/3.28.1/journal.html>

Change-Id: I5ae4ee8b0f69a4ed9b6088f043abaa1c4b1291d8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-31 12:58:57 -05:00
Jonathan Rosser f0621d6e64 Use generic vars file for ubuntu
These vars work for both Xenial and Bionic.

Change-Id: Iedcf7fbf93d1a4fc1549834dfd74468f5e78c53f
2018-07-31 09:19:38 +01:00
Markos Chandras 76ae602612 vars: Do not pull devel packages on distro installations
The devel packages are only needed to build the pip pacakges so we don't
need them when we install packages straight from the distro repos.

Change-Id: I84bb4c07d2a2abdf517ba24477c2b22a32564129
Implements: blueprint openstack-distribution-packages
2018-06-04 10:03:55 +01:00
Markos Chandras ba05bf78a0 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.

Change-Id: I1247ae07035451087e70f3e1782dd9c25fe1c554
Implements: blueprint openstack-distribution-packages
2018-05-31 08:37:58 +01:00
Markos Chandras 5e0a16e624 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: I3edabacc3978cd42988a6c0c04a011c22159b9fa
Implements: blueprint openstack-distribution-packages
2018-05-18 15:25:38 +01:00
Mohammed Naser 33f5dfa7e3 Drop MongoDB installation and API file configurations
Ceilometer no longer stores any data so the MongoDB installation
playbook is not used.  In addition, it no longer has an API so
the api-paste file is useless as well.

Closes-Bug: #1747612
Change-Id: I20104cc357f78b01e2b1246a3f51d609bb2f4f24
2018-02-06 15:28:48 -05:00
Markos Chandras 15ca22d4e0 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.
Moreover, for tests to pass, we need to use the OBS repository to
install the MongoDB packages since they are not provided in the default
openSUSE distribution repositories for Leap < 42.3

Change-Id: Ifa3968f7f578174cf12737c758fa2bca30393fb0
2017-07-11 11:19:54 +01:00
Jesse Pretorius 9e96b65126 Source template files from git or deploy host
Instead of sourcing the paste/policy files from the role,
the deploy host will first be checked, then the git source.

The current mechanism uses a lookup, causing the fetch of
the default templates to happen via curl from the deployment
node. This causes problems if the deployment node does not
have access to the repo server web service, which may be the
case in high security environments.

This patch changes the mechanism to only use the lookup
module for the file content that is on the deployment node,
then falls back to using the uri module to fetch the default
content. This ensures that the deployment node does not have
to reach into the environment for the content.

Additionally, the following variables and related tasks are
removed as the files they applied to no longer exist in the
source git repository:
- ceilometer_event_definitions_yaml_overrides
- ceilometer_event_pipeline_yaml_overrides

The pattern applied is the same as that used in the
combination of the following two reference patches:
- https://review.openstack.org/446235
- https://review.openstack.org/463390

The rootwrap.conf template is re-added because it cannot be
used verbatim from the upstream repository. It requires the
addition of the service venv bin in the exec_dirs. A mechanism
to implement this dynamically will be figured out in a later
review along with an implementation which will fetch the
rootwrap files directly from the git source too.

Change-Id: I248910a544f611b590bc93449aea98434802cae3
2017-05-19 16:12:28 +00:00
Miguel Alex Cantu 5e6ff1ea5f Remove Ceilometer API Service
Ceilometer API is now deprecated in favor of using
Gnocchi, Aodh, and Panko to pull telemetry information.

Change-Id: I4464fc6bd4ad3ef14e2638abcdb86180e82615e1
Closes-Bug: 1666640
2017-03-02 15:42:08 +00:00
Marc Gariepy a7dbfcf146 Add which in CentOS package list
which is needed by virtualenv-tools.

Change-Id: Idc94b224d1d6217c6b07509bc4a2184c0344b45f
2017-01-11 13:57:55 -05:00
Marc Gariepy 4487698ad3 Add CentOS support for os_ceilometer role
Depends-On: Iaf51101bbaa5eba49f78e950152095913951430e
Change-Id: If002cf8f8f5c04df0dee664640ab725cea8c1a3b
2016-12-20 19:14:13 +00:00
Jenkins 52a2bfe0d8 Merge "Remove remaining Trusty support from os_ceilometer role" 2016-12-20 16:12:47 +00:00
Andy McCrae 9e27c9de1f Add required packages for Ceilometer
Ceilometer now has a requirement on libxml2-dev and libxslt1-dev in
order to install lxml pip package.

Change-Id: I55a00db4350f05b96bb3b48a0e9d5d96b6792908
2016-12-16 12:45:43 +00:00
Andy McCrae bf0c6c7221 Remove remaining Trusty support from os_ceilometer role
Change-Id: I5ed854d48915226eb930525f268c5ff49f521cee
Implements: blueprint trusty-removal
2016-12-15 12:36:16 +00:00
Kevin Carter 22967712bf [Trival Update] Organize the packages lists
The package lists within the role should be alphabetized.
This makes reading the list and adding packages easier.

Change-Id: Ib9ed21fa6e9bc79537f76c7a2fc7842afa91a7c7
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 09:16:26 +01:00
Steve Lewis f2365ec17d Limit where Apache is installed for Ceilometer
Because Ceilometer is deployed with impacts on some deploy hosts,
Apache presents an undesirable surface area to deploying it seems to
be contraindicated.

Change-Id: I494875017509516e50af594c53430f5db90f5322
2016-09-14 20:49:44 -07:00
Steve Lewis 31cddcd762 Serve the ceilometer-api using mod_wsgi
With the dependent change merged Ceilometer API will no longer run
without a stand-alone wsgi engine. It is too late in the cycle right
now to bring over changes for nginx and/or uwsgi for this project so
only this deployment option is being supported at this time.

Change-Id: I3cff6b183feae3c346cd56602d7b733a6dd9a01b
Depends-On: I8812ea1a92d6dc7f41a490e971bb7a09dee9b304
2016-09-14 17:24:49 -07:00
Jesse Pretorius de037c4d3f 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: Ia44a7a5eefdba72a55ffa877d92cdda2732d4c73
2016-08-30 16:41:49 +01:00