Retire openstack-chef: remove repo content

OpenStack-chef project is retiring
- https://review.opendev.org/c/openstack/governance/+/905279

this commit remove the content of this project repo

Depends-On: https://review.opendev.org/c/openstack/project-config/+/909134
Change-Id: Ie74b00de70c5ce8180b1d6b06394572ef8025f34
This commit is contained in:
Ghanshyam Mann 2024-02-15 14:17:39 -08:00 committed by Dr. Jens Harbott
parent f04c63bd47
commit ea238dc447
47 changed files with 8 additions and 3216 deletions

View File

@ -1,9 +0,0 @@
[local_phases]
unit = 'rspec spec/'
lint = 'cookstyle --display-cop-names --extra-details'
syntax = "berks install -e integration"
provision = "echo skipping"
deploy = "echo skipping"
smoke = "echo skipping"
functional = "echo skipping"
cleanup = "echo skipping"

9
.gitignore vendored
View File

@ -1,9 +0,0 @@
.bundle/
berks-cookbooks/
.kitchen
.vagrant
.coverage/
*.swp
Berksfile.lock
Vagrantfile
Gemfile.lock

View File

@ -1,4 +0,0 @@
Chef/Modernize/FoodcriticComments:
Enabled: true
Chef/Style/CopyrightCommentFormat:
Enabled: true

View File

@ -1,3 +0,0 @@
- project:
templates:
- openstack-chef-jobs

View File

@ -1,24 +0,0 @@
source 'https://supermarket.chef.io'
solver :ruby, :required
[
%w(client dep),
%w(-common dep),
%w(-compute integration),
%w(-dns integration),
%w(-identity dep),
%w(-image integration),
%w(-integration-test integration),
%w(-network integration),
%w(-ops-database integration),
%w(-ops-messaging integration),
].each do |cookbook, group|
if Dir.exist?("../cookbook-openstack#{cookbook}")
cookbook "openstack#{cookbook}", path: "../cookbook-openstack#{cookbook}", group: group
else
cookbook "openstack#{cookbook}", git: "https://opendev.org/openstack/cookbook-openstack#{cookbook}", group: group
end
end
metadata

View File

@ -1,36 +0,0 @@
Contributing
============
How To Get Started
------------------
If you would like to contribute to the development of OpenStack Chef Cookbooks,
you must follow the steps in this page:
http://docs.openstack.org/infra/manual/developers.html
Gerrit Workflow
---------------
Once those steps have been completed, changes to OpenStack
should be submitted for review via the Gerrit tool, following
the workflow documented at:
http://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Bugs
----
Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/openstack-chef
Contacts
--------
Mailing list: groups.google.com/group/opscode-chef-openstack
IRC: #openstack-chef is our channel on irc.oftc.net
Wiki: https://wiki.openstack.org/wiki/Chef/GettingStarted and https://docs.getchef.com/openstack.html
Twitter: @chefopenstack

176
LICENSE
View File

@ -1,176 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

View File

@ -1,161 +1,10 @@
OpenStack Chef Cookbook - telemetry
===================================
This project is no longer maintained.
.. image:: https://governance.openstack.org/badges/cookbook-openstack-telemetry.svg
:target: https://governance.openstack.org/reference/tags/index.html
The contents of this repository are still available in the Git
source code management system. To see the contents of this
repository before it reached its end of life, please check out the
previous commit with "git checkout HEAD^1".
Description
===========
Installs the OpenStack Metering service **Ceilometer** as well as
**Gnocchi** as the backend for Metrics as part of the OpenStack
reference deployment Chef for OpenStack. The `OpenStack chef-repo`_
contains documentation for using this cookbook in the context of a full
OpenStack deployment. Both are currently installed from packages.
.. _OpenStack chef-repo: https://opendev.org/openstack/openstack-chef
https://docs.openstack.org/ceilometer/latest/
https://gnocchi.xyz/
Requirements
============
- Chef 16 or higher
- Chef Workstation 21.10.640 for testing (also includes Berkshelf for
cookbook dependency resolution)
Platform
========
- ubuntu
- redhat
- centos
Cookbooks
=========
The following cookbooks are dependencies:
- 'apache2', '~> 8.6'
- 'openstackclient'
- 'openstack-common', '>= 20.0.0'
- 'openstack-identity', '>= 20.0.0'
Attributes
==========
Please see the extensive inline documentation in ``attributes/*.rb`` for
descriptions of all the settable attributes for this cookbook.
Note that all attributes are in the ``default['openstack']`` "namespace"
The usage of attributes to generate the ``ceilometer.conf`` and
``gnocchi`` is described in the openstack-common cookbook.
Recipes
=======
agent-central
-------------
- Installs agent central service.
agent-compute
-------------
- Installs agent compute service.
agent-notification
------------------
- Installs agent notification service.
aodh
----
- Installs aodh service
common
------
- Common metering configuration.
gnocchi_configure
-----------------
- Configure Gnocchi
gnocchi_install
---------------
- Installs and starts the Gnocchi service
identity_registration
---------------------
- Registers the endpoints, tenant and user for metering and metric
service with Keystone.
setup
-----
- Run database migrations
License and Author
==================
+-----------------+--------------------------------------------+
| **Author** | Matt Ray (matt@opscode.com) |
+-----------------+--------------------------------------------+
| **Author** | John Dewey (jdewey@att.com) |
+-----------------+--------------------------------------------+
| **Author** | Justin Shepherd (jshepher@rackspace.com) |
+-----------------+--------------------------------------------+
| **Author** | Salman Baset (sabaset@us.ibm.com) |
+-----------------+--------------------------------------------+
| **Author** | Ionut Artarisi (iartarisi@suse.cz) |
+-----------------+--------------------------------------------+
| **Author** | Eric Zhou (zyouzhou@cn.ibm.com) |
+-----------------+--------------------------------------------+
| **Author** | Chen Zhiwei (zhiwchen@cn.ibm.com) |
+-----------------+--------------------------------------------+
| **Author** | David Geng (gengjh@cn.ibm.com) |
+-----------------+--------------------------------------------+
| **Author** | Mark Vanderwiel (vanderwl@us.ibm.com) |
+-----------------+--------------------------------------------+
| **Author** | Jan Klare (j.klare@cloudbau.de) |
+-----------------+--------------------------------------------+
| **Author** | Christoph Albers (c.albers@x-ion.de) |
+-----------------+--------------------------------------------+
| **Author** | Lance Albertson (lance@osuosl.org |
+-----------------+--------------------------------------------+
+-----------------+--------------------------------------------------+
| **Copyright** | Copyright (c) 2013, Opscode, Inc. |
+-----------------+--------------------------------------------------+
| **Copyright** | Copyright (c) 2013, AT&T Services, Inc. |
+-----------------+--------------------------------------------------+
| **Copyright** | Copyright (c) 2013, Rackspace US, Inc. |
+-----------------+--------------------------------------------------+
| **Copyright** | Copyright (c) 2013-2014, IBM, Corp. |
+-----------------+--------------------------------------------------+
| **Copyright** | Copyright (c) 2013-2014, SUSE Linux GmbH |
+-----------------+--------------------------------------------------+
| **Copyright** | Copyright (c) 2019-2021, Oregon State University |
+-----------------+--------------------------------------------------+
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
::
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For any further questions, please email
openstack-discuss@lists.openstack.org or join #openstack-dev on
OFTC.

View File

@ -1,39 +0,0 @@
task default: ['test']
task test: [:syntax, :lint, :unit]
desc 'Vendor the cookbooks in the Berksfile'
task :berks_prep do
sh %(chef exec berks vendor)
end
desc 'Run FoodCritic (syntax) tests'
task :syntax do
sh %(chef exec foodcritic --exclude spec -f any .)
end
desc 'Run RuboCop (lint) tests'
task :lint do
sh %(chef exec cookstyle)
end
desc 'Run RSpec (unit) tests'
task unit: :berks_prep do
sh %(chef exec rspec --format documentation)
end
desc 'Remove the berks-cookbooks directory and the Berksfile.lock'
task :clean do
rm_rf [
'berks-cookbooks',
'Berksfile.lock',
]
end
desc 'All-in-One Neutron build Infra using Common task'
task :integration do
# Use the common integration task
sh %(wget -nv -t 3 -O Rakefile-Common https://opendev.org/openstack/cookbook-openstack-common/raw/branch/master/Rakefile)
load './Rakefile-Common'
Rake::Task['common_integration'].invoke
end

View File

@ -1,31 +0,0 @@
# Testing the Cookbook #
This cookbook uses [chefdk](https://downloads.chef.io/chef-dk/) and [berkshelf](http://berkshelf.com/) to isolate dependencies. Make sure you have chefdk and the header files for `gecode` installed before continuing. Make sure that you're using gecode version 3. More info [here](https://github.com/opscode/dep-selector-libgecode/tree/0bad63fea305ede624c58506423ced697dd2545e#using-a-system-gecode-instead). For more detailed information on what needs to be installed, you can have a quick look into the bootstrap.sh file in this repository, which does install all the needed things to get going on ubuntu trusty. The tests defined in the Rakefile include lint, style and unit. For integration testing please refere to the [openstack-chef-repo](https://github.com/openstack/openstack-chef-repo).
We have three test suites which you can run either, individually (there are three rake tasks):
$ chef exec rake lint
$ chef exec rake style
$ chef exec rake unit
or altogether:
$ chef exec rake
The `rake` tasks will take care of installing the needed cookbooks with `berkshelf`.
## Rubocop ##
[Rubocop](https://github.com/bbatsov/rubocop) is a static Ruby code analyzer, based on the community [Ruby style guide](https://github.com/bbatsov/ruby-style-guide). We are attempting to adhere to this where applicable, slowly cleaning up the cookbooks until we can turn on Rubocop for gating the commits.
## Foodcritic ##
[Foodcritic](http://acrmp.github.io/foodcritic/) is a lint tool for Chef cookbooks. We ignore the following rules:
* [FC003](http://acrmp.github.io/foodcritic/#FC003) These cookbooks are not intended for Chef Solo.
* [FC023](http://acrmp.github.io/foodcritic/#FC023) Prefer conditional attributes.
## Chefspec
[ChefSpec](https://github.com/sethvargo/chefspec) is a unit testing framework for testing Chef cookbooks. ChefSpec makes it easy to write examples and get fast feedback on cookbook changes without the need for virtual machines or cloud servers.

View File

@ -1,19 +0,0 @@
default['openstack']['aodh']['conf_secrets'] = {}
default['openstack']['aodh']['conf'].tap do |conf|
# [keystone_authtoken] section
conf['keystone_authtoken']['username'] = 'aodh'
conf['keystone_authtoken']['project_name'] = 'service'
conf['keystone_authtoken']['auth_type'] = 'v3password'
conf['keystone_authtoken']['user_domain_name'] = 'Default'
conf['keystone_authtoken']['project_domain_name'] = 'Default'
conf['keystone_authtoken']['region_name'] = node['openstack']['region']
# [service_credentials] section
conf['service_credentials']['username'] = 'aodh'
conf['service_credentials']['project_name'] = 'service'
conf['service_credentials']['user_domain_name'] = 'Default'
conf['service_credentials']['project_domain_name'] = 'Default'
conf['service_credentials']['auth_type'] = 'v3password'
conf['service_credentials']['interface'] = 'internal'
conf['service_credentials']['region_name'] = node['openstack']['region']
end

View File

@ -1,19 +0,0 @@
default['openstack']['telemetry']['conf_secrets'] = {}
default['openstack']['telemetry']['conf'].tap do |conf|
# [keystone_authtoken] section
conf['keystone_authtoken']['username'] = 'ceilometer'
conf['keystone_authtoken']['project_name'] = 'service'
conf['keystone_authtoken']['auth_type'] = 'v3password'
conf['keystone_authtoken']['user_domain_name'] = 'Default'
conf['keystone_authtoken']['project_domain_name'] = 'Default'
conf['keystone_authtoken']['region_name'] = node['openstack']['region']
# [service_credentials] section
conf['service_credentials']['username'] = 'ceilometer'
conf['service_credentials']['project_name'] = 'service'
conf['service_credentials']['user_domain_name'] = 'Default'
conf['service_credentials']['project_domain_name'] = 'Default'
conf['service_credentials']['auth_type'] = 'v3password'
conf['service_credentials']['interface'] = 'internal'
conf['service_credentials']['region_name'] = node['openstack']['region']
end

View File

@ -1,247 +0,0 @@
#
# Cookbook:: openstack-telemetry
# Recipe:: default
#
# Copyright:: 2013-2021, AT&T Services, Inc.
# Copyright:: 2013-2021, SUSE Linux GmbH
# Copyright:: 2019-2021, Oregon State University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Set to some text value if you want templated config files
# to contain a custom banner at the top of the written file
default['openstack']['telemetry']['custom_template_banner'] = '
# This file is automatically generated by Chef
# Any changes will be overwritten
'
# Set the endpoints for the telemetry services to allow all other cookbooks to
# access and use them
%w(telemetry telemetry_metric aodh).each do |ts|
%w(public internal admin).each do |ep_type|
default['openstack']['endpoints'][ep_type][ts]['host'] = '127.0.0.1'
default['openstack']['endpoints'][ep_type][ts]['scheme'] = 'http'
default['openstack']['endpoints'][ep_type][ts]['path'] = ''
default['openstack']['endpoints'][ep_type]['telemetry_metric']['port'] = 8041
default['openstack']['endpoints'][ep_type]['aodh']['port'] = 8042
# web-service (e.g. apache) listen address (can be different from openstack
# telemetry endpoints)
end
default['openstack']['bind_service']['all'][ts]['host'] = '127.0.0.1'
end
default['openstack']['bind_service']['all']['telemetry_metric']['port'] = 8041
default['openstack']['bind_service']['all']['aodh']['port'] = 8042
default['openstack']['telemetry']['conf_dir'] = '/etc/ceilometer'
default['openstack']['telemetry']['conf_file'] =
::File.join(node['openstack']['telemetry']['conf_dir'], 'ceilometer.conf')
default['openstack']['telemetry_metric']['conf_dir'] = '/etc/gnocchi'
default['openstack']['telemetry_metric']['conf_file'] =
::File.join(node['openstack']['telemetry_metric']['conf_dir'], 'gnocchi.conf')
default['openstack']['telemetry']['syslog']['use'] = false
default['openstack']['telemetry']['upgrade_opts'] = '--skip-gnocchi-resource-types'
default['openstack']['aodh']['conf_dir'] = '/etc/aodh'
default['openstack']['aodh']['conf_file'] =
::File.join(node['openstack']['aodh']['conf_dir'], 'aodh.conf')
default['openstack']['telemetry']['user'] = 'ceilometer'
default['openstack']['telemetry']['group'] = 'ceilometer'
default['openstack']['telemetry_metric']['user'] = 'gnocchi'
default['openstack']['telemetry_metric']['group'] = 'gnocchi'
default['openstack']['aodh']['user'] = 'aodh'
default['openstack']['aodh']['group'] = 'aodh'
default['openstack']['telemetry']['service_role'] = 'admin'
default['openstack']['telemetry_metric']['service_role'] = 'admin'
default['openstack']['aodh']['service_role'] = 'admin'
default['openstack']['telemetry_metric']['gnocchi-upgrade-options'] = ''
# Configuration for /etc/ceilometer/pipeline.yaml
default['openstack']['telemetry']['pipeline']['publishers'] = ['gnocchi://']
# Configuration for /etc/ceilometer/polling.yaml
default['openstack']['telemetry']['polling']['interval'] = 300
default['openstack']['telemetry']['polling']['meters'] =
%w(
cpu
cpu_l3_cache
memory.usage
network.incoming.bytes
network.incoming.packets
network.outgoing.bytes
network.outgoing.packets
disk.device.read.bytes
disk.device.read.requests
disk.device.write.bytes
disk.device.write.requests
hardware.cpu.util
hardware.memory.used
hardware.memory.total
hardware.memory.buffer
hardware.memory.cached
hardware.memory.swap.avail
hardware.memory.swap.total
hardware.system_stats.io.outgoing.blocks
hardware.system_stats.io.incoming.blocks
hardware.network.ip.incoming.datagrams
hardware.network.ip.outgoing.datagrams
)
%w(telemetry_metric aodh).each do |ts|
# specify whether to enable SSL for ceilometer API endpoint
default['openstack'][ts]['ssl']['enabled'] = false
# specify server whether to enforce client certificate requirement
default['openstack'][ts]['ssl']['cert_required'] = false
# SSL certificate, keyfile and CA certficate file locations
default['openstack'][ts]['ssl']['basedir'] = '/etc/ceilometer/ssl'
# Protocol for SSL (Apache)
default['openstack'][ts]['ssl']['protocol'] = 'All -SSLv2 -SSLv3'
# Which ciphers to use with the SSL/TLS protocol (Apache)
# Example: 'RSA:HIGH:MEDIUM:!LOW:!kEDH:!aNULL:!ADH:!eNULL:!EXP:!SSLv2:!SEED:!CAMELLIA:!PSK!RC4:!RC4-MD5:!RC4-SHA'
default['openstack'][ts]['ssl']['ciphers'] = nil
# path of the cert file for SSL.
default['openstack'][ts]['ssl']['certfile'] = "#{node['openstack'][ts]['ssl']['basedir']}/certs/sslcert.pem"
# path of the keyfile for SSL.
default['openstack'][ts]['ssl']['keyfile'] = "#{node['openstack'][ts]['ssl']['basedir']}/private/sslkey.pem"
default['openstack'][ts]['ssl']['chainfile'] = nil
# path of the CA cert file for SSL.
default['openstack'][ts]['ssl']['ca_certs'] = "#{node['openstack'][ts]['ssl']['basedir']}/certs/sslca.pem"
# path of the CA cert files for SSL (Apache)
default['openstack'][ts]['ssl']['ca_certs_path'] = "#{node['openstack'][ts]['ssl']['basedir']}/certs/"
end
case node['platform_family']
when 'rhel'
default['openstack']['telemetry']['platform'] =
case node['platform_version'].to_i
when 8
{
'common_packages' => %w(openstack-ceilometer-common),
'gnocchi_packages' => %w(openstack-gnocchi-api openstack-gnocchi-metricd),
'gnocchi-api_service' => 'openstack-gnocchi-api',
'gnocchi-metricd_service' => 'gnocchi-metricd',
'agent_central_packages' => %w(openstack-ceilometer-central),
'agent_central_service' => 'openstack-ceilometer-central',
'agent_compute_packages' => %w(openstack-ceilometer-compute),
'agent_compute_service' => 'openstack-ceilometer-compute',
'agent_notification_packages' => %w(openstack-ceilometer-collector openstack-ceilometer-notification),
'agent_notification_service' => 'openstack-ceilometer-notification',
'ceilometer-api_wsgi_file' => '/usr/lib/python3.6/site-packages/ceilometer/api/app.wsgi',
'gnocchi-api_wsgi_file' => '/usr/lib/python3.6/site-packages/gnocchi/rest/wsgi.py',
'package_overrides' => '',
}
when 7
{
'common_packages' => %w(openstack-ceilometer-common),
'gnocchi_packages' => %w(openstack-gnocchi-api openstack-gnocchi-metricd),
'gnocchi-api_service' => 'openstack-gnocchi-api',
'gnocchi-metricd_service' => 'gnocchi-metricd',
'agent_central_packages' => %w(openstack-ceilometer-central),
'agent_central_service' => 'openstack-ceilometer-central',
'agent_compute_packages' => %w(openstack-ceilometer-compute),
'agent_compute_service' => 'openstack-ceilometer-compute',
'agent_notification_packages' => %w(openstack-ceilometer-collector openstack-ceilometer-notification),
'agent_notification_service' => 'openstack-ceilometer-notification',
'ceilometer-api_wsgi_file' => '/usr/lib/python2.7/site-packages/ceilometer/api/app.wsgi',
'gnocchi-api_wsgi_file' => '/usr/lib/python2.7/site-packages/gnocchi/rest/wsgi.py',
'package_overrides' => '',
}
end
default['openstack']['aodh']['platform'] =
case node['platform_version'].to_i
when 8
{
'aodh_packages' =>
%w(
openstack-aodh-api
openstack-aodh-evaluator
openstack-aodh-expirer
openstack-aodh-listener
openstack-aodh-notifier
python3-aodhclient
),
'aodh_services' =>
%w(
openstack-aodh-evaluator
openstack-aodh-notifier
openstack-aodh-listener
),
'aodh-api_wsgi_file' => '/usr/lib/python3.6/site-packages/aodh/api/app.wsgi',
}
when 7
{
'aodh_packages' =>
%w(
openstack-aodh-api
openstack-aodh-evaluator
openstack-aodh-expirer
openstack-aodh-listener
openstack-aodh-notifier
python-aodhclient
),
'aodh_services' =>
%w(
openstack-aodh-evaluator
openstack-aodh-notifier
openstack-aodh-listener
),
'aodh-api_wsgi_file' => '/usr/lib/python2.7/site-packages/aodh/api/app.wsgi',
}
end
when 'debian'
default['openstack']['telemetry']['platform'] = {
'common_packages' => %w(ceilometer-common python3-ceilometer),
'gnocchi_packages' =>
%w(
gnocchi-api
gnocchi-common
gnocchi-metricd
python3-gnocchi
python3-gnocchiclient
),
'gnocchi-api_service' => 'gnocchi-api',
'gnocchi-metricd_service' => 'gnocchi-metricd',
'agent_central_packages' => %w(ceilometer-agent-central),
'agent_central_service' => 'ceilometer-agent-central',
'agent_compute_packages' => %w(ceilometer-agent-compute),
'agent_compute_service' => 'ceilometer-agent-compute',
'agent_notification_packages' => %w(ceilometer-agent-notification),
'agent_notification_service' => 'ceilometer-agent-notification',
'ceilometer-api_wsgi_file' => '/usr/lib/python3/dist-packages/ceilometer/api/app.wsgi',
'gnocchi-api_wsgi_file' => '/usr/lib/python3/dist-packages/gnocchi/rest/wsgi.py',
'package_overrides' => '',
}
default['openstack']['aodh']['platform'] = {
'aodh_packages' =>
%w(
aodh-api
aodh-evaluator
aodh-expirer
aodh-listener
aodh-notifier
python3-ceilometerclient
),
'aodh_services' =>
%w(
aodh-evaluator
aodh-notifier
aodh-listener
),
'aodh-api_wsgi_file' => '/usr/share/aodh/app.wsgi', # this file come with aodh-common which aodh-api depends on
}
end

View File

@ -1,15 +0,0 @@
default['openstack']['telemetry_metric']['conf_secrets'] = {}
default['openstack']['telemetry_metric']['conf'].tap do |conf|
# [keystone_authtoken] section
conf['keystone_authtoken']['username'] = 'gnocchi'
conf['keystone_authtoken']['project_name'] = 'service'
conf['keystone_authtoken']['auth_type'] = 'v3password'
conf['keystone_authtoken']['user_domain_name'] = 'Default'
conf['keystone_authtoken']['project_domain_name'] = 'Default'
conf['keystone_authtoken']['region_name'] = node['openstack']['region']
conf['storage']['driver'] = 'file'
if node['openstack']['telemetry_metric']['conf']['storage']['driver'] == 'file'
conf['storage']['file_basepath'] = '/var/lib/gnocchi'
end
end

View File

@ -1,31 +0,0 @@
[pipeline:main]
pipeline = gnocchi+auth
[composite:gnocchi+noauth]
use = egg:Paste#urlmap
/ = gnocchiversions
/v1 = gnocchiv1
[composite:gnocchi+auth]
use = egg:Paste#urlmap
/ = gnocchiversions
/v1 = gnocchiv1+auth
[pipeline:gnocchiv1+auth]
pipeline = keystone_authtoken gnocchiv1
[app:gnocchiversions]
paste.app_factory = gnocchi.rest.app:app_factory
root = gnocchi.rest.VersionsController
[app:gnocchiv1]
paste.app_factory = gnocchi.rest.app:app_factory
root = gnocchi.rest.V1Controller
[filter:keystone_authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
oslo_config_project = gnocchi
[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = gnocchi

View File

@ -1,3 +0,0 @@
---
sources: []
sinks: []

View File

@ -1,213 +0,0 @@
---
resources:
- resource_type: identity
archive_policy: low
metrics:
- 'identity.authenticate.success'
- 'identity.authenticate.pending'
- 'identity.authenticate.failure'
- 'identity.user.created'
- 'identity.user.deleted'
- 'identity.user.updated'
- 'identity.group.created'
- 'identity.group.deleted'
- 'identity.group.updated'
- 'identity.role.created'
- 'identity.role.deleted'
- 'identity.role.updated'
- 'identity.project.created'
- 'identity.project.deleted'
- 'identity.project.updated'
- 'identity.trust.created'
- 'identity.trust.deleted'
- 'identity.role_assignment.created'
- 'identity.role_assignment.deleted'
- resource_type: ceph_account
metrics:
- 'radosgw.objects'
- 'radosgw.objects.size'
- 'radosgw.objects.containers'
- 'radosgw.api.request'
- 'radosgw.containers.objects'
- 'radosgw.containers.objects.size'
- resource_type: instance
metrics:
- 'instance'
- 'memory'
- 'memory.usage'
- 'memory.resident'
- 'vcpus'
- 'cpu'
- 'cpu.delta'
- 'cpu_util'
- 'disk.root.size'
- 'disk.ephemeral.size'
- 'disk.read.requests'
- 'disk.read.requests.rate'
- 'disk.write.requests'
- 'disk.write.requests.rate'
- 'disk.read.bytes'
- 'disk.read.bytes.rate'
- 'disk.write.bytes'
- 'disk.write.bytes.rate'
- 'disk.latency'
- 'disk.iops'
- 'disk.capacity'
- 'disk.allocation'
- 'disk.usage'
attributes:
host: resource_metadata.host
image_ref: resource_metadata.image_ref
display_name: resource_metadata.display_name
flavor_id: resource_metadata.(instance_flavor_id|(flavor.id))
server_group: resource_metadata.user_metadata.server_group
- resource_type: instance_network_interface
metrics:
- 'network.outgoing.packets.rate'
- 'network.incoming.packets.rate'
- 'network.outgoing.packets'
- 'network.incoming.packets'
- 'network.outgoing.bytes.rate'
- 'network.incoming.bytes.rate'
- 'network.outgoing.bytes'
- 'network.incoming.bytes'
attributes:
name: resource_metadata.vnic_name
instance_id: resource_metadata.instance_id
- resource_type: instance_disk
metrics:
- 'disk.device.read.requests'
- 'disk.device.read.requests.rate'
- 'disk.device.write.requests'
- 'disk.device.write.requests.rate'
- 'disk.device.read.bytes'
- 'disk.device.read.bytes.rate'
- 'disk.device.write.bytes'
- 'disk.device.write.bytes.rate'
- 'disk.device.latency'
- 'disk.device.iops'
- 'disk.device.capacity'
- 'disk.device.allocation'
- 'disk.device.usage'
attributes:
name: resource_metadata.disk_name
instance_id: resource_metadata.instance_id
- resource_type: image
metrics:
- 'image'
- 'image.size'
- 'image.download'
- 'image.serve'
attributes:
name: resource_metadata.name
container_format: resource_metadata.container_format
disk_format: resource_metadata.disk_format
- resource_type: ipmi
metrics:
- 'hardware.ipmi.node.power'
- 'hardware.ipmi.node.temperature'
- 'hardware.ipmi.node.inlet_temperature'
- 'hardware.ipmi.node.outlet_temperature'
- 'hardware.ipmi.node.fan'
- 'hardware.ipmi.node.current'
- 'hardware.ipmi.node.voltage'
- 'hardware.ipmi.node.airflow'
- 'hardware.ipmi.node.cups'
- 'hardware.ipmi.node.cpu_util'
- 'hardware.ipmi.node.mem_util'
- 'hardware.ipmi.node.io_util'
- resource_type: network
metrics:
- 'bandwidth'
- 'network'
- 'network.create'
- 'network.update'
- 'subnet'
- 'subnet.create'
- 'subnet.update'
- 'port'
- 'port.create'
- 'port.update'
- 'router'
- 'router.create'
- 'router.update'
- 'ip.floating'
- 'ip.floating.create'
- 'ip.floating.update'
- resource_type: stack
metrics:
- 'stack.create'
- 'stack.update'
- 'stack.delete'
- 'stack.resume'
- 'stack.suspend'
- resource_type: swift_account
metrics:
- 'storage.objects.incoming.bytes'
- 'storage.objects.outgoing.bytes'
- 'storage.api.request'
- 'storage.objects.size'
- 'storage.objects'
- 'storage.objects.containers'
- 'storage.containers.objects'
- 'storage.containers.objects.size'
- resource_type: volume
metrics:
- 'volume'
- 'volume.size'
- 'volume.create'
- 'volume.delete'
- 'volume.update'
- 'volume.resize'
- 'volume.attach'
- 'volume.detach'
attributes:
display_name: resource_metadata.display_name
- resource_type: host
metrics:
- 'hardware.cpu.load.1min'
- 'hardware.cpu.load.5min'
- 'hardware.cpu.load.15min'
- 'hardware.cpu.util'
- 'hardware.memory.total'
- 'hardware.memory.used'
- 'hardware.memory.swap.total'
- 'hardware.memory.swap.avail'
- 'hardware.memory.buffer'
- 'hardware.memory.cached'
- 'hardware.network.ip.outgoing.datagrams'
- 'hardware.network.ip.incoming.datagrams'
- 'hardware.system_stats.cpu.idle'
- 'hardware.system_stats.io.outgoing.blocks'
- 'hardware.system_stats.io.incoming.blocks'
attributes:
host_name: resource_metadata.resource_url
- resource_type: host_disk
metrics:
- 'hardware.disk.size.total'
- 'hardware.disk.size.used'
attributes:
host_name: resource_metadata.resource_url
device_name: resource_metadata.device
- resource_type: host_network_interface
metrics:
- 'hardware.network.incoming.bytes'
- 'hardware.network.outgoing.bytes'
- 'hardware.network.outgoing.errors'
attributes:
host_name: resource_metadata.resource_url
device_name: resource_metadata.name

View File

@ -1,19 +0,0 @@
name 'openstack-telemetry'
maintainer 'openstack-chef'
maintainer_email 'openstack-discuss@lists.openstack.org'
license 'Apache-2.0'
description 'The OpenStack Metering service Ceilometer.'
version '20.0.0'
%w(ubuntu redhat centos).each do |os|
supports os
end
depends 'apache2', '~> 8.6'
depends 'openstackclient'
depends 'openstack-common', '>= 20.0.0'
depends 'openstack-identity', '>= 20.0.0'
issues_url 'https://launchpad.net/openstack-chef'
source_url 'https://opendev.org/openstack/cookbook-openstack-telemetry'
chef_version '>= 16.0'

View File

@ -1,36 +0,0 @@
#
# Cookbook:: openstack-telemetry
# Recipe:: agent-central
#
# Copyright:: 2013-2021, AT&T Services, Inc.
# Copyright:: 2013-2021, SUSE Linux GmbH
# Copyright:: 2019-2021, Oregon State University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'openstack-telemetry::common'
platform = node['openstack']['telemetry']['platform']
package platform['agent_central_packages'] do
options platform['package_overrides']
action :upgrade
end
service 'ceilometer-agent-central' do
service_name platform['agent_central_service']
subscribes :restart, "template[#{node['openstack']['telemetry']['conf_file']}]"
subscribes :restart, "template[#{::File.join(node['openstack']['telemetry']['conf_dir'], 'pipeline.yaml')}]"
subscribes :restart, "template[#{::File.join(node['openstack']['telemetry']['conf_dir'], 'polling.yaml')}]"
action [:enable, :start]
end

View File

@ -1,36 +0,0 @@
#
# Cookbook:: openstack-telemetry
# Recipe:: agent-compute
#
# Copyright:: 2013-2021, AT&T Services, Inc.
# Copyright:: 2013-2021, SUSE Linux GmbH
# Copyright:: 2019-2021, Oregon State University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'openstack-telemetry::common'
platform = node['openstack']['telemetry']['platform']
package platform['agent_compute_packages'] do
options platform['package_overrides']
action :upgrade
end
service 'ceilometer-agent-compute' do
service_name platform['agent_compute_service']
subscribes :restart, "template[#{node['openstack']['telemetry']['conf_file']}]"
subscribes :restart, "template[#{::File.join(node['openstack']['telemetry']['conf_dir'], 'pipeline.yaml')}]"
subscribes :restart, "template[#{::File.join(node['openstack']['telemetry']['conf_dir'], 'polling.yaml')}]"
action [:enable, :start]
end

View File

@ -1,35 +0,0 @@
#
# Cookbook:: openstack-telemetry
# Recipe:: agent-notification
#
# Copyright:: 2014-2021, IBM Corp.
# Copyright:: 2019-2021, Oregon State University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'openstack-telemetry::common'
platform = node['openstack']['telemetry']['platform']
package platform['agent_notification_packages'] do
options platform['package_overrides']
action :upgrade
end
service 'ceilometer-agent-notification' do
service_name platform['agent_notification_service']
subscribes :restart, "template[#{node['openstack']['telemetry']['conf_file']}]"
subscribes :restart, "template[#{::File.join(node['openstack']['telemetry']['conf_dir'], 'pipeline.yaml')}]"
subscribes :restart, "template[#{::File.join(node['openstack']['telemetry']['conf_dir'], 'polling.yaml')}]"
action [:enable, :start]
end

View File

@ -1,160 +0,0 @@
#
# Cookbook:: openstack-telemetry
# Recipe:: aodh
#
# Copyright:: 2019-2021, Oregon State University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# load the methods defined in cookbook-openstack-common libraries
class ::Chef::Recipe
include ::Openstack
include Apache2::Cookbook::Helpers
end
include_recipe 'openstack-telemetry::common'
platform = node['openstack']['aodh']['platform']
package platform['aodh_packages'] do
options platform['package_overrides']
action :upgrade
end
if node['openstack']['mq']['service_type'] == 'rabbit'
node.default['openstack']['aodh']['conf_secrets']['DEFAULT']['transport_url'] = rabbit_transport_url 'aodh'
end
db_user = node['openstack']['db']['aodh']['username']
db_pass = get_password 'db', 'aodh'
bind_service = node['openstack']['bind_service']['all']['aodh']
bind_service_address = bind_address bind_service
node.default['openstack']['aodh']['conf_secrets'].tap do |conf_secrets|
conf_secrets['database']['connection'] =
db_uri('aodh', db_user, db_pass)
conf_secrets['service_credentials']['password'] =
get_password 'service', 'openstack-aodh'
conf_secrets['keystone_authtoken']['password'] =
get_password 'service', 'openstack-aodh'
end
identity_public_endpoint = public_endpoint 'identity'
auth_url = identity_public_endpoint.to_s
node.default['openstack']['aodh']['conf'].tap do |conf|
conf['api']['host'] = bind_service_address
conf['api']['port'] = bind_service['port']
conf['keystone_authtoken']['auth_url'] = auth_url
conf['service_credentials']['auth_url'] = auth_url
conf['keystone_authtoken']['memcache_servers'] = memcached_servers.join ','
end
directory node['openstack']['aodh']['conf_dir'] do
owner node['openstack']['aodh']['user']
group node['openstack']['aodh']['group']
mode '750'
end
# merge all config options and secrets to be used in the aodh.conf
aodh_conf_options = merge_config_options 'aodh'
template node['openstack']['aodh']['conf_file'] do
source 'openstack-service.conf.erb'
cookbook 'openstack-common'
owner node['openstack']['aodh']['user']
group node['openstack']['aodh']['group']
mode '640'
sensitive true
variables(
service_config: aodh_conf_options
)
notifies :restart, 'service[apache2]'
end
execute 'run aodh-dbsync' do
command 'aodh-dbsync '
user node['openstack']['aodh']['user']
group node['openstack']['aodh']['group']
end
#### Start of Apache specific work
# Finds and appends the listen port to the apache2_install[openstack]
# resource which is defined in openstack-identity::server-apache.
apache_resource = find_resource(:apache2_install, 'openstack')
if apache_resource
apache_resource.listen = [apache_resource.listen, "#{bind_service['host']}:#{bind_service['port']}"].flatten
else
apache2_install 'openstack' do
listen "#{bind_service['host']}:#{bind_service['port']}"
end
end
apache2_mod_wsgi 'aodh'
apache2_module 'ssl' if node['openstack']['aodh']['ssl']['enabled']
# create the aodh-api apache directory
aodh_apache_dir = "#{default_docroot_dir}/aodh"
directory aodh_apache_dir do
owner 'root'
group 'root'
mode '755'
end
aodh_server_entry = "#{aodh_apache_dir}/app"
# NOTE: Using lazy here as the wsgi file is not available until after
# the aodh-common package is installed during execution phase.
file aodh_server_entry do
content lazy { IO.read(platform['aodh-api_wsgi_file']) }
owner 'root'
group 'root'
mode '755'
end
template "#{apache_dir}/sites-available/aodh-api.conf" do
extend Apache2::Cookbook::Helpers
source 'wsgi-template.conf.erb'
variables(
daemon_process: 'aodh-api',
server_host: bind_service['host'],
server_port: bind_service['port'],
server_entry: aodh_server_entry,
run_dir: lock_dir,
log_dir: default_log_dir,
user: node['openstack']['aodh']['user'],
group: node['openstack']['aodh']['group'],
use_ssl: node['openstack']['aodh']['ssl']['enabled'],
cert_file: node['openstack']['aodh']['ssl']['certfile'],
chain_file: node['openstack']['aodh']['ssl']['chainfile'],
key_file: node['openstack']['aodh']['ssl']['keyfile'],
ca_certs_path: node['openstack']['aodh']['ssl']['ca_certs_path'],
cert_required: node['openstack']['aodh']['ssl']['cert_required'],
protocol: node['openstack']['aodh']['ssl']['protocol'],
ciphers: node['openstack']['aodh']['ssl']['ciphers']
)
notifies :restart, 'service[apache2]'
end
apache2_site 'aodh-api' do
notifies :restart, 'service[apache2]', :immediately
end
platform['aodh_services'].each do |aodh_service|
service aodh_service do
service_name aodh_service
subscribes :restart, "template[#{node['openstack']['aodh']['conf_file']}]"
action [:enable, :start]
end
end

View File

@ -1,129 +0,0 @@
#
# Cookbook:: openstack-telemetry
# Recipe:: common
#
# Copyright:: 2013-2021, AT&T Services, Inc.
# Copyright:: 2013-2021, Craig Tracey <craigtracey@gmail.com>
# Copyright:: 2013-2021, SUSE Linux GmbH
# Copyright:: 2019-2021, Oregon State University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
include Apache2::Cookbook::Helpers
end
if node['openstack']['telemetry']['syslog']['use']
include_recipe 'openstack-common::logging'
end
platform = node['openstack']['telemetry']['platform']
db_type = node['openstack']['db']['telemetry']['service_type']
package node['openstack']['db']['python_packages'][db_type] do
action :upgrade
end
package platform['common_packages'] do
options platform['package_overrides']
action :upgrade
end
if node['openstack']['mq']['service_type'] == 'rabbit'
node.default['openstack']['telemetry']['conf_secrets']['DEFAULT']['transport_url'] =
rabbit_transport_url 'telemetry'
end
db_user = node['openstack']['db']['telemetry']['username']
db_pass = get_password 'db', 'ceilometer'
# define secrets that are needed in the ceilometer.conf
node.default['openstack']['telemetry']['conf_secrets'].tap do |conf_secrets|
conf_secrets['database']['connection'] =
db_uri('telemetry', db_user, db_pass)
conf_secrets['service_credentials']['password'] =
get_password 'service', 'openstack-telemetry'
conf_secrets['keystone_authtoken']['password'] =
get_password 'service', 'openstack-telemetry'
end
identity_endpoint = public_endpoint 'identity'
auth_url = identity_endpoint.to_s
node.default['openstack']['telemetry']['conf'].tap do |conf|
conf['keystone_authtoken']['auth_url'] = auth_url
conf['service_credentials']['auth_url'] = auth_url
conf['dispatcher_gnocchi']['url'] = public_endpoint 'telemetry_metric'
conf['dispatcher_gnocchi']['filter_project'] = 'service'
end
directory node['openstack']['telemetry']['conf_dir'] do
owner node['openstack']['telemetry']['user']
group node['openstack']['telemetry']['group']
mode '750'
end
directory "#{lock_dir}/ceilometer" do
owner node['openstack']['telemetry']['user']
group node['openstack']['telemetry']['group']
mode '750'
recursive true
end
# merge all config options and secrets to be used in the ceilometer.conf
ceilometer_conf_options = merge_config_options 'telemetry'
# service['apache2'] is defined in the apache2_default_install resource
# but other resources are currently unable to reference it. To work
# around this issue, define the following helper in your cookbook:
service 'apache2' do
extend Apache2::Cookbook::Helpers
service_name lazy { apache_platform_service_name }
supports restart: true, status: true, reload: true
action :nothing
end
template node['openstack']['telemetry']['conf_file'] do
source 'openstack-service.conf.erb'
cookbook 'openstack-common'
owner node['openstack']['telemetry']['user']
group node['openstack']['telemetry']['group']
mode '640'
sensitive true
variables(
service_config: ceilometer_conf_options
)
end
template ::File.join(node['openstack']['telemetry']['conf_dir'], 'pipeline.yaml') do
source 'pipeline.yaml.erb'
owner node['openstack']['telemetry']['user']
group node['openstack']['telemetry']['group']
mode '640'
variables(
publishers: node['openstack']['telemetry']['pipeline']['publishers']
)
end
template ::File.join(node['openstack']['telemetry']['conf_dir'], 'polling.yaml') do
source 'polling.yaml.erb'
owner node['openstack']['telemetry']['user']
group node['openstack']['telemetry']['group']
mode '640'
variables(
interval: node['openstack']['telemetry']['polling']['interval'],
meters: node['openstack']['telemetry']['polling']['meters']
)
end

View File

@ -1,184 +0,0 @@
#
# Cookbook:: openstack-telemetry
# Recipe:: gnocchi_configure
#
# Copyright:: 2019-2021, Oregon State University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
class ::